Commit 340985ae by jiangyun

修改

parent 4c95dc1d
package com.zjsgfa.project.zjsgfa.controller;
import java.io.*;
import java.math.BigInteger;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Paths;
......@@ -233,6 +234,9 @@ public class SjDjjcController extends BaseController
@Autowired
private SjLjfzqkMapper sjLjfzqkMapper;
@Autowired
private SjLjzjyfzqkMapper sjLjzjyfzqkMapper;
@Autowired
private SjGcjbsjMapper sjGcjbsjMapper;
......@@ -256,6 +260,37 @@ public class SjDjjcController extends BaseController
return getDataTable(list);
}
/**
* 获取工程方案已通过
* @param sjDjjc
* @return
*/
@GetMapping("/getGcList")
public TableDataInfo getGcList(SjDjjc sjDjjc)
{
startPage();
sjDjjc.setLx("1");
List<SjDjjc> list = sjDjjcService.getGcList(sjDjjc);
return getDataTable(list);
}
/**
* 获取钻井液方案已通过
* @param sjDjjc
* @return
*/
@GetMapping("/getZjyList")
public TableDataInfo getZjyList(SjDjjc sjDjjc)
{
startPage();
sjDjjc.setLx("2");
List<SjDjjc> list = sjDjjcService.getGcList(sjDjjc);
return getDataTable(list);
}
@GetMapping("/getList")
public AjaxResult apiList(SjDjjc sjDjjc)
{
......@@ -2179,26 +2214,42 @@ public class SjDjjcController extends BaseController
String body = HttpRequest.post("http://10.68.202.238:12001/api/pdf2xlsx").body(param).execute().body();//测试
// String body = HttpRequest.post("http://10.68.249.11:5174/api/pdf2xlsx").body(param).execute().body();//正式
System.out.println("接口返回数据"+body);
// {"code":200,"message":{"file_base64":""}}
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";
String outPath=RuoYiConfig.getUploadPath()+"/jxh/"+fileName;
System.out.println("解析后存放的路径"+outPath);
FileBase64Converter.base64ToExcel(s,outPath);
File testFile = new File(outPath);
MultipartFile multipartFile = FileToMultipartFileConverter.convert(testFile);
importData(multipartFile,false,sjDjjcnew);
int code = root.get("code").getAsInt();
if(code==1){
// JsonObject outerData = root.getAsJsonObject("message");
String s = root.get("excelb64").getAsString();
if(StringUtils.isNotEmpty(s)){
long time = new Date().getTime();
String fileName=sjDjjcnew.getJh()+"_"+time+".xlsx";
String outPath=RuoYiConfig.getUploadPath()+"/jxh/"+fileName;
System.out.println("解析后存放的路径"+outPath);
FileBase64Converter.base64ToExcel(s,outPath);
File testFile = new File(outPath);
MultipartFile multipartFile = FileToMultipartFileConverter.convert(testFile);
importData(multipartFile,false,sjDjjcnew);
}
}else {
String s = root.get("message").getAsString();
return AjaxResult.error(s);
}
}
}
return AjaxResult.success("解析成功");
}
// public static void main(String[] args) {
// String body="{\"code\":200,\"message\":{\"file_base64\":\"\"}}";
// Gson gson = new GsonBuilder().setPrettyPrinting().create();
// JsonObject root = gson.fromJson(body, JsonObject.class);
// int code = root.get("code").getAsInt();
// JsonObject outerData = root.getAsJsonObject("message");
// String s = outerData.get("file_base64").getAsString();
// System.out.println(s);
// }
......@@ -2284,6 +2335,7 @@ public class SjDjjcController extends BaseController
.bind("sjZsjqks", policy)//行循环策略
.bind("sjDcfxTsyxList", policy)//行循环策略
.bind("sjLjfzqks", policy)//行循环策略
.bind("sjLjzjyfzqks", policy)//行循环策略
.bind("sjJhzqList", policy)//行循环策略
.bind("sjH2sList", policy)//行循环策略
.bind("sjLjsmList", policy)//行循环策略
......@@ -2942,6 +2994,13 @@ public class SjDjjcController extends BaseController
ljfzqk.setZbid(sjDjjc.getId());
List<SjLjfzqk> sjLjfzqks = sjLjfzqkMapper.selectSjLjfzqkList(ljfzqk);
dataModel.put("sjLjfzqks", sjLjfzqks);
SjLjzjyfzqk ljzjyfzqk =new SjLjzjyfzqk();
ljzjyfzqk.setZbid(sjDjjc.getId());
List<SjLjzjyfzqk> sjLjzjyfzqks = sjLjzjyfzqkMapper.selectSjLjzjyfzqkList(ljzjyfzqk);
dataModel.put("sjLjzjyfzqks", sjLjzjyfzqks);
//邻井钻井液使用情况
SjLjzjysyqk sjLjzjysyqk =new SjLjzjysyqk();
......@@ -3509,1535 +3568,7 @@ public class SjDjjcController extends BaseController
// /**
// * 导入数据
// */
// @PreAuthorize("@ss.hasPermi('designInformation:sjDjjc:importData')")
// @PostMapping("/importData2")
// @ResponseBody
// public AjaxResult importData2(MultipartFile file, boolean updateSupport,SjDjjc sjDjjc) throws Exception
// {
//
//
// SjDjjc sjDjjc1 = sjDjjcService.selectSjDjjcById(sjDjjc.getId());
//
// XSSFWorkbook workbook = null;
// try {
// //装载流
// workbook = new XSSFWorkbook(file.getInputStream());
// // 获取井基础信息表,下标从0开始
// XSSFSheet sheet = workbook.getSheetAt(0);
// int lastRowNum = sheet.getLastRowNum();
// String jh = sjDjjc.getJh();
// Long id =sjDjjc.getId();
// // 通过循环,逐行取出表中每行数据
// for(int i=0;i<=lastRowNum;i++){
// //跳过第一行
// if(i==0){
// continue;
// }
// // 获取行
// XSSFRow row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjDjjc info=new SjDjjc();
//// jh=new DataFormatter().formatCellValue(row.getCell(0));
//// if(StringUtils.isEmpty(jh)){
//// return AjaxResult.error("井基础信息中第"+(i+1)+"行井号不能为空");
//// }
// info.setJh(jh);
// String qk=new DataFormatter().formatCellValue(row.getCell(1));
// if(StringUtils.isEmpty(qk)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行区块不能为空");
// }
// info.setQk(qk);
// String jb=new DataFormatter().formatCellValue(row.getCell(2));
// if(StringUtils.isEmpty(jb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井别不能为空");
// }
// info.setJb(jb);
//
// String jx=new DataFormatter().formatCellValue(row.getCell(3));
// if(StringUtils.isEmpty(jx)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井型不能为空");
// }
// info.setJx(jx);
//
// String jkhzb=new DataFormatter().formatCellValue(row.getCell(4));
// if(StringUtils.isEmpty(jkhzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井口横坐标不能为空");
// }
// info.setJkhzb(Double.parseDouble(jkhzb));
//
// String jkzzb=new DataFormatter().formatCellValue(row.getCell(5));
// if(StringUtils.isEmpty(jkzzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井口纵坐标不能为空");
// }
// info.setJkzzb(Double.parseDouble(jkzzb));
//
// String jdhzb=new DataFormatter().formatCellValue(row.getCell(6));
// if(StringUtils.isEmpty(jdhzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井底横坐标不能为空");
// }
// info.setJdhzb(Double.parseDouble(jdhzb));
//
//
// String jdzzb=new DataFormatter().formatCellValue(row.getCell(7));
// if(StringUtils.isEmpty(jdzzb)){
// return AjaxResult.error("井基础信息中第"+(i+1)+"行井底纵坐标不能为空");
// }
// info.setJdzzb(Double.parseDouble(jdzzb));
//
// String gzwz=new DataFormatter().formatCellValue(row.getCell(8));
// info.setGzwz(gzwz);
// String wzcw=new DataFormatter().formatCellValue(row.getCell(9));
// info.setWzcw(wzcw);
// String ztmd=new DataFormatter().formatCellValue(row.getCell(10));
// info.setZtmd(ztmd);
// String wzyz=new DataFormatter().formatCellValue(row.getCell(11));
// info.setWzyz(wzyz);
// String wjff=new DataFormatter().formatCellValue(row.getCell(12));
// info.setWjfa(wjff);
//// String zjgs=new DataFormatter().formatCellValue(row.getCell(13));
//// info.setZjgs(zjgs);
//// String zjd=new DataFormatter().formatCellValue(row.getCell(14));
//// info.setZjd(zjd);
// info.setFaid(sjDjjc1.getFaid());
// sjDjjcService.updateSjDjjc(info);
// }
// //地质分层---------------------------------------------------
// sheet = workbook.getSheetAt(1);
// lastRowNum = sheet.getLastRowNum();
// List<SjDzfc> sjDzfcList =new ArrayList<>();
// XSSFRow row2 =sheet.getRow(1);
//
//// String sjjh=new DataFormatter().formatCellValue( row2.getCell(5));
// String yjjh1=new DataFormatter().formatCellValue( row2.getCell(9));
// String yjjh2=new DataFormatter().formatCellValue( row2.getCell(13));
//
// for(int i=4 ; i<=lastRowNum;i++){
// XSSFRow row = sheet.getRow(i);
// if(row==null){
// continue;
// }
//
// SjDzfc sjDzfc =new SjDzfc();
// sjDzfc.setSjjh(jh);
// sjDzfc.setYjjh1(yjjh1);
// sjDzfc.setYjjh2(yjjh2);
// String dcJ=new DataFormatter().formatCellValue( row.getCell(0));
// sjDzfc.setDcJ(dcJ);
//
// String dcX=new DataFormatter().formatCellValue( row.getCell(1));
// sjDzfc.setDcX(dcX);
//
//
// String dcT=new DataFormatter().formatCellValue( row.getCell(2));
// sjDzfc.setDcT(dcT);
//
// String dcZ=new DataFormatter().formatCellValue( row.getCell(3));
// sjDzfc.setDcZ(dcZ);
//
// String dcD=new DataFormatter().formatCellValue( row.getCell(4));
// sjDzfc.setDcD(dcD);
//
// String sjdcs=new DataFormatter().formatCellValue( row.getCell(5));
// if(StringUtils.isNotEmpty(sjdcs)){
// sjDzfc.setSjdcs(Double.parseDouble(sjdcs));
// }
//
//
// String sjjcgx=new DataFormatter().formatCellValue( row.getCell(6));
//
// sjDzfc.setSjjcgx(sjjcgx);
//
// String sjhd=new DataFormatter().formatCellValue( row.getCell(7));
// if(StringUtils.isNotEmpty(sjhd)){
// sjDzfc.setSjhd(Double.parseDouble(sjhd));
// }
//
//
// String sjddsd=new DataFormatter().formatCellValue( row.getCell(8));
// if(StringUtils.isNotEmpty(sjddsd)){
// sjDzfc.setSjddsd(sjddsd);
// }
//
//
// String yjdcs1=new DataFormatter().formatCellValue( row.getCell(9));
// if(StringUtils.isNotEmpty(yjdcs1)){
// sjDzfc.setYjdcs1(Double.parseDouble(yjdcs1));
// }
//
//
// String yjjcgx1=new DataFormatter().formatCellValue( row.getCell(10));
// sjDzfc.setYjjcgx1(yjjcgx1);
//
// String yjhyjd1=new DataFormatter().formatCellValue( row.getCell(11));
// sjDzfc.setYjhyjd1(yjhyjd1);
//
// String yjddsd1=new DataFormatter().formatCellValue( row.getCell(12));
// if(StringUtils.isNotEmpty(yjddsd1)){
// sjDzfc.setYjddsd1(yjddsd1);
// }
//
//
//
// String yjdcs2=new DataFormatter().formatCellValue( row.getCell(13));
// if(StringUtils.isNotEmpty(yjdcs2)){
// sjDzfc.setYjdcs2(Double.parseDouble(yjdcs2));
// }
//
//
// String yjjcgx2=new DataFormatter().formatCellValue( row.getCell(14));
// sjDzfc.setYjjcgx2(yjjcgx2);
//
// String yjhyjd2=new DataFormatter().formatCellValue( row.getCell(15));
// sjDzfc.setYjhyjd2(yjhyjd2);
//
// String yjddsd2=new DataFormatter().formatCellValue( row.getCell(16));
// if(StringUtils.isNotEmpty(yjddsd2)){
// sjDzfc.setYjddsd2(yjddsd2);
// }
//
//
// sjDzfcList.add(sjDzfc);
// }
// if(sjDzfcList.size()>0){
// sjDzfcMapper.deleteSjDzfcByJh(jh);
// sjDzfcMapper.insertSjDzfcBatch(sjDzfcList);
// }
// //地质分层 end--------------------------------------------------
//
//
//
// //井身结构---------------------------------------------------
// sheet = workbook.getSheetAt(2);
// lastRowNum = sheet.getLastRowNum();
// List<SjJsjg> sjJsjgList=new ArrayList<>();
// for(int i=0;i<=lastRowNum;i++){
// if(i==0 || i==1){
// continue;
// }
// SjJsjg sjJsjg =new SjJsjg();
// sjJsjg.setJh(jh);
// XSSFRow row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// String kc=new DataFormatter().formatCellValue(row.getCell(0));
// if(StringUtils.isEmpty(kc)){
// return AjaxResult.error("井身结构表第"+(i+1)+"行开次不能为空");
// }
// sjJsjg.setKc(kc);
//
// String ztzj=new DataFormatter().formatCellValue(row.getCell(1));
// if(StringUtils.isEmpty(ztzj)){
// return AjaxResult.error("井身结构表第"+(i+1)+"行钻头直径不能为空");
// }
// sjJsjg.setZtzj(Double.parseDouble(ztzj));
//
// String js=new DataFormatter().formatCellValue(row.getCell(2));
// if(StringUtils.isEmpty(js)){
// return AjaxResult.error("井身结构表第"+(i+1)+"行井深不能为空");
// }
// sjJsjg.setJs(Double.parseDouble(js));
//
//
// String tgwj=new DataFormatter().formatCellValue(row.getCell(3));
// if(StringUtils.isEmpty(tgwj)){
// return AjaxResult.error("井身结构表第"+(i+1)+"行套管外径不能为空");
// }
// sjJsjg.setTtwj(Double.parseDouble(tgwj));
//
// String tgds=new DataFormatter().formatCellValue(row.getCell(4));
// if(StringUtils.isEmpty(tgds)){
// return AjaxResult.error("井身结构表第"+(i+1)+"行套管顶深不能为空");
// }
// sjJsjg.setTtds(Double.parseDouble(tgds));
// String tgxs=new DataFormatter().formatCellValue(row.getCell(5));
// if(StringUtils.isEmpty(tgxs)){
// return AjaxResult.error("井身结构表第"+(i+1)+"行套管下深不能为空");
// }
// sjJsjg.setTtxs(Double.parseDouble(tgxs));
// String snfg=new DataFormatter().formatCellValue(row.getCell(6));
// if(StringUtils.isEmpty(snfg)){
// sjJsjg.setSnfg(Double.parseDouble("0"));
// }else {
// sjJsjg.setSnfg(Double.parseDouble(snfg));
// }
// String bz=new DataFormatter().formatCellValue(row.getCell(7));
// sjJsjg.setBz(bz);
// sjJsjgList.add(sjJsjg);
// }
// if(sjJsjgList.size()>0){
// //先删除该井数据
// sjJsjgMapper.deleteSjJsjgByJh(jh);
// //执行插入
// sjJsjgMapper.insertSjJsjgBatch(sjJsjgList);
// }
//
//
// //井身结构 end---------------------------------------------------
//
//
//
//
// //井眼轨迹 ---------------------------------------------------
// sheet = workbook.getSheetAt(3);
// lastRowNum = sheet.getLastRowNum();
// XSSFRow row = sheet.getRow(0);
//
// SjJygjInfo info =new SjJygjInfo();
// info.setJh(jh);
// String gdlx=new DataFormatter().formatCellValue(row.getCell(1));
// if(StringUtils.isEmpty(gdlx)){
// return AjaxResult.error("井眼轨迹表第"+(1)+"行轨道类型不能为空");
// }
// info.setGdlx(gdlx);
//
// String jkhzb=new DataFormatter().formatCellValue(row.getCell(3));
// if(StringUtils.isEmpty(jkhzb)){
// return AjaxResult.error("井眼轨迹表第"+(1)+"行井口横坐标不能为空");
// }
// info.setJkhzb(Double.parseDouble(jkhzb));
//
// String jkzzb=new DataFormatter().formatCellValue(row.getCell(5));
// if(StringUtils.isEmpty(jkzzb)){
// return AjaxResult.error("井眼轨迹表第"+(1)+"行井口纵坐标不能为空");
// }
// info.setJkzzb(Double.parseDouble(jkzzb));
//
// String bdhzb=new DataFormatter().formatCellValue(row.getCell(7));
// if(StringUtils.isEmpty(bdhzb)){
// return AjaxResult.error("井眼轨迹表第"+(1)+"行靶点横坐标不能为空");
// }
// info.setBdhzb(Double.parseDouble(bdhzb));
//
//
// String bdzzb=new DataFormatter().formatCellValue(row.getCell(9));
// if(StringUtils.isEmpty(bdzzb)){
// return AjaxResult.error("井眼轨迹表第"+(1)+"行靶点纵坐标不能为空");
// }
// info.setBdzzb(Double.parseDouble(bdzzb));
//
// row = sheet.getRow(1);
// String cs=new DataFormatter().formatCellValue(row.getCell(1));
// if(StringUtils.isEmpty(cs)){
// return AjaxResult.error("井眼轨迹表第"+(2)+"行垂深不能为空");
// }
// info.setCs(Double.parseDouble(cs));
// String bhj=new DataFormatter().formatCellValue(row.getCell(3));
// if(StringUtils.isEmpty(bhj)){
// return AjaxResult.error("井眼轨迹表第"+(2)+"行闭合距不能为空");
// }
// info.setBhj(Double.parseDouble(bhj));
//
// String bhfx=new DataFormatter().formatCellValue(row.getCell(5));
// if(StringUtils.isEmpty(bhfx)){
// return AjaxResult.error("井眼轨迹表第"+(2)+"行闭合方向不能为空");
// }
// info.setBhfx(Double.parseDouble(bhfx));
//
// String bbj=new DataFormatter().formatCellValue(row.getCell(7));
// if(StringUtils.isEmpty(bbj)){
// return AjaxResult.error("井眼轨迹表第"+(2)+"行靶半径不能为空");
// }
// info.setBbj(Double.parseDouble(bbj));
// sjJygjInfoMapper.insertSjJygjInfo(info);
// //井眼轨迹 基础数据 end---------------------------------------------------
//
// //井眼轨迹 轨道分段参数---------------------------------------------------
//// sheet = workbook.getSheetAt(3);
//// lastRowNum = sheet.getLastRowNum();
// List<SjJygjGdfdcs> sjJygjGdfdcsList=new ArrayList<>();
// for(int i=5; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjJygjGdfdcs gdfdcs =new SjJygjGdfdcs();
// gdfdcs.setJh(jh);
// String js=new DataFormatter().formatCellValue(row.getCell(0));
// if(StringUtils.isEmpty(js)){
// continue;
// }
// gdfdcs.setJs(Double.parseDouble(js));
// String jx=new DataFormatter().formatCellValue(row.getCell(1));
// gdfdcs.setJx(Double.parseDouble(jx));
// String fw=new DataFormatter().formatCellValue(row.getCell(2));
// gdfdcs.setFw(Double.parseDouble(fw));
// cs=new DataFormatter().formatCellValue(row.getCell(3));
// gdfdcs.setCs(Double.parseDouble(cs));
//
// String spwy=new DataFormatter().formatCellValue(row.getCell(4));
// gdfdcs.setSpwy(Double.parseDouble(spwy));
//
// String nbwy=new DataFormatter().formatCellValue(row.getCell(5));
// gdfdcs.setNbwy(Double.parseDouble(nbwy));
//
// String dxwy=new DataFormatter().formatCellValue(row.getCell(6));
// gdfdcs.setDxwy(Double.parseDouble(dxwy));
//
// String qjbhl=new DataFormatter().formatCellValue(row.getCell(7));
// gdfdcs.setQjbhl(Double.parseDouble(qjbhl));
//
//
// String gjm=new DataFormatter().formatCellValue(row.getCell(8));
// gdfdcs.setGjm(Double.parseDouble(gjm));
//
// String bd=new DataFormatter().formatCellValue(row.getCell(9));
// gdfdcs.setBd(bd);
// sjJygjGdfdcsList.add(gdfdcs);
// }
//
// if(sjJygjGdfdcsList.size()>0){
// //先删除数据
// sjJygjGdfdcsMapper.deleteSjJygjGdfdcsByJh(jh);
// //执行插入
//
// sjJygjGdfdcsMapper.insertSjJygjGdfdcsBatch(sjJygjGdfdcsList);
// }
//
// //井眼轨迹 轨道分段参数 end---------------------------------------------------
//
// //井眼轨迹 轨道设计各点参数---------------------------------------------------
// List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList=new ArrayList<>();
// for(int i=3; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjJygjGdsjgdcs gdfdcs =new SjJygjGdsjgdcs();
// gdfdcs.setJh(jh);
// int ks=11;
// String js=new DataFormatter().formatCellValue(row.getCell(ks));
// if(StringUtils.isEmpty(js)){
// continue;
// }
// gdfdcs.setJs(Double.parseDouble(js));
// String jx=new DataFormatter().formatCellValue(row.getCell(ks+1));
// if(StringUtils.isNotEmpty(jx)){
// gdfdcs.setJx(Double.parseDouble(jx));
// }
//
// String fw=new DataFormatter().formatCellValue(row.getCell(ks+2));
// if(StringUtils.isNotEmpty(fw)){
// gdfdcs.setFw(Double.parseDouble(fw));
// }
//
// String bhfw=new DataFormatter().formatCellValue(row.getCell(ks+3));
// gdfdcs.setBhfw(Double.parseDouble(bhfw));
//
// String cs1=new DataFormatter().formatCellValue(row.getCell(ks+4));
// if(StringUtils.isNotEmpty(cs1)){
// gdfdcs.setCs(Double.parseDouble(cs1));
// }
//
//
// bhj=new DataFormatter().formatCellValue(row.getCell(ks+5));
// if(StringUtils.isNotEmpty(bhj)){
// gdfdcs.setBhj(Double.parseDouble(bhj));
// }
//
//
// String nbwy=new DataFormatter().formatCellValue(row.getCell(ks+6));
// if(StringUtils.isNotEmpty(nbwy)){
// gdfdcs.setNbwy(Double.parseDouble(nbwy));
// }
//
//
// String dxwy=new DataFormatter().formatCellValue(row.getCell(ks+7));
// if(StringUtils.isNotEmpty(dxwy)){
// gdfdcs.setDxwy(Double.parseDouble(dxwy));
// }
//
//
//
// String zxl=new DataFormatter().formatCellValue(row.getCell(ks+8));
// if(StringUtils.isNotEmpty(zxl)){
// gdfdcs.setZxl(Double.parseDouble(zxl));
// }
//
//
// String fwbhl=new DataFormatter().formatCellValue(row.getCell(ks+9));
// if(StringUtils.isNotEmpty(fwbhl)){
// gdfdcs.setFwbhl(Double.parseDouble(fwbhl));
// }
//
//
// String qjbhl=new DataFormatter().formatCellValue(row.getCell(ks+10));
// if(StringUtils.isNotEmpty(qjbhl)){
// gdfdcs.setQjbhl(Double.parseDouble(qjbhl));
// }
//
// String gjm=new DataFormatter().formatCellValue(row.getCell(ks+11));
// if(StringUtils.isNotEmpty(gjm)){
// gdfdcs.setGjm(Double.parseDouble(gjm));
// }
//
// //计算视平移
// double spy = calculateApparentDisplacement(Double.parseDouble(bhfw), Double.parseDouble(nbwy), Double.parseDouble(dxwy));
// gdfdcs.setSpy(spy);
// sjJygjGdsjgdcsList.add(gdfdcs);
// }
//
// if(sjJygjGdsjgdcsList.size()>0){
// sjJygjGdsjgdcsMapper.deleteSjJygjGdsjgdcsByJh(jh);
// sjJygjGdsjgdcsMapper.insertSjJygjGdsjgdcsBatch(sjJygjGdsjgdcsList);
// }
// //井眼轨迹 轨道设计各点参数 end---------------------------------------------------
// List<SjJygjgdsj> sjJygjgdsjList=new ArrayList<>();
// for(int i=3; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjJygjgdsj gdfdcs =new SjJygjgdsj();
// gdfdcs.setJh(jh);
// int ks=24;
// String jdcs=new DataFormatter().formatCellValue(row.getCell(ks));
// if(StringUtils.isEmpty(jdcs)){
// continue;
// }
// gdfdcs.setJdcs(Double.parseDouble(jdcs));
// String jdbhj=new DataFormatter().formatCellValue(row.getCell(ks+1));
// if(StringUtils.isNotEmpty(jdbhj)){
// gdfdcs.setJdbhj(Double.parseDouble(jdbhj));
// }
//
// String jdbhfw=new DataFormatter().formatCellValue(row.getCell(ks+2));
// if(StringUtils.isNotEmpty(jdbhfw)){
// gdfdcs.setJdbhfw(Double.parseDouble(jdbhfw));
// }
//
// String zxd=new DataFormatter().formatCellValue(row.getCell(ks+3));
// gdfdcs.setZxd(Double.parseDouble(zxd));
//
// String zdjxj=new DataFormatter().formatCellValue(row.getCell(ks+4));
// if(StringUtils.isNotEmpty(zdjxj)){
// gdfdcs.setZdjxj(Double.parseDouble(zdjxj));
// }
//
//
// String cqj=new DataFormatter().formatCellValue(row.getCell(ks+5));
// if(StringUtils.isNotEmpty(cqj)){
// gdfdcs.setCqj(Double.parseDouble(cqj));
// }
//
//
// String ccqd=new DataFormatter().formatCellValue(row.getCell(ks+6));
// if(StringUtils.isNotEmpty(ccqd)){
// gdfdcs.setCcqd(Double.parseDouble(ccqd));
// }
//
//
// String cpj=new DataFormatter().formatCellValue(row.getCell(ks+7));
// if(StringUtils.isNotEmpty(cpj)){
// gdfdcs.setCpj(Double.parseDouble(cpj));
// }
//
//
//
// String slj=new DataFormatter().formatCellValue(row.getCell(ks+8));
// if(StringUtils.isNotEmpty(slj)){
// gdfdcs.setSlj(Double.parseDouble(slj));
// }
//
//
// String fwxzj=new DataFormatter().formatCellValue(row.getCell(ks+9));
// if(StringUtils.isNotEmpty(fwxzj)){
// gdfdcs.setFwxzj(Double.parseDouble(fwxzj));
// }
//
//
//
// sjJygjgdsjList.add(gdfdcs);
// }
// if(sjJygjgdsjList.size()>0){
// sjJygjgdsjMapper.deleteSjJygjgdsjByJh(jh);
// sjJygjgdsjMapper.insertSjJygjgdsjBatch(sjJygjgdsjList);
// }
// //钻井液 分段钻井液设计---------------------------------------------------
// sheet = workbook.getSheetAt(4);
// lastRowNum = sheet.getLastRowNum();
//
// List<SjZjyFdsj> sjZjyFdsjList =new ArrayList<>();
// List<SjSggyZjyFdsj> sjSggyZjyFdsjList =new ArrayList<>();
// for(int i=2; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjZjyFdsj fdsj =new SjZjyFdsj();
// fdsj.setJh(jh);
// String kc=new DataFormatter().formatCellValue(row.getCell(0));
// if(StringUtils.isEmpty(kc)){
// continue;
// }
// fdsj.setKc(kc);
// String jd=new DataFormatter().formatCellValue(row.getCell(1));
// fdsj.setJd(jd);
//
// String zjytx=new DataFormatter().formatCellValue(row.getCell(2));
// fdsj.setZjytx(zjytx);
// sjZjyFdsjList.add(fdsj);
// SjSggyZjyFdsj sjSggyZjyFdsj =new SjSggyZjyFdsj();
// BeanUtils.copyProperties(fdsj,sjSggyZjyFdsj);
// sjSggyZjyFdsjList.add(sjSggyZjyFdsj);
// }
// if(sjZjyFdsjList.size()>0){
// sjZjyFdsjMapper.deleteSjZjyFdsjByJh(jh);
// sjZjyFdsjMapper.insertSjZjyFdsjBatch(sjZjyFdsjList);
// }
// if(sjSggyZjyFdsjList.size()>0){
// sjSggyZjyFdsjMapper.deleteSjSggyZjyFdsjByJh(jh);
// sjSggyZjyFdsjMapper.insertSjSggyZjyFdsjBatch(sjSggyZjyFdsjList);
// }
// //钻井液 分段钻井液设计 end ---------------------------------------------------
// //钻井液 加量 ---------------------------------------------------
// List<SjZjyCljl> sjZjyCljlList =new ArrayList<>();
// List<SjSggyZjyCljl> sjSggyZjyCljlList =new ArrayList<>();
// for(int i=2; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjZjyCljl cljl =new SjZjyCljl();
// cljl.setJh(jh);
// int ks =5;
// String clmc=new DataFormatter().formatCellValue(row.getCell(ks));
// if(StringUtils.isEmpty(clmc)){
// continue;
// }
// cljl.setClmc(clmc);
// String ykjl=new DataFormatter().formatCellValue(row.getCell(ks+1));
// cljl.setYkjl(ykjl);
//
// String ekjl=new DataFormatter().formatCellValue(row.getCell(ks+2));
// cljl.setEkjl(ekjl);
//
// String skjl=new DataFormatter().formatCellValue(row.getCell(ks+3));
// cljl.setSkjl(skjl);
//
// String sikjl=new DataFormatter().formatCellValue(row.getCell(ks+4));
// cljl.setSikjl(sikjl);
// String wkjl=new DataFormatter().formatCellValue(row.getCell(ks+5));
// cljl.setWkjl(wkjl);
//
// sjZjyCljlList.add(cljl);
//
// SjSggyZjyCljl sjSggyZjyCljl =new SjSggyZjyCljl();
// BeanUtils.copyProperties(cljl,sjSggyZjyCljl);
// sjSggyZjyCljlList.add(sjSggyZjyCljl);
// }
// if(sjZjyCljlList.size()>0){
// sjZjyCljlMapper.deleteSjZjyCljlByJh(jh);
// sjZjyCljlMapper.insertSjZjyCljlBatch(sjZjyCljlList);
// }
// if(sjSggyZjyCljlList.size()>0){
// sjSggyZjyCljlMapper.deleteSjSggyZjyCljlByJh(jh);
// sjSggyZjyCljlMapper.insertSjSggyZjyCljlBatch(sjSggyZjyCljlList);
// }
// //钻井液 加量 end ---------------------------------------------------
//
// //钻井液 分段钻井液性能设计表 ---------------------------------------------------
// List<SjZjyFdxnb> sjZjyFdxnbList = new ArrayList<>();
// List<SjSggyZjyFdxnb> sjSggyZjyFdxnbList = new ArrayList<>();
// List<SjFdsgcsZjyFdxnb> sjFdsgcsZjyFdxnbList = new ArrayList<>();
// DataFormatter dataFormatter = new DataFormatter();
// lastRowNum = sheet.getLastRowNum();
//
// // 第一步:解析表头,确定动态井段(从第 12 列开始,第 0 列是项目列,从第 1 列往后是井段列)
// Row headerRow = sheet.getRow(1); // 假设表头在第 0 行(根据实际 Excel 结构调整)
// int ksl=13;
// List<String> wellSegments = new ArrayList<>();
// if (headerRow != null) {
// int lastCellNum = headerRow.getLastCellNum();
// for (int k = 13; k < lastCellNum; k++) { // 第 0 列是“项目”,从第 1 列开始是井段
//
// Cell cell = headerRow.getCell(k);
// if (cell != null) {
// String segment = dataFormatter.formatCellValue(cell);
// if("0-451m或0~451m".equals(segment)){
// ksl=14;
// continue;
// }
// wellSegments.add(segment);
// }
// }
// }
// for(int k=0;k<wellSegments.size();k++){
// String segment = wellSegments.get(k);
// SjZjyFdxnb fdxnb = new SjZjyFdxnb();
// fdxnb.setJh(jh);
// fdxnb.setJd(segment); // 设置井段
//
// for(int i=0;i<=lastRowNum;i++){
// //获取数据行
// Row xmRow = sheet.getRow(i+2);
// if(xmRow==null){
// continue;
// }
// //项目名称
// String xm = dataFormatter.formatCellValue(xmRow.getCell(12));
// if(StringUtils.isEmpty(xm)){
// continue;
// }
// String value = dataFormatter.formatCellValue(xmRow.getCell(k + ksl));
//
// String fieldName = DrillingFluidConstant.ITEM_FIELD_MAP.get(xm);
// if(StringUtils.isEmpty(fieldName)){
// continue;
// }
// switch (fieldName) {
// case "md":
// fdxnb.setMd(value);
// break;
// case "msldnd":
// fdxnb.setMsldnd(value);
// break;
// case "apilsl":
// fdxnb.setApilsl(value);
// break;
// case "apinb":
// fdxnb.setApinb(value);
// break;
// case "jql":
// fdxnb.setJql(value);
// break;
// case "ph":
// fdxnb.setPh(value);
// break;
// case "hsl":
// fdxnb.setHsl(value);
// break;
// case "zgh":
// fdxnb.setZgh(value);
// break;
// case "mzxs":
// fdxnb.setMzxs(value);
// break;
// case "dql":
// fdxnb.setDql(value);
// break;
// case "sxnd":
// fdxnb.setSxnd(value);
// break;
// // 其他字段的 case 继续补充
// default:
// break;
// }
// }
// sjZjyFdxnbList.add(fdxnb);
// SjSggyZjyFdxnb sjSggyZjyFdxnb =new SjSggyZjyFdxnb();
// BeanUtils.copyProperties(fdxnb,sjSggyZjyFdxnb);
// sjSggyZjyFdxnbList.add(sjSggyZjyFdxnb);
// SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb =new SjFdsgcsZjyFdxnb();
// BeanUtils.copyProperties(fdxnb,sjFdsgcsZjyFdxnb);
// sjFdsgcsZjyFdxnbList.add(sjFdsgcsZjyFdxnb);
// }
// // 第三步:执行删除旧数据和插入新数据逻辑
// if (!sjZjyFdxnbList.isEmpty()) {
// sjZjyFdxnbMapper.deleteSjZjyFdxnbByJh(jh);
// sjZjyFdxnbMapper.insertSjZjyFdxnbBatch(sjZjyFdxnbList);
// }
// if(sjSggyZjyFdxnbList.size()>0){
// sjSggyZjyFdxnbMapper.deleteSjSggyZjyFdxnbByJh(jh);
// sjSggyZjyFdxnbMapper.insertSjSggyZjyFdxnbBatch(sjSggyZjyFdxnbList);
// }
//
// if(sjFdsgcsZjyFdxnbList.size()>0){
// double ksjs=0;
// for(int i=0;i<sjJsjgList.size();i++){
// if(i==0){
// ksjs=0;
// }else {
// ksjs=sjJsjgList.get(i-1).getJs();
// }
// Double js = sjJsjgList.get(i).getJs();
// for(SjFdsgcsZjyFdxnb fdxnb:sjFdsgcsZjyFdxnbList){
// if(StringUtils.isNotEmpty(fdxnb.getJd())){
// String s = extractNumber(fdxnb.getJd());
// if(StringUtils.isNotEmpty(s)){
// double jsjs = Double.parseDouble(s);
// if(jsjs>ksjs&&jsjs<=js){
// fdxnb.setKc(sjJsjgList.get(i).getKc());
// }
// }
// }
// }
// }
//
// sjFdsgcsZjyFdxnbMapper.deleteSjFdsgcsZjyFdxnbByJh(jh);
// sjFdsgcsZjyFdxnbMapper.insertSjFdsgcsZjyFdxnbBatch(sjFdsgcsZjyFdxnbList);
//
// }
// //钻井液 分段钻井液性能设计表 end---------------------------------------------------
//
//
// sheet = workbook.getSheetAt(5);
// lastRowNum = sheet.getLastRowNum();
//
// //套管 套管柱数据表---------------------------------------------------
// List<SjTgTgz> sjTgTgzList =new ArrayList<>();
// for(int i=4; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
//
// SjTgTgz tgTgz =new SjTgTgz();
// tgTgz.setJh(jh);
// String kc=new DataFormatter().formatCellValue(row.getCell(0));
// if(StringUtils.isEmpty(kc)){
// continue;
// }
//
// tgTgz.setKc(kc);
// String jd=new DataFormatter().formatCellValue(row.getCell(1));
// tgTgz.setJd(jd);
//
// String wj=new DataFormatter().formatCellValue(row.getCell(2));
// if(StringUtils.isNotEmpty(wj)){
// tgTgz.setWj(wj);
// }
//
//
// String gj=new DataFormatter().formatCellValue(row.getCell(3));
// tgTgz.setGj(gj);
//
// String bh=new DataFormatter().formatCellValue(row.getCell(4));
// if(StringUtils.isNotEmpty(bh)){
// tgTgz.setBh(bh);
// }
//
//
// String kx=new DataFormatter().formatCellValue(row.getCell(5));
// tgTgz.setKx(kx);
//
//
// String zjsknj=new DataFormatter().formatCellValue(row.getCell(6));
// if(StringUtils.isNotEmpty(zjsknj)){
// tgTgz.setZjsknj(zjsknj);
// }
//
//
// String cd=new DataFormatter().formatCellValue(row.getCell(7));
// if(StringUtils.isNotEmpty(cd)){
// tgTgz.setCd(cd);
// }
//
//
// String zjymd=new DataFormatter().formatCellValue(row.getCell(8));
// if(StringUtils.isNotEmpty(zjymd)){
// tgTgz.setZjymd(zjymd);
// }
//
//
// sjTgTgzList.add(tgTgz);
// }
// if(sjTgTgzList.size()>0){
// sjTgTgzMapper.deleteSjTgTgzByJh(jh);
// sjTgTgzMapper.insertSjTgTgzBatch(sjTgTgzList);
// }
//
// //套管 套管柱数据表end---------------------------------------------------
// //套管 套管性能数据---------------------------------------------------
// List<SjTgTgxnsj> sjTgTgxnsjList =new ArrayList<>();
//
// for(int i=4; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjTgTgxnsj tgTgz =new SjTgTgxnsj();
// tgTgz.setJh(jh);
// int ks =11;
// String wj=new DataFormatter().formatCellValue(row.getCell(ks));
// if(StringUtils.isEmpty(wj)){
// continue;
// }
//
// tgTgz.setWj(Double.parseDouble(wj));
// String gj=new DataFormatter().formatCellValue(row.getCell(ks+1));
// tgTgz.setGj(gj);
//
// String bh=new DataFormatter().formatCellValue(row.getCell(ks+2));
// if(StringUtils.isNotEmpty(bh)){
// tgTgz.setBh(Double.parseDouble(bh));
// }
//
//
// String kx=new DataFormatter().formatCellValue(row.getCell(ks+3));
// tgTgz.setKx(kx);
//
// String mmzl=new DataFormatter().formatCellValue(row.getCell(ks+4));
// if(StringUtils.isNotEmpty(mmzl)){
// tgTgz.setMmzl(Double.parseDouble(mmzl));
// }
//
//
// String jgwj=new DataFormatter().formatCellValue(row.getCell(ks+5));
// if(StringUtils.isNotEmpty(jgwj)){
// tgTgz.setJgwj(Double.parseDouble(jgwj));
// }
//
//
// String klqd=new DataFormatter().formatCellValue(row.getCell(ks+6));
// if(StringUtils.isNotEmpty(klqd)){
// tgTgz.setKlqd(Double.parseDouble(klqd));
// }
//
//
// String kjqd=new DataFormatter().formatCellValue(row.getCell(ks+7));
// if(StringUtils.isNotEmpty(kjqd)){
// tgTgz.setKjqd(Double.parseDouble(kjqd));
// }
//
//
//
// String knyqd=new DataFormatter().formatCellValue(row.getCell(ks+8));
// if(StringUtils.isNotEmpty(knyqd)){
// tgTgz.setKnyqd(Double.parseDouble(knyqd));
// }
//
// sjTgTgxnsjList.add(tgTgz);
// }
// if(sjTgTgxnsjList.size()>0){
// sjTgTgxnsjMapper.deleteSjTgTgxnsjByJh(jh);
// sjTgTgxnsjMapper.insertSjTgTgxnsjBatch(sjTgTgxnsjList);
// }
// //套管 套管性能数据end---------------------------------------------------
// //套管 套管柱强度校核---------------------------------------------------
// List<SjTgTgqdjh> sjTgTgqdjhList =new ArrayList<>();
// for(int i=4; i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjTgTgqdjh tgTgz =new SjTgTgqdjh();
// tgTgz.setJh(jh);
// int ks =22;
// String kc=new DataFormatter().formatCellValue(row.getCell(ks));
// if(StringUtils.isEmpty(kc)){
// continue;
// }
// tgTgz.setKc(kc);
// String jd=new DataFormatter().formatCellValue(row.getCell(ks+1));
// tgTgz.setJd(jd);
//
// String mmzl=new DataFormatter().formatCellValue(row.getCell(ks+2));
// if(StringUtils.isNotEmpty(mmzl)){
// tgTgz.setMmzl(Double.parseDouble(mmzl));
// }
//
//
// String djz=new DataFormatter().formatCellValue(row.getCell(ks+3));
// if(StringUtils.isNotEmpty(djz)){
// tgTgz.setDjz(Double.parseDouble(djz));
// }
//
//
// String ljz=new DataFormatter().formatCellValue(row.getCell(ks+4));
// if(StringUtils.isNotEmpty(ljz)){
// tgTgz.setLjz(Double.parseDouble(ljz));
// }
//
//
// String zdzhkwj=new DataFormatter().formatCellValue(row.getCell(ks+5));
// if(StringUtils.isNotEmpty(zdzhkwj)){
// tgTgz.setZdzhkwj(Double.parseDouble(zdzhkwj));
// }
//
//
// String aqxskwj=new DataFormatter().formatCellValue(row.getCell(ks+6));
// if(StringUtils.isNotEmpty(aqxskwj)){
// tgTgz.setAqxskwj(Double.parseDouble(aqxskwj));
// }
//
//
// String zdzhkny=new DataFormatter().formatCellValue(row.getCell(ks+7));
// if(StringUtils.isNotEmpty(zdzhkny)){
// tgTgz.setZdzhkny(Double.parseDouble(zdzhkny));
// }
//
//
//
// String aqxskny=new DataFormatter().formatCellValue(row.getCell(ks+8));
// if(StringUtils.isNotEmpty(aqxskny)){
// tgTgz.setAqxskny(Double.parseDouble(aqxskny));
// }
//
//
// String zdzhkl=new DataFormatter().formatCellValue(row.getCell(ks+9));
// if(StringUtils.isNotEmpty(zdzhkl)){
// tgTgz.setZdzhkl(Double.parseDouble(zdzhkl));
// }
//
//
// String aqxskl=new DataFormatter().formatCellValue(row.getCell(ks+10));
// if(StringUtils.isNotEmpty(aqxskl)){
// tgTgz.setAqxskl(Double.parseDouble(aqxskl));
// }
//
// sjTgTgqdjhList.add(tgTgz);
// }
// if(sjTgTgqdjhList.size()>0){
// sjTgTgqdjhMapper.deleteSjTgTgqdjhByJh(jh);
// sjTgTgqdjhMapper.insertSjTgTgqdjhBatch(sjTgTgqdjhList);
// }
// //套管 套管柱强度校核end---------------------------------------------------
// //质量要求 井身质量要求---------------------------------------------------
// sheet = workbook.getSheetAt(6);
// lastRowNum = sheet.getLastRowNum();
// List<SjZlyq> sjZlyqList =new ArrayList<>();
// for(int i=2;i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjZlyq sjZlyq =new SjZlyq();
// sjZlyq.setJh(jh);
// String jd=new DataFormatter().formatCellValue(row.getCell(0));
// if(StringUtils.isEmpty(jd)){
// continue;
// }
// sjZlyq.setJd(jd);
//
// String jxj=new DataFormatter().formatCellValue(row.getCell(1));
// if(StringUtils.isNotEmpty(jxj)){
// sjZlyq.setJxj(Double.parseDouble(jxj));
// }
//
//
// String qjbhl=new DataFormatter().formatCellValue(row.getCell(2));
// if(StringUtils.isNotEmpty(qjbhl)){
// sjZlyq.setQjbhl(Double.parseDouble(qjbhl));
//
// }
//
// sjZlyqList.add(sjZlyq);
// }
//
// if(sjZlyqList.size()>0){
// sjZlyqMapper.deleteSjZlyqByJh(jh);
// sjZlyqMapper.insertSjZlyqBatch(sjZlyqList);
// }
//
// //质量要求 中靶要求-定向井---------------------------------------------------
// List<SjZlyqZbyq> sjZlyqZbyqList =new ArrayList<>();
// for(int i=2;i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjZlyqZbyq sjZlyq =new SjZlyqZbyq();
// sjZlyq.setJh(jh);
//
// String bd=new DataFormatter().formatCellValue(row.getCell(4));
// if(StringUtils.isEmpty(bd)){
// continue;
// }
// sjZlyq.setBd(bd);
//
// String bbj1=new DataFormatter().formatCellValue(row.getCell(5));
// if(StringUtils.isNotEmpty(bbj1)){
// sjZlyq.setBbj(Double.parseDouble(bbj1));
//
// }
//
//
// String bz=new DataFormatter().formatCellValue(row.getCell(6));
// sjZlyq.setBz(bz);
// sjZlyqZbyqList.add(sjZlyq);
// }
//
// if(sjZlyqZbyqList.size()>0){
// sjZlyqZbyqMapper.deleteSjZlyqZbyqByJh(jh);
// sjZlyqZbyqMapper.insertSjZlyqZbyqBatch(sjZlyqZbyqList);
// }
// //质量要求 中靶要求-定向井end---------------------------------------------------
// //质量要求 质量要求---------------------------------------------------
// List<SjZlyqXx> sjZlyqXxList =new ArrayList<>();
// for(int i=1;i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjZlyqXx sjZlyq =new SjZlyqXx();
// sjZlyq.setJh(jh);
//
// String dxj=new DataFormatter().formatCellValue(row.getCell(8));
// if(StringUtils.isEmpty(dxj)){
// continue;
// }
// sjZlyq.setDxjzlyq(dxj);
//
// String gjzlyq=new DataFormatter().formatCellValue(row.getCell(9));
// sjZlyq.setGjzlyq(gjzlyq);
//
// String wcjjkzlyq=new DataFormatter().formatCellValue(row.getCell(10));
// sjZlyq.setWcjjkzlyq(wcjjkzlyq);
// String yqcwrpdyq=new DataFormatter().formatCellValue(row.getCell(11));
// sjZlyq.setYqcwrpdyq(yqcwrpdyq);
// sjZlyqXxList.add(sjZlyq);
// }
//
// if(sjZlyqXxList.size()>0){
// sjZlyqXxMapper.deleteSjZlyqXxByJh(jh);
// sjZlyqXxMapper.insertSjZlyqXxBatch(sjZlyqXxList);
// }
//
// //质量要求 质量要求end---------------------------------------------------
// //构造特征 ---------------------------------------------------
// sheet = workbook.getSheetAt(7);
// List<SjGztz> sjGztzList=new ArrayList<>();
// List<XSSFPictureData> allPictures = sheet.getWorkbook().getAllPictures();
//
//
//
//
//
//
//
// List<XSSFPicture> pictures = getPictures(sheet);
//
// // 遍历图片并处理
// for (XSSFPicture picture : pictures) {
// // 获取锚点信息(位置)
// XSSFClientAnchor anchor = picture.getClientAnchor();
// XSSFPictureData pictureData = picture.getPictureData();
// String ext = pictureData.suggestFileExtension();
// String filePath = RuoYiConfig.getUploadPath()+"/gztz/";
// //判断是否为井位图
// if(isPictureInRow(anchor, 0, 0)){
// SjGztz sjGztz=new SjGztz();
// sjGztz.setJh(jh);
// sjGztz.setGzlx("井位图");
// String fileName = UUID.randomUUID().toString();
// String lj = filePath + fileName + "." + ext;
//
// File desc = new File(lj);
//
// if (!desc.exists())
// {
// if (!desc.getParentFile().exists())
// {
// desc.getParentFile().mkdirs();
// }
// }
// sjGztz.setLj( Constants.RESOURCE_PREFIX +"/upload/gztz/"+fileName + "." + ext);
// FileOutputStream fos = new FileOutputStream(new File(filePath+fileName+"." + ext));
// fos.write(pictureData.getData());
// fos.close();
// sjGztzList.add(sjGztz);
// }else if(isPictureInRow(anchor, 1, 1)){
// SjGztz sjGztz=new SjGztz();
// sjGztz.setJh(jh);
// sjGztz.setGzlx("地震剖面图");
// String fileName = UUID.randomUUID().toString();
// String lj = filePath + fileName + "." + ext;
// File desc = new File(lj);
// if (!desc.exists())
// {
// if (!desc.getParentFile().exists())
// {
// desc.getParentFile().mkdirs();
// }
// }
// sjGztz.setLj( Constants.RESOURCE_PREFIX +"/upload/gztz/"+fileName + "." + ext);
// FileOutputStream fos = new FileOutputStream(new File(filePath+fileName+"." + ext));
// fos.write(pictureData.getData());
// fos.close();
// sjGztzList.add(sjGztz);
// }else if(isPictureInRow(anchor, 2, 2)){
// SjGztz sjGztz=new SjGztz();
// sjGztz.setJh(jh);
// sjGztz.setGzlx("三压力剖面图");
// String fileName = UUID.randomUUID().toString();
// String lj = filePath + fileName + "." + ext;
// File desc = new File(lj);
// if (!desc.exists())
// {
// if (!desc.getParentFile().exists())
// {
// desc.getParentFile().mkdirs();
// }
// }
// sjGztz.setLj( Constants.RESOURCE_PREFIX +"/upload/gztz/"+fileName + "." + ext);
// FileOutputStream fos = new FileOutputStream(new File(filePath+fileName+"." + ext));
// fos.write(pictureData.getData());
// fos.close();
// sjGztzList.add(sjGztz);
// }
// }
//
//
//
// //井身结构图
// sheet = workbook.getSheetAt(12);
// if(sheet!=null){
// List<XSSFPicture> picturesJsjgt = getPictures(sheet);
//
// // 遍历图片并处理
// for (XSSFPicture picture : picturesJsjgt) {
// // 获取锚点信息(位置)
// XSSFClientAnchor anchor = picture.getClientAnchor();
// XSSFPictureData pictureData = picture.getPictureData();
// String ext = pictureData.suggestFileExtension();
// String filePath = RuoYiConfig.getUploadPath()+"/gztz/";
// //判断是否为井位图
// if(isPictureInRow(anchor, 0, 0)){
// SjGztz sjGztz=new SjGztz();
// sjGztz.setJh(jh);
// sjGztz.setGzlx("井身结构图");
// String fileName = UUID.randomUUID().toString();
// String lj = filePath + fileName + "." + ext;
//
// File desc = new File(lj);
//
// if (!desc.exists())
// {
// if (!desc.getParentFile().exists())
// {
// desc.getParentFile().mkdirs();
// }
// }
// sjGztz.setLj( Constants.RESOURCE_PREFIX +"/upload/gztz/"+fileName + "." + ext);
// FileOutputStream fos = new FileOutputStream(new File(filePath+fileName+"." + ext));
// fos.write(pictureData.getData());
// fos.close();
// sjGztzList.add(sjGztz);
// }
// }
// if(sjGztzList.size()>0){
// sjGztzMapper.deleteSjGztzByJh(jh);
// sjGztzMapper.insertSjGztzBatch(sjGztzList);
// }
//
// }
//
//
//
// //构造特征end---------------------------------------------------
// //邻井扫描 table---------------------------------------------------
// sheet = workbook.getSheetAt(8);
// lastRowNum = sheet.getLastRowNum();
// List<SjLjsm> sjLjsmList=new ArrayList<>();
// for(int i=3;i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjLjsm sjLjsm =new SjLjsm();
// sjLjsm.setJh(jh);
// String js=new DataFormatter().formatCellValue(row.getCell(1));
// if(StringUtils.isEmpty(js)){
// continue;
// }
// sjLjsm.setJs(Double.parseDouble(js));
// String cssj=new DataFormatter().formatCellValue(row.getCell(2));
// if(StringUtils.isEmpty(cssj)){
// sjLjsm.setCs(0.0);
// }else {
// sjLjsm.setCs(Double.parseDouble(cssj));
// }
// String bjjh=new DataFormatter().formatCellValue(row.getCell(3));
// sjLjsm.setBjjh(bjjh);
//
// String bjsjly=new DataFormatter().formatCellValue(row.getCell(4));
// sjLjsm.setBjsjly(bjsjly);
//
// String bjjs=new DataFormatter().formatCellValue(row.getCell(5));
// if(StringUtils.isNotEmpty(bjjs)){
// sjLjsm.setBjjs(Double.parseDouble(bjjs));
// }
// String bjcs=new DataFormatter().formatCellValue(row.getCell(6));
// if(StringUtils.isNotEmpty(bjcs)){
// sjLjsm.setBjcs(Double.parseDouble(bjcs));
// }
// String bjzjjl=new DataFormatter().formatCellValue(row.getCell(7));
// if(StringUtils.isNotEmpty(bjzjjl)){
// sjLjsm.setBjzjjl(Double.parseDouble(bjzjjl));
// }
// String bjsmj=new DataFormatter().formatCellValue(row.getCell(8));
// if(StringUtils.isNotEmpty(bjsmj)){
// sjLjsm.setBjsmj(Double.parseDouble(bjsmj));
// }
//
// String bjyj=new DataFormatter().formatCellValue(row.getCell(9));
// if(StringUtils.isNotEmpty(bjyj)){
// sjLjsm.setBjyj(Double.parseDouble(bjyj));
// }
// sjLjsmList.add(sjLjsm);
//
// }
// if(sjLjsmList.size()>0){
// sjLjsmMapper.deleteSjLjsmByJh(jh);
// sjLjsmMapper.insertSjLjsmBatch(sjLjsmList);
// }
// //邻井扫描 end---------------------------------------------------
// //邻井扫描 注意事项---------------------------------------------------
// List<ClFxsb> clFxsbList = clFxsbMapper.selectClFxsbList(new ClFxsb());
// sjZysxMapper.deleteSjZysxByJh(jh);
// String zysx=new DataFormatter().formatCellValue(sheet.getRow(1).getCell(11));
// if(StringUtils.isNotEmpty(zysx)){
// SjZysx sjZysx=new SjZysx();
// sjZysx.setJh(jh);
// sjZysx.setLb("邻井扫描");
// sjZysx.setZysx(zysx);
// for(SjLjsm sjLjsm:sjLjsmList){
// Double zjjl=sjLjsm.getBjzjjl();
// Double js=sjLjsm.getJs();
// if(zjjl<5){
// if(StringUtils.isNotEmpty(sjZysx.getZysx())){
// sjZysx.setZysx(sjZysx.getZysx()+";本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰");
// }else {
// sjZysx.setZysx("本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰");
// }
// Double ksjs=0.0;
// for(int i=0;i<sjJsjgList.size();i++){
// SjJsjg sjJsjg = sjJsjgList.get(i);
// String kc = sjJsjg.getKc();
// if(i==0){
// ksjs=0.0;
// }else {
// ksjs =sjJsjgList.get(i-1).getJs();
// }
// ClFxsb clFxsb = clFxsbList.stream().filter(it -> it.getFxys().equals("防碰距离")).findFirst().orElse(null);
// if(js>ksjs&&js<sjJsjg.getJs()){
// SjFdsgcs sjFdsgcs=new SjFdsgcs();
// sjFdsgcs.setJh(jh);
// sjFdsgcs.setKc(sjJsjg.getKc());
// SjFdsgcs sjFdsgcs1 = sjFdsgcsMapper.selectSjFdsgcsByJhAndKc(sjFdsgcs);
// if(sjFdsgcs1!=null){
// if(clFxsb!=null){
// String zjycs = clFxsb.getZjycs();
// String gcjscs = clFxsb.getGcjscs();
// String zyfx="防碰风险:本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰;风险描述:"+clFxsb.getFxms();
// if(StringUtils.isNotEmpty(sjFdsgcs1.getZyfx())){
// if(!sjFdsgcs1.getZyfx().contains("防碰风险")){
// sjFdsgcs1.setZyfx(sjFdsgcs1.getZyfx()+";"+zyfx);
// }
// }else {
// sjFdsgcs1.setZyfx(zyfx);
// }
//
// if(StringUtils.isNotEmpty(zjycs)){
// String zjycsms="防碰风险:钻井液措施:"+zjycs;
// if(StringUtils.isNotEmpty(sjFdsgcs1.getZjycs())){
// if(!sjFdsgcs1.getZjycs().contains("防碰风险")){
// sjFdsgcs1.setZjycs(sjFdsgcs1.getZjycs()+";"+zjycsms);
// }
// }else {
// sjFdsgcs1.setZjycs(zjycsms);
// }
//
// }
// if(StringUtils.isNotEmpty(gcjscs)){
// if(StringUtils.isNotEmpty(sjFdsgcs1.getZjgccs())){
// if(!sjFdsgcs1.getZjgccs().contains("防碰风险")){
// sjFdsgcs1.setZjgccs(sjFdsgcs1.getZjgccs()+";防碰风险:工程技术措施:"+gcjscs);
// }
// }else {
// sjFdsgcs1.setZjgccs("防碰风险:工程技术措施:"+gcjscs);
// }
//
// }
// }
// sjFdsgcsMapper.updateSjFdsgcs(sjFdsgcs1);
// }else {
// sjFdsgcs1=new SjFdsgcs();
// sjFdsgcs1.setJh(jh);
// sjFdsgcs1.setKc(kc);
//
// if(clFxsb!=null){
// String zjycs = clFxsb.getZjycs();
// String gcjscs = clFxsb.getGcjscs();
// sjFdsgcs1.setZyfx("本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰;风险描述:"+clFxsb.getFxms());
// if(StringUtils.isNotEmpty(zjycs)){
// sjFdsgcs1.setZjycs("防碰风险:钻井液措施:"+zjycs);
// }
// if(StringUtils.isNotEmpty(gcjscs)){
// sjFdsgcs1.setZjgccs("防碰风险:工程技术措施:"+gcjscs);
// }
// }
// sjFdsgcsMapper.insertSjFdsgcs(sjFdsgcs1);
// }
// }
// }
// }
//
// }
// sjZysxMapper.insertSjZysx(sjZysx);
// }
//
// //邻井扫描 注意事项end---------------------------------------------------
// //H2S table---------------------------------------------------
// sheet = workbook.getSheetAt(9);
// lastRowNum = sheet.getLastRowNum();
// List<SjH2s> sjH2sList=new ArrayList<>();
// for(int i=3;i<=lastRowNum;i++){
// row = sheet.getRow(i);
// if(row==null){
// continue;
// }
// SjH2s sjH2s=new SjH2s();
// String jh1=new DataFormatter().formatCellValue(row.getCell(0));
// if(StringUtils.isEmpty(jh1)){
// continue;
// }
// sjH2s.setJh(jh);
// sjH2s.setLjjh(jh1);
// String js=new DataFormatter().formatCellValue(row.getCell(1));
// if(StringUtils.isNotEmpty(js)){
// sjH2s.setJs(Double.parseDouble(js));
// }
// String gczt=new DataFormatter().formatCellValue(row.getCell(2));
// sjH2s.setGczt(gczt);
// String cw=new DataFormatter().formatCellValue(row.getCell(3));
// sjH2s.setCw(cw);
// String xsbd=new DataFormatter().formatCellValue(row.getCell(4));
// if(StringUtils.isNotEmpty(xsbd)){
// sjH2s.setXsbd(Double.parseDouble(xsbd));
// }
//
// String xsgc=new DataFormatter().formatCellValue(row.getCell(5));
// sjH2s.setXsgc(xsgc);
// String jcsj=new DataFormatter().formatCellValue(row.getCell(6));
// sjH2s.setJcsj(jcsj);
//
// String jcfs=new DataFormatter().formatCellValue(row.getCell(7));
// sjH2s.setJcfs(jcfs);
// String wyjkfw=new DataFormatter().formatCellValue(row.getCell(8));
// if(StringUtils.isNotEmpty(wyjkfw)){
// sjH2s.setWyjkfw(Double.parseDouble(wyjkfw));
// }
//
// String wyjkjl=new DataFormatter().formatCellValue(row.getCell(9));
// if(StringUtils.isNotEmpty(wyjkjl)){
// sjH2s.setWyjkjl(Double.parseDouble(wyjkjl));
// }
// String wybdfw=new DataFormatter().formatCellValue(row.getCell(10));
// if(StringUtils.isNotEmpty(wybdfw)){
// sjH2s.setWybdfw(Double.parseDouble(wybdfw));
// }
//
// String wybdjl=new DataFormatter().formatCellValue(row.getCell(11));
// if(StringUtils.isNotEmpty(wybdjl)){
// sjH2s.setWybdjl(Double.parseDouble(wybdjl));
// }
// sjH2sList.add(sjH2s);
// }
// if(sjH2sList.size()>0){
// sjH2sMapper.deleteSjH2sByJh(jh);
// sjH2sMapper.insertSjH2sBatch(sjH2sList);
// }
////
// //H2S end---------------------------------------------------
// //H2S 注意事项---------------------------------------------------
// String zysx1=new DataFormatter().formatCellValue(sheet.getRow(1).getCell(13));
// if(StringUtils.isNotEmpty(zysx1)){
// SjZysx sjZysx=new SjZysx();
// sjZysx.setJh(jh);
// sjZysx.setLb("H2S");
// sjZysx.setZysx(zysx1);
//// sjZysxMapper.deleteSjZysxByJh(jh);
// sjZysxMapper.insertSjZysx(sjZysx);
// }
// //H2S 注意事项end---------------------------------------------------
// //喷漏卡塌 ---------------------------------------------------
// sheet = workbook.getSheetAt(10);
// 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);
// }
// //喷漏卡塌 end---------------------------------------------------
// //浅层气---------------------------------------------------
// sheet = workbook.getSheetAt(11);
// 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);
// }
// //浅层气end---------------------------------------------------
// //计算地质分层
// CommonParam param =new CommonParam();
// param.setJh(jh);
// List<SjDcfxDzfc> dzfcList = djdcService.getDzfcList2(param);
// List<SjFdfx> sjFdfxList=new ArrayList<>();
// if(dzfcList.size()>0){
// sjDcfxDzfcMapper.deleteSjDcfxDzfcByJh(jh);
// sjDcfxDzfcMapper.insertSjDcfxDzfcBatch(dzfcList);
// List<SjFdsgcsDcyx> sjFdsgcsDcyxList=new ArrayList<>();
// double previousDepth= 0;
// double csaa= 0;
// for (int i = 0; i < sjJsjgList.size(); i++) {
// SjJsjg sjJsjg = sjJsjgList.get(i);
// if (i == 0) {
// previousDepth = 0;
// } else {
// //上一次的垂深
// previousDepth = csaa;
// }
// //计算垂深
// double targetCs = CxszhUtil.getCs(sjJygjGdsjgdcsList, sjJsjg.getJs());
// csaa = targetCs;
// sjFdsgcsDcyxList.addAll(processAndDisplayDc(dzfcList, previousDepth, targetCs, jh, sjJsjg.getKc(),sjJygjGdsjgdcsList));
// sjFdfxList.addAll(processAndDisplayFd(dzfcList, previousDepth, targetCs, jh, sjJsjg.getKc(),sjJygjGdsjgdcsList,id));
// }
// if (sjFdsgcsDcyxList.size() > 0) {
// sjFdsgcsDcyxMapper.deleteSjFdsgcsDcyxByJh(jh);
// sjFdsgcsDcyxMapper.insertSjFdsgcsDcyxBatch(sjFdsgcsDcyxList);
// }
// if(sjFdfxList.size()>0){
// sjFdfxMapper.deleteSjFdfxByZbid(id);
// sjFdfxMapper.insertSjFdfxBatch(sjFdfxList);
// }
// }
//
// //高指标井
// sjDjjcService.getGzbjList(jh);
// } catch (IOException e) {
// e.getMessage();
// e.printStackTrace();
// throw new Exception("导入Excel失败,请联系网站管理员!");
//
// } finally {
// workbook.close();
// }
//
//
//
//
// String name = file.getOriginalFilename();
// String type = StringUtils.substringAfterLast(name, ".");
// String fileNameYs = name.substring(0,name.lastIndexOf("."));
// String filePath1 = RuoYiConfig.getUploadPath();
// String fileName1 = FileUploadUtils.upload(filePath1, file);
// CommonFile upFile = new CommonFile();
// upFile.setFileName(fileNameYs);//文件名
// upFile.setFilePath(fileName1);//文件路径
// upFile.setFileSuffix(type);//后缀
// upFile.setFileType(type);//文件类型
// upFile.setTemplateName("模板数据导入");//文件类型
// upFile.setType("施工方案设计");//文件类型
// upFile.setBusinessId(sjDjjc.getId().toString());//文件类型
//// upFile.setCreatedBy(SecurityUtils.getUsername());//创建人
// upFile.setCreatedTime(new Date());//创建时间
// commonFileService.insertCommonFile(upFile);
// return AjaxResult.success("导入成功");
// }
......
......@@ -2,6 +2,8 @@ package com.zjsgfa.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -101,4 +103,17 @@ public class SjLjfzqkController extends BaseController
{
return toAjax(sjLjfzqkService.deleteSjLjfzqkByIds(ids));
}
@PostMapping("/pladd2Ljfzqk")
public AjaxResult pladd2Ljfzqk(@RequestBody List<SjLjjw> list) throws Exception
{
return toAjax(sjLjfzqkService.insertSjLjfzqkBatch(list));
}
}
......@@ -2,6 +2,8 @@ package com.zjsgfa.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -41,7 +43,7 @@ public class SjLjzjyfzqkController extends BaseController
@GetMapping("/list")
public TableDataInfo list(SjLjzjyfzqk sjLjzjyfzqk)
{
startPage();
// startPage();
List<SjLjzjyfzqk> list = sjLjzjyfzqkService.selectSjLjzjyfzqkList(sjLjzjyfzqk);
return getDataTable(list);
}
......@@ -101,4 +103,11 @@ public class SjLjzjyfzqkController extends BaseController
{
return toAjax(sjLjzjyfzqkService.deleteSjLjzjyfzqkByIds(ids));
}
@PostMapping("/pladd2")
public AjaxResult pladd2(@RequestBody List<SjLjjw> list) throws Exception
{
return toAjax(sjLjzjyfzqkService.insertSjLjzjyfzqkBatch(list));
}
}
......@@ -230,7 +230,9 @@ public class SjDjjc extends ProcessBaseEntity
private String ndxsjg;
private String sgdw;
//类型(工程、钻井液)
private String lx;
/** 钻井液流程实例id */
......
......@@ -66,144 +66,7 @@ public class SjJsjg extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
//水泥固封段
private String sngfd;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setJh(String jh)
{
this.jh = jh;
}
public String getJh()
{
return jh;
}
public void setKc(String kc)
{
this.kc = kc;
}
public String getKc()
{
return kc;
}
public void setZtzj(Double ztzj)
{
this.ztzj = ztzj;
}
public Double getZtzj()
{
return ztzj;
}
public void setJs(Double js)
{
this.js = js;
}
public Double getJs()
{
return js;
}
public void setTtwj(Double ttwj)
{
this.ttwj = ttwj;
}
public Double getTtwj()
{
return ttwj;
}
public void setTtds(Double ttds)
{
this.ttds = ttds;
}
public Double getTtds()
{
return ttds;
}
public void setTtxs(Double ttxs)
{
this.ttxs = ttxs;
}
public Double getTtxs()
{
return ttxs;
}
public void setSnfg(Double snfg)
{
this.snfg = snfg;
}
public Double getSnfg()
{
return snfg;
}
public void setBz(String bz)
{
this.bz = bz;
}
public String getBz()
{
return bz;
}
public void setCreatedBy(String createdBy)
{
this.createdBy = createdBy;
}
public String getCreatedBy()
{
return createdBy;
}
public void setCreatedTime(Date createdTime)
{
this.createdTime = createdTime;
}
public Date getCreatedTime()
{
return createdTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("jh", getJh())
.append("kc", getKc())
.append("ztzj", getZtzj())
.append("js", getJs())
.append("ttwj", getTtwj())
.append("ttds", getTtds())
.append("ttxs", getTtxs())
.append("snfg", getSnfg())
.append("bz", getBz())
.append("createdBy", getCreatedBy())
.append("createdTime", getCreatedTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}
......@@ -50,11 +50,11 @@ public class SjLjjw extends BaseEntity
/** 钻井周期 */
@Excel(name = "钻井周期")
private Double zjzq;
private String zjzq;
/** 钻完周期 */
@Excel(name = "钻完周期")
private Double wjzq;
private String wjzq;
/** 井口距离 */
@Excel(name = "井口距离")
......@@ -112,7 +112,7 @@ public class SjLjjw extends BaseEntity
//钻机台月
private Double zjy;
//建井周期
private Double jjzq1;
private String jjzq1;
}
......@@ -72,4 +72,6 @@ public interface SjDjjcMapper
SjDjjc selectSjDjjcByinstanceIdZjy(String instanceId);
List<SjDjjc> getGcList(SjDjjc sjDjjc);
}
......@@ -63,4 +63,5 @@ public interface SjLjfzqkMapper
int insertSjLjfzqkBatch(List<SjLjfzqk> jsqaList);
}
package com.zjsgfa.project.zjsgfa.mapper;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.SjLjfzqk;
import com.zjsgfa.project.zjsgfa.domain.SjLjzjyfzqk;
/**
......@@ -58,4 +60,9 @@ public interface SjLjzjyfzqkMapper
* @return 结果
*/
public int deleteSjLjzjyfzqkByIds(Long[] ids);
int deleteSjLjzjyfzqkByZbid(Long zbid);
int insertSjLjzjyfzqkBatch(List<SjLjfzqk> jsqaList);
}
......@@ -74,4 +74,6 @@ public interface ISjDjjcService
int getGzbjList(String jh) throws Exception;
List<SjDjjc> getGcList(SjDjjc sjDjjc);
}
......@@ -2,6 +2,7 @@ package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.SjLjfzqk;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
/**
* 邻井复杂情况Service接口
......@@ -58,4 +59,7 @@ public interface ISjLjfzqkService
* @return 结果
*/
public int deleteSjLjfzqkById(Long id);
int insertSjLjfzqkBatch(List<SjLjjw> list);
}
package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import com.zjsgfa.project.zjsgfa.domain.SjLjzjyfzqk;
/**
......@@ -58,4 +60,7 @@ public interface ISjLjzjyfzqkService
* @return 结果
*/
public int deleteSjLjzjyfzqkById(Long id);
int insertSjLjzjyfzqkBatch(List<SjLjjw> list);
}
......@@ -59,6 +59,9 @@ public class ProcessServiceImpl implements ProcessService {
// 考虑到候选用户组,会有多个 todoitem 办理同个 task
List<BizTodoItem> updateList = CollectionUtils.isEmpty(bizTodoItemService.selectBizTodoItemList(query)) ? null : bizTodoItemService.selectBizTodoItemList(query);
for (BizTodoItem update: updateList) {
if(update.getIsHandle().equals("1")){
continue;
}
// 找到当前登录用户的 todoitem,置为已办
if (update.getTodoUserId().equals(SecurityUtils.getUsername())) {
update.setIsView("1");
......
......@@ -1478,9 +1478,11 @@ public class SjDjjcServiceImpl implements ISjDjjcService
return 1;
}
@Override
@DataScope(deptAlias = "d")
public List<SjDjjc> getGcList(SjDjjc sjDjjc) {
return sjDjjcMapper.getGcList(sjDjjc);
}
}
package com.zjsgfa.project.zjsgfa.service.impl;
import java.util.List;
import java.util.stream.Collectors;
import com.zjsgfa.project.zjsgfa.domain.SjDjjc;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import com.zjsgfa.project.zjsgfa.mapper.SjDjjcMapper;
import com.zjsgfa.project.zt.domain.CommonParam;
import com.zjsgfa.project.zt.service.DjdcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsgfa.project.zjsgfa.mapper.SjLjfzqkMapper;
......@@ -19,6 +26,13 @@ public class SjLjfzqkServiceImpl implements ISjLjfzqkService
@Autowired
private SjLjfzqkMapper sjLjfzqkMapper;
@Autowired
private SjDjjcMapper sjDjjcMapper;
@Autowired
private DjdcService djdcService;
/**
* 查询邻井复杂情况
*
......@@ -90,4 +104,24 @@ public class SjLjfzqkServiceImpl implements ISjLjfzqkService
{
return sjLjfzqkMapper.deleteSjLjfzqkById(id);
}
@Override
public int insertSjLjfzqkBatch(List<SjLjjw> list) {
String jh = list.get(0).getJh();
SjDjjc sjDjjc = sjDjjcMapper.selectSjDjjcByJh(jh);
//先删除已有数据
sjLjfzqkMapper.deleteSjLjfzqkByJh(sjDjjc.getId());
CommonParam param1 = new CommonParam();
param1.setJh(String.join(",",list.stream().map(SjLjjw::getLjjh).collect(Collectors.toList())));
//复杂情况
param1.setJkhzb(sjDjjc.getJkhzb());
param1.setJkzzb(sjDjjc.getJkzzb());
List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
if(jsqaList.size()>0){
jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
sjLjfzqkMapper.insertSjLjfzqkBatch(jsqaList);
}
return 1;
}
}
......@@ -205,15 +205,15 @@ public class SjLjjwServiceImpl implements ISjLjjwService
sjZtgjsjMapper.deleteSjZtgjsjByJh(jh);
sjZtgjsjMapper.insertSjZtgjsjBatch(sjZtgjsjList);
}
//复杂情况
param1.setJkhzb(sjDjjc.getJkhzb());
param1.setJkzzb(sjDjjc.getJkzzb());
List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
if(jsqaList.size()>0){
jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
sjLjfzqkMapper.deleteSjLjfzqkByJh(sjDjjc.getId());
sjLjfzqkMapper.insertSjLjfzqkBatch(jsqaList);
}
// //复杂情况
// param1.setJkhzb(sjDjjc.getJkhzb());
// param1.setJkzzb(sjDjjc.getJkzzb());
// List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
// if(jsqaList.size()>0){
// jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
// sjLjfzqkMapper.deleteSjLjfzqkByJh(sjDjjc.getId());
// sjLjfzqkMapper.insertSjLjfzqkBatch(jsqaList);
// }
......
package com.zjsgfa.project.zjsgfa.service.impl;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import com.zjsgfa.project.zjsgfa.domain.SjDjjc;
import com.zjsgfa.project.zjsgfa.domain.SjLjfzqk;
import com.zjsgfa.project.zjsgfa.domain.SjLjjw;
import com.zjsgfa.project.zjsgfa.mapper.SjDjjcMapper;
import com.zjsgfa.project.zt.domain.CommonParam;
import com.zjsgfa.project.zt.service.DjdcService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsgfa.project.zjsgfa.mapper.SjLjzjyfzqkMapper;
......@@ -19,6 +28,15 @@ public class SjLjzjyfzqkServiceImpl implements ISjLjzjyfzqkService
@Autowired
private SjLjzjyfzqkMapper sjLjzjyfzqkMapper;
@Autowired
private SjDjjcMapper sjDjjcMapper;
@Autowired
private DjdcService djdcService;
/**
* 查询邻井复杂情况-钻井液
*
......@@ -90,4 +108,25 @@ public class SjLjzjyfzqkServiceImpl implements ISjLjzjyfzqkService
{
return sjLjzjyfzqkMapper.deleteSjLjzjyfzqkById(id);
}
@Override
public int insertSjLjzjyfzqkBatch(List<SjLjjw> list) {
String jh = list.get(0).getJh();
SjDjjc sjDjjc = sjDjjcMapper.selectSjDjjcByJh(jh);
//先删除已有数据
sjLjzjyfzqkMapper.deleteSjLjzjyfzqkByZbid(sjDjjc.getId());
CommonParam param1 = new CommonParam();
param1.setJh(String.join(",",list.stream().map(SjLjjw::getLjjh).collect(Collectors.toList())));
//复杂情况
param1.setJkhzb(sjDjjc.getJkhzb());
param1.setJkzzb(sjDjjc.getJkzzb());
List<SjLjfzqk> jsqaList=djdcService.getJsqaListByJh(param1);
if(jsqaList.size()>0){
jsqaList.forEach(it->{it.setZbid(sjDjjc.getId());});
sjLjzjyfzqkMapper.insertSjLjzjyfzqkBatch(jsqaList);
}
return 1;
}
}
......@@ -90,4 +90,6 @@ public class CommonParam {
private String searchType;
private String fzqk;
}
......@@ -31,11 +31,11 @@ public class Ljjw {
//钻井周期
@Excel(name = "钻井周期")
private Double zjzq;
private String zjzq;
//完井周期
@Excel(name = "钻完周期")
private Double wjzq;
private String wjzq;
//井口距离
......@@ -88,7 +88,9 @@ public class Ljjw {
//钻机台月
private Double zjy;
//建井周期
private Double jjzq1;
private String jjzq1;
private String fzqk;
......
......@@ -188,6 +188,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectSjDjjcVo"/>
where a.zjyinstance_id = #{instanceId}
</select>
<select id="getGcList" resultType="com.zjsgfa.project.zjsgfa.domain.SjDjjc">
select a.*, b.ndxsjg, c.sgdw, d.dept_name
from sj_djjc a
left join sj_ndxm b on a.id = b.zbid
left join sj_gcjbsj c on a.id = c.zbid
left join sys_dept d on a.deptid = d.dept_id
where 1=1
<if test="lx!=null and lx != '' and lx=='1'.toString()">
and process_status='通过'
</if>
<if test="lx!=null and lx != '' and lx=='2'.toString()">
and zjyprocess_status='通过'
</if>
<if test="jh != null and jh != ''">and a.jh like concat('%', #{jh}, '%')</if>
<if test="sgdw != null and sgdw != ''">and c.sgdw = #{sgdw}</if>
<if test="jfdw != null and jfdw != ''">and a.jfdw = #{jfdw}</if>
<if test="qk != null and qk != ''">and a.qk = #{qk}</if>
<if test="ndxsjg != null and ndxsjg != ''">and b.ndxsjg = #{ndxsjg}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
order by a.created_time desc
</select>
<insert id="insertSjDjjc" parameterType="SjDjjc" useGeneratedKeys="true" keyProperty="id">
insert into sj_djjc
......
......@@ -19,10 +19,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createdTime" column="created_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="sngfd" column="sngfd" />
</resultMap>
<sql id="selectSjJsjgVo">
select id, jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz, created_by, created_time, update_by, update_time from sj_jsjg
select id, jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz, created_by, created_time, update_by, update_time,sngfd from sj_jsjg
</sql>
<select id="selectSjJsjgList" parameterType="SjJsjg" resultMap="SjJsjgResult">
......@@ -39,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="sngfd != null "> and sngfd = #{sngfd}</if>
</where>
order by jh ,js
</select>
......@@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">created_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="sngfd != null">sngfd,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jh != null">#{jh},</if>
......@@ -83,12 +86,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">#{createdTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="sngfd != null">#{sngfd},</if>
</trim>
</insert>
<insert id="insertSjJsjgBatch">
insert into sj_jsjg( jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz) values
insert into sj_jsjg( jh, kc, ztzj, js, ttwj, ttds, ttxs, snfg, bz,sngfd) values
<foreach item="item" index="index" collection="list" separator=",">
( #{item.jh}, #{item.kc}, #{item.ztzj}, #{item.js}, #{item.ttwj}, #{item.ttds}, #{item.ttxs}, #{item.snfg}, #{item.bz})
( #{item.jh}, #{item.kc}, #{item.ztzj}, #{item.js}, #{item.ttwj}, #{item.ttds}, #{item.ttxs}, #{item.snfg}, #{item.bz}, #{item.sngfd})
</foreach>
</insert>
<insert id="insertSjJsjgt">
......@@ -119,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="sngfd != null">sngfd = #{sngfd},</if>
</trim>
where id = #{id}
</update>
......
......@@ -110,4 +110,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<delete id="deleteSjLjfzqkByJh">
delete from sj_ljfzqk where zbid = #{zbid}
</delete>
</mapper>
\ No newline at end of file
......@@ -58,6 +58,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="fzqk != null">#{fzqk},</if>
</trim>
</insert>
<insert id="insertSjLjzjyfzqkBatch">
<foreach collection="list" item="item" separator=";">
insert into sj_ljzjyfzqk
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="item.jh != null">jh,</if>
<if test="item.ljjh != null">ljjh,</if>
<if test="item.jl != null">jl,</if>
<if test="item.sj != null">sj,</if>
<if test="item.wzjs != null">wzjs,</if>
<if test="item.fzqk != null">fzqk,</if>
<if test="item.zbid != null">zbid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="item.jh != null">#{item.jh},</if>
<if test="item.ljjh != null">#{item.ljjh},</if>
<if test="item.jl != null">#{item.jl},</if>
<if test="item.sj != null">#{item.sj},</if>
<if test="item.wzjs != null">#{item.wzjs},</if>
<if test="item.fzqk != null">#{item.fzqk},</if>
<if test="item.zbid != null">#{item.zbid},</if>
</trim>
</foreach>
</insert>
<update id="updateSjLjzjyfzqk" parameterType="SjLjzjyfzqk">
update sj_ljzjyfzqk
......@@ -83,4 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{id}
</foreach>
</delete>
<delete id="deleteSjLjzjyfzqkByZbid">
delete from sj_ljzjyfzqk where zbid = #{zbid}
</delete>
</mapper>
\ No newline at end of file
......@@ -593,8 +593,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.wjczjs,
b.wzcw,
kc.kc,
zjzq.wjzq,
zjzq.zjzq,
<if test="jkhzb!=null and jkzzb!=null">
round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
......@@ -614,7 +612,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
b.jjzq1 ||'d' || case when b.JJZQ2 is null then 0 else b.JJZQ2 end ||'h' wjzq,
b.jjzq1 ||'d' || case when b.JJZQ2 is null then 0 else b.JJZQ2 end ||'h' jjzq1,
b.zjzq1 ||'d' || case when b.zjzq2 is null then 0 else b.zjzq2 end ||'h' zjzq,
case when qa.jh is not null then '是' else '否' end fzqk,
fm.zjbh dh
FROM JSBA a
left join jsaa b
......@@ -622,16 +623,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join jsfm fm
on a.jh = fm.jh
left join
(select jsta.jh,
sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as wjzq,
sum(jsta.sjts) - sum(case when jsta.sgzyxm = '完井作业' then jsta.sjts else 0 end) as zjzq
FROM JSTA jsta
where jsta.jd1 is not null
or jsta.jd2 is not null
group by jsta.jh) zjzq
on zjzq.jh = a.jh
left join (select jh from JSQA group by jh) qa
on a.jh = qa.jh
left join (select jh, count(*) as kc
from jsdb
where tgcc not like '%导管%' and tgcc not like '%其它%'
......@@ -678,6 +671,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item}
</foreach>
</if>
<if test="fzqk != null and fzqk !='' and fzqk=='是'.toString()">
and qa.jh is not null
</if>
<if test="fzqk != null and fzqk !='' and fzqk=='否'.toString()">
and qa.jh is null
</if>
order by WJRQ desc NULLS LAST) where
1=1
......
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