Compare commits

...

28 Commits

Author SHA1 Message Date
liujun eba8aec968 Merge branch 'liujun-2024-06-06-相关方新需求' into pet
# Conflicts:
#	src/main/java/com/zcloud/service/xgf/impl/XgfUserServiceImpl.java
#	src/main/resources/application-local.properties
2024-07-02 14:57:55 +08:00
liujun 9422e6958c Merge remote-tracking branch 'origin/20240528Test' into liujun-2024-06-06-相关方新需求 2024-06-24 08:50:46 +08:00
WenShiJun 62ece3f434 动火作业新增接口所有节点打回时添加保存签字图片和打回意见逻辑 2024-06-21 17:40:50 +08:00
liujun c5f5081596 Merge remote-tracking branch 'origin/20240528Test' into liujun-2024-06-06-相关方新需求 2024-06-20 14:36:01 +08:00
WenShiJun e1033f8a41 接受交底人和完工验收多图片上传逻辑修改 2024-06-20 14:02:01 +08:00
liujun d8113d56e6 Merge remote-tracking branch 'origin/20240528Test' into liujun-2024-06-06-相关方新需求 2024-06-20 08:35:48 +08:00
WenShiJun 3cc4a13ad3 接受交底人,完工验收添加多张签字图片逻辑修改,新增saveFiles方法
新增动火操作人图片删除方法
2024-06-19 17:25:57 +08:00
liujun a600897c34 Merge remote-tracking branch 'origin/20240528Test' into liujun-2024-06-06-相关方新需求 2024-06-18 08:37:11 +08:00
WenShiJun 3e9f75af65 安全防护措施动态插入数据 2024-06-17 17:49:52 +08:00
WenShiJun 9d1e796ec7 动火app详情页面响应数据添加字段 2024-06-17 10:23:18 +08:00
WenShiJun 4c9929452e 如果是暂存数据在其他节点不显示
完工验收如果不输入意见默认同意
补充项目责任负责人签字图片
2024-06-14 17:52:50 +08:00
liujun 30287687a3 打回功能 2024-06-13 18:42:47 +08:00
WenShiJun eb9be8ce5f 动火页面统计数逻辑修改
安全检查项意见逻辑修改
2024-06-13 18:07:27 +08:00
liujun f10cae67a1 企业端、监管端功能同步 2024-06-12 15:00:08 +08:00
liujun b8201850a4 Merge remote-tracking branch 'origin/20240528Test' into liujun-2024-06-06-相关方新需求 2024-06-12 11:43:17 +08:00
liujun 6c0fe2170c 相关方人员 2024-06-12 11:25:59 +08:00
liujun 246de69195 相关方人员信息打回 2024-06-12 08:51:18 +08:00
liujun 4d59fba200 1、bug修复-系统异常后事务未回滚
2、指定人员打回
2024-06-11 17:42:13 +08:00
WenShiJun c361f8f794 修改动火作业流程,未进行安全措施确认不允许监护人,安全交底人和接受交底人签字 2024-06-11 16:17:04 +08:00
liujun 813fd36a88 相关方人员审批可指定打回至特殊节点。 2024-06-11 14:31:06 +08:00
liujun 6d152e28ee 相关方人员审批可指定打回至特殊节点。 2024-06-11 14:27:19 +08:00
WenShiJun 0ae96c5305 企业端动火作业数据详情页面,新增动火是否完成,作业现场是否清理,是否存在遗留火种三个字段显示 2024-06-11 09:43:14 +08:00
WenShiJun e8c2e655ed 接受交底人可添加多个,
完工审核时新增三个审核字段入库保存
2024-06-07 17:28:02 +08:00
WenShiJun 87178f4289 申请时,安全交底人可添加、接受交底人不能已添加 2024-06-06 18:03:59 +08:00
WenShiJun dc537a8a15 高危作业申请提交后,下一步的操作人员账号中在主界面和高危作业界面中都没有相应的提示。 2024-06-05 15:03:47 +08:00
WenShiJun 95f225bb9f 一公司app端判断是否显示项目主管审批内容,添加查询APPROVAL_SIGNATURE字段 2024-06-05 09:46:57 +08:00
WenShiJun 42dc26afd5 动火各个模块查询时按照创建时间降序排序 2024-06-04 10:58:14 +08:00
WenShiJun 6e4f31f205 动火申请提交后,只有申请人和下一步的操作人可以看到动火申请,流程中其他人员都看不到 2024-06-04 10:11:02 +08:00
31 changed files with 1399 additions and 726 deletions

View File

@ -7,6 +7,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Conditional;
import org.springframework.scheduling.annotation.EnableScheduling;

View File

