Commit ed90faa5 by jiang'yun

修改

parent bf008b72
......@@ -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();
})
......
......@@ -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":
......
......@@ -22,5 +22,10 @@ public class CommonParam {
//钻具组合
private String zjzh;
/**
* 距离
*/
private Double jl=1000.00;
}
......@@ -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){
......
......@@ -200,10 +200,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where 1=1
<if test="jdhzb!=null">
and ABS(#{jdhzb} - a.jdhzb) &lt; 1000
and ABS(#{jdhzb} - a.jdhzb) &lt; #{jl}
</if>
<if test="jdzzb!=null">
AND ABS(#{jdzzb} - a.jdzzb) &lt; 1000
AND ABS(#{jdzzb} - a.jdzzb) &lt; #{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) &lt; 1000
and ABS(#{jdhzb} - a.jdhzb) &lt; #{jl}
</if>
<if test="jdzzb!=null">
AND ABS(#{jdzzb} - a.jdzzb) &lt; 1000
AND ABS(#{jdzzb} - a.jdzzb) &lt; #{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')&lt;=#{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) &lt; 1000
and ABS(#{jdhzb} - a.jdhzb) &lt; #{jl}
</if>
<if test="jdzzb!=null">
AND ABS(#{jdzzb} - a.jdzzb) &lt; 1000
AND ABS(#{jdzzb} - a.jdzzb) &lt; #{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')&lt;=#{wjsjjs}
</if>
<if test="jh!=null and jh!=''">
and a.jh = #{jh}
</if>
order by kc, jh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment