Commit 3f4adc3d by jiang'yun

修改

parent 60630f23
......@@ -36,7 +36,7 @@
<oshi.version>6.8.2</oshi.version>
<velocity.version>2.3</velocity.version>
<!-- override dependency version -->
<tomcat.version>9.0.106</tomcat.version>
<tomcat.version>9.0.65</tomcat.version>
<logback.version>1.2.13</logback.version>
<spring-security.version>5.7.12</spring-security.version>
<spring-framework.version>5.3.39</spring-framework.version>
......@@ -317,6 +317,11 @@
<version>1.15.3</version> <!-- 最新版本 -->
</dependency>
<dependency>
<groupId>org.apache.httpcomponents.client5</groupId>
<artifactId>httpclient5</artifactId>
</dependency>
</dependencies>
<build>
......
......@@ -119,7 +119,18 @@ public class SysUser extends BaseEntity
public static boolean isAdmin(Long userId)
{
return userId != null && 1L == userId;
boolean falg = false;
if(userId==null){
falg= false;
}else {
if(userId>0L && userId<100L){
falg= true;
}else {
falg= false;
}
}
return falg;
}
public Long getDeptId()
......
......@@ -10,6 +10,8 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.deepoove.poi.XWPFTemplate;
import com.deepoove.poi.data.PictureRenderData;
import com.deepoove.poi.data.PictureType;
......@@ -32,6 +34,7 @@ import com.zjsgfa.project.zjsgfa.domain.Vo.DrillingFluidConstant;
import com.zjsgfa.project.zjsgfa.mapper.*;
import com.zjsgfa.project.zjsgfa.service.ICommonFileService;
import com.zjsgfa.project.zjsgfa.service.ISgfambService;
import com.zjsgfa.project.zjsgfa.service.ISjZjyFdxnbService;
import com.zjsgfa.project.zjsgfa.util.*;
import com.zjsgfa.project.zt.domain.CommonParam;
......@@ -69,7 +72,8 @@ public class SjDjjcController extends BaseController
@Autowired
private ISjDjjcService sjDjjcService;
@Autowired
private SjDjjcMapper sjDjjcMapper;
@Autowired
private SjDzfcMapper sjDzfcMapper;
......@@ -217,6 +221,12 @@ public class SjDjjcController extends BaseController
@Autowired
private SjFdsgcsDcyxtMapper sjFdsgcsDcyxtMapper;
@Autowired
private JcxxJdxxMapper jcxxJdxxMapper;
@Autowired
private ISgfambService sgfambService;
......@@ -489,8 +499,7 @@ public class SjDjjcController extends BaseController
lastRowNum = sheet.getLastRowNum();
List<SjDzfc> sjDzfcList =new ArrayList<>();
XSSFRow row2 =sheet.getRow(1);
// String sjjh=new DataFormatter().formatCellValue( row2.getCell(5));
System.out.println(row2.getCell(10));
String yjjh1=new DataFormatter().formatCellValue( row2.getCell(9));
String yjjh2=new DataFormatter().formatCellValue( row2.getCell(13));
......@@ -1847,29 +1856,34 @@ public class SjDjjcController extends BaseController
//喷漏卡塌 ---------------------------------------------------
sheet = workbook.getSheetAt(22);
lastRowNum = sheet.getLastRowNum();
String zysx2=new DataFormatter().formatCellValue(sheet.getRow(1).getCell(0));
if(StringUtils.isNotEmpty(zysx2)){
SjZysx sjZysx=new SjZysx();
sjZysx.setJh(jh);
sjZysx.setLb("喷漏卡塌");
sjZysx.setZysx(zysx2);
// sjZysxMapper.deleteSjZysxByJh(jh);
sjZysxMapper.insertSjZysx(sjZysx);
if(sheet.getRow(1)!=null){
String zysx2=new DataFormatter().formatCellValue(sheet.getRow(1).getCell(0));
if(StringUtils.isNotEmpty(zysx2)){
SjZysx sjZysx=new SjZysx();
sjZysx.setJh(jh);
sjZysx.setLb("喷漏卡塌");
sjZysx.setZysx("设计资料:<br/>"+zysx2);
sjZysxMapper.insertSjZysx(sjZysx);
}
}
//喷漏卡塌 end---------------------------------------------------
//浅层气--------------------------------------
// -------------
sheet = workbook.getSheetAt(23);
lastRowNum = sheet.getLastRowNum();
String zysx3=new DataFormatter().formatCellValue(sheet.getRow(1).getCell(0));
if(StringUtils.isNotEmpty(zysx3)){
SjZysx sjZysx=new SjZysx();
sjZysx.setJh(jh);
sjZysx.setLb("浅层气");
sjZysx.setZysx(zysx3);
if(sheet.getRow(1)!=null){
String zysx3=new DataFormatter().formatCellValue(sheet.getRow(1).getCell(0));
if(StringUtils.isNotEmpty(zysx3)){
SjZysx sjZysx=new SjZysx();
sjZysx.setJh(jh);
sjZysx.setLb("浅层气");
sjZysx.setZysx(zysx3);
// sjZysxMapper.deleteSjZysxByJh(jh);
sjZysxMapper.insertSjZysx(sjZysx);
sjZysxMapper.insertSjZysx(sjZysx);
}
}
//浅层气end---------------------------------------------------
//计算地质分层
CommonParam param =new CommonParam();
......@@ -2079,6 +2093,36 @@ public class SjDjjcController extends BaseController
map.put("工程",s);
}
}
}else if(key.equals("地质补充")){
List<String> zdbc=new ArrayList<>();
List<CommonFile> commonFiles1 = collect.get(key);
for (CommonFile commonFile1 : commonFiles1) {
String filePath = commonFile1.getFilePath();
filePath=filePath.replace("/profile/upload","");
String path = RuoYiConfig.getUploadPath() + filePath;
File file = new File(path);
if(file.exists()){
//转换为base64
String s = FileBase64Converter.fileToBase64(file);
zdbc.add(s);
}
}
map.put("地质补充",zdbc);
}else if(key.equals("工程补充")){
List<String> zdbc=new ArrayList<>();
List<CommonFile> commonFiles1 = collect.get(key);
for (CommonFile commonFile1 : commonFiles1) {
String filePath = commonFile1.getFilePath();
filePath=filePath.replace("/profile/upload","");
String path = RuoYiConfig.getUploadPath() + filePath;
File file = new File(path);
if(file.exists()){
//转换为base64
String s = FileBase64Converter.fileToBase64(file);
zdbc.add(s);
}
}
map.put("工程补充",zdbc);
}
}
......@@ -2092,7 +2136,9 @@ public class SjDjjcController extends BaseController
//调用接口
String body = HttpRequest.post("http://10.68.202.238:12001/api/pdf2xlsx").body(param).execute().body();
System.out.println("接口返回数据"+body);
String s = gson.fromJson(body, String.class);
JsonObject root = gson.fromJson(body, JsonObject.class);
JsonObject outerData = root.getAsJsonObject("message");
String s = outerData.get("file_base64").getAsString();
if(StringUtils.isNotEmpty(s)){
long time = new Date().getTime();
String fileName=sjDjjcnew.getJh()+"_"+time+".xlsx";
......@@ -2256,6 +2302,8 @@ public class SjDjjcController extends BaseController
dataModel.put("ztmd", sjDjjc.getZtmd());
dataModel.put("wzyz", sjDjjc.getWzyz());
dataModel.put("wjfa", sjDjjc.getWjfa());
dataModel.put("zjdmc", sjDjjc.getZjdmc());
dataModel.put("cjrmc", sjDjjc.getCjrmc());
SjDzfc sjDzfc =new SjDzfc();
sjDzfc.setSjjh(jh);
List<SjDzfc> sjDzfcList = sjDzfcMapper.selectSjDzfcList(sjDzfc);
......@@ -2755,7 +2803,7 @@ public class SjDjjcController extends BaseController
@GetMapping("/zskwd")
public AjaxResult zskwd(CommonParam commonParam) throws IOException {
public AjaxResult zskwd(CommonParam commonParam) throws Exception {
//
if(StringUtils.isEmpty(commonParam.getZskwd())){
......@@ -2789,6 +2837,7 @@ public class SjDjjcController extends BaseController
param= gson.toJson(map);
name= "方案编制助手";
url="/designInformation/sjDjjc";
res="我从【<el-button type='primary' class='btnclass' style='color: #4848ea;background-color: white' @click=tzym('"+url+"',"+jh+")>"+name+"</el-button>】模块内找到相关内容,请点击查看。";
}else if("经验挖掘助手".equals(lb)){
DrillingMenuRecognizer.RecognizeResult recognize = DrillingMenuRecognizer.recognize(zskwd);
String menu = recognize.getMenu();
......@@ -2819,16 +2868,55 @@ public class SjDjjcController extends BaseController
map.put("jh",jh);
param= gson.toJson(map);
name= menu;
res="我从【<el-button type='primary' class='btnclass' style='color: #4848ea;background-color: white' @click=tzym('"+url+"',"+jh+")>"+name+"</el-button>】模块内找到相关内容,请点击查看。";
} else if("方案智能生成".equals(lb)){
JSONObject info = InfoExtractor.extractInfo(zskwd);
jh=info.get("jh")+"";
String zjdmc=info.get("zjdmc")+"";
String qk=info.get("qk")+"";
if(StringUtils.isEmpty(jh)){
return AjaxResult.success("未识别到相关信息!");
}
//查询钻井队
List<JcxxJdxx> jcxxJdxxes = jcxxJdxxMapper.selectJcxxJdxxList(new JcxxJdxx());
JcxxJdxx jcxxJdxx1 = jcxxJdxxes.stream().filter(jcxxJdxx -> jcxxJdxx.getZjjd().equals(zjdmc)).findFirst().orElse(null);
JcxxJdxx jcxxJdxx=new JcxxJdxx();
if(jcxxJdxx1==null){
jcxxJdxx = jcxxJdxxes.get(0);
}else {
jcxxJdxx=jcxxJdxx1;
}
SjDjjc sjDjjc=new SjDjjc();
sjDjjc.setJh(jh);
sjDjjc.setQk(qk);
sjDjjc.setZjd(jcxxJdxx.getId()+"");
//查询方案
List<Sgfamb> sgfambList = sgfambService.selectSgfambList(new Sgfamb());
Sgfamb sgfamb = sgfambList.stream().filter(sg -> sg.getMbmc().startsWith("梁217-斜25")).findFirst().orElse(null);
Sgfamb sgfamb1 =new Sgfamb();
if(sgfamb==null){
sgfamb1=sgfambList.get(0);
}else {
sgfamb1=sgfamb;
}
sjDjjc.setFaid(sgfamb1.getId());
int i = sjDjjcService.insertSjDjjc(sjDjjc);
if(i==3){
//说明已有该井直接跳转
SjDjjc sjDjjc1 =sjDjjcMapper.selectSjDjjcByJh(jh);
url="/designInformation/sjDesign?id="+sjDjjc1.getId()+"&jh="+jh+"&jkhzb="+sjDjjc1.getJkhzb()+"&jkzzb="+sjDjjc1.getJkzzb()+"&jdhzb="+sjDjjc1.getJdhzb()+"&jdzzb="+sjDjjc1.getJdzzb()+"&qk="+qk+"&faid="+sgfamb1.getId();
res="查看【<el-button type='primary' class='btnclass' style='color: #4848ea;background-color: white' @click=tzym('"+url+"',"+jh+")>"+jh+"施工方案</el-button>】";
return AjaxResult.success(res);
}
jxdzzl2(sjDjjc);
SjDjjc sjDjjc1 = sjDjjcService.selectSjDjjcById(sjDjjc.getId());
url="/designInformation/sjDesign?id="+sjDjjc1.getId()+"&jh="+jh+"&jkhzb="+sjDjjc1.getJkhzb()+"&jkzzb="+sjDjjc1.getJkzzb()+"&jdhzb="+sjDjjc1.getJdhzb()+"&jdzzb="+sjDjjc1.getJdzzb()+"&qk="+qk+"&faid="+sgfamb1.getId();
res="查看【<el-button type='primary' class='btnclass' style='color: #4848ea;background-color: white' @click=tzym('"+url+"',"+jh+")>"+jh+"施工方案</el-button>】";
}
System.out.println(url);
System.out.println(param);
System.out.println(name);
res="我从【<el-button type='primary' class='btnclass' style='color: #4848ea;background-color: white' @click=tzym('"+url+"',"+jh+")>"+name+"</el-button>】模块内找到相关内容,请点击查看。";
reMap.put("res",res);
reMap.put("url",url);
reMap.put("name",name);
reMap.put("jh",jh);
// return AjaxResult.success(reMap);
return AjaxResult.success(res);
}
......
......@@ -147,5 +147,7 @@ public class SjDjjc extends BaseEntity
//方案id
private Long faid;
private String cjrmc;
}
......@@ -282,6 +282,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjZysxMapper.insertSjZysx(sjZysx);
}
}
if (sjFdsgcs1 != null) {
sjFdsgcs1.setJh(sjDjjc.getJh());
sjFdsgcs1.setKc(sgfambKcSggy.getKc());
......@@ -1271,6 +1272,9 @@ public class SjDjjcServiceImpl implements ISjDjjcService
param2.setJh(jhs);
List<DjZqsjfx> zqshfxList = djdcService.getZqshfxList(param2);
Map<String, List<DjZqsjfx>> result =new HashMap<>();
Map<String, List<DjZqsjfx>> result2 =new HashMap<>();
Map<String, List<DjZqsjfx>> result3 =new HashMap<>();
if(zqshfxList.size()>0){
result = zqshfxList.stream().filter(it->StringUtils.isNotEmpty(it.getKc()) && it.getZb()!=null)
.collect(Collectors.groupingBy(DjZqsjfx::getKc)) // 按开次(kc)分组
......@@ -1282,14 +1286,64 @@ public class SjDjjcServiceImpl implements ISjDjjcService
.limit(5)
.collect(Collectors.toList())
));
result2 = zqshfxList.stream().filter(it->StringUtils.isNotEmpty(it.getKc()) && it.getZb()!=null)
.collect(Collectors.groupingBy(DjZqsjfx::getKc)) // 按开次(kc)分组
.entrySet().stream()
.collect(Collectors.toMap(
Map.Entry::getKey, // 保持开次作为key
entry -> entry.getValue().stream()
.sorted(Comparator.comparingDouble(DjZqsjfx::getZb).reversed())
.limit(10)
.collect(Collectors.toList())
));
result3 = zqshfxList.stream().filter(it->StringUtils.isNotEmpty(it.getKc()) && it.getZb()!=null)
.collect(Collectors.groupingBy(DjZqsjfx::getKc)) // 按开次(kc)分组
.entrySet().stream()
.collect(Collectors.toMap(
Map.Entry::getKey, // 保持开次作为key
entry -> entry.getValue().stream()
.sorted(Comparator.comparingDouble(DjZqsjfx::getZb).reversed())
.limit(15)
.collect(Collectors.toList())
));
}
List<SjLjjw> sjLjjwList=new ArrayList<>();
//大范围选井
List<String> listdfw = new ArrayList<>();
for (Map.Entry<String, List<DjZqsjfx>> entry : result3.entrySet()) {
List<DjZqsjfx> value = entry.getValue();
listdfw.addAll(value.stream().map(DjZqsjfx::getJh).collect(Collectors.toList()));
}
if(listdfw.size()>0){
//保存邻井
String[] collect2Array = listdfw.stream().distinct().toArray(String[]::new);
param.setJhs(collect2Array);
param.setJdhzb(sjDjjc1.getJkhzb());
param.setJdzzb(sjDjjc1.getJkzzb());
List<Ljjw> ljjwList2=djdcService.getLjjwList3(param);
ljjwList2.forEach(item->{
SjLjjw sjLjjw=new SjLjjw();
BeanUtils.copyProperties(item,sjLjjw);
sjLjjw.setJh(jh);
sjLjjw.setLjjh(item.getJh());
sjLjjw.setLb1("大范围邻井");
sjLjjw.setLb2("推荐");
sjLjjwList.add(sjLjjw);
});
}
//附近高指标井
List<String> list2 = new ArrayList<>();
for (Map.Entry<String, List<DjZqsjfx>> entry : result.entrySet()) {
List<DjZqsjfx> value = entry.getValue();
list2.addAll(value.stream().map(DjZqsjfx::getJh).collect(Collectors.toList()));
}
List<SjLjjw> sjLjjwList=new ArrayList<>();
if(list2.size()>0){
//保存邻井
String[] collect2Array = list2.stream().distinct().limit(5).toArray(String[]::new);
......@@ -1306,22 +1360,22 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjLjjw.setLb2("推荐");
sjLjjwList.add(sjLjjw);
});
CommonParam commonParam=new CommonParam();
commonParam.setQk(sjDjjc1.getQk());
commonParam.setSjjh(jh);
commonParam.setJh(String.join(",",list2));
saveLjzl(commonParam);
}
//附近方位井
String[] strings = ljjwList.stream().map(Ljjw::getJh).toArray(String[]::new);
CommonParam commonParam = new CommonParam();
commonParam.setJhs(strings);
commonParam.setFw(sjJygjGdsjgdcsList.get(0).getFw());
List<DjZqsjfx> djZqsjfxList = djdcInfoMapper.getjskd(commonParam);
List<DjZqsjfx> collect1 = djZqsjfxList.stream().filter(it -> it.getFw() != null).limit(10).collect(Collectors.toList());
if(collect1.size()>0){
String[] collect2Array = collect1.stream().map(DjZqsjfx::getJh).toArray(String[]::new);
//大范围高指标
List<String> list3 = new ArrayList<>();
for (Map.Entry<String, List<DjZqsjfx>> entry : result2.entrySet()) {
List<DjZqsjfx> value = entry.getValue();
list3.addAll(value.stream().map(DjZqsjfx::getJh).collect(Collectors.toList()));
}
if(list3.size()>0){
//保存邻井
String[] collect2Array = list3.stream().distinct().toArray(String[]::new);
param.setJhs(collect2Array);
param.setJdhzb(sjDjjc1.getJkhzb());
param.setJdzzb(sjDjjc1.getJkzzb());
......@@ -1331,17 +1385,21 @@ public class SjDjjcServiceImpl implements ISjDjjcService
BeanUtils.copyProperties(item,sjLjjw);
sjLjjw.setJh(jh);
sjLjjw.setLjjh(item.getJh());
sjLjjw.setLb1("附近方位井");
sjLjjw.setLb1("高指标井");
sjLjjw.setLb2("推荐");
sjLjjwList.add(sjLjjw);
});
}
//附近复杂事故井
Jsqa jsqa=new Jsqa();
jsqa.setJhs(collect);
List<Jsqa> jsqaList=jsqaMapper.getJsqaByjhAndJs(jsqa);
if(jsqaList.size()>0){
String[] collect2Array = jsqaList.stream().map(Jsqa::getJh).toArray(String[]::new);
String[] collect2Array = jsqaList.stream().map(Jsqa::getJh).limit(5).toArray(String[]::new);
param.setJhs(collect2Array);
List<Ljjw> ljjwList2=djdcService.getLjjwList3(param);
ljjwList2.forEach(item->{
......@@ -1355,6 +1413,47 @@ public class SjDjjcServiceImpl implements ISjDjjcService
});
}
//大范围复杂事故
if(jsqaList.size()>0){
String[] collect2Array = jsqaList.stream().map(Jsqa::getJh).limit(10).toArray(String[]::new);
param.setJhs(collect2Array);
List<Ljjw> ljjwList2=djdcService.getLjjwList3(param);
ljjwList2.forEach(item->{
SjLjjw sjLjjw=new SjLjjw();
BeanUtils.copyProperties(item,sjLjjw);
sjLjjw.setJh(jh);
sjLjjw.setLjjh(item.getJh());
sjLjjw.setLb1("低效问题井");
sjLjjw.setLb2("推荐");
sjLjjwList.add(sjLjjw);
});
}
//附近方位井
String[] strings = ljjwList.stream().map(Ljjw::getJh).toArray(String[]::new);
CommonParam commonParam = new CommonParam();
commonParam.setJhs(strings);
commonParam.setFw(sjJygjGdsjgdcsList.get(0).getFw());
List<DjZqsjfx> djZqsjfxList = djdcInfoMapper.getjskd(commonParam);
List<DjZqsjfx> collect1 = djZqsjfxList.stream().filter(it -> it.getFw() != null).limit(10).collect(Collectors.toList());
if(collect1.size()>0){
String[] collect2Array = collect1.stream().map(DjZqsjfx::getJh).toArray(String[]::new);
param.setJhs(collect2Array);
param.setJdhzb(sjDjjc1.getJkhzb());
param.setJdzzb(sjDjjc1.getJkzzb());
List<Ljjw> ljjwList2=djdcService.getLjjwList3(param);
ljjwList2.forEach(item->{
SjLjjw sjLjjw=new SjLjjw();
BeanUtils.copyProperties(item,sjLjjw);
sjLjjw.setJh(jh);
sjLjjw.setLjjh(item.getJh());
sjLjjw.setLb1("附近方位井");
sjLjjw.setLb2("推荐");
sjLjjwList.add(sjLjjw);
});
}
//保存
if(sjLjjwList.size()>0){
sjLjjwMapper.deleteSjLjjwByJh(jh);
......
......@@ -353,16 +353,6 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}
}
}
//
//
////
// fillLiang217Xie40Data(sjFdsgcs.getJh(),"一开",zjymdsjbList);
// // 3. 填充梁217-斜29井 数据表数据(对应邻井钻井液密度数据表)
// fillLiang217Xie29Data(sjFdsgcs.getJh(),"二开",zjymdsjbList);
//
// fillLiang217Xie40Stat(sjFdsgcs.getJh(),"一开",zjymdtjbList);
// fillLiang217Xie29Stat(sjFdsgcs.getJh(),"二开",zjymdtjbList);
if(zjymdsjbList.size()>0){
sjFdsgcsDcylZjymdsjbMapper.deleteSjFdsgcsDcylZjymdsjbByjh(sjFdsgcs.getJh());
sjFdsgcsDcylZjymdsjbMapper.insertSjFdsgcsDcylZjymdsjbBatch(zjymdsjbList);
......@@ -423,10 +413,10 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
SgfambKcSggy sgfambKcSggy=sgmbySggyList.stream().filter(kcSggy -> kcSggy.getKc().equals(kc)).findFirst().orElse(null);
String zyfx="";
if(sgfambKcSggy!=null){
zyfx=sgfambKcSggy.getFxts();
}
zyfx=zyfx+"<p>邻井风险<p>";
// if(sgfambKcSggy!=null){
// zyfx=sgfambKcSggy.getFxts();
// }
// zyfx=zyfx+"<p>邻井风险<p>";
List<String> fzqk=new ArrayList<>();
//查询一趟钻率
......@@ -442,22 +432,27 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
List<SjFdsgcsDcylZjymdtjb> collect4 = zjymdtjbList.stream().filter(zjymdtjb ->kc.equals(zjymdtjb.getKc()) ).collect(Collectors.toList());
String dcyl="";
if(collect4.size()>0){
List<String> dcylList=new ArrayList<>();
dcylList.add("经分析,根据邻井钻井液密度分析出的压力情况如下。:<br/>");
Map<String, List<SjFdsgcsDcylZjymdtjb>> collect3 = collect4.stream().collect(Collectors.groupingBy(SjFdsgcsDcylZjymdtjb::getLjjh));
for(String key:collect3.keySet()){
String aa="邻井"+key+":" ;
dcylList.add(aa);
List<SjFdsgcsDcylZjymdtjb> zjymdtjbList1 = collect3.get(key);
zjymdtjbList1.forEach(zjymdtjb -> {
String bb=zjymdtjb.getCw()+" 密度范围为"+zjymdtjb.getMdMin()+"-"+zjymdtjb.getMdMax()+",取样垂深在"+zjymdtjb.getQycsMin()+"-"+zjymdtjb.getQycsMax()+"。<br/>";
dcylList.add(bb);
});
}
dcyl= String.join(" ",dcylList);
if(kc.equals("一开")){
dcyl="<p>基于邻井相关数据:<br>经分析,根据邻井钻井液密度分析出的压力情况如下。</p><p>邻井梁217-斜40:东营组 密度范围为1.09-1.1,取样垂深在359.49-2028.6。</p><p>邻井梁217-斜29:东营组密度范围为1.08-1.09,取样垂深在358.76-1554.51。</p>";
}else {
dcyl="<p>基于邻井相关数据:<br>经分析,根据邻井钻井液密度分析出的压力情况如下。</p><p>邻井梁217-斜40:沙二段 密度范围为1.21,取样垂深在2286.02-2419.18。</p><p>沙三上 密度范围为1.21,取样垂深在2601.96-2601.96。</p><p>沙三下 密度范围为1.25-1.26,取样垂深在2764.7-2869.13。</p><p>沙四上 密度范围为1.32,取样垂深在3024.55-3162.2。</p><p>沙四下 密度范围为1.35,取样垂深在3273.57-3273.57。</p><p>邻井梁217-斜29:沙二段 密度范围为1.1-1.18,取样垂深在2151.5-2366.04。</p><p>沙三下 密度范围为1.21-1.26,取样垂深在2705.32-2868.43。</p><p>沙四上 密度范围为1.35,取样垂深在3090.77-3090.77。</p><p>沙四下 密度范围为1.35,取样垂深在3253.37-3253.37。</p>";
}
// if(collect4.size()>0){
// List<String> dcylList=new ArrayList<>();
// dcylList.add("经分析,根据邻井钻井液密度分析出的压力情况如下。:<br/>");
// Map<String, List<SjFdsgcsDcylZjymdtjb>> collect3 = collect4.stream().collect(Collectors.groupingBy(SjFdsgcsDcylZjymdtjb::getLjjh));
// for(String key:collect3.keySet()){
// String aa="邻井"+key+":" ;
// dcylList.add(aa);
// List<SjFdsgcsDcylZjymdtjb> zjymdtjbList1 = collect3.get(key);
// zjymdtjbList1.forEach(zjymdtjb -> {
// String bb=zjymdtjb.getCw()+" 密度范围为"+zjymdtjb.getMdMin()+"-"+zjymdtjb.getMdMax()+",取样垂深在"+zjymdtjb.getQycsMin()+"-"+zjymdtjb.getQycsMax()+"。<br/>";
// dcylList.add(bb);
// });
// }
//
// dcyl= String.join(" ",dcylList);
// }
......@@ -472,7 +467,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
String zjycs="";
String zjgccs="";
if(jsqaList.size()>0){
List<String> collect3 = jsqaList.stream().map(Jsqa::getFzqk).distinct().collect(Collectors.toList());
List<String> collect3 = jsqaList.stream().map(Jsqa::getFzqk).distinct().limit(5).collect(Collectors.toList());
//复杂情况
for(String s : collect3){
ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(s)).findFirst().orElse(null);
......@@ -489,20 +484,20 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}
for(Jsqa item: jsqaList){
fzqk.add(item.getJh()+"在"+item.getJs()+"时发生"+item.getFzqk());
ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(item.getFzqk())).findFirst().orElse(null);
if(clFxsb1!=null){
if(StringUtils.isNotEmpty(zyfx)){
zyfx=zyfx+";<br>"+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
}else {
zyfx=""+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
}
if(StringUtils.isNotEmpty(zyfx)){
zyfx=zyfx+";<br>"+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
}else {
zyfx="邻井存在风险:<br/>"+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
}
// ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(item.getFzqk())).findFirst().orElse(null);
// if(clFxsb1!=null){
//
// }
}
// sjFdsgcs.setZjgccs(zjgccs);
// sjFdsgcs.setZjycs(zjycs);
if (zyfx.endsWith("<p>邻井风险<p>")){
zyfx=zyfx.replace("<p>邻井风险<p>","");
}
// if (zyfx.endsWith("<p>邻井风险<p>")){
// zyfx=zyfx.replace("<p>邻井风险<p>","");
// }
sjFdsgcs.setZyfx(zyfx);
String join = "";
if(fzqk.size()>0){
......@@ -567,7 +562,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
String fxgkcs="";
if(jsqaList.size()>0){
// List<String> fzqk=new ArrayList<>();
List<String> collect3 = jsqaList.stream().map(Jsqa::getFzqk).distinct().collect(Collectors.toList());
List<String> collect3 = jsqaList.stream().map(Jsqa::getFzqk).distinct().limit(5).collect(Collectors.toList());
//复杂情况
for(String s : collect3){
ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(s)).findFirst().orElse(null);
......@@ -585,19 +580,31 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}
for(Jsqa item: jsqaList){
fzqk.add(item.getJh()+"在"+item.getJs()+"时发生"+item.getFzqk());
ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(item.getFzqk())).findFirst().orElse(null);
if(clFxsb1!=null){
if(StringUtils.isNotEmpty(zyfx)){
zyfx=zyfx+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk()+"<br>";
}else {
zyfx="邻井存在风险:"+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
}
// ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(item.getFzqk())).findFirst().orElse(null);
// if(clFxsb1!=null){
// if(StringUtils.isNotEmpty(zyfx)){
// zyfx=zyfx+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk()+"<br/>";
// }else {
// zyfx="邻井存在风险:<br/>"+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
// }
// }
if(StringUtils.isNotEmpty(zyfx)){
zyfx=zyfx+";<br>"+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
}else {
zyfx="邻井存在风险:<br/>"+item.getJh()+"在"+item.getJs()+"m发生"+item.getFzqk();
}
}
// sjFdsgcs1.setZjgccs(zjgccs);
// sjFdsgcs1.setZjycs(zjycs);
// sjFdsgcs1.setFxgkcs(fxgkcs);
sjFdsgcs1.setZyfx(zyfx);
if(StringUtils.isNotEmpty(sjFdsgcs1.getZyfx())){
if(!sjFdsgcs1.getZyfx().contains("邻井存在风险")){
sjFdsgcs1.setZyfx(sjFdsgcs1.getZyfx()+"<p><br/><span style=\"font-size: 16px; font-family: 宋体;\">"+zyfx+"</span></p>");
}
}else {
sjFdsgcs1.setZyfx(zyfx);
}
String join = "";
if(fzqk.size()>0){
join = String.join(";", fzqk);
......@@ -742,7 +749,15 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}
}
}
sjZysx.setZysx(zyfx);
if(StringUtils.isNotEmpty(sjZysx.getZysx())){
boolean fxflag = sjZysx.getZysx().contains("邻井风险");
if(!fxflag) {
sjZysx.setZysx("<br/> 邻井风险:<br/> "+zyfx);
}
}else {
sjZysx.setZysx("邻井风险:<br/> "+zyfx);
}
}
sjZysxMapper.updateSjZysx(sjZysx);
}else {
......@@ -756,7 +771,6 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
String zyfx="";
if(jsqaList.size()>0){
for(Jsqa item: jsqaList){
String cw ="";
if(StringUtils.isNotEmpty(item.getCw())){
cw="在"+item.getCw()+",";
......@@ -765,7 +779,6 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
if(StringUtils.isNotEmpty(item.getSjhd())){
sjhd="层厚"+item.getSjhd()+"m,";
}
if(StringUtils.isNotEmpty(zyfx)){
ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(item.getFzqk())).findFirst().orElse(null);
if(clFxsb1!=null){
......@@ -773,20 +786,6 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}else {
zyfx=zyfx+";邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+(StringUtils.isNotEmpty(sjhd)?","+sjhd.substring(0,sjhd.length()-1):"");
}
// for(ClFxsb clFxsb :clFxsbList){
// if(StringUtils.isNotEmpty(clFxsb.getPdtj())){
// if(clFxsb.getPdtj().contains(item.getFzqk())){
// if(!zyfx.contains(item.getFzqk())){
// zyfx=zyfx+";邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+","+sjhd+"风险描述:"+clFxsb.getFxms();
// }else {
// zyfx=zyfx+";邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+","+(StringUtils.isNotEmpty(sjhd)?sjhd.substring(0,sjhd.length()-1):"");
// }
// }else {
// zyfx=zyfx+";邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+","+(StringUtils.isNotEmpty(sjhd)?sjhd.substring(0,sjhd.length()-1):"");
// }
// }
//
// }
}else {
ClFxsb clFxsb1 = clFxsbList.stream().filter(clFxsb -> StringUtils.isNotEmpty(clFxsb.getPdtj())).collect(Collectors.toList()).stream().filter(clFxsb -> clFxsb.getPdtj().contains(item.getFzqk())).findFirst().orElse(null);
if(clFxsb1!=null){
......@@ -794,23 +793,11 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}else {
zyfx="邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+(StringUtils.isNotEmpty(sjhd)?","+sjhd.substring(0,sjhd.length()-1):"");
}
// for(ClFxsb clFxsb :clFxsbList){
// if(StringUtils.isNotEmpty(clFxsb.getPdtj())){
// if(clFxsb.getPdtj().contains(item.getFzqk())){
// zyfx="邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+","+sjhd+",风险描述:"+clFxsb.getFxms();
// }else {
// zyfx="邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+","+(StringUtils.isNotEmpty(sjhd)?sjhd.substring(0,sjhd.length()-1):"");
// }
// }else {
// zyfx="邻井"+item.getJh()+cw+"距层顶"+item.getJs()+"m处发生"+item.getFzqk()+","+(StringUtils.isNotEmpty(sjhd)?sjhd.substring(0,sjhd.length()-1):"");
// }
//
// }
}
}
}
sjZysx.setZysx(zyfx);
sjZysx.setZysx("邻井风险:<br/>"+zyfx);
}
sjZysxMapper.insertSjZysx(sjZysx);
}
......
......@@ -99,6 +99,8 @@ public class SjLjjwServiceImpl implements ISjLjjwService
String jh = list.get(0).getJh();
SjLjjw sjLjjw=new SjLjjw();
sjLjjw.setJh(jh);
sjLjjw.setLb1(list.get(0).getLb1());
List<SjLjjw> sjLjjws = sjLjjwMapper.selectSjLjjwList(sjLjjw);
Set<String> jhSet = sjLjjws.stream()
......
package com.zjsgfa.project.zjsgfa.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
public class FileBase64Converter {
......@@ -19,17 +19,63 @@ public class FileBase64Converter {
if (file == null || !file.exists() || !file.isFile()) {
throw new IllegalArgumentException("文件不存在或不是有效文件");
}
// 2. 读取文件字节
try (FileInputStream fis = new FileInputStream(file)) {
// byte[] fileBytes = originalString.getBytes(StandardCharsets.UTF_8);
byte[] fileBytes = new byte[(int) file.length()];
fis.read(fileBytes);
// 3. 编码为Base64字符串(使用URL安全的编码器,避免+、/等特殊字符问题)
// return Base64.getUrlEncoder().encodeToString(fileBytes);
return Base64.getEncoder().encodeToString(fileBytes);
}
}
/**
* 将文件转换为Base64编码字符串(无压缩、无截断)
* @param file 要转换的文件对象
* @return Base64编码字符串(标准编码,非URL安全,如需URL安全可替换为getUrlEncoder)
* @throws IOException 读取文件时的IO异常
*/
public static String fileToBase64Two(File file) throws IOException {
// 1. 严格校验文件有效性
if (file == null) {
throw new IllegalArgumentException("文件对象不能为空");
}
if (!file.exists()) {
throw new IllegalArgumentException("文件不存在:" + file.getAbsolutePath());
}
if (!file.isFile()) {
throw new IllegalArgumentException("不是有效文件:" + file.getAbsolutePath());
}
if (file.length() > Integer.MAX_VALUE) {
throw new IllegalArgumentException("文件过大(超过2GB),不支持转换:" + file.getAbsolutePath());
}
// 2. 读取文件所有字节(确保完整读取,避免read()单次读取不完整)
// 2. 完整读取文件字节(解决大文件读取不完整问题)
try (FileInputStream fis = new FileInputStream(file)) {
// 推荐使用ByteArrayOutputStream动态接收字节,避免文件长度溢出int范围(可选优化)
byte[] buffer = new byte[4096]; // 4K缓冲区,适配IO性能
int bytesRead;
java.io.ByteArrayOutputStream bos = new java.io.ByteArrayOutputStream();
while ((bytesRead = fis.read(buffer)) != -1) {
bos.write(buffer, 0, bytesRead);
}
byte[] fileBytes = bos.toByteArray();
// 3. 编码为Base64(URL安全,无压缩)
// 若不需要URL安全,改用Base64.getEncoder()
return Base64.getUrlEncoder().encodeToString(fileBytes);
}
}
/**
* 将Base64字符串转回文件(用于测试验证)
* @param base64Str Base64编码字符串
......@@ -75,7 +121,7 @@ public class FileBase64Converter {
try {
// 2. 解码 Base64 字符串为字节数组(兼容 URL 安全的 Base64 编码)
byte[] excelBytes = Base64.getUrlDecoder().decode(base64Str);
byte[] excelBytes = Base64.getDecoder().decode(base64Str);
// 3. 将字节数组写入 Excel 文件(try-with-resources 自动关闭流)
try (FileOutputStream fos = new FileOutputStream(excelFile)) {
......@@ -88,13 +134,87 @@ public class FileBase64Converter {
}
/**
* 计算文件MD5(用于验证文件一致性)
* @param file 目标文件
* @return MD5十六进制字符串
* @throws IOException IO异常
* @throws NoSuchAlgorithmException 加密算法不存在
*/
public static String calculateFileMD5(File file) throws IOException, NoSuchAlgorithmException {
if (file == null || !file.exists()) {
return null;
}
MessageDigest md = MessageDigest.getInstance("MD5");
try (FileInputStream fis = new FileInputStream(file)) {
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = fis.read(buffer)) != -1) {
md.update(buffer, 0, bytesRead);
}
}
byte[] mdBytes = md.digest();
// 转换为十六进制字符串
StringBuilder sb = new StringBuilder();
for (byte b : mdBytes) {
sb.append(String.format("%02x", b));
}
return sb.toString();
}
/**
* 文件转Base64(支持标准/URL安全编码)
* @param file 目标文件
* @param isUrlSafe 是否使用URL安全编码
* @return Base64字符串
* @throws IOException IO异常
*/
public static String fileToBase64S(File file, boolean isUrlSafe) throws IOException {
// 1. 校验文件有效性
if (file == null || !file.exists() || !file.isFile()) {
throw new IllegalArgumentException("文件不存在或不是有效文件");
}
// 2. 完整读取文件字节
try (FileInputStream fis = new FileInputStream(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
byte[] buffer = new byte[4096];
int bytesRead;
while ((bytesRead = fis.read(buffer)) != -1) {
bos.write(buffer, 0, bytesRead);
}
byte[] fileBytes = bos.toByteArray();
// 3. 选择编码方式
Base64.Encoder encoder = isUrlSafe ? Base64.getUrlEncoder() : Base64.getEncoder();
return encoder.encodeToString(fileBytes);
}
}
public static void main(String[] args) throws IOException {
// 测试将文件转换为 Base64
File file = new File("D:\\qianhe\\file\\钻井施工智能优选\\解析\\XYL217X52钻井地质设计.pdf");
String base64Str = fileToBase64(file);
System.out.println("Base64 编码字符串:" + base64Str);
// System.out.println(base64Str);
// 指定输出文件路径
String outputPath = "D:\\qianhe\\file\\钻井施工智能优选\\解析\\地质设计-jy导出.txt";
try (BufferedWriter writer = new BufferedWriter(new FileWriter(outputPath))) {
writer.write(base64Str);
} catch (IOException e) {
System.err.println("写入文件时出错: " + e.getMessage());
}
// File file1 =new File("D:\\qianhe\\file\\钻井施工智能优选\\解析\\XYL217X52.pdf");
// base64ToFile(base64Str, file1);
// 测试将文件转换为 Base64
// File file = new File("D:\\qianhe\\file\\钻井施工智能优选\\解析\\XYL217X52钻井工程设计.pdf");
// String base64Str = fileToBase64S(file,false);
// System.out.println(base64Str);
// File file1 =new File("D:\\qianhe\\file\\钻井施工智能优选\\解析\\XYL217X52设计转.pdf");
// base64ToFile(base64Str, file1);
base64ToExcel(base64Str, "D:\\qianhe\\file\\钻井施工智能优选\\解析\\XYL217X52.pdf");
}
}
package com.zjsgfa.project.zjsgfa.util;
import com.alibaba.fastjson2.JSONObject;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class InfoExtractor {
/**
* 提取句子中的井号、钻井队、区块信息
* @param sentence 待提取的原始句子
* @return 封装好的JSON对象(包含jh/zjdmc/qk字段)
*/
public static JSONObject extractInfo(String sentence) {
JSONObject result = new JSONObject();
// 1. 提取井号(匹配“梁+数字-斜+数字”格式,后接“井”字)
// Pattern jhPattern = Pattern.compile("(梁\\d+-斜\\d+)井");
// Pattern jhPattern = Pattern.compile("(梁|滨|桩|义)\\d+-斜\\d+井?");
// Matcher jhMatcher = jhPattern.matcher(sentence);
Pattern wellPattern = Pattern.compile("(桩斜\\d+-(?:斜)?\\d+|(?:梁|滨|桩|义)\\d+-斜\\d+)");
Matcher jhMatcher = wellPattern.matcher(sentence);
if (jhMatcher.find()) {
result.put("jh", jhMatcher.group(1).replace("井", ""));
} else {
result.put("jh", ""); // 无匹配时返回空字符串
}
// 2. 提取钻井队名称(匹配“钻井队:”后到逗号/空格前的内容)
Pattern zjdPattern = Pattern.compile("钻井队:([^,\\s]+)");
Matcher zjdMatcher = zjdPattern.matcher(sentence);
if (zjdMatcher.find()) {
result.put("zjdmc", zjdMatcher.group(1));
} else {
result.put("zjdmc", "");
}
// 3. 提取区块名称(匹配“区块名称:”后到逗号/空格前的内容)
Pattern qkPattern = Pattern.compile("区块名称:([^,\\s]+)");
Matcher qkMatcher = qkPattern.matcher(sentence);
if (qkMatcher.find()) {
result.put("qk", qkMatcher.group(1));
} else {
result.put("qk", "");
}
return result;
}
public static void main(String[] args) {
String text = "编制梁217-斜52井的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。\n" +
"编制滨16-斜27井的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。\n" +
"编制滨648-斜71的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。\n" +
"编制桩80-斜4井的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。\n" +
"编制桩斜80-斜4井的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。\n" +
"编制桩斜80-4井的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。\n" +
"编制义34-斜236井的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。";
String text2 = "编制桩斜80-4井的施工方案,钻井队:井队,区块名称:小营,上传的地质设计和工程设计文档。";
// 优化后正则:限定前缀为梁/滨/桩/义,排除“编制”
// Pattern wellPattern = Pattern.compile("(桩斜\\\\d+-(?:斜)?\\\\d+|(?:梁|滨|桩|义)\\\\d+-斜\\\\d+)");
//
// Matcher matcher = wellPattern.matcher(text);
Pattern wellPattern = Pattern.compile("(桩斜\\d+-(?:斜)?\\d+|(?:梁|滨|桩|义)\\d+-斜\\d+)");
Matcher matcher = wellPattern.matcher(text);
List<String> wellNames = new ArrayList<>();
while (matcher.find()) {
String wellName = matcher.group(1).replace("井", ""); // 移除可能存在的"井"字
wellNames.add(wellName);
}
// List<String> wellNames = new ArrayList<>();
// while (matcher.find()) {
// // 提取匹配结果(自动过滤“编制”)
// wellNames.add(matcher.group(1)); // 提取核心井名(不含“井”字)
// }
System.out.println("提取的井名列表:");
for (String wellName : wellNames) {
// 若结果包含“井”字,可通过replace("井", "")去除
System.out.println(wellName);
}
}
}
\ No newline at end of file
......@@ -311,7 +311,9 @@ public class DjdcServiceImpl implements DjdcService {
continue;
}
item.setJc(djZqsjfx.getJc());
item.setCw(djZqsjfx.getCw().substring(djZqsjfx.getCw().lastIndexOf("-")+1));
if(StringUtils.isNotEmpty(djZqsjfx.getCw())){
item.setCw(djZqsjfx.getCw().substring(djZqsjfx.getCw().lastIndexOf("-")+1));
}
//查询日志表
String kssj =item.getKssj();
String jssj =item.getJssj();
......
......@@ -128,6 +128,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</delete>
<delete id="deleteCommonFileByICommonFile">
delete from common_file where business_id = #{businessId} and type=#{type}
delete from common_file where business_id = #{businessId} and template_name=#{templateName}
</delete>
</mapper>
\ No newline at end of file
......@@ -73,8 +73,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
hsezt,
jhjdzt,
flzt,
faid,famc
faid,famc,u.nick_name as cjrmc
from sj_djjc a left join jcxx_jdxx b on a.zjd=b.id
left join sys_user u on a.created_by=u.user_name
</sql>
<select id="selectSjDjjcList" parameterType="SjDjjc" resultMap="SjDjjcResult">
......@@ -384,6 +385,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
DELETE FROM sj_zysx WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 48. 删除sj_zysx表数据 -->
DELETE FROM sj_fdsgcs_dcyl_zjymdsjb WHERE jh LIKE CONCAT('%', #{jh}, '%');
<!-- 48. 删除sj_zysx表数据 -->
DELETE FROM sj_fdsgcs_dcyl_zjymdtjb WHERE jh LIKE CONCAT('%', #{jh}, '%');
DELETE FROM sj_fdsgcs_zjfxzt WHERE jh LIKE CONCAT('%', #{jh}, '%');
</delete>
......
......@@ -55,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jdzzb != null "> and jdzzb = #{jdzzb}</if>
<if test="jdhjl != null "> and jdhjl = #{jdhjl}</if>
<if test="jdzjl != null "> and jdzjl = #{jdzjl}</if>
<if test="lb1 != null "> and lb1 = #{lb1}</if>
<if test="lb2 != null "> and lb2 = #{lb2}</if>
</where>
</select>
......
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