@ -38,7 +38,7 @@ import java.util.*;
* www.zcloudchina.com
*/
@Controller
@RequestMapping("/app/electricity")
@RequestMapping("c")
public class AppElectricityController extends BaseController {
@Autowired

View File

@ -23,6 +23,7 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartRequest;
import javax.annotation.Resource;
import java.io.File;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@ -650,33 +651,33 @@ public class AppHotworkCfdController extends BaseController {
* @param
* @throws Exception
*/
@RequestMapping(value = "/editAcceptconfess")
@ResponseBody
@Transactional
@LogAnno(menuType = "手机", menuServer = "动土作业", instructionsOperate = "动土作业", instructionsType = "修改")
public Object editAcceptconfess(MultipartRequest request) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
PageData pd2 = new PageData();
pd2 = hotworkCfdService.findById(pd);
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
String signertime = "";
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
for (int i = 0; i < SIGNTIME.length; i++) {
signertime = SIGNTIME[i];
fileList.add(request.getFile("file" + i));
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
saveImg(fileList.toArray(fileArr), signertime, pd.getString("HOTWORK_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_CONFESS_USER_ID"), pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
fileList.clear();
}
map.put("result", errInfo);
return map;
}
// @RequestMapping(value = "/editAcceptconfess")
// @ResponseBody
// @Transactional
// @LogAnno(menuType = "手机", menuServer = "动土作业", instructionsOperate = "动土作业", instructionsType = "修改")
// public Object editAcceptconfess(MultipartRequest request) throws Exception {
// Map<String, Object> map = new HashMap<String, Object>();
// String errInfo = "success";
// PageData pd = new PageData();
// pd = this.getPageData();
// PageData pd2 = new PageData();
// pd2 = hotworkCfdService.findById(pd);
// pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
// pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
// List<MultipartFile> fileList = new ArrayList<MultipartFile>();
// String signertime = "";
// String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
//
// for (int i = 0; i < SIGNTIME.length; i++) {
// signertime = SIGNTIME[i];
// fileList.add(request.getFile("file" + i));
// MultipartFile[] fileArr = new MultipartFile[fileList.size()];
// saveImg(fileList.toArray(fileArr), signertime, pd.getString("HOTWORK_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_CONFESS_USER_ID"), pd.getString("ACCEPT_CONFESS_DEPARTMENT_ID"));
// fileList.clear();
// }
// map.put("result", errInfo);
// return map;
// }
private void saveImg(MultipartFile[] files, String signertime, String HOTWORK_ID, String CORPINFO_ID, String ACCEPT_CONFESS_USER_ID, String ACCEPT_CONFESS_DEPARTMENT_ID) throws Exception {
if (files != null && files.length > 0) {
@ -721,6 +722,7 @@ public class AppHotworkCfdController extends BaseController {
pd = this.getPageData();
PageData pd2 = new PageData();
pd2 = hotworkCfdService.findById(pd);
pd2.put("OPERATOR", pd.get("OPERATOR")); //修改人
pd2.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
PageData log = new PageData();
@ -739,13 +741,12 @@ public class AppHotworkCfdController extends BaseController {
pd2.put("OTHER_PROTECTIVE_MEASURES", "");
}
switch (status) {
case "8"://验收人
List<MultipartFile> fileList = new ArrayList<MultipartFile>();
String signertime = "";
String SIGNTIME[] = pd.getString("SIGNTIME").split(",");
String[] SIGNTIME = pd.getString("SIGNTIME").split(",");
switch (status) {
case "8": // 验收人
for (int i = 0; i < SIGNTIME.length; i++) {
signertime = SIGNTIME[i];
fileList.add(request.getFile("file" + i));
@ -755,6 +756,9 @@ public class AppHotworkCfdController extends BaseController {
}
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("FIRE_COMPLETED", pd.get("FIRE_COMPLETED")); // 动火是否完成
pd2.put("SITE_CLEANED", pd.get("SITE_CLEANED")); // 作业现场是否清理
pd2.put("NO_REMAINING_EMBERS", pd.get("NO_REMAINING_EMBERS")); // 是否存在遗留火种
hotworkCfdService.edit(pd2);
log.put("ACTION", "验收通过");
@ -780,10 +784,17 @@ public class AppHotworkCfdController extends BaseController {
break;
case "-8": // 审批打回
log.put("ACTION", "验收人打回");
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
for (int i = 0; i < SIGNTIME.length; i++) {
signertime = SIGNTIME[i];
fileList.add(request.getFile("file" + i));
MultipartFile[] fileArr = new MultipartFile[fileList.size()];
saveAcceptImg(fileList.toArray(fileArr), signertime, pd.getString("HOTWORK_ID"), pd.getString("CORPINFO_ID"), pd.getString("ACCEPT_USER_ID"), pd.getString("ACCEPT_DEPARTMENT_ID"));
fileList.clear();
}
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
hotworkCfdService.edit(pd2);
log.put("ACTION", "验收人打回");
// 发短信
PageData mes6 = new PageData();
@ -1098,9 +1109,12 @@ public class AppHotworkCfdController extends BaseController {
case "7"://班长
if (files != null && files.length > 0) {
PageData condition = new PageData();
condition.put("HOTWORK_ID",pd2.getString("HOTWORK_ID"));
List<PageData> acceptUsers = hotworkAcceptUserCfdService.listAll(condition);
if (acceptUsers.size() <= 0){
pd.put("HOTWORK_ID", pd2.getString("HOTWORK_ID"));
// condition.put("HOTWORK_ID",pd2.getString("HOTWORK_ID"));
hotworkCfdService.addInfo(pd);
//List<PageData> acceptUsers = hotworkAcceptUserCfdService.listAll(condition);
List<PageData> acceptConfessList = (List<PageData>) pd.get("acceptConfessList");
if (acceptConfessList == null || acceptConfessList.size() <= 0 || "0".equals(pd.getString("acceptConfessStatus"))) {
map.put("code", "9999");
map.put("errorMessage", "接受交底人未签字");
return map;
@ -1208,17 +1222,50 @@ public class AppHotworkCfdController extends BaseController {
}
break;
case "-1.5": {//确认
log.put("ACTION", "作业负责人打回");
// log.put("ACTION", "作业负责人打回");
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
// pd2.put("AUDIT_CONTENT", pd.get("CONTENT"));
// hotworkCfdService.edit(pd2);
// break;
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("CONFIRM_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd2.put("CONFIRM_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
pd2.put("CONFIRM_CONTENT", pd.get("CONTENT"));
pd2.put("CONFIRM_OTHER_CONTENT", pd.get("APPROVAL_CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("AUDIT_CONTENT", pd.get("CONTENT"));
hotworkCfdService.edit(pd2);
log.put("ACTION", "作业负责人打回");
}
break;
}
case "-2": {//确认打回
log.put("ACTION", "作业单位打回");
// log.put("ACTION", "作业单位打回");
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
// pd2.put("CONFIRM_CONTENT", pd.get("CONTENT"));
// hotworkCfdService.edit(pd2);
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("CONFIRM_CONTENT", pd.get("CONTENT"));
hotworkCfdService.edit(pd2);
// 保存审批信息
PageData condition = new PageData();
condition.put("HOTWORK_ID", pd2.get("HOTWORK_ID"));
condition.put("TYPE", "1");
condition.put("APPROVAL_OPINIONS", pd.get("CONTENT"));
condition.put("APPROVAL_SIGNATURE", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
condition.put("APPROVAL_SIGNATURE_TIME", pd.get("SIGNER_TIME"));
condition.put("APPROVAL_STATUS", pd.getString("APPROVAL_STATUS"));
condition.put("APPROVAL_CONTENT", pd.getString("APPROVAL_CONTENT"));
hotworkCfdService.approval(condition);
}
// 发短信
PageData mes = new PageData();
@ -1248,9 +1295,24 @@ public class AppHotworkCfdController extends BaseController {
}
case "-4"://单位负责人打回
log.put("ACTION", "单位负责人打回");
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("LEADER_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd2.put("LEADER_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
pd2.put("LEADER_CONTENT", pd.get("CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("AUDIT_CONTENT", pd.get("CONTENT"));
hotworkCfdService.edit(pd2);
log.put("ACTION", "单位负责人打回");
}
// log.put("ACTION", "单位负责人打回");
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
// pd2.put("AUDIT_CONTENT", pd.get("CONTENT"));
// hotworkCfdService.edit(pd2);
// 发短信
PageData mes2 = new PageData();
@ -1278,10 +1340,24 @@ public class AppHotworkCfdController extends BaseController {
//sendMessageUtil.sendMessages(mes2, paramsList2);
break;
case "-5"://审批部门打回
log.put("ACTION", "安全部门打回");
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("AUDIT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd2.put("AUDIT_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
pd2.put("AUDIT_CONTENT", pd.get("CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("APPROVE_CONTENT", pd.get("CONTENT"));
hotworkCfdService.edit(pd2);
log.put("ACTION", "安全部门打回");
// log.put("ACTION", "安全部门打回");
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
// pd2.put("APPROVE_CONTENT", pd.get("CONTENT"));
// hotworkCfdService.edit(pd2);
// 发短信
PageData mes3 = new PageData();
@ -1308,11 +1384,25 @@ public class AppHotworkCfdController extends BaseController {
paramsList3.add(params12);
//sendMessageUtil.sendMessages(mes3, paramsList3);
break;
}
case "-6"://审批打回
log.put("ACTION", "审批部门打回");
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("APPROVE_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd2.put("APPROVE_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
pd2.put("APPROVE_CONTENT", pd.get("CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
hotworkCfdService.edit(pd2);
log.put("ACTION", "审批部门打回");
// log.put("ACTION", "审批部门打回");
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
// pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
// hotworkCfdService.edit(pd2);
// 发短信
PageData mes4 = new PageData();
mes4.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
@ -1338,11 +1428,26 @@ public class AppHotworkCfdController extends BaseController {
paramsList4.add(params15);
//sendMessageUtil.sendMessages(mes4, paramsList4);
break;
}
case "-7"://审批打回
log.put("ACTION", "动火前验票打回");
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("MONITOR_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd2.put("MONITOR_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
pd2.put("MONITOR_CONTENT", pd.get("CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
pd2.put("WORK_START_DATE", LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")));
hotworkCfdService.edit(pd2);
log.put("ACTION", "动火前验票打回");
// log.put("ACTION", "动火前验票打回");
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
// pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
// hotworkCfdService.edit(pd2);
// 发短信
PageData mes5 = new PageData();
mes5.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
@ -1368,11 +1473,25 @@ public class AppHotworkCfdController extends BaseController {
paramsList5.add(params18);
//sendMessageUtil.sendMessages(mes5, paramsList5);
break;
}
case "-8"://审批打回
log.put("ACTION", "验收人打回");
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd2.put("ACCEPT_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd2.put("ACCEPT_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
hotworkCfdService.edit(pd2);
log.put("ACTION", "验收人打回");
// log.put("ACTION", "验收人打回");
// pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
// pd2.put("ACCEPT_CONTENT", pd.get("CONTENT"));
// hotworkCfdService.edit(pd2);
// 发短信
PageData mes6 = new PageData();
@ -1398,6 +1517,7 @@ public class AppHotworkCfdController extends BaseController {
params21.put("value", "验收归档");// 存入上面参数名称所传递的值
paramsList6.add(params21);
//sendMessageUtil.sendMessages(mes6, paramsList6);
}
break;
default:
break;
@ -1656,16 +1776,52 @@ public class AppHotworkCfdController extends BaseController {
PageData condition = new PageData();
condition.put("showInfo",pd.getString("showInfo"));
condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID"));
map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
// map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
List<PageData> measuresList = hotworkCfdService.listAllMeasures(condition);
for (PageData measure : measuresList) {
String order = measure.getString("ORDER");
String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES");
if ("2".equals(order)) {
String answer1 = measure.getString("ANSWER1");
int startIndex = protectiveMeasures.indexOf('(');
int endIndex = protectiveMeasures.indexOf(')');
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex);
}
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
} else if ("8".equals(order)) {
String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")};
for (String answer : answers) {
int index = protectiveMeasures.indexOf("()");
if (index != -1) {
protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1);
}
}
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
}
}
map.put("measuresList", measuresList);
pd = hotworkCfdService.findById(pd); //根据ID读取
// created by liu jun 添加(交底人、项目主管部门负责人、安全措施确认人)
hotworkCfdService.addInfo(pd);
//气体检测数据
map.put("gasList", hotworkGasCfdService.listAll(pd));
// imgList是接受交底人签字
map.put("imgList", hotworkAcceptUserCfdService.findByIds(pd));
map.put("imgList1", hotworkAcceptUserCfdService.findById(pd));
List<PageData> acceptConfessList = (List<PageData>) pd.get("acceptConfessList");
List<String> imgList = new ArrayList<>();
if (acceptConfessList != null) {
for (PageData acceptConfess : acceptConfessList) {
String signerPath = acceptConfess.getString("ACCEPT_CONFESS_USER_SIGNER_PATH");
if (signerPath != null && !signerPath.isEmpty()) {
imgList.add(signerPath);
}
}
}
map.put("imgList", imgList);
// map.put("imgList", hotworkAcceptUserCfdService.findByIds(pd));
// map.put("imgList1", hotworkAcceptUserCfdService.findById(pd));
condition.clear();
condition.put("TYPE","115");
condition.put("FOREIGN_KEY",pd.getString("HOTWORK_ID"));
@ -1675,6 +1831,26 @@ public class AppHotworkCfdController extends BaseController {
return map;
}
/**
* @param
* @throws Exception
*/
@RequestMapping(value="/delImg")
@ResponseBody
@LogAnno(menuType= "手机",menuServer= "动火作业",instructionsOperate = "动火作业",instructionsType = "删除动火操作人图片")
public Object delImg() throws Exception{
Map<String,String> map = new HashMap<String,String>();
String errInfo = "success";
PageData pd = new PageData();
pd = this.getPageData();
pd = imgFilesService.findById(pd); //根据ID读取
File file = new File(PathUtil.getProjectpath()+pd.getString("FILEPATH"));
file.delete();
imgFilesService.delete(pd);
map.put("result", errInfo); //返回结果
return map;
}
/**
* @param
* @throws Exception
@ -1846,6 +2022,36 @@ public class AppHotworkCfdController extends BaseController {
}
}
/**
*
* @param files
* @return
* @throws Exception
*/
@RequestMapping(value = "/editAcceptconfess")
@ResponseBody
public Object editAcceptconfess(@RequestParam(value = "FFILE", required = false) MultipartFile[] files) throws Exception {
PageData response = new PageData();
try {
PageData request = this.getPageData();
PageData condition = new PageData();
condition.put("HOTWORK_ID",request.get("HOTWORK_ID"));
condition.put("USER_ID",request.get("USER_ID"));
condition.put("CORPINFO_ID",request.get("CORPINFO_ID"));
condition.put("TYPE","3");
condition.put("APPROVAL_STATUS","1");
hotworkCfdService.confessApproval(condition, files);
response.put("result", "success");
return response;
} catch (Exception e) {
e.printStackTrace();
response.put("result", "error");
response.put("message", e.getMessage());
return response;
}
}
/**
*
* created by liu jun

View File

@ -141,13 +141,36 @@ public class HotworkCfdController extends BaseController {
PageData condition = new PageData();
condition.put("showInfo",pd.getString("showInfo"));
condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID"));
map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
// map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
List<PageData> measuresList = hotworkCfdService.listAllMeasures(condition);
for (PageData measure : measuresList) {
String order = measure.getString("ORDER");
String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES");
if ("2".equals(order)) {
String answer1 = measure.getString("ANSWER1");
int startIndex = protectiveMeasures.indexOf('(');
int endIndex = protectiveMeasures.indexOf(')');
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex);
}
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
} else if ("8".equals(order)) {
String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")};
for (String answer : answers) {
int index = protectiveMeasures.indexOf("()");
if (index != -1) {
protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1);
}
}
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
}
}
map.put("measuresList", measuresList);
pd = hotworkCfdService.findById(pd); //根据ID读取
// created by liu jun 添加(交底人、项目主管部门负责人、安全措施确认人)
hotworkCfdService.addInfo(pd);
map.put("measuresList", hotworkCfdService.listAllMeasures(pd));
// map.put("measuresList", hotworkCfdService.listAllMeasures(pd));
map.put("gasList", hotworkGasCfdService.listAll(pd));
// imgList是接受交底人签字
map.put("imgList", hotworkAcceptUserCfdService.findByIds(pd));

View File

@ -187,7 +187,7 @@ public class LoginController extends BaseController {
PageData pathData = corpPathService.getCorpPathByCorpId(pd);
map.put("baseImgPath",pathData.getString("PIC_PATH"));
map.put("USER_IDENTITY",pathData.getString("USER_IDENTITY"));
map.put("BACKENDADDR", pathData.getString("BACK_END_PATH"));
map.put("BACKENDADDR", "http://192.168.0.49:8091/");
} else {
PageData pathData = corpPathService.getCorpPathByPersonInfo(pd);
map.put("baseImgPath",pathData.getString("PIC_PATH"));

View File

@ -66,12 +66,13 @@ public class XgfUserController extends BaseController {
@RequestMapping(value = "/approvePlus")
@ResponseBody
public Object approvePlus(@RequestParam(value = "chengNuoShu", required = false) MultipartFile[] chengNuoShu) throws Exception {
PageData request = this.getPageData();
xgfUserService.approvePlus(request,chengNuoShu);
PageData response = new PageData();
response.put("result", "success");
PageData request = this.getPageData();
xgfUserService.approvePlus(request, chengNuoShu);
response.put("data", request);
return response;
}
/**
@ -81,10 +82,18 @@ public class XgfUserController extends BaseController {
@ResponseBody
public Object approveMax(@RequestParam(value = "chengNuoShu", required = false) MultipartFile[] chengNuoShu) throws Exception {
PageData request = this.getPageData();
xgfUserService.approveMax(request,chengNuoShu);
PageData response = new PageData();
response.put("result", "success");
response.put("code","0");
response.put("data", request);
try {
xgfUserService.approveMax(request, chengNuoShu);
} catch (Exception e) {
e.printStackTrace();
response.put("code", "9999");
response.put("errorMessage", e.getMessage());
return response;
}
return response;
}

View File

@ -54,6 +54,7 @@ public class GuFenCharge extends NodeSwitchComponent {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -113,11 +114,19 @@ public class GuFenCharge extends NodeSwitchComponent {
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
return "GuFenSupervise";
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
return "";
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) {
return true;
}

View File

@ -50,9 +50,8 @@ public class GuFenSupervise extends NodeComponent {
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -88,11 +87,18 @@ public class GuFenSupervise extends NodeComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
} catch (Exception e) {
info.setErrorMsg(e.getMessage());
e.printStackTrace();
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS())) {
return true;
}

View File

@ -53,11 +53,9 @@ public class GuFenWeiTuoCharge extends NodeComponent {
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -107,15 +105,20 @@ public class GuFenWeiTuoCharge extends NodeComponent {
// 清空指针
info.setIterator("");
}
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) {
return true;
}

View File

@ -56,6 +56,7 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -91,11 +92,18 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
xgfUserService.saveLog(info, info.getSTATUS(), "1");
info.setIterator("");
}
} catch (Exception e) {
info.setErrorMsg(e.getMessage());
e.printStackTrace();
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) {
return true;
}

View File

@ -55,6 +55,7 @@ public class JiTuanCharge extends NodeSwitchComponent {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -113,11 +114,19 @@ public class JiTuanCharge extends NodeSwitchComponent {
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}
return "JiTuanSupervise";
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
return "";
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "1".equals(info.getIterator())) {
return true;
}

View File

@ -54,6 +54,7 @@ public class JiTuanSupervise extends NodeComponent {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -88,11 +89,18 @@ public class JiTuanSupervise extends NodeComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS())) {
return true;
}

View File

@ -55,8 +55,8 @@ public class JiTuanWeiTuoCharge extends NodeComponent {
@Override
public void process() throws Exception {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -92,12 +92,18 @@ public class JiTuanWeiTuoCharge extends NodeComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "2".equals(info.getIterator())) {
return true;
}

View File

@ -55,6 +55,7 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
System.out.println(getName() + "节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -89,12 +90,19 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())) {
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "3".equals(info.getIterator())) {
return true;
}

View File

@ -57,6 +57,7 @@ public class YiBanCharge extends NodeComponent {
public void process() throws Exception {
System.out.println("YiBanCharge节点");
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
PageData flows = xgfFlowsMapper.findById(condition);
@ -93,11 +94,18 @@ public class YiBanCharge extends NodeComponent {
}
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "0");
}catch (Exception e){
e.printStackTrace();
info.setErrorMsg(e.getMessage());
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())){
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS()) && "0".equals(info.getIterator())) {
return true;
}

View File

@ -57,7 +57,7 @@ public class YiBanSupervise extends NodeComponent {
public void process() throws Exception {
System.out.println(getName());
XgfFlowDto info = this.getRequestData();
try {
PageData condition = new PageData();
condition.put("FLOWS_ID", info.getFLOWS_ID());
@ -122,11 +122,18 @@ public class YiBanSupervise extends NodeComponent {
// 保存操作记录
xgfUserService.saveLog(info, info.getSTATUS(), "1");
}
} catch (Exception e) {
e.printStackTrace();
info.setErrorMsg(e.getMessage());
}
}
@Override
public boolean isEnd() {
XgfFlowDto info = this.getRequestData();
if (StringUtils.isNotBlank(info.getErrorMsg())){
throw new RuntimeException(info.getErrorMsg());
}
if ("0".equals(info.getSTATUS())) {
return true;
}

View File

@ -49,4 +49,5 @@ public class XgfFlowDto {
// 打回节点游标
private String BACK_STEP;
private String errorMsg;
}

View File

@ -85,5 +85,8 @@ public interface HotworkCfdMapper {
PageData countCheck(PageData pd);
PageData getCode(PageData pd);
List<PageData> datalistPageHistory(Page page);
}

View File

@ -2,6 +2,7 @@ package com.zcloud.service.highriskwork.impl;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.flow.xgf.GuFen.GuFenCharge;
import com.zcloud.mapper.datasource.highriskwork.BusHotworkCfdExamineMapper;
import com.zcloud.mapper.datasource.highriskwork.HotworkAcceptUserCfdMapper;
import com.zcloud.mapper.datasource.highriskwork.HotworkCfdMapper;
@ -65,6 +66,7 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
@Transactional
public void saveConfess(PageData info) throws Exception{
List<PageData> list = Warden.getList(info.getString("confessList"));
List<PageData> listAccept = Warden.getList(info.getString("acceptconfessList"));
String flowsId = Warden.get32UUID();
String time = DateUtil.getTime();
PageData condition = new PageData();
@ -80,7 +82,27 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
entity.put("DEPARTMENT_NAME", x.get("CONFESS_DEPARTMENT_NAME"));
this.getCorpInfo(entity);
entity.put("TYPE", "0");
entity.put("TYPE_NAME", "动火交底人");
entity.put("TYPE_NAME", "安全交底人");
entity.put("APPROVAL_OPINIONS",info.getString("CONFESS_DEPARTMENT_OPINIONS"));
entity.put("APPROVAL_STATUS", "0");
entity.put("STATUS", "0");
entity.put("CREATE_TIME", time);
entity.put("VALID_FLAG", "1");
entity.put("IS_DELETE", "0");
busHotworkCfdExamineMapper.save(entity);
}
for (PageData x : listAccept) {
PageData entity = new PageData();
entity.put("HOTWORK_EXAMINE_ID", Warden.get32UUID());
entity.put("HOTWORK_ID", info.getString("HOTWORK_ID"));
entity.put("FLOW_ID", flowsId);// 流程id
entity.put("USER_ID", x.get("ACCEPT_CONFESS_USER_ID"));
entity.put("USER_NAME", x.get("ACCEPT_CONFESS_USER_NAME"));
entity.put("DEPARTMENT_ID", x.get("ACCEPT_CONFESS_DEPARTMENT_ID"));
entity.put("DEPARTMENT_NAME", x.get("ACCEPT_CONFESS_DEPARTMENT_NAME"));
this.getCorpInfo(entity);
entity.put("TYPE", "3");
entity.put("TYPE_NAME", "接受交底人");
entity.put("APPROVAL_OPINIONS",info.getString("CONFESS_DEPARTMENT_OPINIONS"));
entity.put("APPROVAL_STATUS", "0");
entity.put("STATUS", "0");
@ -228,16 +250,32 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
conditon.put("VALID_FLAG", "1");
conditon.put("TYPE", request.getString("TYPE"));
conditon.put("USER_ID", request.get("USER_ID"));
String userId = Jurisdiction.getUSER_ID();
List<PageData> approvalInfos = busHotworkCfdExamineMapper.findByCondition(conditon);
if(approvalInfos.size() == 0) throw new RuntimeException("未找到审批信息,请联系管理员");
if (approvalInfos.size() > 1) throw new RuntimeException("审批信息异常,请联系管理员");
// if (approvalInfos.size() > 1) throw new RuntimeException("审批信息异常,请联系管理员");
PageData entity = approvalInfos.get(0);
String newFilePath = Warden.saveFile(files, request.getString("CORPINFO_ID"));
// 判断条件
if (entity.getString("APPROVAL_SIGNATURE") != null && !entity.getString("APPROVAL_SIGNATURE").isEmpty()
&& userId.equals(entity.getString("USER_ID"))
&& "3".equals(entity.getString("TYPE"))) {
// 拼接新的文件路径
String existingFilePaths = entity.getString("APPROVAL_SIGNATURE");
entity.put("APPROVAL_SIGNATURE", existingFilePaths + ";" + newFilePath);
} else {
// 走原有逻辑
entity.put("APPROVAL_SIGNATURE", newFilePath);
}
entity.put("APPROVAL_STATUS", request.getString("APPROVAL_STATUS"));
entity.put("APPROVAL_SIGNATURE", Warden.saveFile(files,request.getString("CORPINFO_ID")));
// entity.put("APPROVAL_SIGNATURE", Warden.saveFile(files,request.getString("CORPINFO_ID")));
// List<String> filePaths = Warden.saveFiles(files, request.getString("CORPINFO_ID"));
// entity.put("APPROVAL_SIGNATURE", String.join(";", filePaths));
entity.put("APPROVAL_SIGNATURE_TIME", DateUtil.getTime());
entity.put("APPROVAL_CONTENT",request.getString("APPROVAL_CONTENT"));
busHotworkCfdExamineMapper.edit(entity);
}
@Override
@ -311,11 +349,30 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
*/
public List<PageData> list(Page page) throws Exception {
List<PageData> list = hotworkCfdMapper.datalistPage(page);
// created by liu jun 2024/02/03 description: 拼接动火交底人、项目主管部门、安全项检查人
String applyStatus = page.getPd().getString("APPLY_STATUS");
for (PageData dto : list) {
page.getPd().put("HOTWORK_ID", dto.getString("HOTWORK_ID"));
if ("1".equals(applyStatus) || "1.5".equals(applyStatus) || "2".equals(applyStatus)) {
List<PageData> historyList = hotworkCfdMapper.datalistPageHistory(page);
if (historyList != null && !historyList.isEmpty()) {
for (PageData historyPd : historyList) {
if (historyPd.getString("HOTWORK_ID").equals(dto.getString("HOTWORK_ID"))) {
dto.put("historyPd", historyPd);
break;
}
}
}
}
this.addInfo(dto);
}
return list;
return list.stream()
.sorted((o1, o2) -> o2.getString("CREATTIME").compareTo(o1.getString("CREATTIME")))
.collect(Collectors.toList());
}
public List<PageData> jhlist(Page page)throws Exception{
return hotworkCfdMapper.jhdatalistPage(page);
@ -413,6 +470,9 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
condition.put("isValid","1");
//动火交底人需处理数
info.put("confessNum", busHotworkCfdExamineMapper.findByCondition(condition).size());
//接受交底人需处理数
condition.put("TYPE", "3");
info.put("acceptConfessNum", busHotworkCfdExamineMapper.findByCondition(condition).size());
condition.put("TYPE", "1");
// 项目主管部门需处理数
List<PageData> _belongingList = busHotworkCfdExamineMapper.findByCondition(condition);
@ -431,6 +491,24 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
condition.put("TYPE", "2");
// 安全项检查人需处理数
info.put("safetyNum", busHotworkCfdExamineMapper.findByCondition(condition).size());
int sumCount = 0;
sumCount += Integer.parseInt(info.getString("COUNTBACK", "0"));
sumCount += Integer.parseInt(info.getString("COUNTLEADER", "0"));
sumCount += Integer.parseInt(info.getString("COUNTMONITOR", "0"));
sumCount += Integer.parseInt(info.getString("COUNTACCEPT", "0"));
sumCount += Integer.parseInt(info.getString("COUNTAPPROVE", "0"));
sumCount += Integer.parseInt(info.getString("COUNTANALYZE", "0"));
sumCount += Integer.parseInt(info.getString("safetyNum", "0"));
sumCount += Integer.parseInt(info.getString("belongingNum", "0"));
sumCount += Integer.parseInt(info.getString("COUNTGUARDIAN", "0"));
sumCount += Integer.parseInt(info.getString("confessNum", "0"));
// sumCount += Integer.parseInt(info.getString("COUNTACCEPTCONFESS", "0"));
sumCount += Integer.parseInt(info.getString("COUNTCONFIRM", "0"));
sumCount += Integer.parseInt(info.getString("COUNTCONFESS", "0"));
sumCount += Integer.parseInt(info.getString("COUNTAUDIT", "0"));
sumCount += Integer.parseInt(info.getString("acceptConfessNum", "0"));
info.put("SUMCOUNT", sumCount);
// 气体分析人需处理数
return info;
}
@ -457,6 +535,7 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
x.put("CONFESS_USER_NAME", x.get("USER_NAME"));
x.put("CONFESS_DEPARTMENT_ID", x.get("DEPARTMENT_ID"));
x.put("CONFESS_DEPARTMENT_NAME", x.get("DEPARTMENT_NAME"));
x.put("CONFESS_USER_SIGNER_PATH", x.get("APPROVAL_SIGNATURE"));
}
pd.put("confessUserNames", confess.stream().map(x -> x.getString("USER_NAME")).collect(Collectors.joining(",")));
pd.put("confessList", confess);
@ -465,7 +544,33 @@ public class HotworkCfdServiceImpl implements HotworkCfdService {
}else {
pd.put("confessStatus", "1");
}
//接受交底人
List<PageData> acceptConfess = approvalInfos.stream()
.filter(x -> "3".equals(x.getString("TYPE")))
.collect(Collectors.toList());
for (PageData x : acceptConfess) {
x.put("ACCEPT_CONFESS_USER_ID", x.get("USER_ID"));
x.put("ACCEPT_CONFESS_USER_NAME", x.get("USER_NAME"));
x.put("ACCEPT_CONFESS_DEPARTMENT_ID", x.get("DEPARTMENT_ID"));
x.put("ACCEPT_CONFESS_DEPARTMENT_NAME", x.get("DEPARTMENT_NAME"));
x.put("ACCEPT_CONFESS_USER_SIGNER_PATH", x.get("APPROVAL_SIGNATURE"));
}
pd.put("acceptConfessUserNames", acceptConfess.stream().map(x -> x.getString("USER_NAME")).collect(Collectors.joining(",")));
pd.put("acceptConfessList", acceptConfess);
if (acceptConfess.stream().anyMatch(x -> "0".equals(x.getString("APPROVAL_STATUS")))){
pd.put("acceptConfessStatus", "0");
}else {
pd.put("acceptConfessStatus", "1");
}
//安全措施数据
List<PageData> safetyList = approvalInfos.stream()
.filter(x -> "2".equals(x.getString("TYPE")))
.collect(Collectors.toList());
for (PageData x : safetyList) {
x.put("APPROVAL_STATUS", x.get("APPROVAL_STATUS"));
x.put("APPROVAL_SIGNATURE", x.get("APPROVAL_SIGNATURE"));
}
pd.put("safetyList", safetyList);
// 项目责任负责人
PageData belong = approvalInfos.stream().filter(x -> "1".equals(x.getString("TYPE"))).findFirst().orElse(null);
pd.put("BELONGING_USER_ID", belong.getString("USER_ID"));

View File

@ -62,7 +62,31 @@ public class MapEightCfdServiceImpl implements MapEightCfdService {
PageData condition = new PageData();
condition.put("showInfo",pd.getString("showInfo"));
condition.put("HOTWORK_ID",pd.getString("HOTWORK_ID"));
map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
// map.put("measuresList", hotworkCfdService.listAllMeasures(condition));
List<PageData> measuresList = hotworkCfdService.listAllMeasures(condition);
for (PageData measure : measuresList) {
String order = measure.getString("ORDER");
String protectiveMeasures = measure.getString("PROTECTIVE_MEASURES");
if ("2".equals(order)) {
String answer1 = measure.getString("ANSWER1");
int startIndex = protectiveMeasures.indexOf('(');
int endIndex = protectiveMeasures.indexOf(')');
if (startIndex != -1 && endIndex != -1 && startIndex < endIndex) {
protectiveMeasures = protectiveMeasures.substring(0, endIndex) + answer1 + protectiveMeasures.substring(endIndex);
}
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
} else if ("8".equals(order)) {
String[] answers = {measure.getString("ANSWER1"), measure.getString("ANSWER2"), measure.getString("ANSWER3")};
for (String answer : answers) {
int index = protectiveMeasures.indexOf("()");
if (index != -1) {
protectiveMeasures = protectiveMeasures.substring(0, index + 1) + answer + protectiveMeasures.substring(index + 1);
}
}
measure.put("PROTECTIVE_MEASURES", protectiveMeasures);
}
}
map.put("measuresList", measuresList);
map.put("gasList", hotworkGasCfdService.listAll(pd));
map.put("imgList", hotworkacceptuserCfdService.findByIds(pd));
map.put("imgList1", hotworkacceptuserCfdService.findById(pd));

View File

@ -19,11 +19,9 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.net.PasswordAuthentication;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
@Service
@ -383,7 +381,9 @@ public class XgfUserServiceImpl implements XgfUserService {
for (PageData x : list) {
condition.clear();
condition.put("FLOW_ID", x.getString("FLOW_ID"));
x.put("flow", flowDetailMapper.getList(condition));
List<PageData> flow = flowDetailMapper.getList(condition);
flow = flow.stream().sorted(Comparator.comparing(o -> new BigDecimal(String.valueOf(o.get("SORT"))))).collect(Collectors.toList());
x.put("flow",flow);
}
return list;
}
@ -992,6 +992,8 @@ public class XgfUserServiceImpl implements XgfUserService {
@Override
public void repulse(PageData flows, XgfFlowDto info) throws Exception {
// add by liu jun 相关方可指定打回至指定节点 -1 为默认打回至相关方端
if ("-1".equals(info.getBACK_STEP())){
PageData condition = new PageData();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
@ -1010,9 +1012,97 @@ public class XgfUserServiceImpl implements XgfUserService {
xgfUserMapper.edit(entity);
this.clearInfo(flows);
xgfFlowsMapper.edit(flows);
} else {
// 1、判断不能自己打回到自己
PageData condition = new PageData();
condition.put("FLOWS_ID",flows.getString("FLOWS_ID"));
PageData flowEntity = xgfFlowsMapper.findById(condition);
if (flowEntity != null && flowEntity.size() > 0 && (flowEntity.get("FLOWS_STEP").toString()).equals(info.getBACK_STEP())){
info.setErrorMsg("不能自己打回到自己");
}
flowEntity.put("FLOWS_STEP", info.getBACK_STEP());
xgfFlowsMapper.edit(flowEntity);
// 清理数据
clearsInfo(flowEntity,info.getBACK_STEP());
xgfFlowsMapper.edit(flowEntity);
condition.clear();
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
PageData entity = xgfUserMapper.findById(condition);
entity.put("CHECK_STEP",info.getBACK_STEP());
xgfUserMapper.edit(entity);
// 判断要不要清理委托书
if (clearWeiTuo(flowEntity, info.getBACK_STEP())) {
condition.clear();
condition.put("XGF_USER_DETAILS_ID", flows.getString("FLOWS_ID"));
PageData infoEntity = xgfUserDetailsMapper.findById(condition);
infoEntity.put("ATTORNEY", null);
xgfUserDetailsMapper.edit(infoEntity);
}
}
}
private boolean clearWeiTuo(PageData flowEntity,String backStep) throws Exception{
if ("1".equals(flowEntity.getString("FLOWS_TYPE"))){
return 1 <= Integer.parseInt(backStep);
}
if ("2".equals(flowEntity.getString("FLOWS_TYPE"))){
return 0 <= Integer.parseInt(backStep);
}
return false;
}
private void clearsInfo(PageData entity,String step) throws Exception {
if ("0".equals(step)){
entity.put("APPOINT_ONE_USER_ID", "");
entity.put("APPOINT_TWO_USER_ID", "");
entity.put("APPOINT_THREE_USER_ID", "");
entity.put("APPOINT_FOUR_USER_ID", "");
entity.put("APPOINT_FIVE_USER_ID", "");
entity.put("APPOINT_SIX_USER_ID", "");
entity.put("APPOINT_SEVEN_USER_ID", "");
}
if ("1".equals(step)){
entity.put("APPOINT_TWO_USER_ID", "");
entity.put("APPOINT_THREE_USER_ID", "");
entity.put("APPOINT_FOUR_USER_ID", "");
entity.put("APPOINT_FIVE_USER_ID", "");
entity.put("APPOINT_SIX_USER_ID", "");
entity.put("APPOINT_SEVEN_USER_ID", "");
}
if ("2".equals(step)){
entity.put("APPOINT_THREE_USER_ID", "");
entity.put("APPOINT_FOUR_USER_ID", "");
entity.put("APPOINT_FIVE_USER_ID", "");
entity.put("APPOINT_SIX_USER_ID", "");
entity.put("APPOINT_SEVEN_USER_ID", "");
}
if ("3".equals(step)){
entity.put("APPOINT_FOUR_USER_ID", "");
entity.put("APPOINT_FIVE_USER_ID", "");
entity.put("APPOINT_SIX_USER_ID", "");
entity.put("APPOINT_SEVEN_USER_ID", "");
}
if ("4".equals(step)){
entity.put("APPOINT_FIVE_USER_ID", "");
entity.put("APPOINT_SIX_USER_ID", "");
entity.put("APPOINT_SEVEN_USER_ID", "");
}
if ("5".equals(step)){
entity.put("APPOINT_SIX_USER_ID", "");
entity.put("APPOINT_SEVEN_USER_ID", "");
}
if ("6".equals(step)){
entity.put("APPOINT_SEVEN_USER_ID", "");
}
}
@Override
@Transactional
public void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception {
if (chengNuoShu != null && chengNuoShu.length > 0) {
request.put("APPOINT_ANNEX", Warden.saveFile(Warden.createZip(chengNuoShu), Jurisdiction.getCORPINFO_ID()));
@ -1057,16 +1147,16 @@ public class XgfUserServiceImpl implements XgfUserService {
if (request.get("APPOINT_ANNEX") != null) {
info.setAPPOINT_ANNEX(request.getString("APPOINT_ANNEX"));
}
info.setBACK_STEP(request.getString("BACK_STEP"));
// 进行数据审核
LiteflowResponse response = flowExecutor.execute2Resp("chain1", info);
if (!response.isSuccess()) {
if (response.isSuccess()) {
System.out.println("流程信息:" + response.getExecuteStepStrWithTime());
} else {
Exception e = response.getCause();
e.printStackTrace();
System.out.println(response.getMessage());
throw new RuntimeException("系统异常");
} else {
System.out.println("流程信息:" + response.getExecuteStepStrWithTime());
throw new RuntimeException(e.getMessage());
}
}

View File

@ -381,6 +381,19 @@ public class Warden {
return saveFile(files, CORPINFO_ID);
}
//保存多图片
public static List<String> saveFiles(MultipartFile[] files, String number) throws Exception {
if (files.length == 0) throw new RuntimeException("文件为空");
List<String> filePaths = new ArrayList<>();
for (MultipartFile file : files) {
String ffile = DateUtil.getDays();
String fileName = get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + number + "/" + ffile);
filePaths.add(Const.FILEPATHFILE + number + "/" + ffile + "/" + fileName);
}
return filePaths;
}
/**
*
*/
@ -479,5 +492,6 @@ public class Warden {
}
throw new IOException("压缩文件失败");
}
}

View File

@ -62,6 +62,12 @@ spring.main.banner-mode=off
#qa-regulatory-gwj.api.url=http://192.168.0.79:8008
preventionxgf.api.url=https://qgxgf.qhdsafety.com/qa-prevention-xgf/
qa-regulatory-gwj.api.url=https://qgjg.qhdsafety.com/qa-regulatory-gwj/
baseimgpath =http://192.168.192.201:8991/file/
heBeiQinAnFile=https://file.zcloudchina.com/YTHFile
dw.url=http://192.168.192.201:8888/qa-dingWei-gwj/
#?????
smb.host=39.101.130.96
smb.port=22
@ -74,7 +80,7 @@ rocketmq.consumer.group2=edu-admin-edit
rocketmq.consumer.group1=edu-admin-add
#rocketmq.name-server=10.0.140.141:9876
#rocketmq.name-server=192.168.0.70:9876
rocketmq.name-server=192.168.0.2:9876
rocketmq.name-server=39.100.115.58:8899
rocketmq.producer.group=libmiddle
rocketmq.producer.send-message-timeout=3000
rocketmq.producer.compress-message-body-threshold=4096
@ -88,6 +94,8 @@ mq.topic.info=info
mq.topic.eightWork=eightWork
mq.group.info=scheduled_tasks
mq.group.eightWork=scheduled_tasks_eightWork
mq.gwj.data.topic=czks_docking
mq.gwj.file.topic=czks_dockingPicture
corp.default.pic-path=https://qgqy.qhdsafety.com/

View File

@ -1,12 +1,12 @@
# ??????
datasource.no1.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no1.url=jdbc:mysql://192.168.192.202:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no1.username=root
datasource.no1.password=gwjsjkzcloud888888
datasource.no1.password=Mysql@zcloud88888
datasource.no2.driver-class-name: com.mysql.cj.jdbc.Driver
datasource.no2.url=jdbc:mysql://192.168.192.202:33068/qa-gwj-regulatory?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no2.url=jdbc:mysql://39.101.130.96:33068/qa-gwj-prevention?serverTimezone=UTC&useSSL=false&useUnicode=true&characterEncoding=utf-8
datasource.no2.username=root
datasource.no2.password=gwjsjkzcloud888888
datasource.no2.password=Mysql@zcloud88888
#druid连接池
spring.datasource.type: com.alibaba.druid.pool.DruidDataSource

View File

@ -1356,14 +1356,23 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.SAFETY_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTSAFETY,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.LEADER_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTLEADER,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.BLINDBOARD_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.BLINDBOARD_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_BLINDBOARD_ACCEPTUSER m where m.BLINDBOARD_ID = f.BLINDBOARD_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.BLINDBOARD_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_BLINDBOARD_ACCEPTUSER m WHERE m.BLINDBOARD_ID = f.BLINDBOARD_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.BLINDBOARD_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS + 0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.PRODUCTION_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.SAFETY_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.LEADER_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt;'6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt;'6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.BLINDBOARD_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt;'6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_BLINDBOARD_ACCEPTUSER m WHERE m.BLINDBOARD_ID = f.BLINDBOARD_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.BLINDBOARD_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT

View File

@ -1453,9 +1453,22 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTAUDIT,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTANALYZE,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.CONFINEDSPACE_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) COUNTANALYZE,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.CONFINEDSPACE_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONFIRM_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.CONFINEDSPACE_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_CONFINEDSPACE_ACCEPTUSER m where m.CONFINEDSPACE_ID = f.CONFINEDSPACE_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.CONFINEDSPACE_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>

View File

@ -1517,16 +1517,25 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) COUNTANALYZE,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and
not exists(select 1 from GF_ELECTRICITY_ACCEPTUSER m where m.ELECTRICITY_ID = f.ELECTRICITY_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID)
THEN f.ELECTRICITY_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_ELECTRICITY_ACCEPTUSER m where m.ELECTRICITY_ID = f.ELECTRICITY_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.ELECTRICITY_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONFIRM_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.ANALYZE_USER_ID = #{USER_ID} THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.ELECTRICITY_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '5' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_ELECTRICITY_ACCEPTUSER m where m.ELECTRICITY_ID = f.ELECTRICITY_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.ELECTRICITY_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT

View File

@ -1360,13 +1360,24 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAUDIT,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HIGHWORK_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HIGHWORK_ACCEPTUSER m where m.HIGHWORK_ID = f.HIGHWORK_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_HIGHWORK_ACCEPTUSER m WHERE m.HIGHWORK_ID = f.HIGHWORK_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END) COUNTACCEPTCONFESS,
-- 求和所有计数项
(
COUNT(CASE WHEN (f.APPLY_STATUS + 0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.LEADER_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} AND f.GUARDIAN_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} AND f.CONFESS_USER_SIGNER_TIME IS NULL THEN f.HIGHWORK_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} AND NOT EXISTS (SELECT 1 FROM GF_HIGHWORK_ACCEPTUSER m WHERE m.HIGHWORK_ID = f.HIGHWORK_ID AND m.CORPINFO_ID = f.CORPINFO_ID AND f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HIGHWORK_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT

View File

@ -1361,13 +1361,25 @@
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) COUNTAUDIT,
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) COUNTAPPROVE,
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) COUNTACCEPT,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS &gt; 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HOISTING_ID END) COUNTACCEPTCONFESS
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTGUARDIAN,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) COUNTCONFESS,
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HOISTING_ID END) COUNTACCEPTCONFESS,
(
COUNT(CASE WHEN (f.APPLY_STATUS+0) &lt; 1 AND f.CREATOR = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '1' AND f.LEADER_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '2' AND f.CONSTRUCTION_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '3' AND f.AUDIT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '4' AND f.APPROVE_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS = '5' AND f.ACCEPT_USER_ID = #{USER_ID} THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.GUARDIAN_USER_ID = #{USER_ID} and f.GUARDIAN_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.CONFESS_USER_ID = #{USER_ID} and f.CONFESS_USER_SIGNER_TIME is null THEN f.HOISTING_ID END) +
COUNT(CASE WHEN f.APPLY_STATUS &lt; '6' AND f.APPLY_STATUS > 0 AND f.ACCEPT_CONFESS_USER_ID = #{USER_ID} and not exists(select 1 from GF_HOISTING_ACCEPTUSER m where m.HOISTING_ID = f.HOISTING_ID and m.CORPINFO_ID = f.CORPINFO_ID and f.ACCEPT_CONFESS_USER_ID = m.ACCEPT_CONFESS_USER_ID) THEN f.HOISTING_ID END)
) AS SUMCOUNT
FROM <include refid="tableName"></include> f
WHERE f.ISDELETE = '0' AND f.CORPINFO_ID = #{CORPINFO_ID}
</select>
<!-- 获取编码 -->
<select id="getCode" parameterType="pd" resultType="pd">
SELECT

View File

@ -134,8 +134,40 @@
select * from bus_hotwork_cfd_examine f
where f.IS_DELETE = '0' and f.HOTWORK_ID = #{HOTWORK_ID}
</select>
<!-- <select id="findByCondition" resultType="com.zcloud.entity.PageData">-->
<!-- select * from bus_hotwork_cfd_examine f where f.IS_DELETE = '0'-->
<!-- <if test="HOTWORK_ID != null and HOTWORK_ID != ''">-->
<!-- and f.HOTWORK_ID = #{HOTWORK_ID}-->
<!-- </if>-->
<!-- <if test="CORP_ID != null and CORP_ID != ''">-->
<!-- and f.CORP_ID = #{CORP_ID}-->
<!-- </if>-->
<!-- <if test="USER_ID != null and USER_ID != ''">-->
<!-- and f.USER_ID = #{USER_ID}-->
<!-- </if>-->
<!-- <if test="TYPE != null and TYPE != ''">-->
<!-- and f.TYPE = #{TYPE}-->
<!-- </if>-->
<!-- <if test="APPROVAL_STATUS != null and APPROVAL_STATUS != ''">-->
<!-- and f.APPROVAL_STATUS = #{APPROVAL_STATUS}-->
<!-- </if>-->
<!-- <if test="isValid != '' and isValid != null">-->
<!-- and not exists(select 1 from bus_hotwork_cfd a where a.HOTWORK_ID = f.HOTWORK_ID and (a.APPLY_STATUS = '-98' or a.APPLY_STATUS = '-99') )-->
<!-- </if>-->
<!-- </select>-->
<select id="findByCondition" resultType="com.zcloud.entity.PageData">
select * from bus_hotwork_cfd_examine f where f.IS_DELETE = '0'
select
f.*,
c.APPLY_STATUS
from
bus_hotwork_cfd_examine f
left join
bus_hotwork_cfd c
on
f.HOTWORK_ID = c.HOTWORK_ID
where
f.IS_DELETE = '0'
and (c.APPLY_STATUS != '0' or c.APPLY_STATUS IS NULL)
<if test="HOTWORK_ID != null and HOTWORK_ID != ''">
and f.HOTWORK_ID = #{HOTWORK_ID}
</if>
@ -152,7 +184,11 @@
and f.APPROVAL_STATUS = #{APPROVAL_STATUS}
</if>
<if test="isValid != '' and isValid != null">
and not exists(select 1 from bus_hotwork_cfd a where a.HOTWORK_ID = f.HOTWORK_ID and (a.APPLY_STATUS = '-98' or a.APPLY_STATUS = '-99') )
and not exists(
select 1 from bus_hotwork_cfd a
where a.HOTWORK_ID = f.HOTWORK_ID
and (a.APPLY_STATUS = '-98' or a.APPLY_STATUS = '-99')
)
</if>
</select>
<select id="safetylistPage" resultType="com.zcloud.entity.PageData">
@ -301,15 +337,17 @@
left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID
left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID
where f.ISDELETE = '0'
and f.APPLY_STATUS &lt; 8 and f.CONFESS_USER_SIGNER_TIME is null and f.APPLY_STATUS &gt; 0
and f.APPLY_STATUS &lt;= 8 and f.CONFESS_USER_SIGNER_TIME is null and f.APPLY_STATUS &gt; 0
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
<if test="pd.USER_ID != null and pd.USER_ID != ''">
and exists (select 1 from bus_hotwork_cfd_examine bhce where bhce.USER_ID = #{pd.USER_ID} and bhce.IS_DELETE =
'0' and bhce.VALID_FLAG = '1' and bhce.APPROVAL_STATUS = '0' and bhce.TYPE = #{pd.TYPE} and bhce.HOTWORK_ID = f.HOTWORK_ID)
'0' and bhce.VALID_FLAG = '1' and bhce.APPROVAL_STATUS = '0' or bhce.APPROVAL_STATUS = '1' and bhce.TYPE = #{pd.TYPE} and bhce.HOTWORK_ID = f.HOTWORK_ID)
</if>
ORDER BY f.APPLY_STATUS,f.CREATTIME DESC
ORDER BY
-- f.APPLY_STATUS,
f.CREATTIME DESC
</select>

View File

@ -359,6 +359,9 @@
ACCEPT_CONFESS_USER_SIGNER_PATH = #{ACCEPT_CONFESS_USER_SIGNER_PATH},
ACCEPT_CONFESS_USER_SIGNER_TIME = #{ACCEPT_CONFESS_USER_SIGNER_TIME},
CONFIRM_OTHER_CONTENT = #{CONFIRM_OTHER_CONTENT},
FIRE_COMPLETED = #{FIRE_COMPLETED},
SITE_CLEANED = #{SITE_CLEANED},
NO_REMAINING_EMBERS = #{NO_REMAINING_EMBERS},
HOTWORK_ID = HOTWORK_ID
where
HOTWORK_ID = #{HOTWORK_ID}
@ -474,6 +477,9 @@
f.OPERATTIME,
f.OPERATOR,
f.CHECK_NO,
f.FIRE_COMPLETED,
f.SITE_CLEANED,
f.NO_REMAINING_EMBERS,
f.WORK_CONTENT,
f.WORK_START_DATE,
f.WORK_END_DATE,
@ -490,7 +496,6 @@
f.APPROVE_USER_SIGNER_PATH,
f.APPROVE_USER_SIGNER_TIME,
f.APPLY_STATUS,
<!--(SELECT a.ANALYZE_TIME from bus_hotworkgas a where a.ISDELETE = '0'-->
(SELECT a.ANALYZE_TIME from bus_hotworkgas_cfd a where a.ISDELETE = '0'
AND a.HOTWORK_ID = #{HOTWORK_ID}
ORDER BY
@ -501,9 +506,9 @@
f.OTHER_PROTECTIVE_MEASURES,
f.ACCEPT_DEPARTMENT_ID,
f.ACCEPT_USER_ID,
f.ACCEPT_USER_SIGNER_PATH,
f.ACCEPT_USER_SIGNER_TIME,
IFNULL(f.ACCEPT_CONTENT,'') as ACCEPT_CONTENT,
bhac.ACCEPT_USER_SIGNER_PATH,
bhac.ACCEPT_USER_SIGNER_TIME,
IFNULL(f.ACCEPT_CONTENT,'同意') as ACCEPT_CONTENT,
f.APPLY_DEPARTMENT_ID,
f.APPLY_USER_ID,
f.WORK_PLACE,
@ -549,75 +554,72 @@
f.CONFIRM_OTHER_CONTENT,
ad.NAME as APPLY_DEPARTMENT_NAME,
au.NAME as APPLY_USER_NAME,
cd.NAME as CONFIRM_DEPARTMENT_NAME,
cu.NAME as CONFIRM_USER_NAME,
gd.NAME as GUARDIAN_DEPARTMENT_NAME,
gu.NAME as GUARDIAN_USER_NAME,
ld.NAME as LEADER_DEPARTMENT_NAME,
lu.NAME as LEADER_USER_NAME,
aud.NAME as AUDIT_DEPARTMENT_NAME,
auu.NAME as AUDIT_USER_NAME,
apd.NAME as APPROVE_DEPARTMENT_NAME,
apu.NAME as APPROVE_USER_NAME,
md.NAME as MONITOR_DEPARTMENT_NAME,
mu.NAME as MONITOR_USER_NAME,
acd.NAME as ACCEPT_DEPARTMENT_NAME,
acu.NAME as ACCEPT_USER_NAME,
ac.NAME as CONFESS_DEPARTMENT_NAME,
accu.NAME as CONFESS_USER_NAME,
aac.NAME as ACCEPT_CONFESS_DEPARTMENT_NAME,
aacu.NAME as ACCEPT_CONFESS_USER_NAME,
anad.NAME as ANALYZE_DEPARTMENT_NAME,
anau.NAME as ANALYZE_USER_NAME
anau.NAME as ANALYZE_USER_NAME,
bhe.USER_NAME as EXAMINE_USER_NAME,
bhe.APPROVAL_OPINIONS as EXAMINE_APPROVAL_OPINIONS,
bhe.APPROVAL_SIGNATURE as EXAMINE_APPROVAL_SIGNATURE,
bhe.CREATE_TIME as EXAMINE_APPROVAL_CREATE_TIME
from
<include refid="tableName"></include> f
left join OA_DEPARTMENT ad on ad.DEPARTMENT_ID = f.APPLY_DEPARTMENT_ID
left join SYS_USER au on au.USER_ID = f.APPLY_USER_ID
left join OA_DEPARTMENT aac on aac.DEPARTMENT_ID = f.ACCEPT_CONFESS_DEPARTMENT_ID
left join SYS_USER aacu on aacu.USER_ID = f.ACCEPT_CONFESS_USER_ID
left join OA_DEPARTMENT ac on ac.DEPARTMENT_ID = f.CONFESS_DEPARTMENT_ID
left join SYS_USER accu on accu.USER_ID = f.CONFESS_USER_ID
left join OA_DEPARTMENT cd on cd.DEPARTMENT_ID = f.CONFIRM_DEPARTMENT_ID
left join SYS_USER cu on cu.USER_ID = f.CONFIRM_USER_ID
left join OA_DEPARTMENT gd on gd.DEPARTMENT_ID = f.GUARDIAN_DEPARTMENT_ID
left join SYS_USER gu on gu.USER_ID = f.GUARDIAN_USER_ID
left join OA_DEPARTMENT ld on ld.DEPARTMENT_ID = f.LEADER_DEPARTMENT_ID
left join SYS_USER lu on lu.USER_ID = f.LEADER_USER_ID
left join OA_DEPARTMENT aud on aud.DEPARTMENT_ID = f.AUDIT_DEPARTMENT_ID
left join SYS_USER auu on auu.USER_ID = f.AUDIT_USER_ID
left join OA_DEPARTMENT apd on apd.DEPARTMENT_ID = f.APPROVE_DEPARTMENT_ID
left join SYS_USER apu on apu.USER_ID = f.APPROVE_USER_ID
left join OA_DEPARTMENT md on md.DEPARTMENT_ID = f.MONITOR_DEPARTMENT_ID
left join SYS_USER mu on mu.USER_ID = f.MONITOR_USER_ID
left join OA_DEPARTMENT acd on acd.DEPARTMENT_ID = f.ACCEPT_DEPARTMENT_ID
left join SYS_USER acu on acu.USER_ID = f.ACCEPT_USER_ID
left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID
left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID
left join bus_hotwork_cfd_examine bhe on
bhe.HOTWORK_ID = f.HOTWORK_ID
and bhe.TYPE = 1
and bhe.IS_DELETE = '0'
-- left join bus_hotwork_acceptuser_cfd bhac on bhac.HOTWORK_ID = f.HOTWORK_ID
left join (
select
HOTWORK_ID,
GROUP_CONCAT(ACCEPT_USER_SIGNER_PATH SEPARATOR ',') as ACCEPT_USER_SIGNER_PATH,
GROUP_CONCAT(ACCEPT_USER_SIGNER_TIME SEPARATOR ',') as ACCEPT_USER_SIGNER_TIME
from bus_hotwork_acceptuser_cfd
group by HOTWORK_ID
) bhac on bhac.HOTWORK_ID = f.HOTWORK_ID
where
f.HOTWORK_ID = #{HOTWORK_ID}
</select>
<!-- 列表 -->
<select id="datalistPage" parameterType="page" resultType="pd">
select
@ -780,9 +782,9 @@
and bhac.ACCEPT_USER_ID = f.ACCEPT_USER_ID and bhac.CORPINFO_ID = f.CORPINFO_ID
and bhac.ISDELETE = '0' and bhac.ACCEPT_USER_ID is not null and trim(bhac.ACCEPT_USER_ID) != ''
where f.ISDELETE = '0'
<if test="pd.APPLY_STATUS != null and pd.APPLY_STATUS != ''">
and f.APPLY_STATUS = #{pd.APPLY_STATUS}
</if>
<!-- <if test="pd.APPLY_STATUS != null and pd.APPLY_STATUS != ''">-->
<!-- and f.APPLY_STATUS = #{pd.APPLY_STATUS}-->
<!-- </if>-->
<if test="pd.IS_GAS != null and pd.IS_GAS != ''">
and f.APPLY_STATUS in ('1','2','4','5','6','0.9','2.5','1.5')
</if>
@ -888,7 +890,9 @@
</choose>
GROUP BY
f.HOTWORK_ID
ORDER BY f.APPLY_STATUS,f.CREATTIME DESC
ORDER BY
-- f.APPLY_STATUS,
f.CREATTIME DESC
</select>
<select id="aqdatalistPage" parameterType="page" resultType="pd">
select
@ -1290,7 +1294,9 @@
left join OA_DEPARTMENT anad on anad.DEPARTMENT_ID = f.ANALYZE_DEPARTMENT_ID
left join SYS_USER anau on anau.USER_ID = f.ANALYZE_USER_ID
where f.ISDELETE = '0'
and f.APPLY_STATUS &lt; 8 and f.GUARDIAN_USER_SIGNER_TIME is null and f.APPLY_STATUS &gt; 0
and f.APPLY_STATUS &lt;= 8
-- and f.GUARDIAN_USER_SIGNER_TIME is null
and f.APPLY_STATUS &gt; 0
<if test="pd.CORPINFO_ID != null and pd.CORPINFO_ID != ''">
and f.CORPINFO_ID = #{pd.CORPINFO_ID}
</if>
@ -1725,4 +1731,23 @@
and f.CREATTIME LIKE CONCAT(#{CREATDATE},'%')
</select>
<select id="datalistPageHistory" resultType="com.zcloud.entity.PageData"
parameterType="com.zcloud.entity.Page">
select
<include refid="Field"></include>
from
<include refid="tableName"></include> f
WHERE f.ISDELETE = '0'
<if test="pd.CONFIRM_USER_ID != null">
and f.CONFIRM_USER_ID = #{pd.CONFIRM_USER_ID}
</if>
<if test="pd.BELONGING_USER_ID != null">
and f.CONFIRM_USER_ID = #{pd.BELONGING_USER_ID}
</if>
<if test="pd.LEADER_USER_ID != null">
and f.CONFIRM_USER_ID = #{pd.LEADER_USER_ID}
</if>
and f.HOTWORK_ID = #{pd.HOTWORK_ID}
</select>
</mapper>