Commit c3e3cc6c by jiang'yun

修改

parent 22c2b8d1
......@@ -29,96 +29,96 @@ import springfox.documentation.spring.web.plugins.Docket;
@Configuration
public class SwaggerConfig
{
/** 系统基础配置 */
@Autowired
private RuoYiConfig ruoyiConfig;
/** 是否开启swagger */
@Value("${swagger.enabled}")
private boolean enabled;
/** 设置请求的统一前缀 */
@Value("${swagger.pathMapping}")
private String pathMapping;
/**
* 创建API
*/
@Bean
public Docket createRestApi()
{
return new Docket(DocumentationType.OAS_30)
// 是否启用Swagger
.enable(enabled)
// 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
.apiInfo(apiInfo())
// 设置哪些接口暴露给Swagger展示
.select()
// 扫描所有有注解的api,用这种方式更灵活
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// 扫描指定包中的swagger注解
// .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
// 扫描所有 .apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
/* 设置安全模式,swagger可以设置访问token */
.securitySchemes(securitySchemes())
.securityContexts(securityContexts())
.pathMapping(pathMapping);
}
/**
* 安全模式,这里指定token通过Authorization头请求头传递
*/
private List<SecurityScheme> securitySchemes()
{
List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
return apiKeyList;
}
/**
* 安全上下文
*/
private List<SecurityContext> securityContexts()
{
List<SecurityContext> securityContexts = new ArrayList<>();
securityContexts.add(
SecurityContext.builder()
.securityReferences(defaultAuth())
.operationSelector(o -> o.requestMappingPattern().matches("/.*"))
.build());
return securityContexts;
}
/**
* 默认的安全上引用
*/
private List<SecurityReference> defaultAuth()
{
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
List<SecurityReference> securityReferences = new ArrayList<>();
securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
return securityReferences;
}
/**
* 添加摘要信息
*/
private ApiInfo apiInfo()
{
// 用ApiInfoBuilder进行定制
return new ApiInfoBuilder()
// 设置标题
.title("标题:若依管理系统_接口文档")
// 描述
.description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// 作者信息
.contact(new Contact(ruoyiConfig.getName(), null, null))
// 版本
.version("版本号:" + ruoyiConfig.getVersion())
.build();
}
// /** 系统基础配置 */
// @Autowired
// private RuoYiConfig ruoyiConfig;
//
// /** 是否开启swagger */
// @Value("${swagger.enabled}")
// private boolean enabled;
//
// /** 设置请求的统一前缀 */
// @Value("${swagger.pathMapping}")
// private String pathMapping;
//
// /**
// * 创建API
// */
// @Bean
// public Docket createRestApi()
// {
// return new Docket(DocumentationType.OAS_30)
// // 是否启用Swagger
// .enable(false)
// // 用来创建该API的基本信息,展示在文档的页面中(自定义展示的信息)
// .apiInfo(apiInfo())
// // 设置哪些接口暴露给Swagger展示
// .select()
// // 扫描所有有注解的api,用这种方式更灵活
// .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
// // 扫描指定包中的swagger注解
// // .apis(RequestHandlerSelectors.basePackage("com.ruoyi.project.tool.swagger"))
// // 扫描所有 .apis(RequestHandlerSelectors.any())
// .paths(PathSelectors.any())
// .build()
// /* 设置安全模式,swagger可以设置访问token */
// .securitySchemes(securitySchemes())
// .securityContexts(securityContexts())
// .pathMapping(pathMapping);
// }
//
// /**
// * 安全模式,这里指定token通过Authorization头请求头传递
// */
// private List<SecurityScheme> securitySchemes()
// {
// List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
// apiKeyList.add(new ApiKey("Authorization", "Authorization", In.HEADER.toValue()));
// return apiKeyList;
// }
//
// /**
// * 安全上下文
// */
// private List<SecurityContext> securityContexts()
// {
// List<SecurityContext> securityContexts = new ArrayList<>();
// securityContexts.add(
// SecurityContext.builder()
// .securityReferences(defaultAuth())
// .operationSelector(o -> o.requestMappingPattern().matches("/.*"))
// .build());
// return securityContexts;
// }
//
// /**
// * 默认的安全上引用
// */
// private List<SecurityReference> defaultAuth()
// {
// AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
// AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
// authorizationScopes[0] = authorizationScope;
// List<SecurityReference> securityReferences = new ArrayList<>();
// securityReferences.add(new SecurityReference("Authorization", authorizationScopes));
// return securityReferences;
// }
//
// /**
// * 添加摘要信息
// */
// private ApiInfo apiInfo()
// {
// // 用ApiInfoBuilder进行定制
// return new ApiInfoBuilder()
// // 设置标题
// .title("标题:若依管理系统_接口文档")
// // 描述
// .description("描述:用于管理集团旗下公司的人员信息,具体包括XXX,XXX模块...")
// // 作者信息
// .contact(new Contact(ruoyiConfig.getName(), null, null))
// // 版本
// .version("版本号:" + ruoyiConfig.getVersion())
// .build();
// }
}
......@@ -3,6 +3,10 @@ package com.zjsgfa.project.system.controller;
import java.util.Date;
import java.util.List;
import java.util.Set;
import com.zjsgfa.project.system.domain.SysDept;
import com.zjsgfa.project.system.mapper.SysDeptMapper;
import com.zjsgfa.project.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -47,6 +51,12 @@ public class SysLoginController
@Autowired
private ISysConfigService configService;
@Autowired
private SysUserMapper sysUserMapper;
@Autowired
private SysDeptMapper sysDeptMapper;
/**
* 登录方法
*
......@@ -74,6 +84,13 @@ public class SysLoginController
{
LoginUser loginUser = SecurityUtils.getLoginUser();
SysUser user = loginUser.getUser();
SysUser sysUser = sysUserMapper.selectUserById(user.getUserId());
if(sysUser.getDeptId()!=null){
SysDept sysDept = sysDeptMapper.selectDeptById(sysUser.getDeptId());
user.setDept(sysDept);
}else {
user.setDept(null);
}
// 角色集合
Set<String> roles = permissionService.getRolePermission(user);
// 权限集合
......
......@@ -111,7 +111,9 @@ public class SysUserController extends BaseController
ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList()));
}
List<SysRole> roles = roleService.selectRoleAll();
ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
// System.out.println(userId);
// ajax.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
ajax.put("roles",roles);
ajax.put("posts", postService.selectPostAll());
return ajax;
}
......@@ -253,4 +255,9 @@ public class SysUserController extends BaseController
{
return success(deptService.selectDeptTreeList(dept));
}
@GetMapping("/deptTreeW")
public AjaxResult deptTreeW(SysDept dept)
{
return success(deptService.selectDeptTreeList2(dept));
}
}
......@@ -123,7 +123,7 @@ public class SysUser extends BaseEntity
if(userId==null){
falg= false;
}else {
if(userId>0L && userId<100L){
if(userId==1L){
falg= true;
}else {
falg= false;
......
......@@ -121,4 +121,6 @@ public interface ISysDeptService
* @return 结果
*/
public int deleteDeptById(Long deptId);
List<TreeSelect> selectDeptTreeList2(SysDept dept);
}
package com.zjsgfa.project.system.service.impl;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
......@@ -293,6 +294,12 @@ public class SysDeptServiceImpl implements ISysDeptService
return deptMapper.deleteDeptById(deptId);
}
@Override
public List<TreeSelect> selectDeptTreeList2(SysDept dept) {
List<SysDept> sysDepts = deptMapper.selectDeptList(dept);
return buildDeptTreeSelect(sysDepts);
}
/**
* 递归列表
*/
......
package com.zjsgfa.project.zjsgfa.controller;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.zjsgfa.common.utils.StringUtils;
import com.zjsgfa.common.utils.file.FileUploadUtils;
import com.zjsgfa.framework.config.RuoYiConfig;
import com.zjsgfa.project.zjsgfa.domain.CommonFile;
import com.zjsgfa.project.zjsgfa.domain.Dcmbgl;
import com.zjsgfa.project.zjsgfa.service.IDcmbglService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.zjsgfa.framework.aspectj.lang.annotation.Log;
import com.zjsgfa.framework.aspectj.lang.enums.BusinessType;
import com.zjsgfa.framework.web.controller.BaseController;
import com.zjsgfa.framework.web.domain.AjaxResult;
import com.zjsgfa.common.utils.poi.ExcelUtil;
import com.zjsgfa.framework.web.page.TableDataInfo;
import org.springframework.web.multipart.MultipartFile;
/**
* 导出word模板管理Controller
*
* @author ruoyi
* @date 2026-01-19
*/
@RestController
@RequestMapping("/system/dcmbgl")
public class DcmbglController extends BaseController
{
@Autowired
private IDcmbglService dcmbglService;
/**
* 查询导出word模板管理列表
*/
//@PreAuthorize("@ss.hasPermi('system:dcmbgl:list')")
@GetMapping("/list")
public TableDataInfo list(Dcmbgl dcmbgl)
{
startPage();
List<Dcmbgl> list = dcmbglService.selectDcmbglList(dcmbgl);
return getDataTable(list);
}
/**
* 查询导出word模板管理下拉框数据
* @param dcmbgl
* @return
*/
@GetMapping("/selectList")
public TableDataInfo selectList(Dcmbgl dcmbgl)
{
List<Dcmbgl> list = dcmbglService.selectDcmbglList(dcmbgl);
return getDataTable(list);
}
/**
* 导出导出word模板管理列表
*/
//@PreAuthorize("@ss.hasPermi('system:dcmbgl:export')")
@Log(title = "导出word模板管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Dcmbgl dcmbgl)
{
List<Dcmbgl> list = dcmbglService.selectDcmbglList(dcmbgl);
ExcelUtil<Dcmbgl> util = new ExcelUtil<Dcmbgl>(Dcmbgl.class);
util.exportExcel(response, list, "导出word模板管理数据");
}
/**
* 获取导出word模板管理详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:dcmbgl:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(dcmbglService.selectDcmbglById(id));
}
/**
* 新增导出word模板管理
*/
//@PreAuthorize("@ss.hasPermi('system:dcmbgl:add')")
@Log(title = "导出word模板管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Dcmbgl dcmbgl) throws IOException {
return toAjax(dcmbglService.insertDcmbgl(dcmbgl));
}
/**
* 修改导出word模板管理
*/
//@PreAuthorize("@ss.hasPermi('system:dcmbgl:edit')")
@Log(title = "导出word模板管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Dcmbgl dcmbgl) throws IOException {
return toAjax(dcmbglService.updateDcmbgl(dcmbgl));
}
/**
* 删除导出word模板管理
*/
//@PreAuthorize("@ss.hasPermi('system:dcmbgl:remove')")
@Log(title = "导出word模板管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcmbglService.deleteDcmbglByIds(ids));
}
@PostMapping("/dr")
@ResponseBody
public AjaxResult importData(MultipartFile file) throws Exception{
String name = file.getOriginalFilename();
String type = StringUtils.substringAfterLast(name, ".");
String fileNameYs = name.substring(0,name.lastIndexOf("."));
String filePath = RuoYiConfig.getUploadPath();
String fileName = FileUploadUtils.upload(filePath, file);
Dcmbgl dcmbgl=new Dcmbgl();
dcmbgl.setFileName(fileNameYs);//文件名
dcmbgl.setFilePath(fileName);//文件路径
dcmbgl.setFileSuffix(type);//后缀
dcmbgl.setFileType(type);//文件类型
return AjaxResult.success(dcmbgl);
}
}
......@@ -2,6 +2,8 @@ package com.zjsgfa.project.zjsgfa.controller;
import java.io.*;
import java.net.URLEncoder;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.text.DecimalFormat;
import java.util.*;
import java.util.regex.Matcher;
......@@ -33,9 +35,7 @@ import com.zjsgfa.project.zjsgfa.domain.*;
import com.zjsgfa.project.zjsgfa.domain.Vo.DrillingFluidConstant;
import com.zjsgfa.project.zjsgfa.mapper.*;
import com.zjsgfa.project.zjsgfa.service.ICommonFileService;
import com.zjsgfa.project.zjsgfa.service.ISgfambService;
import com.zjsgfa.project.zjsgfa.service.ISjZjyFdxnbService;
import com.zjsgfa.project.zjsgfa.service.*;
import com.zjsgfa.project.zjsgfa.util.*;
import com.zjsgfa.project.zt.domain.CommonParam;
import com.zjsgfa.project.zt.service.DjdcService;
......@@ -48,7 +48,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.zjsgfa.framework.aspectj.lang.annotation.Log;
import com.zjsgfa.framework.aspectj.lang.enums.BusinessType;
import com.zjsgfa.project.zjsgfa.service.ISjDjjcService;
import com.zjsgfa.framework.web.controller.BaseController;
import com.zjsgfa.framework.web.domain.AjaxResult;
import com.zjsgfa.common.utils.poi.ExcelUtil;
......@@ -228,7 +227,8 @@ public class SjDjjcController extends BaseController
private ISgfambService sgfambService;
@Autowired
private IDcmbglService dcmbglService;
......@@ -1719,20 +1719,20 @@ public class SjDjjcController extends BaseController
if(clFxsb!=null){
String zjycs = clFxsb.getZjycs();
String gcjscs = clFxsb.getGcjscs();
String zyfx="防碰风险:本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰;风险描述:"+clFxsb.getFxms();
String zyfx="<p><br/><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\">防碰风险:本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰;风险描述:"+clFxsb.getFxms()+"</span></p>";
if(StringUtils.isNotEmpty(sjFdsgcs1.getZyfx())){
if(!sjFdsgcs1.getZyfx().contains("防碰风险")){
sjFdsgcs1.setZyfx(sjFdsgcs1.getZyfx()+""+zyfx);
sjFdsgcs1.setZyfx(sjFdsgcs1.getZyfx()+"<br/> "+zyfx);
}
}else {
sjFdsgcs1.setZyfx(zyfx);
}
if(StringUtils.isNotEmpty(zjycs)){
String zjycsms="防碰风险:钻井液措施:"+zjycs;
String zjycsms="<p><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\">防碰风险:钻井液措施:"+zjycs+"</span></p>";
if(StringUtils.isNotEmpty(sjFdsgcs1.getZjycs())){
if(!sjFdsgcs1.getZjycs().contains("防碰风险")){
sjFdsgcs1.setZjycs(sjFdsgcs1.getZjycs()+""+zjycsms);
sjFdsgcs1.setZjycs(sjFdsgcs1.getZjycs()+" <br/>"+zjycsms);
}
}else {
sjFdsgcs1.setZjycs(zjycsms);
......@@ -1742,10 +1742,10 @@ public class SjDjjcController extends BaseController
if(StringUtils.isNotEmpty(gcjscs)){
if(StringUtils.isNotEmpty(sjFdsgcs1.getZjgccs())){
if(!sjFdsgcs1.getZjgccs().contains("防碰风险")){
sjFdsgcs1.setZjgccs(sjFdsgcs1.getZjgccs()+";防碰风险:工程技术措施:"+gcjscs);
sjFdsgcs1.setZjgccs(sjFdsgcs1.getZjgccs()+"<br/><p><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\"> 防碰风险:工程技术措施:"+gcjscs+"</span></p>");
}
}else {
sjFdsgcs1.setZjgccs("防碰风险:工程技术措施:"+gcjscs);
sjFdsgcs1.setZjgccs("<p><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\">防碰风险:工程技术措施:"+gcjscs+"</span></p>");
}
}
......@@ -1759,12 +1759,12 @@ public class SjDjjcController extends BaseController
if(clFxsb!=null){
String zjycs = clFxsb.getZjycs();
String gcjscs = clFxsb.getGcjscs();
sjFdsgcs1.setZyfx("本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰;风险描述:"+clFxsb.getFxms());
sjFdsgcs1.setZyfx("<p><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\">本井在井深"+sjLjsm.getJs()+"m处与同台"+sjLjsm.getBjjh()+"井最近距离 "+zjjl+"m,现场施工时注意防碰;风险描述:"+clFxsb.getFxms()+"</span></p>");
if(StringUtils.isNotEmpty(zjycs)){
sjFdsgcs1.setZjycs("防碰风险:钻井液措施:"+zjycs);
sjFdsgcs1.setZjycs("<p><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\">防碰风险:钻井液措施:"+zjycs+"</span></p>");
}
if(StringUtils.isNotEmpty(gcjscs)){
sjFdsgcs1.setZjgccs("防碰风险:工程技术措施:"+gcjscs);
sjFdsgcs1.setZjgccs("<p><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\">防碰风险:工程技术措施:"+gcjscs+"</span></p>");
}
}
sjFdsgcsMapper.insertSjFdsgcs(sjFdsgcs1);
......@@ -1804,7 +1804,7 @@ public class SjDjjcController extends BaseController
sjH2s.setCw(cw);
String xsbd=new DataFormatter().formatCellValue(row.getCell(4));
if(StringUtils.isNotEmpty(xsbd)){
sjH2s.setXsbd(Double.parseDouble(xsbd));
sjH2s.setXsbd(xsbd);
}
String xsgc=new DataFormatter().formatCellValue(row.getCell(5));
......@@ -2129,12 +2129,20 @@ public class SjDjjcController extends BaseController
if(!map.isEmpty()){
map.computeIfAbsent("工程补充", k -> new ArrayList<>());
map.computeIfAbsent("地质补充", k -> new ArrayList<>());
System.out.println("第一次map"+map);
if(map.get("工程补充")==null){
map.put("工程补充",new ArrayList<>());
}
if(map.get("地质补充")==null){
map.put("地质补充",new ArrayList<>());
}
// System.out.println("第一次map"+map);
System.out.println("地质补充"+map.get("地质补充"));
System.out.println("工程补充"+map.get("工程补充"));
Map<String,Object> map2 =new HashMap<>();
map2.put("dict_content",map);
Gson gson = new GsonBuilder().setPrettyPrinting().create();
String param = gson.toJson(map2);
System.out.println("最终参数"+param);
// System.out.println("最终参数"+param);
//调用接口
String body = HttpRequest.post("http://10.68.202.238:12001/api/pdf2xlsx").body(param).execute().body();
System.out.println("接口返回数据"+body);
......@@ -2187,14 +2195,23 @@ public class SjDjjcController extends BaseController
@PostMapping("/exportWord")
public void exportWord(long id,HttpServletResponse response) throws Exception {
public void exportWord(long id,HttpServletResponse response,Long dcmmbglid) throws Exception {
SjDjjc sjDjjc = sjDjjcService.selectSjDjjcById(id);
if(dcmmbglid==null){
return;
}
Dcmbgl dcmbgl = dcmbglService.selectDcmbglById(dcmmbglid);
String filePath = dcmbgl.getFilePath();
filePath=filePath.replace("/profile/upload","");
String path = RuoYiConfig.getUploadPath() + filePath;
InputStream in = null;
XWPFTemplate template = null;
OutputStream os = null;
try {
in = this.getClass().getResourceAsStream("/static/excel/sgfamb.docx");
// in = this.getClass().getResourceAsStream("/static/excel/sgfamb.docx");
in = Files.newInputStream(Paths.get(path));
os = response.getOutputStream();
String fileName = sjDjjc.getJh() + "井施工方案";
......
package com.zjsgfa.project.zjsgfa.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zjsgfa.framework.aspectj.lang.annotation.Excel;
import com.zjsgfa.framework.web.domain.BaseEntity;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;
/**
* 导出word模板管理对象 dcmbgl
*
* @author ruoyi
* @date 2026-01-19
*/
@Data
public class Dcmbgl extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 模板名称 */
@Excel(name = "模板名称")
private String mbmc;
/** 文件名 */
@Excel(name = "文件名")
private String fileName;
/** 后缀名 */
@Excel(name = "后缀名")
private String fileSuffix;
/** 文件类型 */
@Excel(name = "文件类型")
private String fileType;
/** 文件路径 */
@Excel(name = "文件路径")
private String filePath;
/** 业务类型 */
@Excel(name = "业务类型")
private String type;
/** 模板名 */
@Excel(name = "模板名")
private String templateName;
/** 创建人 */
@Excel(name = "创建人")
private String createdBy;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date createdTime;
/** 备用1 */
@Excel(name = "备用1")
private String ext1;
/** 备用2 */
@Excel(name = "备用2")
private String ext2;
/** 备用3 */
@Excel(name = "备用3")
private String ext3;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long height;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Long width;
private MultipartFile file;
}
......@@ -102,6 +102,11 @@ public class SjDjjc extends BaseEntity
@Excel(name = "状态")
private String zt;
//单位id
private String deptid;
private String deptName;
/** 设计状态(未定稿/定稿) */
......
......@@ -45,7 +45,7 @@ public class SjH2s extends BaseEntity
/** 显示浓度 */
@Excel(name = "显示浓度")
private Double xsbd;
private String xsbd;
/** 显示过程与处理 */
@Excel(name = "显示过程与处理")
......
......@@ -99,229 +99,20 @@ public class SjLjjw extends BaseEntity
private String lb1;
private String lb2;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setJh(String jh)
{
this.jh = jh;
}
//队号
private String dh;
//完井日期
private String wjrq;
//设计井深
private Double sjjs;
//完钻垂直井深
private Double wzczjs;
//钻机台月
private Double zjy;
//建井周期
private Double jjzq1;
public String getJh()
{
return jh;
}
public void setLjjh(String ljjh)
{
this.ljjh = ljjh;
}
public String getLjjh()
{
return ljjh;
}
public void setJx(String jx)
{
this.jx = jx;
}
public String getJx()
{
return jx;
}
public void setWjjs(Double wjjs)
{
this.wjjs = wjjs;
}
public Double getWjjs()
{
return wjjs;
}
public void setWjczjs(Double wjczjs)
{
this.wjczjs = wjczjs;
}
public Double getWjczjs()
{
return wjczjs;
}
public void setWzcw(String wzcw)
{
this.wzcw = wzcw;
}
public String getWzcw()
{
return wzcw;
}
public void setKc(String kc)
{
this.kc = kc;
}
public String getKc()
{
return kc;
}
public void setZjzq(Double zjzq)
{
this.zjzq = zjzq;
}
public Double getZjzq()
{
return zjzq;
}
public void setWjzq(Double wjzq)
{
this.wjzq = wjzq;
}
public Double getWjzq()
{
return wjzq;
}
public void setJkjl(Double jkjl)
{
this.jkjl = jkjl;
}
public Double getJkjl()
{
return jkjl;
}
public void setJdjl(Double jdjl)
{
this.jdjl = jdjl;
}
public Double getJdjl()
{
return jdjl;
}
public void setJkhzb(Double jkhzb)
{
this.jkhzb = jkhzb;
}
public Double getJkhzb()
{
return jkhzb;
}
public void setJkzzb(Double jkzzb)
{
this.jkzzb = jkzzb;
}
public Double getJkzzb()
{
return jkzzb;
}
public void setJkhjl(Double jkhjl)
{
this.jkhjl = jkhjl;
}
public Double getJkhjl()
{
return jkhjl;
}
public void setJkzjl(Double jkzjl)
{
this.jkzjl = jkzjl;
}
public Double getJkzjl()
{
return jkzjl;
}
public void setJdhzb(Double jdhzb)
{
this.jdhzb = jdhzb;
}
public Double getJdhzb()
{
return jdhzb;
}
public void setJdzzb(Double jdzzb)
{
this.jdzzb = jdzzb;
}
public Double getJdzzb()
{
return jdzzb;
}
public void setJdhjl(Double jdhjl)
{
this.jdhjl = jdhjl;
}
public Double getJdhjl()
{
return jdhjl;
}
public void setJdzjl(Double jdzjl)
{
this.jdzjl = jdzjl;
}
public Double getJdzjl()
{
return jdzjl;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("jh", getJh())
.append("ljjh", getLjjh())
.append("jx", getJx())
.append("wjjs", getWjjs())
.append("wjczjs", getWjczjs())
.append("wzcw", getWzcw())
.append("kc", getKc())
.append("zjzq", getZjzq())
.append("wjzq", getWjzq())
.append("jkjl", getJkjl())
.append("jdjl", getJdjl())
.append("jkhzb", getJkhzb())
.append("jkzzb", getJkzzb())
.append("jkhjl", getJkhjl())
.append("jkzjl", getJkzjl())
.append("jdhzb", getJdhzb())
.append("jdzzb", getJdzzb())
.append("jdhjl", getJdhjl())
.append("jdzjl", getJdzjl())
.toString();
}
}
package com.zjsgfa.project.zjsgfa.mapper;
import com.zjsgfa.project.zjsgfa.domain.Dcmbgl;
import java.util.List;
/**
* 导出word模板管理Mapper接口
*
* @author ruoyi
* @date 2026-01-19
*/
public interface DcmbglMapper
{
/**
* 查询导出word模板管理
*
* @param id 导出word模板管理主键
* @return 导出word模板管理
*/
public Dcmbgl selectDcmbglById(Long id);
/**
* 查询导出word模板管理列表
*
* @param dcmbgl 导出word模板管理
* @return 导出word模板管理集合
*/
public List<Dcmbgl> selectDcmbglList(Dcmbgl dcmbgl);
/**
* 新增导出word模板管理
*
* @param dcmbgl 导出word模板管理
* @return 结果
*/
public int insertDcmbgl(Dcmbgl dcmbgl);
/**
* 修改导出word模板管理
*
* @param dcmbgl 导出word模板管理
* @return 结果
*/
public int updateDcmbgl(Dcmbgl dcmbgl);
/**
* 删除导出word模板管理
*
* @param id 导出word模板管理主键
* @return 结果
*/
public int deleteDcmbglById(Long id);
/**
* 批量删除导出word模板管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDcmbglByIds(Long[] ids);
}
package com.zjsgfa.project.zjsgfa.service;
import com.zjsgfa.project.zjsgfa.domain.Dcmbgl;
import java.io.IOException;
import java.util.List;
/**
* 导出word模板管理Service接口
*
* @author ruoyi
* @date 2026-01-19
*/
public interface IDcmbglService
{
/**
* 查询导出word模板管理
*
* @param id 导出word模板管理主键
* @return 导出word模板管理
*/
public Dcmbgl selectDcmbglById(Long id);
/**
* 查询导出word模板管理列表
*
* @param dcmbgl 导出word模板管理
* @return 导出word模板管理集合
*/
public List<Dcmbgl> selectDcmbglList(Dcmbgl dcmbgl);
/**
* 新增导出word模板管理
*
* @param dcmbgl 导出word模板管理
* @return 结果
*/
public int insertDcmbgl(Dcmbgl dcmbgl) throws IOException;
/**
* 修改导出word模板管理
*
* @param dcmbgl 导出word模板管理
* @return 结果
*/
public int updateDcmbgl(Dcmbgl dcmbgl) throws IOException;
/**
* 批量删除导出word模板管理
*
* @param ids 需要删除的导出word模板管理主键集合
* @return 结果
*/
public int deleteDcmbglByIds(Long[] ids);
/**
* 删除导出word模板管理信息
*
* @param id 导出word模板管理主键
* @return 结果
*/
public int deleteDcmbglById(Long id);
}
package com.zjsgfa.project.zjsgfa.service.impl;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import com.zjsgfa.common.utils.DateUtils;
import com.zjsgfa.common.utils.SecurityUtils;
import com.zjsgfa.common.utils.StringUtils;
import com.zjsgfa.common.utils.file.FileUploadUtils;
import com.zjsgfa.framework.config.RuoYiConfig;
import com.zjsgfa.project.zjsgfa.domain.Dcmbgl;
import com.zjsgfa.project.zjsgfa.mapper.DcmbglMapper;
import com.zjsgfa.project.zjsgfa.service.IDcmbglService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
/**
* 导出word模板管理Service业务层处理
*
* @author ruoyi
* @date 2026-01-19
*/
@Service
public class DcmbglServiceImpl implements IDcmbglService
{
@Autowired
private DcmbglMapper dcmbglMapper;
/**
* 查询导出word模板管理
*
* @param id 导出word模板管理主键
* @return 导出word模板管理
*/
@Override
public Dcmbgl selectDcmbglById(Long id)
{
return dcmbglMapper.selectDcmbglById(id);
}
/**
* 查询导出word模板管理列表
*
* @param dcmbgl 导出word模板管理
* @return 导出word模板管理
*/
@Override
public List<Dcmbgl> selectDcmbglList(Dcmbgl dcmbgl)
{
return dcmbglMapper.selectDcmbglList(dcmbgl);
}
/**
* 新增导出word模板管理
*
* @param dcmbgl 导出word模板管理
* @return 结果
*/
@Override
public int insertDcmbgl(Dcmbgl dcmbgl) throws IOException {
dcmbgl.setCreatedBy(SecurityUtils.getUsername());//创建人
dcmbgl.setCreatedTime(new Date());//创建时间
return dcmbglMapper.insertDcmbgl(dcmbgl);
}
/**
* 修改导出word模板管理
*
* @param dcmbgl 导出word模板管理
* @return 结果
*/
@Override
public int updateDcmbgl(Dcmbgl dcmbgl) throws IOException {
dcmbgl.setUpdateBy(SecurityUtils.getUsername());
dcmbgl.setUpdateTime(DateUtils.getNowDate());
return dcmbglMapper.updateDcmbgl(dcmbgl);
}
/**
* 批量删除导出word模板管理
*
* @param ids 需要删除的导出word模板管理主键
* @return 结果
*/
@Override
public int deleteDcmbglByIds(Long[] ids)
{
return dcmbglMapper.deleteDcmbglByIds(ids);
}
/**
* 删除导出word模板管理信息
*
* @param id 导出word模板管理主键
* @return 结果
*/
@Override
public int deleteDcmbglById(Long id)
{
return dcmbglMapper.deleteDcmbglById(id);
}
}
......@@ -19,6 +19,8 @@ import com.zjsgfa.common.utils.DateUtils;
import com.zjsgfa.common.utils.SecurityUtils;
import com.zjsgfa.common.utils.StringUtils;
import com.zjsgfa.common.utils.bean.BeanUtils;
import com.zjsgfa.framework.aspectj.lang.annotation.DataScope;
import com.zjsgfa.framework.aspectj.lang.annotation.DataSource;
import com.zjsgfa.framework.util.HttpsPostUtil;
import com.zjsgfa.framework.web.domain.AjaxResult;
import com.zjsgfa.project.zjsgfa.domain.*;
......@@ -155,6 +157,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
* @return 设计信息-井基础信息
*/
@Override
@DataScope(deptAlias = "d")
public List<SjDjjc> selectSjDjjcList(SjDjjc sjDjjc)
{
return sjDjjcMapper.selectSjDjjcList(sjDjjc);
......@@ -195,7 +198,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
List<String> sjggjyh= new ArrayList<>();
if(sjDjjc.getFaid()!=null){
//根据方案id查询
List<SgfambKcSggy> sgfambKcSggyList=sgfambKcSggyMapper.selectSgfambKcSggyListByQk(new SgfambKcSggy());
List<SgfambKcSggy> collect = sgfambKcSggyList.stream().filter(sgfambKcSggy -> sgfambKcSggy.getZbid().toString().equals(sjDjjc.getFaid().toString())).collect(Collectors.toList());
......@@ -407,8 +410,9 @@ public class SjDjjcServiceImpl implements ISjDjjcService
}
sjSggyGjsbxnyq.setSjyh(String.join(" \n", sjggjyh));
sjSggyGjsbxnyqMapper.insertSjSggyGjsbxnyq(sjSggyGjsbxnyq);
}
if(StringUtils.isNotEmpty(sjDjjc.getQk())){
//井口装置
List<JcxxJkzp> jcxxJkzps = jcxxJkzpMapper.selectJcxxJkzpList(new JcxxJkzp());
JcxxJkzp jcxxJkzp = jcxxJkzps.stream().filter(it -> it.getQk().equals(sjDjjc.getQk())).findFirst().orElse(null);
......@@ -430,7 +434,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjHse.setHse(jcxxHse.getHse());
sjHseMapper.insertSjHse(sjHse);
}
}
return i;
}
......@@ -477,6 +481,7 @@ public class SjDjjcServiceImpl implements ISjDjjcService
sjDjjc.setUpdateTime(DateUtils.getNowDate());
sjDjjc.setUpdateBy(SecurityUtils.getUsername());
if(sjDjjc.getFaid()!=null){
List<String> sjggjyh= new ArrayList<>();
List<SgfambKcSggy> sgfambKcSggyList=sgfambKcSggyMapper.selectSgfambKcSggyListByQk(new SgfambKcSggy());
List<SgfambKcSggy> collect = sgfambKcSggyList.stream().filter(sgfambKcSggy -> sgfambKcSggy.getZbid().toString().equals(sjDjjc.getFaid().toString())).collect(Collectors.toList());
......@@ -668,6 +673,8 @@ public class SjDjjcServiceImpl implements ISjDjjcService
// sjZtcsxxMapper.insertSjZtcsxx(sjZtcsxx);
}
}
}
return sjDjjcMapper.updateSjDjjc(sjDjjc);
......
package com.zjsgfa.project.zjsgfa.service.impl;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.charset.StandardCharsets;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
......@@ -447,6 +449,8 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
dcylList.add(aa);
List<SjFdsgcsDcylZjymdtjb> zjymdtjbList1 = collect3.get(key);
zjymdtjbList1.forEach(zjymdtjb -> {
zjymdtjb.setQycsMin(new BigDecimal(zjymdtjb.getQycsMin()).setScale(1, RoundingMode.HALF_UP).doubleValue());
zjymdtjb.setQycsMax(new BigDecimal(zjymdtjb.getQycsMax()).setScale(1, RoundingMode.HALF_UP).doubleValue());
String bb=zjymdtjb.getCw()+" 密度范围为"+zjymdtjb.getMdMin()+"-"+zjymdtjb.getMdMax()+",取样垂深在"+zjymdtjb.getQycsMin()+"-"+zjymdtjb.getQycsMax()+"。<br/>";
dcylList.add(bb);
});
......@@ -606,7 +610,7 @@ public class SjFdsgcsServiceImpl implements ISjFdsgcsService
// sjFdsgcs1.setFxgkcs(fxgkcs);
if(StringUtils.isNotEmpty(sjFdsgcs1.getZyfx())){
if(!sjFdsgcs1.getZyfx().contains("邻井存在风险")){
sjFdsgcs1.setZyfx(sjFdsgcs1.getZyfx()+"<p><br/><span style=\"font-size: 16px; font-family: 宋体;\">"+zyfx+"</span></p>");
sjFdsgcs1.setZyfx(sjFdsgcs1.getZyfx()+"<p><br/><span style=\"font-size: 14px; font-family: 宋体;line-height: 1.5;\">"+zyfx+"</span></p>");
}
}else {
sjFdsgcs1.setZyfx(zyfx);
......
......@@ -22,6 +22,10 @@ public class CommonParam {
private String jh;
//设计井号
private String sjjh;
private String jb;
private String jx;
//井型
private List<String> jxs;
......
......@@ -77,6 +77,20 @@ public class Ljjw {
//井别
private String jb;
//队号
private String dh;
//完井rq
private String wjrq;
//设计井深
private Double sjjs;
//完钻垂直井深
private Double wzczjs;
//钻机台月
private Double zjy;
//建井周期
private Double jjzq1;
......
......@@ -85,4 +85,7 @@ public interface DjdcInfoMapper {
List<Djjc> getJhKcList(String jh);
List<Ljjw> getLjjwListNew(CommonParam param);
}
......@@ -331,7 +331,13 @@ public class DjdcServiceImpl implements DjdcService {
String brzygz = jswaZwsj.getBrzygz();
// 去除所有空白字符(包括空格、制表符、换行符等)
String cleanedRecord = brzygz.replaceAll("\\s+", "");
List<TimePointPair> timePointPairs = extractTimePointPairsBeforeDrilling(cleanedRecord);
System.out.println(brzygz);
System.out.println(jswaZwsj.getJh());
List<TimePointPair> timePointPairs=extractDrillingPeriods(cleanedRecord);
if(timePointPairs.size()==0){
timePointPairs = extractTimePointPairsBeforeDrilling(cleanedRecord);
}
if(timePointPairs.size()==0){
timePointPairs=extractTimePeriodsBeforeDrilling(cleanedRecord);
}
......@@ -555,12 +561,12 @@ public class DjdcServiceImpl implements DjdcService {
public static void main(String[] args) {
String record = "13:30-17:00一开钻进-18:00循环钻井液-19:00起钻-20:00下套管准备-23:00下表层套管-1:00固井-3:00侯凝-8:00安装防喷器";
String record = "8:00-9:00整拖准备-10:00整拖-16:00安装、一开准备(一开时间:2025.11.21 16:00)-21:00一开钻进-21:30循环钻井液-23:00短程起下 钻(18m-364m)-0:00循环钻井液-1:30起钻-2:30下套管准备-6:00下表层套管-8:00固井";
// 去除所有空白字符(包括空格、制表符、换行符等)
String cleanedRecord = record.replaceAll("\\s+", "");
List<TimePointPair> timePointPairs = extractTimePeriodsBeforeDrilling(cleanedRecord);
List<TimePointPair> timePointPairs = extractDrillingPeriods(cleanedRecord);
System.out.println("钻进字样前的时间点及其前一个时间点:");
for (TimePointPair pair : timePointPairs) {
......@@ -683,6 +689,37 @@ public class DjdcServiceImpl implements DjdcService {
return pairs;
}
public static List<TimePointPair> extractDrillingPeriods(String input) {
List<TimePointPair> result = new ArrayList<>();
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("H:mm");
// 分割时间节点(支持跨天时间格式)
Pattern nodePattern = Pattern.compile("(?<!\\d)(\\d{1,2}:\\d{2})"); // 匹配时间节点开头的HH:mm格式
String[] nodes = input.split("(?<!\\d:)\\s*-\\s*"); // 智能分割节点,忽略时间范围中的短横线
LocalTime prevTime = null;
for (String node : nodes) {
// 提取当前节点的时间
Matcher timeMatcher = nodePattern.matcher(node);
if (timeMatcher.find()) {
LocalTime currentTime = LocalTime.parse(timeMatcher.group(1), formatter);
// 发现含有"钻进"的节点
if (node.contains("钻进")) {
if (prevTime != null) {
result.add(new TimePointPair(prevTime, currentTime));
}
}
prevTime = currentTime; // 更新前一个有效时间节点
}
}
return result;
}
@Override
public List<DjZjzhfx> getZjzhfxList(CommonParam param) {
if(StringUtils.isNotEmpty(param.getJh())){
......@@ -861,8 +898,8 @@ public class DjdcServiceImpl implements DjdcService {
}
}
List<Ljjw> ljjwList = djdcInfoMapper.getLjjwList(param);
// List<Ljjw> ljjwList = djdcInfoMapper.getLjjwList(param);
List<Ljjw> ljjwList = djdcInfoMapper.getLjjwListNew(param);
return AjaxResult.success(ljjwList);
}
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zjsgfa.project.zjsgfa.mapper.DcmbglMapper">
<resultMap type="Dcmbgl" id="DcmbglResult">
<result property="id" column="id" />
<result property="mbmc" column="mbmc" />
<result property="fileName" column="file_name" />
<result property="fileSuffix" column="file_suffix" />
<result property="fileType" column="file_type" />
<result property="filePath" column="file_path" />
<result property="type" column="type" />
<result property="templateName" column="template_name" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="ext1" column="ext1" />
<result property="ext2" column="ext2" />
<result property="ext3" column="ext3" />
<result property="height" column="height" />
<result property="width" column="width" />
</resultMap>
<sql id="selectDcmbglVo">
select id, mbmc, file_name, file_suffix, file_type, file_path, type, template_name, created_by, created_time, update_by, update_time, ext1, ext2, ext3, height, width from dcmbgl
</sql>
<select id="selectDcmbglList" parameterType="Dcmbgl" resultMap="DcmbglResult">
<include refid="selectDcmbglVo"/>
<where>
<if test="mbmc != null and mbmc != ''"> and mbmc = #{mbmc}</if>
<if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if>
<if test="fileSuffix != null and fileSuffix != ''"> and file_suffix = #{fileSuffix}</if>
<if test="fileType != null and fileType != ''"> and file_type = #{fileType}</if>
<if test="filePath != null and filePath != ''"> and file_path = #{filePath}</if>
<if test="type != null and type != ''"> and type = #{type}</if>
<if test="templateName != null and templateName != ''"> and template_name like concat('%', #{templateName}, '%')</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if>
<if test="createdTime != null "> and created_time = #{createdTime}</if>
<if test="ext1 != null and ext1 != ''"> and ext1 = #{ext1}</if>
<if test="ext2 != null and ext2 != ''"> and ext2 = #{ext2}</if>
<if test="ext3 != null and ext3 != ''"> and ext3 = #{ext3}</if>
<if test="height != null "> and height = #{height}</if>
<if test="width != null "> and width = #{width}</if>
</where>
order by created_time desc
</select>
<select id="selectDcmbglById" parameterType="Long" resultMap="DcmbglResult">
<include refid="selectDcmbglVo"/>
where id = #{id}
</select>
<insert id="insertDcmbgl" parameterType="Dcmbgl" useGeneratedKeys="true" keyProperty="id">
insert into dcmbgl
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="mbmc != null">mbmc,</if>
<if test="fileName != null">file_name,</if>
<if test="fileSuffix != null">file_suffix,</if>
<if test="fileType != null">file_type,</if>
<if test="filePath != null">file_path,</if>
<if test="type != null">type,</if>
<if test="templateName != null">template_name,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="ext1 != null">ext1,</if>
<if test="ext2 != null">ext2,</if>
<if test="ext3 != null">ext3,</if>
<if test="height != null">height,</if>
<if test="width != null">width,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="mbmc != null">#{mbmc},</if>
<if test="fileName != null">#{fileName},</if>
<if test="fileSuffix != null">#{fileSuffix},</if>
<if test="fileType != null">#{fileType},</if>
<if test="filePath != null">#{filePath},</if>
<if test="type != null">#{type},</if>
<if test="templateName != null">#{templateName},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="ext1 != null">#{ext1},</if>
<if test="ext2 != null">#{ext2},</if>
<if test="ext3 != null">#{ext3},</if>
<if test="height != null">#{height},</if>
<if test="width != null">#{width},</if>
</trim>
</insert>
<update id="updateDcmbgl" parameterType="Dcmbgl">
update dcmbgl
<trim prefix="SET" suffixOverrides=",">
<if test="mbmc != null">mbmc = #{mbmc},</if>
<if test="fileName != null">file_name = #{fileName},</if>
<if test="fileSuffix != null">file_suffix = #{fileSuffix},</if>
<if test="fileType != null">file_type = #{fileType},</if>
<if test="filePath != null">file_path = #{filePath},</if>
<if test="type != null">type = #{type},</if>
<if test="templateName != null">template_name = #{templateName},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<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="ext1 != null">ext1 = #{ext1},</if>
<if test="ext2 != null">ext2 = #{ext2},</if>
<if test="ext3 != null">ext3 = #{ext3},</if>
<if test="height != null">height = #{height},</if>
<if test="width != null">width = #{width},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteDcmbglById" parameterType="Long">
delete from dcmbgl where id = #{id}
</delete>
<delete id="deleteDcmbglByIds" parameterType="String">
delete from dcmbgl where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -38,6 +38,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="flzt" column="flzt" />
<result property="faid" column="faid" />
<result property="famc" column="famc" />
<result property="deptid" column="deptid" />
<result property="deptName" column="dept_name" />
</resultMap>
<sql id="selectSjDjjcVo">
......@@ -73,9 +75,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
hsezt,
jhjdzt,
flzt,
faid,famc,u.nick_name as cjrmc
faid,famc,u.nick_name as cjrmc,a.deptid,d.dept_name
from sj_djjc a left join jcxx_jdxx b on a.zjd=b.id
left join sys_user u on a.created_by=u.user_name
left join sys_dept d on a.deptid = d.dept_id
</sql>
<select id="selectSjDjjcList" parameterType="SjDjjc" resultMap="SjDjjcResult">
......@@ -109,8 +112,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="hsezt != null and hsezt != ''"> and hsezt = #{hsezt}</if>
<if test="jhjdzt != null and jhjdzt != ''"> and jhjdzt = #{jhjdzt}</if>
<if test="flzt != null and flzt != ''"> and flzt = #{flzt}</if>
<if test="deptid != null and deptid != ''"> and a.deptid = #{deptid}</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</where>
order by a.created_time desc
</select>
<select id="selectSjDjjcById" parameterType="Long" resultMap="SjDjjcResult">
......@@ -157,6 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flzt != null">flzt,</if>
<if test="faid != null">faid,</if>
<if test="famc != null">famc,</if>
<if test="deptid != null">deptid,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jh != null">#{jh},</if>
......@@ -191,6 +199,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flzt != null">#{flzt},</if>
<if test="faid != null">#{faid},</if>
<if test="famc != null">#{famc},</if>
<if test="deptid != null">#{deptid},</if>
</trim>
</insert>
......@@ -228,6 +237,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="flzt != null">flzt = #{flzt},</if>
<if test="faid != null">faid = #{faid},</if>
<if test="famc != null">famc = #{famc},</if>
<if test="deptid != null">deptid = #{deptid},</if>
</trim>
where jh = #{jh}
</update>
......
......@@ -27,10 +27,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="jdzjl" column="jdzjl" />
<result property="lb1" column="lb1" />
<result property="lb2" column="lb2" />
<result property="dh" column="dh" />
<result property="wjrq" column="wjrq" />
<result property="sjjs" column="sjjs" />
<result property="wzczjs" column="wzczjs" />
<result property="zjy" column="zjy" />
<result property="jjzq1" column="jjzq1" />
</resultMap>
<sql id="selectSjLjjwVo">
select id, jh, ljjh, jx, wjjs, wjczjs, wzcw, kc, zjzq, wjzq, jkjl, jdjl, jkhzb, jkzzb, jkhjl, jkzjl, jdhzb, jdzzb, jdhjl, jdzjl,lb2, lb1 from sj_ljjw
select id, jh, ljjh, jx, wjjs, wjczjs, wzcw, kc, zjzq, wjzq, jkjl, jdjl, jkhzb, jkzzb, jkhjl, jkzjl, jdhzb, jdzzb, jdhjl, jdzjl,lb2, lb1,dh, wjrq, sjjs, wzczjs, zjy, jjzq1 from sj_ljjw
</sql>
<select id="selectSjLjjwList" parameterType="SjLjjw" resultMap="SjLjjwResult">
......@@ -89,6 +95,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jdzjl != null">jdzjl,</if>
<if test="lb1 != null">lb1,</if>
<if test="lb2 != null">lb2,</if>
<if test="dh != null">dh,</if>
<if test="wjrq != null">wjrq,</if>
<if test="sjjs != null">sjjs,</if>
<if test="wzczjs != null">wzczjs,</if>
<if test="zjy != null">zjy,</if>
<if test="jjzq1 != null">jjzq1,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="jh != null">#{jh},</if>
......@@ -112,6 +125,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jdzjl != null">#{jdzjl},</if>
<if test="lb1 != null">#{lb1},</if>
<if test="lb2 != null">#{lb2},</if>
<if test="dh != null">#{dh},</if>
<if test="wjrq != null">#{wjrq},</if>
<if test="sjjs != null">#{sjjs},</if>
<if test="wzczjs != null">#{wzczjs},</if>
<if test="zjy != null">#{zjy},</if>
<if test="jjzq1 != null">#{jjzq1},</if>
</trim>
</insert>
<insert id="insertSjLjjwBatch">
......@@ -120,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
(
jh, ljjh, jx, wjjs, wjczjs, wzcw, kc, zjzq, wjzq,
jkjl, jdjl, jkhzb, jkzzb, jkhjl, jkzjl,
jdhzb, jdzzb, jdhjl, jdzjl,lb1,lb2
jdhzb, jdzzb, jdhjl, jdzjl,lb1,lb2,dh, wjrq, sjjs, wzczjs, zjy, jjzq1
)
VALUES
<foreach collection="list" item="item" separator=",">
......@@ -145,7 +165,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{item.jdhjl},
#{item.jdzjl},
#{item.lb1},
#{item.lb2}
#{item.lb2},
#{item.dh},
#{item.wjrq},
#{item.sjjs},
#{item.wzczjs},
#{item.zjy},
#{item.jjzq1}
)
</foreach>
</insert>
......@@ -174,6 +200,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="jdzjl != null">jdzjl = #{jdzjl},</if>
<if test="lb1 != null">lb1 = #{lb1},</if>
<if test="lb2 != null">lb2 = #{lb2},</if>
<if test="dh != null">dh = #{dh},</if>
<if test="wjrq != null">wjrq = #{wjrq},</if>
<if test="sjjs != null">sjjs = #{sjjs},</if>
<if test="wzczjs != null">wzczjs = #{wzczjs},</if>
<if test="zjy != null">zjy = #{zjy},</if>
<if test="jjzq1 != null">jjzq1 = #{jjzq1},</if>
</trim>
where id = #{id}
</update>
......
......@@ -413,10 +413,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl
a.jdhzb - ${jdhzb} as jdhjl,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
fm.zjbh dh
FROM JSBA a
left join jsaa b
on a.jh = b.jh
left join jsfm fm
on a.jh = fm.jh
left join
(select jsta.jh,
......@@ -439,7 +447,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.jdhzb - #{jdhzb} &lt; #{jl}
AND a.jdzzb - #{jdzzb} &lt; #{jl}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if test="wjsjks!=null and wjsjks!=''">
and TO_CHAR(b.wjrq, 'YYYY')>=#{wjsjks}
</if>
<if test="wjsjjs!=null and wjsjjs!=''">
and TO_CHAR(b.wjrq, 'YYYY')&lt;=#{wjsjjs}
</if>
<if test="qk!=null and qk!=''">
and b.qk like CONCAT(CONCAT('%', #{qk}), '%')
</if>
......@@ -449,6 +462,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ksjs!=null">
and b.wjjs >= #{ksjs}
</if>
<if test="jx!=null and jx!=''">
AND a.jx=#{jx}
</if>
<if test="jb!=null and jb!=''">
AND a.jb=#{jb}
</if>
<if test="jxs != null and jxs.size() > 0">
AND a.jx IN
<foreach item="item" collection="jxs" open="(" separator="," close=")">
......@@ -485,10 +504,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl
a.jdhzb - ${jdhzb} as jdhjl,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
fm.zjbh dh
FROM JSBA a
left join jsaa b
on a.jh = b.jh
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,
......@@ -510,7 +537,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and a.jdhzb - #{jdhzb} &lt; #{jl}
AND a.jdzzb - #{jdzzb} &lt; #{jl}
and TO_CHAR(b.wjrq, 'YYYY') between #{wjsjks} and #{wjsjjs}
<if test="wjsjks!=null and wjsjks!=''">
and TO_CHAR(b.wjrq, 'YYYY')>=#{wjsjks}
</if>
<if test="wjsjjs!=null and wjsjjs!=''">
and TO_CHAR(b.wjrq, 'YYYY')&lt;=#{wjsjjs}
</if>
<if test="qk!=null and qk!=''">
and b.qk like CONCAT(CONCAT('%', #{qk}), '%')
</if>
......@@ -520,6 +553,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ksjs!=null">
and b.wjjs >= #{ksjs}
</if>
<if test="jx!=null and jx!=''">
AND a.jx=#{jx}
</if>
<if test="jb!=null and jb!=''">
AND a.jb=#{jb}
</if>
<if test="jxs != null and jxs.size() > 0">
AND a.jx IN
<foreach item="item" collection="jxs" open="(" separator="," close=")">
......@@ -539,6 +578,100 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="getLjjwListNew" resultType="com.zjsgfa.project.zt.domain.Ljjw">
select *
from (
SELECT a.jh,
a.jkhzb,
a.jkzzb,
a.jdhzb,
a.jdzzb,
a.jx,
a.jb,
b.wjjs,
b.wjczjs,
b.wzcw,
kc.kc,
zjzq.wjzq,
zjzq.zjzq,
round(power(power(a.jkhzb - ${jkhzb}
, 2) + power(a.jkzzb - ${jkzzb}, 2), 0.5), 2) as jkjl,
round(power(power(a.jdhzb - ${jdhzb}
, 2) + power(a.jdzzb - ${jdzzb}, 2), 0.5), 2) as jdjl,
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
fm.zjbh dh
FROM JSBA a
left join jsaa b
on a.jh = b.jh
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, count(*) as kc
from jsdb
where tgcc not like '%导管%'
group by jh) kc
on a.jh = kc.jh
WHERE 1 = 1
and a.jh not like '%侧%'
and a.jdhzb - #{jdhzb} &lt; #{jl}
AND a.jdzzb - #{jdzzb} &lt; #{jl}
<if test="wjsjks!=null and wjsjks!=''">
and TO_CHAR(b.wjrq, 'YYYY')>=#{wjsjks}
</if>
<if test="wjsjjs!=null and wjsjjs!=''">
and TO_CHAR(b.wjrq, 'YYYY')&lt;=#{wjsjjs}
</if>
<if test="qk!=null and qk!=''">
and b.qk like CONCAT(CONCAT('%', #{qk}), '%')
</if>
<if test="js!=null">
and b.wjjs &lt;= #{js}
</if>
<if test="ksjs!=null">
and b.wjjs >= #{ksjs}
</if>
<if test="jx!=null and jx!=''">
AND a.jx like concat(#{jx},'%')
</if>
<if test="jb!=null and jb!=''">
AND
a.jb like concat(#{jb},'%')
</if>
<if test="jxs != null and jxs.size() > 0">
AND a.jx IN
<foreach item="item" collection="jxs" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="jbs != null and jbs.size() > 0">
AND a.jb IN
<foreach item="item" collection="jbs" open="(" separator="," close=")">
#{item}
</foreach>
</if>
order by WJRQ desc) where ROWNUM &lt;= 100
</select>
<!-- select ss.kc,ss.ztxh,ss.cc,-->
<!-- count( *) as ztsl,-->
<!-- round( sum(case when ss.kc=1 and tcyk=1 then 1 else 0 end )/count(*)*100,2)as ytzl,-->
......@@ -1071,11 +1204,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
a.jkzzb - ${jkzzb} as jkzjl,
a.jkhzb - ${jkhzb} as jkhjl,
a.jdzzb - ${jdzzb} as jdzjl,
a.jdhzb - ${jdhzb} as jdhjl
a.jdhzb - ${jdhzb} as jdhjl,
to_char(WJRQ,'YYYY-MM-DD')WJRQ,
b.sjjs,
b.wjczjs wzczjs,
b.zjy,
b.jjzq1,
fm.zjbh dh
FROM JSBA a
left join jsaa b
on a.jh = b.jh
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,
......@@ -1119,4 +1259,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LAG(JS, 1, 0) OVER (PARTITION BY jh ORDER BY js) AS LAG_JS
FROM JSDB) ) a where jh=#{jh}
</select>
</mapper>
\ No newline at end of file
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