Commit 7fe6c4f7 by jiang'yun

修改

parent 018e522b
package com.zjsgfa.framework.task;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson2.JSON;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonObject;
import com.zjsgfa.project.zjsgfa.domain.Mxfxjgb;
import com.zjsgfa.project.zjsgfa.mapper.MxfxjgbMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Component("mxdyTask")
public class MxdyTask {
@Autowired
private MxfxjgbMapper mxfxjgbMapper;
public void ryParams(Long mxid)
{
Mxfxjgb mxfxjgb = mxfxjgbMapper.selectMxfxjgbById(mxid);
System.out.println(mxfxjgb);
Map<String, Object> map = new HashMap<>();
map.put("stream", false);
Map<String, Object> map2 = new HashMap<>();
map2.put("field_name","data");
map2.put("type","input");
map2.put("value",mxfxjgb.getRwnr());
List<Map> listMap =new ArrayList<>();
listMap.add(map2);
map.put("content",listMap);
String url = "https://agent.ai.sinopec.com/aicoapi/gateway/v2/workflow/api_run/53f4afd436d2417180cb27d6dc0a3e17";
String key="278GANwseRJ98YbADs3G1tj7Fg40sI7d";
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String json = gson.toJson(map);
String result2 = HttpRequest.post(url).header("Authorization","Bearer "+key).body(json).execute().body();
System.out.println(result2);
// // 解析API响应
String textPresentation ="";
// 解析为顶层JsonObject
JsonObject root = gson.fromJson(result2, JsonObject.class);
// 逐层获取"文本呈现"内容
// 1. 获取外层data节点
JsonObject outerData = root.getAsJsonObject("data");
// 2. 获取内层data节点
JsonObject innerData = outerData.getAsJsonObject("data");
// 3. 获取"文本呈现"字段的值
textPresentation = innerData.get("文本呈现").getAsString();
// 打印结果
System.out.println("文本呈现内容:\n" + textPresentation);
mxfxjgb.setFhjg(textPresentation);
mxfxjgb.setJxzt("解析完成");
mxfxjgbMapper.updateMxfxjgb(mxfxjgb);
}
}
......@@ -2,6 +2,12 @@ package com.zjsgfa.project.zjsgfa.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zjsgfa.common.exception.job.TaskException;
import com.zjsgfa.project.monitor.domain.SysJob;
import com.zjsgfa.project.monitor.service.ISysJobService;
import oracle.jdbc.proxy.annotation.Post;
import org.quartz.SchedulerException;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -34,6 +40,9 @@ public class MxfxjgbController extends BaseController
@Autowired
private IMxfxjgbService mxfxjgbService;
@Autowired
private ISysJobService jobService;
/**
* 查询大模型分析列表
*/
......@@ -75,8 +84,7 @@ public class MxfxjgbController extends BaseController
//@PreAuthorize("@ss.hasPermi('system:mxfxjgb:add')")
@Log(title = "大模型分析", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Mxfxjgb mxfxjgb)
{
public AjaxResult add(@RequestBody Mxfxjgb mxfxjgb) throws SchedulerException, TaskException {
return toAjax(mxfxjgbService.insertMxfxjgb(mxfxjgb));
}
......@@ -101,4 +109,29 @@ public class MxfxjgbController extends BaseController
{
return toAjax(mxfxjgbService.deleteMxfxjgbByIds(ids));
}
@GetMapping("/run/{id}")
public AjaxResult run(@PathVariable("id") Long id) throws SchedulerException
{
boolean result=false;
Mxfxjgb mxfxjgb1 = mxfxjgbService.selectMxfxjgbById(id);
if(mxfxjgb1!=null){
if(mxfxjgb1.getJobid()!=null){
SysJob job = jobService.selectJobById(mxfxjgb1.getJobid());
result = jobService.run(job);
if(result){
mxfxjgb1.setJxzt("解析中");
}else {
mxfxjgb1.setJxzt("解析失败");
}
mxfxjgbService.updateMxfxjgb(mxfxjgb1);
}
}
return result ? success() : error("任务不存在或已过期!");
}
}
......@@ -649,8 +649,12 @@ public class SjDjjcController extends BaseController
sjJsjgMapper.insertSjJsjgBatch(sjJsjgList);
}
//井身结构 end---------------------------------------------------
//井眼轨迹 ---------------------------------------------------
sheet = workbook.getSheetAt(3);
lastRowNum = sheet.getLastRowNum();
......@@ -1540,11 +1544,53 @@ public class SjDjjcController extends BaseController
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---------------------------------------------------
......@@ -1918,853 +1964,875 @@ public class SjDjjcController extends BaseController
}
/**
* 保存邻井资料
*/
@PostMapping("/saveLjzl")
public AjaxResult saveLjzl(@RequestBody CommonParam param) throws Exception{
return sjDjjcService.saveLjzl(param);
}
// /**
// * 计算风险
// */
// @PostMapping("/saveFx")
// public AjaxResult saveFx(@RequestBody CommonParam param) throws Exception{
//
// return sjDjjcService.saveLjzl(param);
// }
/**
* 计算钻头
*/
@PostMapping("/saveZtxh")
public AjaxResult saveZtxh(@RequestBody CommonParam param) throws Exception{
return sjDjjcService.saveZtxh(param);
}
/**
* 计算钻具组合
*/
@PostMapping("/saveZjzh")
public AjaxResult saveZjzh(@RequestBody CommonParam param) throws Exception{
return sjDjjcService.saveZjzh(param);
}
private static List<SjFdsgcsDcyx> processAndDisplay(List<SjDcfxDzfc> stratumList,double kscs, double targetCs,String jh,String kc) {
List<SjFdsgcsDcyx> list =new ArrayList<>();
System.out.println("名称\t井段垂深 / m");
double previousDepth = kscs; // 从kscs开始计算
boolean foundStartingPoint = false;
System.out.println("名称\t井段垂深 / m");
for (SjDcfxDzfc stratum : stratumList) {
double currentDepth = stratum.getCs();
// 如果还没找到起始点,且当前地层深度小于kscs,跳过
if (!foundStartingPoint && currentDepth < kscs) {
continue;
/**
* 计算邻井井组
* @param sjDjjc
* @return
*/
@GetMapping("/jsljjz")
public AjaxResult jsljjz(SjDjjc sjDjjc) throws Exception {
return sjDjjcService.jsljjz(sjDjjc);
}
// 标记已找到起始点
foundStartingPoint = true;
// 确定当前地层的显示结束深度
double endDepth = Math.min(currentDepth, targetCs);
@PostMapping("/exportWord")
public void exportWord(long id,HttpServletResponse response) throws Exception {
SjDjjc sjDjjc = sjDjjcService.selectSjDjjcById(id);
InputStream in = null;
XWPFTemplate template = null;
OutputStream os = null;
try {
in = this.getClass().getResourceAsStream("/static/excel/sgfamb.docx");
os = response.getOutputStream();
String fileName = sjDjjc.getJh() + "井施工方案";
// 显示当前地层的范围
System.out.printf("%s\t%.0f-%.0f%n",
stratum.getDzfc(), previousDepth, endDepth);
SjFdsgcsDcyx sjFdsgcsDcyx = new SjFdsgcsDcyx();
sjFdsgcsDcyx.setJh(jh);
sjFdsgcsDcyx.setKc(kc);
sjFdsgcsDcyx.setDcmc(stratum.getDzfc());
sjFdsgcsDcyx.setJdcs(previousDepth + "-" + endDepth);
sjFdsgcsDcyx.setYx(stratum.getYxts());
list.add(sjFdsgcsDcyx);
// 更新上一个深度
previousDepth = currentDepth;
// 设置响应头
response.setContentType("application/force-download");
response.setHeader("Content-Disposition",
"attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".docx");
//加载数据
Map<String, Object> data = buildDataModel(sjDjjc);
// 配置
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
LoopColumnTableRenderPolicy policyCol = new LoopColumnTableRenderPolicy();
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
// 如果当前地层已经超过cs参数,结束处理
if (currentDepth >= targetCs) {
break;
Configure config = Configure.builder().useSpringEL()
.bind("sjDzfcList", policy)//行循环策略
.bind("sjJsjgList", policy)//行循环策略
.bind("sjJygjGdfdcsList", policy)//行循环策略
.bind("sjJygjGdsjgdcsList", policy)//行循环策略
.bind("sjJygjGdsjList", policy)//行循环策略
.bind("zjyFdsjList", policy)//行循环策略
.bind("zjyCljlList", policy)//行循环策略
.bind("sjZjyFdxnbList", policyCol)//列循环策略
.bind("sjTgTgzList", policy)//行循环策略
.bind("sjTgTgxnsjList", policy)//行循环策略
.bind("sjTgTgqdjhList", policy)//行循环策略
.bind("sjZlyqList", policy)//行循环策略
.bind("sjZlyqZbyqList", policy)//行循环策略
.bind("sjLjjwList", policy)//行循环策略
.bind("sjZqfxList", policy)//行循环策略
.bind("sjZtgjsjList", policy)//行循环策略
.bind("sjQkztfxList", policy)//行循环策略
.bind("sjSzfxjgList", policy)//行循环策略
.bind("sjDcfxDzfcList", policy)//行循环策略
.bind("sjDcfxTsyxList", policy)//行循环策略
.bind("sjJhzqList", policy)//行循环策略
.bind("sjH2sList", policy)//行循环策略
.bind("sjLjsmList", policy)//行循环策略
.bind("plqt", htmlRenderPolicy)//富文本策略
.bind("tsyxfx", htmlRenderPolicy)//富文本策略
.bind("sjyh", htmlRenderPolicy)//富文本策略
.bind("sjSggyZjzhcsList", policy)//行循环策略
.bind("sjSggyZjyFdxnbList", policyCol)//列循环策略
.bind("sjSggyZjyFdsjList", policy)//行循环策略
.bind("sjSggyZjyCljlList", policy)//行循环策略
.bind("zjkzz", htmlRenderPolicy)//富文本策略
.bind("jlgh", htmlRenderPolicy)//富文本策略
.bind("syyq", htmlRenderPolicy)//富文本策略
.bind("clcb", htmlRenderPolicy)//富文本策略
.bind("hse", htmlRenderPolicy)//富文本策略
.bind("yjlxfs", htmlRenderPolicy)//富文本策略
.bind("yfgkcs", htmlRenderPolicy)//富文本策略
.bind("wjsgcs", htmlRenderPolicy)//富文本策略
.bind("syzn", htmlRenderPolicy)//富文本策略
.bind("tsyxzs", htmlRenderPolicy)//富文本策略
.bind("gjfx", htmlRenderPolicy)//富文本策略
.bind("gjyh", htmlRenderPolicy)//富文本策略
.bind("dcyl", htmlRenderPolicy)//富文本策略
.bind("zyfx", htmlRenderPolicy)//富文本策略
.bind("fxgkcs", htmlRenderPolicy)//富文本策略
.bind("zjzh", htmlRenderPolicy)//富文本策略
.bind("zjzhzysx", htmlRenderPolicy)//富文本策略
.bind("zjycs", htmlRenderPolicy)//富文本策略
.bind("zjgccs", htmlRenderPolicy)//富文本策略
.bind("sjFdsgcsTsgjList", policy)//行策略
.bind("sjFdsgcsDcyxList", policy)//行策略
.bind("sjLjtjztList", policy)//行策略
.bind("sjZtcsxxList", policy)//行策略
.bind("sjFdsgcsZjyFdxnbList", policyCol)//列策略
.build();
XWPFTemplate compile = XWPFTemplate.compile(in, config);
// 加载模板并填充数据
template = compile.render(data);
template.write(os);
os.flush();
} catch (Exception e) {
throw e;
} finally {
if (in != null) {
in.close();
}
if (template != null) {
template.close();
}
return list;
if (os != null) {
os.close();
}
}
}
private static List<SjFdsgcsDcyx> processAndDisplayDc(List<SjDcfxDzfc> stratumList,double kscs, double targetCs,String jh,String kc,List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList) {
List<SjFdsgcsDcyx> list =new ArrayList<>();
public Map<String, Object> buildDataModel(SjDjjc sjDjjc) {
Map<String, Object> dataModel = new HashMap<>();
String jh = sjDjjc.getJh();
// 添加基础信息
dataModel.put("jh", jh);
dataModel.put("jb", sjDjjc.getJb());
dataModel.put("jx", sjDjjc.getJx());
DecimalFormat df = new DecimalFormat("0"); // 或使用"#,###"等格式
String str = df.format(sjDjjc.getJkhzb());
dataModel.put("jkhzb", df.format(sjDjjc.getJkhzb()));
dataModel.put("jkzzb", df.format(sjDjjc.getJkzzb()));
dataModel.put("gzwz", sjDjjc.getGzwz());
dataModel.put("wzcw", sjDjjc.getWzcw());
dataModel.put("ztmd", sjDjjc.getZtmd());
dataModel.put("wzyz", sjDjjc.getWzyz());
dataModel.put("wjfa", sjDjjc.getWjfa());
SjDzfc sjDzfc =new SjDzfc();
sjDzfc.setSjjh(jh);
List<SjDzfc> sjDzfcList = sjDzfcMapper.selectSjDzfcList(sjDzfc);
dataModel.put("sjDzfcList", sjDzfcList);
SjJsjg sjJsjg =new SjJsjg();
sjJsjg.setJh(jh);
List<SjJsjg> sjJsjgList = sjJsjgMapper.selectSjJsjgList(sjJsjg);
dataModel.put("sjJsjgList", sjJsjgList);
System.out.println("名称\t井段垂深 / m");
double previousDepth = kscs; // 从kscs开始计算
boolean foundStartingPoint = false;
System.out.println("名称\t井段垂深 / m");
for (SjDcfxDzfc stratum : stratumList) {
double currentDepth = stratum.getCs();
// 如果还没找到起始点,且当前地层深度小于kscs,跳过
if (!foundStartingPoint && currentDepth < kscs) {
continue;
SjJygjInfo sjJygjInfo =new SjJygjInfo();
sjJygjInfo.setJh(jh);
List<SjJygjInfo> sjJygjInfos = sjJygjInfoMapper.selectSjJygjInfoList(sjJygjInfo);
String gdlx="";
if(sjJygjInfos.size()>0){
gdlx=sjJygjInfos.get(0).getGdlx();
}
// 标记已找到起始点
foundStartingPoint = true;
// 确定当前地层的显示结束深度
double endDepth = Math.min(currentDepth, targetCs);
// 显示当前地层的范围
System.out.printf("%s\t%.0f-%.0f%n",
stratum.getDzfc(), previousDepth, endDepth);
SjFdsgcsDcyx sjFdsgcsDcyx = new SjFdsgcsDcyx();
sjFdsgcsDcyx.setJh(jh);
sjFdsgcsDcyx.setKc(kc);
sjFdsgcsDcyx.setDcmc(stratum.getDzfc());
sjFdsgcsDcyx.setJdcs(previousDepth + "-" + endDepth);
Double ksxs=getJs(sjJygjGdsjgdcsList,previousDepth);
Double jsxs=getJs(sjJygjGdsjgdcsList,endDepth);
sjFdsgcsDcyx.setJdxs(ksxs + "-" + jsxs);
sjFdsgcsDcyx.setYx(stratum.getYxts());
list.add(sjFdsgcsDcyx);
// 更新上一个深度
previousDepth = currentDepth;
// 如果当前地层已经超过cs参数,结束处理
if (currentDepth >= targetCs) {
break;
}
}
return list;
dataModel.put("gdlx", gdlx);
SjJygjgdsj sjJygjgdsj =new SjJygjgdsj();
sjJygjgdsj.setJh(jh);
List<SjJygjgdsj> sjJygjgdsjList = sjJygjgdsjMapper.selectSjJygjgdsjList(sjJygjgdsj);
dataModel.put("sjJygjGdsjList", sjJygjgdsjList);
//井眼轨迹分段参数
SjJygjGdfdcs sjJygjGdfdcs=new SjJygjGdfdcs();
sjJygjGdfdcs.setJh(jh);
List<SjJygjGdfdcs> sjJygjGdfdcsList = sjJygjGdfdcsMapper.selectSjJygjGdfdcsList(sjJygjGdfdcs);
dataModel.put("sjJygjGdfdcsList", sjJygjGdfdcsList);
// 添加井眼轨迹设计各点参数
SjJygjGdsjgdcs sjJygjGdsjgdcs =new SjJygjGdsjgdcs();
sjJygjGdsjgdcs.setJh(jh);
List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList = sjJygjGdsjgdcsMapper.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
dataModel.put("sjJygjGdsjgdcsList", sjJygjGdsjgdcsList);
//钻井液分段设计
SjZjyFdsj sjZjyFdsj =new SjZjyFdsj();
sjZjyFdsj.setJh(jh);
List<SjZjyFdsj> zjyFdsjList = sjZjyFdsjMapper.selectSjZjyFdsjList(sjZjyFdsj);
dataModel.put("zjyFdsjList", zjyFdsjList);
SjZjyCljl sjZjyCljl =new SjZjyCljl();
sjZjyCljl.setJh(jh);
List<SjZjyCljl> zjyCljlList = sjZjyCljlMapper.selectSjZjyCljlList(sjZjyCljl);
for(int i=0;i<zjyCljlList.size();i++){
zjyCljlList.get(i).setNum(i+1);
}
dataModel.put("zjyCljlList", zjyCljlList);
SjZjyFdxnb sjZjyFdxnb= new SjZjyFdxnb();
sjZjyFdxnb.setJh(jh);
List<SjZjyFdxnb> sjZjyFdxnbList = sjZjyFdxnbMapper.selectSjZjyFdxnbList(sjZjyFdxnb);
dataModel.put("sjZjyFdxnbList", sjZjyFdxnbList);
//套管柱
SjTgTgz sjTgTgz =new SjTgTgz();
sjTgTgz.setJh(jh);
List<SjTgTgz> sjTgTgzList = sjTgTgzMapper.selectSjTgTgzList(sjTgTgz);
dataModel.put("sjTgTgzList", sjTgTgzList);
SjTgTgxnsj sjTgTgxnsj =new SjTgTgxnsj();
sjTgTgxnsj.setJh(jh);
List<SjTgTgxnsj> tgxnsjList = sjTgTgxnsjMapper.selectSjTgTgxnsjList(sjTgTgxnsj);
dataModel.put("sjTgTgxnsjList", tgxnsjList);
SjTgTgqdjh sjTgTgqdjh =new SjTgTgqdjh();
sjTgTgqdjh.setJh(jh);
List<SjTgTgqdjh> sjTgTgqdjhList = sjTgTgqdjhMapper.selectSjTgTgqdjhList(sjTgTgqdjh);
dataModel.put("sjTgTgqdjhList", sjTgTgqdjhList);
private static List<SjFdfx> processAndDisplayFd(List<SjDcfxDzfc> stratumList,double kscs, double targetCs,String jh,String kc,List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList,Long id) {
List<SjFdfx> list =new ArrayList<>();
System.out.println("名称\t井段垂深 / m");
double previousDepth = kscs; // 从kscs开始计算
boolean foundStartingPoint = false;
System.out.println("名称\t井段垂深 / m");
for (SjDcfxDzfc stratum : stratumList) {
double currentDepth = stratum.getCs();
// 如果还没找到起始点,且当前地层深度小于kscs,跳过
if (!foundStartingPoint && currentDepth < kscs) {
continue;
SjZlyq sjZlyq =new SjZlyq();
sjZlyq.setJh(jh);
List<SjZlyq> sjZlyqList = sjZlyqMapper.selectSjZlyqList(sjZlyq);
dataModel.put("sjZlyqList", sjZlyqList);
SjZlyqZbyq sjZlyqZbyq =new SjZlyqZbyq();
sjZlyqZbyq.setJh(jh);
List<SjZlyqZbyq> sjZlyqZbyqList = sjZlyqZbyqMapper.selectSjZlyqZbyqList(sjZlyqZbyq);
dataModel.put("sjZlyqZbyqList", sjZlyqZbyqList);
SjZlyqXx sjZlyqXx =new SjZlyqXx();
sjZlyqXx.setJh(jh);
List<SjZlyqXx> sjZlyqXxList = sjZlyqXxMapper.selectSjZlyqXxList(sjZlyqXx);
if(sjZlyqXxList.size()>0){
SjZlyqXx item = sjZlyqXxList.get(0);
dataModel.put("gjzlyq",item.getGjzlyq());
dataModel.put("wcjjkzlyq",item.getWcjjkzlyq());
dataModel.put("yqcwrpdyq",item.getYqcwrpdyq());
}else {
dataModel.put("gjzlyq","");
dataModel.put("wcjjkzlyq","");
dataModel.put("yqcwrpdyq","");
}
// 标记已找到起始点
foundStartingPoint = true;
//邻井
SjLjjw sjLjjw =new SjLjjw();
sjLjjw.setJh(jh);
List<SjLjjw> sjLjjwList = sjLjjwMapper.selectSjLjjwList(sjLjjw);
dataModel.put("sjLjjwList", sjLjjwList);
SjZqfx sjZqfx =new SjZqfx();
sjZqfx.setJh(jh);
List<SjZqfx> sjZqfxList = sjZqfxMapper.selectSjZqfxList(sjZqfx);
dataModel.put("sjZqfxList", sjZqfxList);
SjZtgjsj sjZtgjsj =new SjZtgjsj();
sjZtgjsj.setJh(jh);
List<SjZtgjsj> sjZtgjsjList = sjZtgjsjMapper.selectSjZtgjsjList(sjZtgjsj);
dataModel.put("sjZtgjsjList", sjZtgjsjList);
SjQkztfx sjQkztfx =new SjQkztfx();
sjQkztfx.setJh(jh);
List<SjQkztfx> sjQkztfxList = sjQkztfxMapper.selectSjQkztfxList(sjQkztfx);
dataModel.put("sjQkztfxList", sjQkztfxList);
// 确定当前地层的显示结束深度
double endDepth = Math.min(currentDepth, targetCs);
SjFdfx sjFdfx = new SjFdfx();
sjFdfx.setZbid(id);
sjFdfx.setJh(jh);
sjFdfx.setKc(kc);
sjFdfx.setDzfc(stratum.getDzfc());
sjFdfx.setCs(endDepth);
//计算斜深
sjFdfx.setXs(getJs(sjJygjGdsjgdcsList,endDepth));
sjFdfx.setYxts(stratum.getYxts());
sjFdfx.setYqsts(stratum.getYqsts());
sjFdfx.setGzts(stratum.getGzts());
list.add(sjFdfx);
SjSzfxjg sjSzfxjg =new SjSzfxjg();
sjSzfxjg.setJh(jh);
List<SjSzfxjg> sjSzfxjgList = sjSzfxjgMapper.selectSjSzfxjgList(sjSzfxjg);
dataModel.put("sjSzfxjgList", sjSzfxjgList);
// 更新上一个深度
previousDepth = currentDepth;
SjDcfxDzfc sjDcfxDzfc =new SjDcfxDzfc();
sjDcfxDzfc.setJh(jh);
List<SjDcfxDzfc> sjDcfxDzfcList = sjDcfxDzfcMapper.selectSjDcfxDzfcList(sjDcfxDzfc);
dataModel.put("sjDcfxDzfcList", sjDcfxDzfcList);
SjDcfxTsyx sjDcfxTsyx =new SjDcfxTsyx();
sjDcfxTsyx.setJh(jh);
List<SjDcfxTsyx> sjDcfxTsyxList = sjDcfxTsyxMapper.selectSjDcfxTsyxList(sjDcfxTsyx);
dataModel.put("sjDcfxTsyxList", sjDcfxTsyxList);
// 如果当前地层已经超过cs参数,结束处理
if (currentDepth >= targetCs) {
break;
}
SjGztz sjGztz =new SjGztz();
sjGztz.setJh(jh);
List<SjGztz> gztzList = sjGztzMapper.selectSjGztzList(sjGztz);
List<String> jwtList = gztzList.stream().filter(it -> it.getGzlx().equals("井位图")).map(SjGztz::getLj).collect(Collectors.toList());
if(jwtList.size()>0){
List<Map<String, PictureRenderData>> pictureList = createPictureList(jwtList, 500, 600);
dataModel.put("jwtList", pictureList);
}else {
dataModel.put("jwtList", new ArrayList<>());
}
return list;
List<String> dzpmtList = gztzList.stream().filter(it -> it.getGzlx().equals("地震刨面图")).map(SjGztz::getLj).collect(Collectors.toList());
if(dzpmtList.size()>0){
List<Map<String, PictureRenderData>> pictureList = createPictureList(dzpmtList, 500, 600);
dataModel.put("dzpmtList", pictureList);
}else {
dataModel.put("dzpmtList", new ArrayList<>());
}
List<String> sylpmtList = gztzList.stream().filter(it -> it.getGzlx().equals("三压力刨面图")).map(SjGztz::getLj).collect(Collectors.toList());
if(sylpmtList.size()>0){
List<Map<String, PictureRenderData>> pictureList = createPictureList(sylpmtList, 500, 600);
dataModel.put("sylpmtList", pictureList);
}else {
dataModel.put("sylpmtList", new ArrayList<>());
}
//查询井身结构图
List<String> jsjgtList = gztzList.stream().filter(it -> it.getGzlx().equals("井身结构图")).map(SjGztz::getLj).collect(Collectors.toList());
if(jsjgtList.size()>0){
PictureRenderData pictureMap2 = createPictureMap2(jsjgtList.get(0), 500, 600);
if(pictureMap2!=null){
dataModel.put("jsjgt", pictureMap2);
}else {
dataModel.put("jsjgt", null);
}
}else {
SjJsjgt sjJsjgt=sjJsjgMapper.selectSjJsjgtById(sjDjjc.getId()+"");
if(sjJsjgt!=null){
String svgContent = ImageProcessUtil.extractSvgFromBase64(sjJsjgt.getJsjgt());
InputStream pngStream = ImageProcessUtil.convertSvgToPng(svgContent);
PictureRenderData image = Pictures.ofStream(pngStream, PictureType.PNG)
.size(500, 600)
.create();
dataModel.put("jsjgt", image);
}else {
dataModel.put("jsjgt", null);
}
}
public static double getCs(List<SjJygjGdsjgdcs> yjMnJygjJgList, double js){
DecimalFormat df = new DecimalFormat("#.00");
//计划周期
SjJhzq sjJhzq =new SjJhzq();
sjJhzq.setJh(jh);
List<SjJhzq> sjJhzqList = sjJhzqMapper.selectSjJhzqList(sjJhzq);
dataModel.put("sjJhzqList",sjJhzqList);
//H2s
SjH2s sjH2s =new SjH2s();
sjH2s.setJh(jh);
List<SjH2s> sjH2sList = sjH2sMapper.selectSjH2sList(sjH2s);
dataModel.put("sjH2sList",sjH2sList);
double cs=0;
for (int i=0;i<yjMnJygjJgList.size();i++){
SjJygjGdsjgdcs jg=yjMnJygjJgList.get(i);
double sd=jg.getJs();
if (sd>=js){
if (i == 0){
cs=yjMnJygjJgList.get(i).getJs();
break;
SjLjsm sjLjsm =new SjLjsm();
sjLjsm.setJh(jh);
List<SjLjsm> sjLjsmList = sjLjsmMapper.selectSjLjsmList(sjLjsm);
dataModel.put("sjLjsmList",sjLjsmList);
SjZysx sjZysx =new SjZysx();
sjZysx.setJh(jh);
List<SjZysx> sjZysxList = sjZysxMapper.selectSjZysxList(sjZysx);
SjZysx h2S = sjZysxList.stream().filter(it -> it.getLb().equals("H2S")).findFirst().orElse(null);
if(h2S!=null){
dataModel.put("h2S",h2S.getZysx());
}else {
// 找到md所在的区间
// SurveyPoint prev = surveyPoints.get(i-1);
// SurveyPoint curr = surveyPoints.get(i);
// double md; // 斜深(Measured Depth),单位:米
// double inc; // 井斜角(Inclination),单位:度
// double azim; // 方位角(Azimuth),单位:度
// double tvd; // 垂深(True Vertical Depth),单位:米
// double northing; // 北向坐标
// double easting; // 东向坐标
// 线性插值计算垂深
double ratio = (js - yjMnJygjJgList.get(i-1).getJs()) / (yjMnJygjJgList.get(i).getJs() - yjMnJygjJgList.get(i-1).getJs());
cs= yjMnJygjJgList.get(i-1).getCs() + ratio * (yjMnJygjJgList.get(i).getCs() -yjMnJygjJgList.get(i-1).getCs());
break;
}
dataModel.put("h2S","");
}
SjZysx plqt = sjZysxList.stream().filter(it -> it.getLb().equals("喷漏卡塌")).findFirst().orElse(null);
if(plqt!=null){
dataModel.put("plqt",plqt.getZysx());
}else {
dataModel.put("plqt","");
}
return Double.parseDouble(df.format(cs));
SjZysx tsyxfx = sjZysxList.stream().filter(it -> it.getLb().equals("特殊岩性风险")).findFirst().orElse(null);
if(tsyxfx!=null){
dataModel.put("tsyxfx",tsyxfx.getZysx());
}else {
dataModel.put("tsyxfx","");
}
SjZysx fpfx = sjZysxList.stream().filter(it -> it.getLb().equals("邻井扫描")).findFirst().orElse(null);
if(fpfx!=null){
dataModel.put("fpfx",fpfx.getZysx());
}else {
dataModel.put("fpfx","");
}
//施工概要
SjSggyGjsbxnyq sjSggyGjsbxnyq =new SjSggyGjsbxnyq();
sjSggyGjsbxnyq.setJh(jh);
List<SjSggyGjsbxnyq> sjSggyGjsbxnyqList = sjSggyGjsbxnyqMapper.selectSjSggyGjsbxnyqList(sjSggyGjsbxnyq);
if(sjSggyGjsbxnyqList.size()>0){
SjSggyGjsbxnyq gjsbxnyq = sjSggyGjsbxnyqList.get(0);
dataModel.put("sjyh",gjsbxnyq.getSjyh());
dataModel.put("zjxh", gjsbxnyq.getZjxh());
dataModel.put("wddy", gjsbxnyq.getWddy());
dataModel.put("dkwdscgl", gjsbxnyq.getDkwdscgl());
dataModel.put("zjnlZjlx", gjsbxnyq.getZjnlZjlx());
dataModel.put("zjnlZdcsll", gjsbxnyq.getZjnlZdcsll());
dataModel.put("zjnlZgcsby", gjsbxnyq.getZjnlZgcsby());
dataModel.put("xzxtDdzp", gjsbxnyq.getXzxtDdzp());
dataModel.put("xzxtDq", gjsbxnyq.getXzxtDq());
dataModel.put("xhxtB1lx", gjsbxnyq.getXhxtB1lx());
dataModel.put("xhxtB1xh", gjsbxnyq.getXhxtB1xh());
dataModel.put("xhxtB1zdgl", gjsbxnyq.getXhxtB1zdgl());
dataModel.put("xhxtB2lx", gjsbxnyq.getXhxtB2lx());
dataModel.put("xhxtB2xh", gjsbxnyq.getXhxtB2xh());
dataModel.put("xhxtB2zdgl", gjsbxnyq.getXhxtB2zdgl());
dataModel.put("xhxtB3lx", gjsbxnyq.getXhxtB3lx());
dataModel.put("xhxtB3xh", gjsbxnyq.getXhxtB3xh());
dataModel.put("xhxtB3zdgl", gjsbxnyq.getXhxtB3zdgl());
dataModel.put("gksbZdslx", gjsbxnyq.getGksbZdslx());
dataModel.put("gksbLxj1lx", gjsbxnyq.getGksbLxj1lx());
dataModel.put("gksbLxj1zdjgl", gjsbxnyq.getGksbLxj1zdjgl());
dataModel.put("gksbLxj2lx", gjsbxnyq.getGksbLxj2lx());
dataModel.put("gksbLxj2zdjgl", gjsbxnyq.getGksbLxj2zdjgl());
dataModel.put("gksbLxj3lx", gjsbxnyq.getGksbLxj3lx());
dataModel.put("gksbLxj3zdjgl", gjsbxnyq.getGksbLxj3zdjgl());
dataModel.put("xhgSl", gjsbxnyq.getXhgSl());
dataModel.put("xhgZrl", gjsbxnyq.getXhgZrl());
dataModel.put("cbgSl", gjsbxnyq.getCbgSl());
dataModel.put("cbgZrl", gjsbxnyq.getCbgZrl());
}else {
dataModel.put("sjyh","");
dataModel.put("zjxh", "");
dataModel.put("wddy", "");
dataModel.put("dkwdscgl", "");
dataModel.put("zjnlZjlx", "");
dataModel.put("zjnlZdcsll", "");
dataModel.put("zjnlZgcsby", "");
dataModel.put("xzxtDdzp", "");
dataModel.put("xzxtDq", "");
dataModel.put("xhxtB1lx", "");
dataModel.put("xhxtB1xh", "");
dataModel.put("xhxtB1zdgl", "");
dataModel.put("xhxtB2lx", "");
dataModel.put("xhxtB2xh", "");
dataModel.put("xhxtB2zdgl", "");
dataModel.put("xhxtB3lx", "");
dataModel.put("xhxtB3xh", "");
dataModel.put("xhxtB3zdgl", "");
dataModel.put("gksbZdslx", "");
dataModel.put("gksbLxj1lx", "");
dataModel.put("gksbLxj1zdjgl", "");
dataModel.put("gksbLxj2lx", "");
dataModel.put("gksbLxj2zdjgl", "");
dataModel.put("gksbLxj3lx", "");
dataModel.put("gksbLxj3zdjgl", "");
dataModel.put("xhgSl", "");
dataModel.put("xhgZrl", "");
dataModel.put("cbgSl", "");
dataModel.put("cbgZrl", "");
}
public static double getJs(List<SjJygjGdsjgdcs> yjMnJygjJgList, double cs) {
// 创建DecimalFormat对象,用于保留两位小数
DecimalFormat df = new DecimalFormat("#.00");
double js = 0;
// 遍历所有数据点
for (int i = 0; i < yjMnJygjJgList.size(); i++) {
SjJygjGdsjgdcs jg = yjMnJygjJgList.get(i);
double currentCs = jg.getCs();
SjSggyZjzhcs sjSggyZjzhcs =new SjSggyZjzhcs();
sjSggyZjzhcs.setJh(jh);
List<SjSggyZjzhcs> sjSggyZjzhcsList = sjSggyZjzhcsMapper.selectSjSggyZjzhcsList(sjSggyZjzhcs);
dataModel.put("sjSggyZjzhcsList",sjSggyZjzhcsList);
SjSggyZjyFdxnb sjSggyZjyFdxnb =new SjSggyZjyFdxnb();
sjSggyZjyFdxnb.setJh(jh);
List<SjSggyZjyFdxnb> sjSggyZjyFdxnbList = sjSggyZjyFdxnbMapper.selectSjSggyZjyFdxnbList(sjSggyZjyFdxnb);
dataModel.put("sjSggyZjyFdxnbList",sjSggyZjyFdxnbList);
// 找到垂深大于等于目标垂深的点
if (currentCs >= cs) {
// 如果是第一个点,直接返回该点的斜深
if (i == 0) {
js = yjMnJygjJgList.get(i).getJs();
break;
} else {
// 找到目标垂深所在的区间,进行线性插值计算斜深
double prevCs = yjMnJygjJgList.get(i-1).getCs();
double prevJs = yjMnJygjJgList.get(i-1).getJs();
double currJs = yjMnJygjJgList.get(i).getJs();
SjSggyZjyFdsj sjSggyZjyFdsj =new SjSggyZjyFdsj();
sjSggyZjyFdsj.setJh(jh);
List<SjSggyZjyFdsj> sjSggyZjyFdsjList = sjSggyZjyFdsjMapper.selectSjSggyZjyFdsjList(sjSggyZjyFdsj);
dataModel.put("sjSggyZjyFdsjList",sjSggyZjyFdsjList);
// 计算插值比例
double ratio = (cs - prevCs) / (currentCs - prevCs);
// 线性插值计算斜深
js = prevJs + ratio * (currJs - prevJs);
break;
}
SjSggyZjyCljl sjSggyZjyCljl =new SjSggyZjyCljl();
sjSggyZjyCljl.setJh(jh);
List<SjSggyZjyCljl> sjSggyZjyCljlList = sjSggyZjyCljlMapper.selectSjSggyZjyCljlList(sjSggyZjyCljl);
dataModel.put("sjSggyZjyCljlList",sjSggyZjyCljlList);
SjJkzp sjJkzp =new SjJkzp();
sjJkzp.setJh(jh);
List<SjJkzp> sjJkzpList = sjJkzpMapper.selectSjJkzpList(sjJkzp);
if(sjJkzpList.size()>0){
SjJkzp sjJkzp1 = sjJkzpList.get(0);
dataModel.put("zjkzz", sjJkzp1.getZjkzz());
dataModel.put("jlgh", sjJkzp1.getJlgh());
dataModel.put("syyq", sjJkzp1.getSyyq());
dataModel.put("clcb", sjJkzp1.getClcb());
}else {
dataModel.put("zjkzz", sjJkzp.getZjkzz());
dataModel.put("jlgh", sjJkzp.getJlgh());
dataModel.put("syyq", sjJkzp.getSyyq());
dataModel.put("clcb", sjJkzp.getClcb());
}
SjHse sjHse =new SjHse();
sjHse.setJh(jh);
List<SjHse> sjHseList = sjHseMapper.selectSjHseList(sjHse);
if(sjHseList.size()>0){
SjHse sjHse1 = sjHseList.get(0);
dataModel.put("hse", sjHse1.getHse());
}else {
dataModel.put("hse", sjHse.getHse());
}
// 格式化结果并返回
return Double.parseDouble(df.format(js));
SjFl sjFl =new SjFl();
sjFl.setJh(jh);
List<SjFl> sjFlList = sjFlMapper.selectSjFlList(sjFl);
if(sjFlList.size()>0){
SjFl sjFl1 = sjFlList.get(0);
dataModel.put("yjlxfs", sjFl1.getYjlxfs());
dataModel.put("yfgkcs", sjFl1.getYfgkcs());
dataModel.put("wjsgcs", sjFl1.getWjsgcs());
dataModel.put("syzn", sjFl1.getSyzn());
dataModel.put("tsyxzs", sjFl1.getTsyxzs());
}else {
dataModel.put("yjlxfs", sjFl.getYjlxfs());
dataModel.put("yfgkcs", sjFl.getYfgkcs());
dataModel.put("wjsgcs", sjFl.getWjsgcs());
dataModel.put("syzn", sjFl.getSyzn());
dataModel.put("tsyxzs", sjFl.getTsyxzs());
}
public static String extractNumber(String str) {
// 正则表达式:匹配-或~,然后捕获后面的数字
Pattern pattern = Pattern.compile("[\\-~](\\d+)");
Matcher matcher = pattern.matcher(str);
List<Map<String, Object>> fdsgcsList =new ArrayList<>();
if (matcher.find()) {
// 返回第一个捕获组的内容(即数字部分)
return matcher.group(1);
for(int i=0;i<sjJsjgList.size();i++){
SjJsjg sjJsjg1 = sjJsjgList.get(i);
String num="";
if(i==0){
num="(一) ";
}else if(i==1){
num="(二) ";
}else if(i==2){
num="(三) ";
}else if(i==3){
num="(四) ";
}else if(i==4){
num="(五) ";
}else if(i==5){
num="(六) ";
}else if(i==6){
num="(七) ";
}else if(i==7){
num="(八) ";
}
return null; // 如果没有匹配到,返回null
String kc = sjJsjg1.getKc();
Map<String, Object> map = new HashMap<>();
map.put("kc",num+ kc+"施工措施:");
SjFdsgcs sjFdsgcs =new SjFdsgcs();
sjFdsgcs.setJh(jh);
sjFdsgcs.setKc(kc);
List<SjFdsgcs> sjFdsgcsList= sjFdsgcsMapper.selectSjFdsgcsList(sjFdsgcs);
SjFdsgcs sjFdsgcs1 = sjFdsgcsList.get(0);
map.put("tzqk", sjFdsgcs1.getTzqk());
map.put("jdqk", sjFdsgcs1.getJdqk());
map.put("gjfx", sjFdsgcs1.getGjfx());
map.put("gjyh", sjFdsgcs1.getGjyh());
map.put("dcyl", sjFdsgcs1.getDcyl());
map.put("zyfx", sjFdsgcs1.getZyfx());
map.put("fxgkcs", sjFdsgcs1.getFxgkcs());
map.put("zjzh", sjFdsgcs1.getZjzh());
map.put("zjzhzysx", sjFdsgcs1.getZjzhzysx());
map.put("zjycs", sjFdsgcs1.getZjycs());
map.put("zjgccs", sjFdsgcs1.getZjgccs());
//特殊工具
SjFdsgcsTsgj sjFdsgcsTsgj =new SjFdsgcsTsgj();
sjFdsgcsTsgj.setJh(jh);
sjFdsgcsTsgj.setKc(kc);
List<SjFdsgcsTsgj> sjFdsgcsTsgjList = sjFdsgcsTsgjMapper.selectSjFdsgcsTsgjList(sjFdsgcsTsgj);
if(sjFdsgcsTsgjList.size()==0){
SjFdsgcsTsgj sjFdsgcsTsgj1 =new SjFdsgcsTsgj();
sjFdsgcsTsgj1.setJh("-");
sjFdsgcsTsgj1.setKc("-");
sjFdsgcsTsgj1.setGgxh("-");
sjFdsgcsTsgj1.setGjmc("-");
sjFdsgcsTsgj1.setGgxh("-");
sjFdsgcsTsgj1.setSl("-");
sjFdsgcsTsgj1.setYqxg("-");
sjFdsgcsTsgj1.setYjazwz("-");
sjFdsgcsTsgj1.setXnzb("-");
sjFdsgcsTsgj1.setRemark("-");
}
map.put("sjFdsgcsTsgjList", sjFdsgcsTsgjList);
SjZtxx sjZtxx=new SjZtxx();
sjZtxx.setJh(jh);
sjZtxx.setKc(kc);
List<SjZtxx> sjZtxxList = sjZtxxMapper.selectSjZtxxList(sjZtxx);
SjZtxx sjZtxx1 = sjZtxxList.get(0);
map.put("ztxh", sjZtxx1.getZtxh());
SjFdsgcsDcyx sjFdsgcsDcyx =new SjFdsgcsDcyx();
sjFdsgcsDcyx.setJh(jh);
sjFdsgcsDcyx.setKc(kc);
List<SjFdsgcsDcyx> sjFdsgcsDcyxList = sjFdsgcsDcyxMapper.selectSjFdsgcsDcyxList(sjFdsgcsDcyx);
map.put("sjFdsgcsDcyxList", sjFdsgcsDcyxList);
SjLjtjzt sjLjtjzt =new SjLjtjzt();
sjLjtjzt.setJh(jh);
sjLjtjzt.setKc(kc);
List<SjLjtjzt> sjLjtjztList = sjLjtjztMapper.selectSjLjtjztList(sjLjtjzt);
map.put("sjLjtjztList", sjLjtjztList);
SjZtcsxx sjZtcsxx =new SjZtcsxx();
sjZtcsxx.setJh(jh);
sjZtcsxx.setKc(kc);
List<SjZtcsxx> sjZtcsxxList = sjZtcsxxMapper.selectSjZtcsxxList(sjZtcsxx);
map.put("sjZtcsxxList", sjZtcsxxList);
/**
* 保存邻井资料
*/
@PostMapping("/saveLjzl")
public AjaxResult saveLjzl(@RequestBody CommonParam param) throws Exception{
return sjDjjcService.saveLjzl(param);
SjZjcsxx sjZjcsxx =new SjZjcsxx();
sjZjcsxx.setJh(jh);
sjZjcsxx.setKc(kc);
List<SjZjcsxx> sjZjcsxxList = sjZjcsxxMapper.selectSjZjcsxxList(sjZjcsxx);
SjZjcsxx sjZjcsxx1 = sjZjcsxxList.get(0);
map.put("zjpl", sjZjcsxx1.getZjpl());
map.put("zjzy", sjZjcsxx1.getZjzy());
map.put("zjzs", sjZjcsxx1.getZjzs());
SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb =new SjFdsgcsZjyFdxnb();
sjFdsgcsZjyFdxnb.setJh(jh);
sjFdsgcsZjyFdxnb.setKc(kc);
List<SjFdsgcsZjyFdxnb> sjFdsgcsZjyFdxnbList = sjFdsgcsZjyFdxnbMapper.selectSjFdsgcsZjyFdxnbList(sjFdsgcsZjyFdxnb);
map.put("sjFdsgcsZjyFdxnbList", sjFdsgcsZjyFdxnbList);
fdsgcsList.add(map);
}
// /**
// * 计算风险
// */
// @PostMapping("/saveFx")
// public AjaxResult saveFx(@RequestBody CommonParam param) throws Exception{
//
// return sjDjjcService.saveLjzl(param);
// }
dataModel.put("fdsgcsList", fdsgcsList);
/**
* 计算钻头
*/
@PostMapping("/saveZtxh")
public AjaxResult saveZtxh(@RequestBody CommonParam param) throws Exception{
return sjDjjcService.saveZtxh(param);
}
/**
* 计算钻具组合
*/
@PostMapping("/saveZjzh")
public AjaxResult saveZjzh(@RequestBody CommonParam param) throws Exception{
return sjDjjcService.saveZjzh(param);
return dataModel;
}
/**
* 计算邻井井组
* @param sjDjjc
* @return
*/
@GetMapping("/jsljjz")
public AjaxResult jsljjz(SjDjjc sjDjjc) throws Exception {
return sjDjjcService.jsljjz(sjDjjc);
}
@PostMapping("/exportWord")
public void exportWord(long id,HttpServletResponse response) throws Exception {
SjDjjc sjDjjc = sjDjjcService.selectSjDjjcById(id);
InputStream in = null;
XWPFTemplate template = null;
OutputStream os = null;
try {
in = this.getClass().getResourceAsStream("/static/excel/sgfamb.docx");
os = response.getOutputStream();
String fileName = sjDjjc.getJh() + "井施工方案";
// 设置响应头
response.setContentType("application/force-download");
response.setHeader("Content-Disposition",
"attachment;filename=" + URLEncoder.encode(fileName, "UTF-8") + ".docx");
//加载数据
Map<String, Object> data = buildDataModel(sjDjjc);
// 配置
LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy();
LoopColumnTableRenderPolicy policyCol = new LoopColumnTableRenderPolicy();
HtmlRenderPolicy htmlRenderPolicy = new HtmlRenderPolicy();
Configure config = Configure.builder().useSpringEL()
.bind("sjDzfcList", policy)//行循环策略
.bind("sjJsjgList", policy)//行循环策略
.bind("sjJygjGdfdcsList", policy)//行循环策略
.bind("sjJygjGdsjgdcsList", policy)//行循环策略
.bind("sjJygjGdsjList", policy)//行循环策略
.bind("zjyFdsjList", policy)//行循环策略
.bind("zjyCljlList", policy)//行循环策略
.bind("sjZjyFdxnbList", policyCol)//列循环策略
.bind("sjTgTgzList", policy)//行循环策略
.bind("sjTgTgxnsjList", policy)//行循环策略
.bind("sjTgTgqdjhList", policy)//行循环策略
.bind("sjZlyqList", policy)//行循环策略
.bind("sjZlyqZbyqList", policy)//行循环策略
.bind("sjLjjwList", policy)//行循环策略
.bind("sjZqfxList", policy)//行循环策略
.bind("sjZtgjsjList", policy)//行循环策略
.bind("sjQkztfxList", policy)//行循环策略
.bind("sjSzfxjgList", policy)//行循环策略
.bind("sjDcfxDzfcList", policy)//行循环策略
.bind("sjDcfxTsyxList", policy)//行循环策略
.bind("sjJhzqList", policy)//行循环策略
.bind("sjH2sList", policy)//行循环策略
.bind("sjLjsmList", policy)//行循环策略
.bind("plqt", htmlRenderPolicy)//富文本策略
.bind("tsyxfx", htmlRenderPolicy)//富文本策略
.bind("sjyh", htmlRenderPolicy)//富文本策略
.bind("sjSggyZjzhcsList", policy)//行循环策略
.bind("sjSggyZjyFdxnbList", policyCol)//列循环策略
.bind("sjSggyZjyFdsjList", policy)//行循环策略
.bind("sjSggyZjyCljlList", policy)//行循环策略
.bind("zjkzz", htmlRenderPolicy)//富文本策略
.bind("jlgh", htmlRenderPolicy)//富文本策略
.bind("syyq", htmlRenderPolicy)//富文本策略
.bind("clcb", htmlRenderPolicy)//富文本策略
.bind("hse", htmlRenderPolicy)//富文本策略
.bind("yjlxfs", htmlRenderPolicy)//富文本策略
.bind("yfgkcs", htmlRenderPolicy)//富文本策略
.bind("wjsgcs", htmlRenderPolicy)//富文本策略
.bind("syzn", htmlRenderPolicy)//富文本策略
.bind("tsyxzs", htmlRenderPolicy)//富文本策略
.bind("gjfx", htmlRenderPolicy)//富文本策略
.bind("gjyh", htmlRenderPolicy)//富文本策略
.bind("dcyl", htmlRenderPolicy)//富文本策略
.bind("zyfx", htmlRenderPolicy)//富文本策略
.bind("fxgkcs", htmlRenderPolicy)//富文本策略
.bind("zjzh", htmlRenderPolicy)//富文本策略
.bind("zjzhzysx", htmlRenderPolicy)//富文本策略
.bind("zjycs", htmlRenderPolicy)//富文本策略
.bind("zjgccs", htmlRenderPolicy)//富文本策略
.bind("sjFdsgcsTsgjList", policy)//行策略
.bind("sjFdsgcsDcyxList", policy)//行策略
.bind("sjLjtjztList", policy)//行策略
.bind("sjZtcsxxList", policy)//行策略
.bind("sjFdsgcsZjyFdxnbList", policyCol)//列策略
.build();
XWPFTemplate compile = XWPFTemplate.compile(in, config);
// 加载模板并填充数据
template = compile.render(data);
template.write(os);
os.flush();
} catch (Exception e) {
throw e;
} finally {
if (in != null) {
in.close();
}
if (template != null) {
template.close();
}
if (os != null) {
os.close();
}
}
}
public Map<String, Object> buildDataModel(SjDjjc sjDjjc) {
Map<String, Object> dataModel = new HashMap<>();
String jh = sjDjjc.getJh();
// 添加基础信息
dataModel.put("jh", jh);
dataModel.put("jb", sjDjjc.getJb());
dataModel.put("jx", sjDjjc.getJx());
DecimalFormat df = new DecimalFormat("0"); // 或使用"#,###"等格式
String str = df.format(sjDjjc.getJkhzb());
dataModel.put("jkhzb", df.format(sjDjjc.getJkhzb()));
dataModel.put("jkzzb", df.format(sjDjjc.getJkzzb()));
dataModel.put("gzwz", sjDjjc.getGzwz());
dataModel.put("wzcw", sjDjjc.getWzcw());
dataModel.put("ztmd", sjDjjc.getZtmd());
dataModel.put("wzyz", sjDjjc.getWzyz());
dataModel.put("wjfa", sjDjjc.getWjfa());
SjDzfc sjDzfc =new SjDzfc();
sjDzfc.setSjjh(jh);
List<SjDzfc> sjDzfcList = sjDzfcMapper.selectSjDzfcList(sjDzfc);
dataModel.put("sjDzfcList", sjDzfcList);
SjJsjg sjJsjg =new SjJsjg();
sjJsjg.setJh(jh);
List<SjJsjg> sjJsjgList = sjJsjgMapper.selectSjJsjgList(sjJsjg);
dataModel.put("sjJsjgList", sjJsjgList);
//查询井身结构图
SjJsjgt sjJsjgt=sjJsjgMapper.selectSjJsjgtById(sjDjjc.getId()+"");
if(sjJsjgt!=null){
String svgContent = ImageProcessUtil.extractSvgFromBase64(sjJsjgt.getJsjgt());
private static List<SjFdsgcsDcyx> processAndDisplay(List<SjDcfxDzfc> stratumList,double kscs, double targetCs,String jh,String kc) {
InputStream pngStream = ImageProcessUtil.convertSvgToPng(svgContent);
PictureRenderData image = Pictures.ofStream(pngStream, PictureType.PNG)
.size(500, 600)
.create();
dataModel.put("jsjgt", image);
}else {
dataModel.put("jsjgt", null);
}
SjJygjInfo sjJygjInfo =new SjJygjInfo();
sjJygjInfo.setJh(jh);
List<SjJygjInfo> sjJygjInfos = sjJygjInfoMapper.selectSjJygjInfoList(sjJygjInfo);
String gdlx="";
if(sjJygjInfos.size()>0){
gdlx=sjJygjInfos.get(0).getGdlx();
}
dataModel.put("gdlx", gdlx);
SjJygjgdsj sjJygjgdsj =new SjJygjgdsj();
sjJygjgdsj.setJh(jh);
List<SjJygjgdsj> sjJygjgdsjList = sjJygjgdsjMapper.selectSjJygjgdsjList(sjJygjgdsj);
dataModel.put("sjJygjGdsjList", sjJygjgdsjList);
//井眼轨迹分段参数
SjJygjGdfdcs sjJygjGdfdcs=new SjJygjGdfdcs();
sjJygjGdfdcs.setJh(jh);
List<SjJygjGdfdcs> sjJygjGdfdcsList = sjJygjGdfdcsMapper.selectSjJygjGdfdcsList(sjJygjGdfdcs);
dataModel.put("sjJygjGdfdcsList", sjJygjGdfdcsList);
// 添加井眼轨迹设计各点参数
SjJygjGdsjgdcs sjJygjGdsjgdcs =new SjJygjGdsjgdcs();
sjJygjGdsjgdcs.setJh(jh);
List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList = sjJygjGdsjgdcsMapper.selectSjJygjGdsjgdcsList(sjJygjGdsjgdcs);
dataModel.put("sjJygjGdsjgdcsList", sjJygjGdsjgdcsList);
//钻井液分段设计
SjZjyFdsj sjZjyFdsj =new SjZjyFdsj();
sjZjyFdsj.setJh(jh);
List<SjZjyFdsj> zjyFdsjList = sjZjyFdsjMapper.selectSjZjyFdsjList(sjZjyFdsj);
dataModel.put("zjyFdsjList", zjyFdsjList);
SjZjyCljl sjZjyCljl =new SjZjyCljl();
sjZjyCljl.setJh(jh);
List<SjZjyCljl> zjyCljlList = sjZjyCljlMapper.selectSjZjyCljlList(sjZjyCljl);
for(int i=0;i<zjyCljlList.size();i++){
zjyCljlList.get(i).setNum(i+1);
}
dataModel.put("zjyCljlList", zjyCljlList);
List<SjFdsgcsDcyx> list =new ArrayList<>();
SjZjyFdxnb sjZjyFdxnb= new SjZjyFdxnb();
sjZjyFdxnb.setJh(jh);
List<SjZjyFdxnb> sjZjyFdxnbList = sjZjyFdxnbMapper.selectSjZjyFdxnbList(sjZjyFdxnb);
dataModel.put("sjZjyFdxnbList", sjZjyFdxnbList);
//套管柱
SjTgTgz sjTgTgz =new SjTgTgz();
sjTgTgz.setJh(jh);
List<SjTgTgz> sjTgTgzList = sjTgTgzMapper.selectSjTgTgzList(sjTgTgz);
dataModel.put("sjTgTgzList", sjTgTgzList);
SjTgTgxnsj sjTgTgxnsj =new SjTgTgxnsj();
sjTgTgxnsj.setJh(jh);
List<SjTgTgxnsj> tgxnsjList = sjTgTgxnsjMapper.selectSjTgTgxnsjList(sjTgTgxnsj);
dataModel.put("sjTgTgxnsjList", tgxnsjList);
SjTgTgqdjh sjTgTgqdjh =new SjTgTgqdjh();
sjTgTgqdjh.setJh(jh);
List<SjTgTgqdjh> sjTgTgqdjhList = sjTgTgqdjhMapper.selectSjTgTgqdjhList(sjTgTgqdjh);
dataModel.put("sjTgTgqdjhList", sjTgTgqdjhList);
SjZlyq sjZlyq =new SjZlyq();
sjZlyq.setJh(jh);
List<SjZlyq> sjZlyqList = sjZlyqMapper.selectSjZlyqList(sjZlyq);
dataModel.put("sjZlyqList", sjZlyqList);
SjZlyqZbyq sjZlyqZbyq =new SjZlyqZbyq();
sjZlyqZbyq.setJh(jh);
List<SjZlyqZbyq> sjZlyqZbyqList = sjZlyqZbyqMapper.selectSjZlyqZbyqList(sjZlyqZbyq);
dataModel.put("sjZlyqZbyqList", sjZlyqZbyqList);
SjZlyqXx sjZlyqXx =new SjZlyqXx();
sjZlyqXx.setJh(jh);
List<SjZlyqXx> sjZlyqXxList = sjZlyqXxMapper.selectSjZlyqXxList(sjZlyqXx);
if(sjZlyqXxList.size()>0){
SjZlyqXx item = sjZlyqXxList.get(0);
dataModel.put("gjzlyq",item.getGjzlyq());
dataModel.put("wcjjkzlyq",item.getWcjjkzlyq());
dataModel.put("yqcwrpdyq",item.getYqcwrpdyq());
}else {
dataModel.put("gjzlyq","");
dataModel.put("wcjjkzlyq","");
dataModel.put("yqcwrpdyq","");
}
System.out.println("名称\t井段垂深 / m");
double previousDepth = kscs; // 从kscs开始计算
boolean foundStartingPoint = false;
//邻井
SjLjjw sjLjjw =new SjLjjw();
sjLjjw.setJh(jh);
List<SjLjjw> sjLjjwList = sjLjjwMapper.selectSjLjjwList(sjLjjw);
dataModel.put("sjLjjwList", sjLjjwList);
SjZqfx sjZqfx =new SjZqfx();
sjZqfx.setJh(jh);
List<SjZqfx> sjZqfxList = sjZqfxMapper.selectSjZqfxList(sjZqfx);
dataModel.put("sjZqfxList", sjZqfxList);
SjZtgjsj sjZtgjsj =new SjZtgjsj();
sjZtgjsj.setJh(jh);
List<SjZtgjsj> sjZtgjsjList = sjZtgjsjMapper.selectSjZtgjsjList(sjZtgjsj);
dataModel.put("sjZtgjsjList", sjZtgjsjList);
SjQkztfx sjQkztfx =new SjQkztfx();
sjQkztfx.setJh(jh);
List<SjQkztfx> sjQkztfxList = sjQkztfxMapper.selectSjQkztfxList(sjQkztfx);
dataModel.put("sjQkztfxList", sjQkztfxList);
System.out.println("名称\t井段垂深 / m");
SjSzfxjg sjSzfxjg =new SjSzfxjg();
sjSzfxjg.setJh(jh);
List<SjSzfxjg> sjSzfxjgList = sjSzfxjgMapper.selectSjSzfxjgList(sjSzfxjg);
dataModel.put("sjSzfxjgList", sjSzfxjgList);
for (SjDcfxDzfc stratum : stratumList) {
double currentDepth = stratum.getCs();
SjDcfxDzfc sjDcfxDzfc =new SjDcfxDzfc();
sjDcfxDzfc.setJh(jh);
List<SjDcfxDzfc> sjDcfxDzfcList = sjDcfxDzfcMapper.selectSjDcfxDzfcList(sjDcfxDzfc);
dataModel.put("sjDcfxDzfcList", sjDcfxDzfcList);
SjDcfxTsyx sjDcfxTsyx =new SjDcfxTsyx();
sjDcfxTsyx.setJh(jh);
List<SjDcfxTsyx> sjDcfxTsyxList = sjDcfxTsyxMapper.selectSjDcfxTsyxList(sjDcfxTsyx);
dataModel.put("sjDcfxTsyxList", sjDcfxTsyxList);
//
SjGztz sjGztz =new SjGztz();
sjGztz.setJh(jh);
List<SjGztz> gztzList = sjGztzMapper.selectSjGztzList(sjGztz);
List<String> jwtList = gztzList.stream().filter(it -> it.getGzlx().equals("井位图")).map(SjGztz::getLj).collect(Collectors.toList());
if(jwtList.size()>0){
List<Map<String, PictureRenderData>> pictureList = createPictureList(jwtList, 500, 600);
dataModel.put("jwtList", pictureList);
}else {
dataModel.put("jwtList", new ArrayList<>());
// 如果还没找到起始点,且当前地层深度小于kscs,跳过
if (!foundStartingPoint && currentDepth < kscs) {
continue;
}
List<String> dzpmtList = gztzList.stream().filter(it -> it.getGzlx().equals("地震刨面图")).map(SjGztz::getLj).collect(Collectors.toList());
if(dzpmtList.size()>0){
List<Map<String, PictureRenderData>> pictureList = createPictureList(dzpmtList, 500, 600);
dataModel.put("dzpmtList", pictureList);
}else {
dataModel.put("dzpmtList", new ArrayList<>());
// 标记已找到起始点
foundStartingPoint = true;
// 确定当前地层的显示结束深度
double endDepth = Math.min(currentDepth, targetCs);
// 显示当前地层的范围
System.out.printf("%s\t%.0f-%.0f%n",
stratum.getDzfc(), previousDepth, endDepth);
SjFdsgcsDcyx sjFdsgcsDcyx = new SjFdsgcsDcyx();
sjFdsgcsDcyx.setJh(jh);
sjFdsgcsDcyx.setKc(kc);
sjFdsgcsDcyx.setDcmc(stratum.getDzfc());
sjFdsgcsDcyx.setJdcs(previousDepth + "-" + endDepth);
sjFdsgcsDcyx.setYx(stratum.getYxts());
list.add(sjFdsgcsDcyx);
// 更新上一个深度
previousDepth = currentDepth;
// 如果当前地层已经超过cs参数,结束处理
if (currentDepth >= targetCs) {
break;
}
}
List<String> sylpmtList = gztzList.stream().filter(it -> it.getGzlx().equals("三压力刨面图")).map(SjGztz::getLj).collect(Collectors.toList());
if(sylpmtList.size()>0){
List<Map<String, PictureRenderData>> pictureList = createPictureList(sylpmtList, 500, 600);
dataModel.put("sylpmtList", pictureList);
}else {
dataModel.put("sylpmtList", new ArrayList<>());
return list;
}
//计划周期
SjJhzq sjJhzq =new SjJhzq();
sjJhzq.setJh(jh);
List<SjJhzq> sjJhzqList = sjJhzqMapper.selectSjJhzqList(sjJhzq);
dataModel.put("sjJhzqList",sjJhzqList);
//H2s
SjH2s sjH2s =new SjH2s();
sjH2s.setJh(jh);
List<SjH2s> sjH2sList = sjH2sMapper.selectSjH2sList(sjH2s);
dataModel.put("sjH2sList",sjH2sList);
SjLjsm sjLjsm =new SjLjsm();
sjLjsm.setJh(jh);
List<SjLjsm> sjLjsmList = sjLjsmMapper.selectSjLjsmList(sjLjsm);
dataModel.put("sjLjsmList",sjLjsmList);
SjZysx sjZysx =new SjZysx();
sjZysx.setJh(jh);
List<SjZysx> sjZysxList = sjZysxMapper.selectSjZysxList(sjZysx);
SjZysx h2S = sjZysxList.stream().filter(it -> it.getLb().equals("H2S")).findFirst().orElse(null);
if(h2S!=null){
dataModel.put("h2S",h2S.getZysx());
}else {
dataModel.put("h2S","");
}
private static List<SjFdsgcsDcyx> processAndDisplayDc(List<SjDcfxDzfc> stratumList,double kscs, double targetCs,String jh,String kc,List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList) {
SjZysx plqt = sjZysxList.stream().filter(it -> it.getLb().equals("喷漏卡塌")).findFirst().orElse(null);
if(plqt!=null){
dataModel.put("plqt",plqt.getZysx());
}else {
dataModel.put("plqt","");
List<SjFdsgcsDcyx> list =new ArrayList<>();
System.out.println("名称\t井段垂深 / m");
double previousDepth = kscs; // 从kscs开始计算
boolean foundStartingPoint = false;
System.out.println("名称\t井段垂深 / m");
for (SjDcfxDzfc stratum : stratumList) {
double currentDepth = stratum.getCs();
// 如果还没找到起始点,且当前地层深度小于kscs,跳过
if (!foundStartingPoint && currentDepth < kscs) {
continue;
}
SjZysx tsyxfx = sjZysxList.stream().filter(it -> it.getLb().equals("特殊岩性风险")).findFirst().orElse(null);
if(tsyxfx!=null){
dataModel.put("tsyxfx",tsyxfx.getZysx());
}else {
dataModel.put("tsyxfx","");
// 标记已找到起始点
foundStartingPoint = true;
// 确定当前地层的显示结束深度
double endDepth = Math.min(currentDepth, targetCs);
// 显示当前地层的范围
System.out.printf("%s\t%.0f-%.0f%n",
stratum.getDzfc(), previousDepth, endDepth);
SjFdsgcsDcyx sjFdsgcsDcyx = new SjFdsgcsDcyx();
sjFdsgcsDcyx.setJh(jh);
sjFdsgcsDcyx.setKc(kc);
sjFdsgcsDcyx.setDcmc(stratum.getDzfc());
sjFdsgcsDcyx.setJdcs(previousDepth + "-" + endDepth);
Double ksxs=getJs(sjJygjGdsjgdcsList,previousDepth);
Double jsxs=getJs(sjJygjGdsjgdcsList,endDepth);
sjFdsgcsDcyx.setJdxs(ksxs + "-" + jsxs);
sjFdsgcsDcyx.setYx(stratum.getYxts());
list.add(sjFdsgcsDcyx);
// 更新上一个深度
previousDepth = currentDepth;
// 如果当前地层已经超过cs参数,结束处理
if (currentDepth >= targetCs) {
break;
}
SjZysx fpfx = sjZysxList.stream().filter(it -> it.getLb().equals("邻井扫描")).findFirst().orElse(null);
if(fpfx!=null){
dataModel.put("fpfx",fpfx.getZysx());
}else {
dataModel.put("fpfx","");
}
//施工概要
SjSggyGjsbxnyq sjSggyGjsbxnyq =new SjSggyGjsbxnyq();
sjSggyGjsbxnyq.setJh(jh);
List<SjSggyGjsbxnyq> sjSggyGjsbxnyqList = sjSggyGjsbxnyqMapper.selectSjSggyGjsbxnyqList(sjSggyGjsbxnyq);
if(sjSggyGjsbxnyqList.size()>0){
SjSggyGjsbxnyq gjsbxnyq = sjSggyGjsbxnyqList.get(0);
dataModel.put("sjyh",gjsbxnyq.getSjyh());
dataModel.put("zjxh", gjsbxnyq.getZjxh());
dataModel.put("wddy", gjsbxnyq.getWddy());
dataModel.put("dkwdscgl", gjsbxnyq.getDkwdscgl());
dataModel.put("zjnlZjlx", gjsbxnyq.getZjnlZjlx());
dataModel.put("zjnlZdcsll", gjsbxnyq.getZjnlZdcsll());
dataModel.put("zjnlZgcsby", gjsbxnyq.getZjnlZgcsby());
dataModel.put("xzxtDdzp", gjsbxnyq.getXzxtDdzp());
dataModel.put("xzxtDq", gjsbxnyq.getXzxtDq());
dataModel.put("xhxtB1lx", gjsbxnyq.getXhxtB1lx());
dataModel.put("xhxtB1xh", gjsbxnyq.getXhxtB1xh());
dataModel.put("xhxtB1zdgl", gjsbxnyq.getXhxtB1zdgl());
dataModel.put("xhxtB2lx", gjsbxnyq.getXhxtB2lx());
dataModel.put("xhxtB2xh", gjsbxnyq.getXhxtB2xh());
dataModel.put("xhxtB2zdgl", gjsbxnyq.getXhxtB2zdgl());
dataModel.put("xhxtB3lx", gjsbxnyq.getXhxtB3lx());
dataModel.put("xhxtB3xh", gjsbxnyq.getXhxtB3xh());
dataModel.put("xhxtB3zdgl", gjsbxnyq.getXhxtB3zdgl());
dataModel.put("gksbZdslx", gjsbxnyq.getGksbZdslx());
dataModel.put("gksbLxj1lx", gjsbxnyq.getGksbLxj1lx());
dataModel.put("gksbLxj1zdjgl", gjsbxnyq.getGksbLxj1zdjgl());
dataModel.put("gksbLxj2lx", gjsbxnyq.getGksbLxj2lx());
dataModel.put("gksbLxj2zdjgl", gjsbxnyq.getGksbLxj2zdjgl());
dataModel.put("gksbLxj3lx", gjsbxnyq.getGksbLxj3lx());
dataModel.put("gksbLxj3zdjgl", gjsbxnyq.getGksbLxj3zdjgl());
dataModel.put("xhgSl", gjsbxnyq.getXhgSl());
dataModel.put("xhgZrl", gjsbxnyq.getXhgZrl());
dataModel.put("cbgSl", gjsbxnyq.getCbgSl());
dataModel.put("cbgZrl", gjsbxnyq.getCbgZrl());
}else {
dataModel.put("sjyh","");
dataModel.put("zjxh", "");
dataModel.put("wddy", "");
dataModel.put("dkwdscgl", "");
dataModel.put("zjnlZjlx", "");
dataModel.put("zjnlZdcsll", "");
dataModel.put("zjnlZgcsby", "");
dataModel.put("xzxtDdzp", "");
dataModel.put("xzxtDq", "");
dataModel.put("xhxtB1lx", "");
dataModel.put("xhxtB1xh", "");
dataModel.put("xhxtB1zdgl", "");
dataModel.put("xhxtB2lx", "");
dataModel.put("xhxtB2xh", "");
dataModel.put("xhxtB2zdgl", "");
dataModel.put("xhxtB3lx", "");
dataModel.put("xhxtB3xh", "");
dataModel.put("xhxtB3zdgl", "");
dataModel.put("gksbZdslx", "");
dataModel.put("gksbLxj1lx", "");
dataModel.put("gksbLxj1zdjgl", "");
dataModel.put("gksbLxj2lx", "");
dataModel.put("gksbLxj2zdjgl", "");
dataModel.put("gksbLxj3lx", "");
dataModel.put("gksbLxj3zdjgl", "");
dataModel.put("xhgSl", "");
dataModel.put("xhgZrl", "");
dataModel.put("cbgSl", "");
dataModel.put("cbgZrl", "");
return list;
}
SjSggyZjzhcs sjSggyZjzhcs =new SjSggyZjzhcs();
sjSggyZjzhcs.setJh(jh);
List<SjSggyZjzhcs> sjSggyZjzhcsList = sjSggyZjzhcsMapper.selectSjSggyZjzhcsList(sjSggyZjzhcs);
dataModel.put("sjSggyZjzhcsList",sjSggyZjzhcsList);
SjSggyZjyFdxnb sjSggyZjyFdxnb =new SjSggyZjyFdxnb();
sjSggyZjyFdxnb.setJh(jh);
List<SjSggyZjyFdxnb> sjSggyZjyFdxnbList = sjSggyZjyFdxnbMapper.selectSjSggyZjyFdxnbList(sjSggyZjyFdxnb);
dataModel.put("sjSggyZjyFdxnbList",sjSggyZjyFdxnbList);
SjSggyZjyFdsj sjSggyZjyFdsj =new SjSggyZjyFdsj();
sjSggyZjyFdsj.setJh(jh);
List<SjSggyZjyFdsj> sjSggyZjyFdsjList = sjSggyZjyFdsjMapper.selectSjSggyZjyFdsjList(sjSggyZjyFdsj);
dataModel.put("sjSggyZjyFdsjList",sjSggyZjyFdsjList);
private static List<SjFdfx> processAndDisplayFd(List<SjDcfxDzfc> stratumList,double kscs, double targetCs,String jh,String kc,List<SjJygjGdsjgdcs> sjJygjGdsjgdcsList,Long id) {
List<SjFdfx> list =new ArrayList<>();
System.out.println("名称\t井段垂深 / m");
double previousDepth = kscs; // 从kscs开始计算
boolean foundStartingPoint = false;
System.out.println("名称\t井段垂深 / m");
for (SjDcfxDzfc stratum : stratumList) {
double currentDepth = stratum.getCs();
// 如果还没找到起始点,且当前地层深度小于kscs,跳过
if (!foundStartingPoint && currentDepth < kscs) {
continue;
}
SjSggyZjyCljl sjSggyZjyCljl =new SjSggyZjyCljl();
sjSggyZjyCljl.setJh(jh);
List<SjSggyZjyCljl> sjSggyZjyCljlList = sjSggyZjyCljlMapper.selectSjSggyZjyCljlList(sjSggyZjyCljl);
dataModel.put("sjSggyZjyCljlList",sjSggyZjyCljlList);
// 标记已找到起始点
foundStartingPoint = true;
SjJkzp sjJkzp =new SjJkzp();
sjJkzp.setJh(jh);
List<SjJkzp> sjJkzpList = sjJkzpMapper.selectSjJkzpList(sjJkzp);
if(sjJkzpList.size()>0){
SjJkzp sjJkzp1 = sjJkzpList.get(0);
dataModel.put("zjkzz", sjJkzp1.getZjkzz());
dataModel.put("jlgh", sjJkzp1.getJlgh());
dataModel.put("syyq", sjJkzp1.getSyyq());
dataModel.put("clcb", sjJkzp1.getClcb());
}else {
dataModel.put("zjkzz", sjJkzp.getZjkzz());
dataModel.put("jlgh", sjJkzp.getJlgh());
dataModel.put("syyq", sjJkzp.getSyyq());
dataModel.put("clcb", sjJkzp.getClcb());
// 确定当前地层的显示结束深度
double endDepth = Math.min(currentDepth, targetCs);
SjFdfx sjFdfx = new SjFdfx();
sjFdfx.setZbid(id);
sjFdfx.setJh(jh);
sjFdfx.setKc(kc);
sjFdfx.setDzfc(stratum.getDzfc());
sjFdfx.setCs(endDepth);
//计算斜深
sjFdfx.setXs(getJs(sjJygjGdsjgdcsList,endDepth));
sjFdfx.setYxts(stratum.getYxts());
sjFdfx.setYqsts(stratum.getYqsts());
sjFdfx.setGzts(stratum.getGzts());
list.add(sjFdfx);
// 更新上一个深度
previousDepth = currentDepth;
// 如果当前地层已经超过cs参数,结束处理
if (currentDepth >= targetCs) {
break;
}
SjHse sjHse =new SjHse();
sjHse.setJh(jh);
List<SjHse> sjHseList = sjHseMapper.selectSjHseList(sjHse);
if(sjHseList.size()>0){
SjHse sjHse1 = sjHseList.get(0);
dataModel.put("hse", sjHse1.getHse());
}else {
dataModel.put("hse", sjHse.getHse());
}
SjFl sjFl =new SjFl();
sjFl.setJh(jh);
List<SjFl> sjFlList = sjFlMapper.selectSjFlList(sjFl);
if(sjFlList.size()>0){
SjFl sjFl1 = sjFlList.get(0);
dataModel.put("yjlxfs", sjFl1.getYjlxfs());
dataModel.put("yfgkcs", sjFl1.getYfgkcs());
dataModel.put("wjsgcs", sjFl1.getWjsgcs());
dataModel.put("syzn", sjFl1.getSyzn());
dataModel.put("tsyxzs", sjFl1.getTsyxzs());
}else {
dataModel.put("yjlxfs", sjFl.getYjlxfs());
dataModel.put("yfgkcs", sjFl.getYfgkcs());
dataModel.put("wjsgcs", sjFl.getWjsgcs());
dataModel.put("syzn", sjFl.getSyzn());
dataModel.put("tsyxzs", sjFl.getTsyxzs());
return list;
}
List<Map<String, Object>> fdsgcsList =new ArrayList<>();
for(int i=0;i<sjJsjgList.size();i++){
SjJsjg sjJsjg1 = sjJsjgList.get(i);
String num="";
if(i==0){
num="(一) ";
}else if(i==1){
num="(二) ";
}else if(i==2){
num="(三) ";
}else if(i==3){
num="(四) ";
}else if(i==4){
num="(五) ";
}else if(i==5){
num="(六) ";
}else if(i==6){
num="(七) ";
}else if(i==7){
num="(八) ";
public static double getCs(List<SjJygjGdsjgdcs> yjMnJygjJgList, double js){
DecimalFormat df = new DecimalFormat("#.00");
double cs=0;
for (int i=0;i<yjMnJygjJgList.size();i++){
SjJygjGdsjgdcs jg=yjMnJygjJgList.get(i);
double sd=jg.getJs();
if (sd>=js){
if (i == 0){
cs=yjMnJygjJgList.get(i).getJs();
break;
}else {
// 找到md所在的区间
// SurveyPoint prev = surveyPoints.get(i-1);
// SurveyPoint curr = surveyPoints.get(i);
// double md; // 斜深(Measured Depth),单位:米
// double inc; // 井斜角(Inclination),单位:度
// double azim; // 方位角(Azimuth),单位:度
// double tvd; // 垂深(True Vertical Depth),单位:米
// double northing; // 北向坐标
// double easting; // 东向坐标
// 线性插值计算垂深
double ratio = (js - yjMnJygjJgList.get(i-1).getJs()) / (yjMnJygjJgList.get(i).getJs() - yjMnJygjJgList.get(i-1).getJs());
cs= yjMnJygjJgList.get(i-1).getCs() + ratio * (yjMnJygjJgList.get(i).getCs() -yjMnJygjJgList.get(i-1).getCs());
break;
}
String kc = sjJsjg1.getKc();
Map<String, Object> map = new HashMap<>();
map.put("kc",num+ kc+"施工措施:");
SjFdsgcs sjFdsgcs =new SjFdsgcs();
sjFdsgcs.setJh(jh);
sjFdsgcs.setKc(kc);
List<SjFdsgcs> sjFdsgcsList= sjFdsgcsMapper.selectSjFdsgcsList(sjFdsgcs);
SjFdsgcs sjFdsgcs1 = sjFdsgcsList.get(0);
map.put("tzqk", sjFdsgcs1.getTzqk());
map.put("jdqk", sjFdsgcs1.getJdqk());
map.put("gjfx", sjFdsgcs1.getGjfx());
map.put("gjyh", sjFdsgcs1.getGjyh());
map.put("dcyl", sjFdsgcs1.getDcyl());
map.put("zyfx", sjFdsgcs1.getZyfx());
map.put("fxgkcs", sjFdsgcs1.getFxgkcs());
map.put("zjzh", sjFdsgcs1.getZjzh());
map.put("zjzhzysx", sjFdsgcs1.getZjzhzysx());
map.put("zjycs", sjFdsgcs1.getZjycs());
map.put("zjgccs", sjFdsgcs1.getZjgccs());
//特殊工具
SjFdsgcsTsgj sjFdsgcsTsgj =new SjFdsgcsTsgj();
sjFdsgcsTsgj.setJh(jh);
sjFdsgcsTsgj.setKc(kc);
List<SjFdsgcsTsgj> sjFdsgcsTsgjList = sjFdsgcsTsgjMapper.selectSjFdsgcsTsgjList(sjFdsgcsTsgj);
if(sjFdsgcsTsgjList.size()==0){
SjFdsgcsTsgj sjFdsgcsTsgj1 =new SjFdsgcsTsgj();
sjFdsgcsTsgj1.setJh("-");
sjFdsgcsTsgj1.setKc("-");
sjFdsgcsTsgj1.setGgxh("-");
sjFdsgcsTsgj1.setGjmc("-");
sjFdsgcsTsgj1.setGgxh("-");
sjFdsgcsTsgj1.setSl("-");
sjFdsgcsTsgj1.setYqxg("-");
sjFdsgcsTsgj1.setYjazwz("-");
sjFdsgcsTsgj1.setXnzb("-");
sjFdsgcsTsgj1.setRemark("-");
}
map.put("sjFdsgcsTsgjList", sjFdsgcsTsgjList);
SjZtxx sjZtxx=new SjZtxx();
sjZtxx.setJh(jh);
sjZtxx.setKc(kc);
List<SjZtxx> sjZtxxList = sjZtxxMapper.selectSjZtxxList(sjZtxx);
SjZtxx sjZtxx1 = sjZtxxList.get(0);
map.put("ztxh", sjZtxx1.getZtxh());
SjFdsgcsDcyx sjFdsgcsDcyx =new SjFdsgcsDcyx();
sjFdsgcsDcyx.setJh(jh);
sjFdsgcsDcyx.setKc(kc);
List<SjFdsgcsDcyx> sjFdsgcsDcyxList = sjFdsgcsDcyxMapper.selectSjFdsgcsDcyxList(sjFdsgcsDcyx);
map.put("sjFdsgcsDcyxList", sjFdsgcsDcyxList);
SjLjtjzt sjLjtjzt =new SjLjtjzt();
sjLjtjzt.setJh(jh);
sjLjtjzt.setKc(kc);
List<SjLjtjzt> sjLjtjztList = sjLjtjztMapper.selectSjLjtjztList(sjLjtjzt);
map.put("sjLjtjztList", sjLjtjztList);
SjZtcsxx sjZtcsxx =new SjZtcsxx();
sjZtcsxx.setJh(jh);
sjZtcsxx.setKc(kc);
List<SjZtcsxx> sjZtcsxxList = sjZtcsxxMapper.selectSjZtcsxxList(sjZtcsxx);
map.put("sjZtcsxxList", sjZtcsxxList);
SjZjcsxx sjZjcsxx =new SjZjcsxx();
sjZjcsxx.setJh(jh);
sjZjcsxx.setKc(kc);
List<SjZjcsxx> sjZjcsxxList = sjZjcsxxMapper.selectSjZjcsxxList(sjZjcsxx);
SjZjcsxx sjZjcsxx1 = sjZjcsxxList.get(0);
map.put("zjpl", sjZjcsxx1.getZjpl());
map.put("zjzy", sjZjcsxx1.getZjzy());
map.put("zjzs", sjZjcsxx1.getZjzs());
SjFdsgcsZjyFdxnb sjFdsgcsZjyFdxnb =new SjFdsgcsZjyFdxnb();
sjFdsgcsZjyFdxnb.setJh(jh);
sjFdsgcsZjyFdxnb.setKc(kc);
List<SjFdsgcsZjyFdxnb> sjFdsgcsZjyFdxnbList = sjFdsgcsZjyFdxnbMapper.selectSjFdsgcsZjyFdxnbList(sjFdsgcsZjyFdxnb);
map.put("sjFdsgcsZjyFdxnbList", sjFdsgcsZjyFdxnbList);
fdsgcsList.add(map);
}
dataModel.put("fdsgcsList", fdsgcsList);
return Double.parseDouble(df.format(cs));
}
public static double getJs(List<SjJygjGdsjgdcs> yjMnJygjJgList, double cs) {
// 创建DecimalFormat对象,用于保留两位小数
DecimalFormat df = new DecimalFormat("#.00");
double js = 0;
// 遍历所有数据点
for (int i = 0; i < yjMnJygjJgList.size(); i++) {
SjJygjGdsjgdcs jg = yjMnJygjJgList.get(i);
double currentCs = jg.getCs();
// 找到垂深大于等于目标垂深的点
if (currentCs >= cs) {
// 如果是第一个点,直接返回该点的斜深
if (i == 0) {
js = yjMnJygjJgList.get(i).getJs();
break;
} else {
// 找到目标垂深所在的区间,进行线性插值计算斜深
double prevCs = yjMnJygjJgList.get(i-1).getCs();
double prevJs = yjMnJygjJgList.get(i-1).getJs();
double currJs = yjMnJygjJgList.get(i).getJs();
// 计算插值比例
double ratio = (cs - prevCs) / (currentCs - prevCs);
// 线性插值计算斜深
js = prevJs + ratio * (currJs - prevJs);
break;
}
}
}
return dataModel;
// 格式化结果并返回
return Double.parseDouble(df.format(js));
}
public static String extractNumber(String str) {
// 正则表达式:匹配-或~,然后捕获后面的数字
Pattern pattern = Pattern.compile("[\\-~](\\d+)");
Matcher matcher = pattern.matcher(str);
if (matcher.find()) {
// 返回第一个捕获组的内容(即数字部分)
return matcher.group(1);
}
return null; // 如果没有匹配到,返回null
}
private Map<String, PictureRenderData> createPictureMap(String pictureName, int width, int height) {
Map<String, PictureRenderData> map = new HashMap<>();
String filePath = RuoYiConfig.getUploadPath();
......@@ -2780,6 +2848,24 @@ public class SjDjjcController extends BaseController
return map;
}
private PictureRenderData createPictureMap2(String pictureName, int width, int height) {
Map<String, PictureRenderData> map = new HashMap<>();
String filePath = RuoYiConfig.getUploadPath();
String lj = pictureName.replaceAll("/profile/upload", "");
String path=filePath + lj;
File file =new File(path);
if(!file.exists()){
return null;
}
//创建PictureRenderData对象并设置其大小
//Pictures还有其他方法,如Pictures.ofStream()流处理,可根据自己的需求及文档替换
PictureRenderData pictureRenderData = Pictures.ofLocal(path).size(width, height).create();
return pictureRenderData;
}
private List<Map<String, PictureRenderData>> createPictureList(List<String> imgList,int width, int height) {
List<Map<String, PictureRenderData>> list = new ArrayList<>();
for(String lj:imgList ){
......
......@@ -38,6 +38,8 @@ public class Mxfxjgb extends BaseEntity
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date rwsj;
//任务内容
private String rwnr;
/** 解析状态 */
@Excel(name = "解析状态")
......@@ -64,4 +66,6 @@ public class Mxfxjgb extends BaseEntity
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
private Long jobid;
}
......@@ -83,8 +83,10 @@ public class SjDjjc extends BaseEntity
private String zjgs;
/** 钻井队 */
@Excel(name = "钻井队")
private String zjd;
@Excel(name = "钻井队")
private String zjdmc;
/** 井底横坐标 */
@Excel(name = "井底横坐标")
......
package com.zjsgfa.project.zjsgfa.service;
import java.util.List;
import com.zjsgfa.common.exception.job.TaskException;
import com.zjsgfa.project.zjsgfa.domain.Mxfxjgb;
import org.quartz.SchedulerException;
/**
* 大模型分析Service接口
......@@ -33,7 +36,7 @@ public interface IMxfxjgbService
* @param mxfxjgb 大模型分析
* @return 结果
*/
public int insertMxfxjgb(Mxfxjgb mxfxjgb);
public int insertMxfxjgb(Mxfxjgb mxfxjgb) throws SchedulerException, TaskException;
/**
* 修改大模型分析
......
package com.zjsgfa.project.zjsgfa.service.impl;
import java.util.List;
import com.zjsgfa.common.exception.job.TaskException;
import com.zjsgfa.common.utils.DateUtils;
import com.zjsgfa.project.monitor.domain.SysJob;
import com.zjsgfa.project.monitor.service.ISysJobService;
import org.quartz.SchedulerException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zjsgfa.project.zjsgfa.mapper.MxfxjgbMapper;
import com.zjsgfa.project.zjsgfa.domain.Mxfxjgb;
import com.zjsgfa.project.zjsgfa.service.IMxfxjgbService;
import org.springframework.transaction.annotation.Transactional;
/**
* 大模型分析Service业务层处理
......@@ -20,6 +26,9 @@ public class MxfxjgbServiceImpl implements IMxfxjgbService
@Autowired
private MxfxjgbMapper mxfxjgbMapper;
@Autowired
private ISysJobService jobService;
/**
* 查询大模型分析
*
......@@ -51,9 +60,22 @@ public class MxfxjgbServiceImpl implements IMxfxjgbService
* @return 结果
*/
@Override
public int insertMxfxjgb(Mxfxjgb mxfxjgb)
{
return mxfxjgbMapper.insertMxfxjgb(mxfxjgb);
@Transactional(rollbackFor = Exception.class)
public int insertMxfxjgb(Mxfxjgb mxfxjgb) throws SchedulerException, TaskException {
int i = mxfxjgbMapper.insertMxfxjgb(mxfxjgb);
if (i > 0) {
SysJob sysJob =new SysJob();
sysJob.setJobName(mxfxjgb.getRwmc());
sysJob.setJobGroup("DEFAULT");
sysJob.setInvokeTarget("mxdyTask.ryParams("+mxfxjgb.getId()+"L)");
sysJob.setCronExpression("0 0 * * * ?");
sysJob.setMisfirePolicy("2");
sysJob.setConcurrent("0");
sysJob.setStatus("0");
jobService.insertJob(sysJob);
mxfxjgb.setJobid(sysJob.getJobId());
}
return i;
}
/**
......
......@@ -396,8 +396,8 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}
}
}
sjFdsgcs.setZjgccs(zjgccs);
sjFdsgcs.setZjycs(zjycs);
// sjFdsgcs.setZjgccs(zjgccs);
// sjFdsgcs.setZjycs(zjycs);
if (zyfx.endsWith("<p>邻井风险<p>")){
zyfx=zyfx.replace("<p>邻井风险<p>","");
}
......@@ -491,8 +491,8 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
}
}
}
sjFdsgcs1.setZjgccs(zjgccs);
sjFdsgcs1.setZjycs(zjycs);
// sjFdsgcs1.setZjgccs(zjgccs);
// sjFdsgcs1.setZjycs(zjycs);
sjFdsgcs1.setFxgkcs(fxgkcs);
sjFdsgcs1.setZyfx(zyfx);
String join = "";
......
......@@ -18,10 +18,12 @@ 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="rwnr" column="rwnr" />
<result property="jobid" column="jobid" />
</resultMap>
<sql id="selectMxfxjgbVo">
select id, mklx, rwlx, rwmc, rwsj, jxzt, fhjg, url, bz, created_by, created_time, update_by, update_time from mxfxjgb
select id, mklx, rwlx, rwmc, rwsj, jxzt, fhjg, url, bz, created_by, created_time, update_by, update_time,rwnr,jobid from mxfxjgb
</sql>
<select id="selectMxfxjgbList" parameterType="Mxfxjgb" resultMap="MxfxjgbResult">
......@@ -37,7 +39,9 @@ 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="jobid != null "> and jobid = #{jobid}</if>
</where>
order by created_time desc
</select>
<select id="selectMxfxjgbById" parameterType="Long" resultMap="MxfxjgbResult">
......@@ -60,6 +64,8 @@ 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="rwnr != null">rwnr,</if>
<if test="jobid != null">jobid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="mklx != null">#{mklx},</if>
......@@ -74,6 +80,8 @@ 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="rwnr != null">#{rwnr},</if>
<if test="jobid != null">#{jobid},</if>
</trim>
</insert>
......@@ -92,6 +100,8 @@ 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="rwnr != null">rwnr = #{rwnr},</if>
<if test="jobid != null">jobid = #{jobid},</if>
</trim>
where id = #{id}
</update>
......
......@@ -40,7 +40,40 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSjDjjcVo">
select id, jh, jb, jx, jkhzb, jkzzb, gzwz, wzcw, ztmd, wzyz, wjfa, created_by, created_time, update_by, update_time, zjgs, zjd, jdhzb, jdzzb, zt, qk, sjzt, ljzlzt, dzfxzt, fxtszt, sggyzt, fdsgzt, jkzt, hsezt, jhjdzt, flzt, faid from sj_djjc
select a.id,
jh,
jb,
jx,
jkhzb,
jkzzb,
gzwz,
wzcw,
ztmd,
wzyz,
wjfa,
a.created_by,
a.created_time,
a.update_by,
a.update_time,
a.zjgs,
a.zjd,
b.zjjd zjdmc,
jdhzb,
jdzzb,
zt,
qk,
sjzt,
ljzlzt,
dzfxzt,
fxtszt,
sggyzt,
fdsgzt,
jkzt,
hsezt,
jhjdzt,
flzt,
faid
from sj_djjc a left join jcxx_jdxx b on a.zjd=b.id
</sql>
<select id="selectSjDjjcList" parameterType="SjDjjc" resultMap="SjDjjcResult">
......@@ -75,16 +108,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jhjdzt != null and jhjdzt != ''"> and jhjdzt = #{jhjdzt}</if>
<if test="flzt != null and flzt != ''"> and flzt = #{flzt}</if>
</where>
order by created_time desc
order by a.created_time desc
</select>
<select id="selectSjDjjcById" parameterType="Long" resultMap="SjDjjcResult">
<include refid="selectSjDjjcVo"/>
where id = #{id}
where a.id = #{id}
</select>
<select id="selectSjDjjcByJh" resultType="com.zjsgfa.project.zjsgfa.domain.SjDjjc">
<include refid="selectSjDjjcVo"/>
where jh = #{jh}
where a.jh = #{jh}
</select>
<insert id="insertSjDjjc" parameterType="SjDjjc" useGeneratedKeys="true" keyProperty="id">
......
......@@ -134,7 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="getDjjcList" resultType="com.zjsgfa.project.zt.domain.Djjc">
select a.jh,a.jdhzb,a.jdzzb,to_char(b.WJRQ,'YYYY-MM-DD') wjrq,c.kc,c.jd,ksjs,c.JS,xh,
select a.jh,a.jdhzb,a.jdzzb,to_char(b.WJRQ,'YYYY-MM-DD') wjrq,c.kc,d.QSJS ||'-' || d.ZZJS jd,ksjs,c.JS,xh,
SZDC cw,
JC,
jxzs,
......@@ -192,7 +192,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
Qzyy,
zzjs,
ROUND(jc / case when (JCSJHJ / 24) =0 then 1 else (JCSJHJ / 24) end , 2) zb
,pl,LGBY,cc
,pl,LGBY,cc,QSJS
from JSHA
order by xh
......
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