Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zjsgfa_mysql
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jiangyun
zjsgfa_mysql
Commits
ed90faa5
Commit
ed90faa5
authored
Jun 24, 2025
by
jiang'yun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
bf008b72
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
18 deletions
+44
-18
src/main/java/com/ruoyi/framework/config/SecurityConfig.java
+1
-1
src/main/java/com/ruoyi/project/zt/controller/DjdcController.java
+6
-4
src/main/java/com/ruoyi/project/zt/domian/CommonParam.java
+5
-0
src/main/java/com/ruoyi/project/zt/service/impl/DjdcServiceImpl.java
+24
-1
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
+8
-12
No files found.
src/main/java/com/ruoyi/framework/config/SecurityConfig.java
View file @
ed90faa5
...
...
@@ -114,7 +114,7 @@ public class SecurityConfig
requests
.
antMatchers
(
"/login"
,
"/register"
,
"/captchaImage"
).
permitAll
()
// 静态资源,可匿名访问
.
antMatchers
(
HttpMethod
.
GET
,
"/"
,
"/*.html"
,
"/**/*.html"
,
"/**/*.css"
,
"/**/*.js"
,
"/profile/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
).
permitAll
()
.
antMatchers
(
"/swagger-ui.html"
,
"/swagger-resources/**"
,
"/webjars/**"
,
"/*/api-docs"
,
"/druid/**"
,
"/djdc/**"
).
permitAll
()
// 除上面外的所有请求全部需要鉴权认证
.
anyRequest
().
authenticated
();
})
...
...
src/main/java/com/ruoyi/project/zt/controller/DjdcController.java
View file @
ed90faa5
...
...
@@ -42,6 +42,8 @@ public class DjdcController {
/**
* 获取井基础信息
*/
...
...
@@ -65,12 +67,12 @@ public class DjdcController {
map
.
put
(
"zb"
,
"指标"
);
List
<
Djjc
>
djjcList
=
djdcService
.
getDjjcList
(
param
);
AjaxResult
success
=
AjaxResult
.
success
(
djjcList
,
map
);
Gson
gson
=
new
GsonBuilder
().
setPrettyPrinting
().
create
();
//
Gson gson = new GsonBuilder().setPrettyPrinting().create();
// 将实体对象转换为JSON字符串
String
json
=
gson
.
toJson
(
success
);
String
convert
=
JsonToMarkdown
.
convert
(
json
);
System
.
out
.
println
(
convert
);
//
String json = gson.toJson(success);
//
String convert = JsonToMarkdown.convert(json);
//
System.out.println(convert);
return
success
;
case
"getZqshfxList"
:
...
...
src/main/java/com/ruoyi/project/zt/domian/CommonParam.java
View file @
ed90faa5
...
...
@@ -22,5 +22,10 @@ public class CommonParam {
//钻具组合
private
String
zjzh
;
/**
* 距离
*/
private
Double
jl
=
1000.00
;
}
src/main/java/com/ruoyi/project/zt/service/impl/DjdcServiceImpl.java
View file @
ed90faa5
...
...
@@ -2,6 +2,8 @@ package com.ruoyi.project.zt.service.impl;
import
cn.hutool.http.HttpRequest
;
import
com.google.gson.*
;
import
com.ruoyi.framework.aspectj.lang.annotation.DataSource
;
import
com.ruoyi.framework.aspectj.lang.enums.DataSourceType
;
import
com.ruoyi.project.zt.domian.*
;
import
com.ruoyi.project.zt.mapper.DjdcInfoMapper
;
import
com.ruoyi.project.zt.mapper.JstaMapper
;
...
...
@@ -16,6 +18,7 @@ import java.util.*;
import
java.util.stream.Collectors
;
@Service
@DataSource
(
value
=
DataSourceType
.
SLAVE
)
public
class
DjdcServiceImpl
implements
DjdcService
{
@Autowired
...
...
@@ -177,7 +180,17 @@ public class DjdcServiceImpl implements DjdcService {
@Override
public
List
<
DjZqsjfx
>
getZqshfxList
(
CommonParam
param
)
{
//查询临井
if
(
StringUtils
.
isNotEmpty
(
param
.
getJh
())){
Djjc
djjc
=
djdcInfoMapper
.
getDjinfoByjh
(
param
.
getJh
());
if
(
djjc
==
null
){
return
new
ArrayList
<>();
}
else
{
param
.
setJdhzb
(
djjc
.
getJdhzb
());
param
.
setJdzzb
(
djjc
.
getJdzzb
());
}
}
List
<
DjZqsjfx
>
list
=
djdcInfoMapper
.
getZqshfxList
(
param
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
for
(
DjZqsjfx
item:
list
){
//查询进尺和层位
DjZqsjfx
djZqsjfx
=
djdcInfoMapper
.
getJcAndCw
(
item
);
...
...
@@ -208,7 +221,8 @@ public class DjdcServiceImpl implements DjdcService {
}
item
.
setZjzq
(
zjzq
);
item
.
setZwzq
(
zwzq
);
item
.
setZjsl
(
item
.
getJc
()/
item
.
getZjzq
());
Double
zjsl
=
item
.
getJc
()/
item
.
getZjzq
();
item
.
setZjsl
(
Double
.
parseDouble
(
df
.
format
(
zjsl
)));
//查询钻井日志
Jswa
jswa
=
new
Jswa
();
jswa
.
setJh
(
item
.
getJh
());
...
...
@@ -238,6 +252,15 @@ public class DjdcServiceImpl implements DjdcService {
@Override
public
List
<
DjZjzhfx
>
getZjzhfxList
(
CommonParam
param
)
{
if
(
StringUtils
.
isNotEmpty
(
param
.
getJh
())){
Djjc
djjc
=
djdcInfoMapper
.
getDjinfoByjh
(
param
.
getJh
());
if
(
djjc
==
null
){
return
new
ArrayList
<>();
}
else
{
param
.
setJdhzb
(
djjc
.
getJdhzb
());
param
.
setJdzzb
(
djjc
.
getJdzzb
());
}
}
List
<
DjZjzhfx
>
list
=
djdcInfoMapper
.
getZjzhfxList
(
param
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.00"
);
for
(
DjZjzhfx
item:
list
){
...
...
src/main/resources/mybatis/zt/DjdcInfoMapper.xml
View file @
ed90faa5
...
...
@@ -200,10 +200,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if
test=
"jdhzb!=null"
>
and ABS(#{jdhzb} - a.jdhzb)
<
1000
and ABS(#{jdhzb} - a.jdhzb)
<
#{jl}
</if>
<if
test=
"jdzzb!=null"
>
AND ABS(#{jdzzb} - a.jdzzb)
<
1000
AND ABS(#{jdzzb} - a.jdzzb)
<
#{jl}
</if>
<if
test=
"wjsjks!=null and wjsjks!=''"
>
and to_char(b.WJRQ,'YYYY-MM-DD')>=#{wjsjks}
...
...
@@ -232,10 +232,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if
test=
"jdhzb!=null"
>
and ABS(#{jdhzb} - a.jdhzb)
<
1000
and ABS(#{jdhzb} - a.jdhzb)
<
#{jl}
</if>
<if
test=
"jdzzb!=null"
>
AND ABS(#{jdzzb} - a.jdzzb)
<
1000
AND ABS(#{jdzzb} - a.jdzzb)
<
#{jl}
</if>
<if
test=
"wjsjks!=null and wjsjks!=''"
>
and to_char(b.WJRQ,'YYYY-MM-DD')>=#{wjsjks}
...
...
@@ -243,9 +243,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"wjsjjs!=null and wjsjjs!=''"
>
and to_char(b.WJRQ,'YYYY-MM-DD')
<
=#{wjsjjs}
</if>
<if
test=
"jh!=null and jh!=''"
>
and a.jh = #{jh}
</if>
order by kc,jh
</select>
...
...
@@ -288,10 +286,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join HHZJJS.JSFA d on a.JH=d.JH and c.kc=d.XH
where 1 = 1
<if
test=
"jdhzb!=null"
>
and ABS(#{jdhzb} - a.jdhzb)
<
1000
and ABS(#{jdhzb} - a.jdhzb)
<
#{jl}
</if>
<if
test=
"jdzzb!=null"
>
AND ABS(#{jdzzb} - a.jdzzb)
<
1000
AND ABS(#{jdzzb} - a.jdzzb)
<
#{jl}
</if>
<if
test=
"wjsjks!=null and wjsjks!=''"
>
and to_char(b.WJRQ,'YYYY-MM-DD')>=#{wjsjks}
...
...
@@ -299,9 +297,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"wjsjjs!=null and wjsjjs!=''"
>
and to_char(b.WJRQ,'YYYY-MM-DD')
<
=#{wjsjjs}
</if>
<if
test=
"jh!=null and jh!=''"
>
and a.jh = #{jh}
</if>
order by kc, jh
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment