Merge remote-tracking branch 'origin/20240528Test' into liujun-2024-06-06-相关方新需求

liujun0703-新项目开发^2^2
liujun 2024-06-24 08:50:46 +08:00
commit 9422e6958c
1 changed files with 279 additions and 167 deletions

View File

@ -741,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));
@ -757,63 +756,70 @@ 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")); //是否存在遗留火种
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", "验收通过");
// 发短信
PageData mes = new PageData();
mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
mes.put("templateCode", "DH_Y08");// 短信模板编码
mes.put("SMSCode", "SMS_227250920");// 短信模板编码
mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
mes.put("RECEIVER_ID", pd2.get("APPLY_USER_ID")); // 收信人userid
mes.put("templateCode", "DH_Y08"); // 短信模板编码
mes.put("SMSCode", "SMS_227250920"); // 短信模板编码
mes.put("CORPINFO_ID", pd2.get("CORPINFO_ID")); // 企业id
// 参数集合
List<PageData> paramsList = new ArrayList<PageData>();
// 第1个参数
PageData params1 = new PageData();
params1.put("name", "number");// 存入短信模板中的参数名称
params1.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
params1.put("name", "number"); // 存入短信模板中的参数名称
params1.put("value", pd2.get("CHECK_NO")); // 存入上面参数名称所传递的值
paramsList.add(params1);
// 第2个参数
PageData params2 = new PageData();
params2.put("name", "type");// 存入短信模板中的参数名称
params2.put("value", "动火作业");// 存入上面参数名称所传递的值
params2.put("name", "type"); // 存入短信模板中的参数名称
params2.put("value", "动火作业"); // 存入上面参数名称所传递的值
paramsList.add(params2);
//sendMessageUtil.sendMessages(mes, paramsList);
// sendMessageUtil.sendMessages(mes, paramsList);
break;
case "-8"://审批打回
log.put("ACTION", "验收人打回");
pd2.put("APPLY_STATUS", pd.get("APPLY_STATUS"));
case "-8": // 审批打回
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();
mes6.put("RECEIVER_ID", pd2.get("APPLY_USER_ID"));// 收信人userid
mes6.put("templateCode", "DH_N08");// 短信模板编码
mes6.put("SMSCode", "SMS_223580715");// 短信模板编码
mes6.put("CORPINFO_ID", pd2.get("CORPINFO_ID"));// 企业id
mes6.put("RECEIVER_ID", pd2.get("APPLY_USER_ID")); // 收信人userid
mes6.put("templateCode", "DH_N08"); // 短信模板编码
mes6.put("SMSCode", "SMS_223580715"); // 短信模板编码
mes6.put("CORPINFO_ID", pd2.get("CORPINFO_ID")); // 企业id
// 参数集合
List<PageData> paramsList6 = new ArrayList<PageData>();
// 第1个参数
PageData params19 = new PageData();
params19.put("name", "params1");// 存入短信模板中的参数名称
params19.put("value", pd2.get("CHECK_NO"));// 存入上面参数名称所传递的值
params19.put("name", "params1"); // 存入短信模板中的参数名称
params19.put("value", pd2.get("CHECK_NO")); // 存入上面参数名称所传递的值
paramsList6.add(params19);
// 第2个参数
PageData params20 = new PageData();
params20.put("name", "params2");// 存入短信模板中的参数名称
params20.put("value", "动火作业");// 存入上面参数名称所传递的值
params20.put("name", "params2"); // 存入短信模板中的参数名称
params20.put("value", "动火作业"); // 存入上面参数名称所传递的值
paramsList6.add(params20);
// 第3个参数
PageData params21 = new PageData();
params21.put("name", "params3");// 存入短信模板中的参数名称
params21.put("value", "验收归档");// 存入上面参数名称所传递的值
params21.put("name", "params3"); // 存入短信模板中的参数名称
params21.put("value", "验收归档"); // 存入上面参数名称所传递的值
paramsList6.add(params21);
//sendMessageUtil.sendMessages(mes6, paramsList6);
// sendMessageUtil.sendMessages(mes6, paramsList6);
break;
default:
break;
@ -926,12 +932,12 @@ public class AppHotworkCfdController extends BaseController {
// 保存审批信息
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"));
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);
}
break;
@ -1103,7 +1109,7 @@ public class AppHotworkCfdController extends BaseController {
case "7"://班长
if (files != null && files.length > 0) {
PageData condition = new PageData();
pd.put("HOTWORK_ID",pd2.getString("HOTWORK_ID"));
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);
@ -1216,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();
@ -1256,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();
@ -1286,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();
@ -1316,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
@ -1346,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
@ -1376,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();
@ -1406,6 +1517,7 @@ public class AppHotworkCfdController extends BaseController {
params21.put("value", "验收归档");// 存入上面参数名称所传递的值
paramsList6.add(params21);
//sendMessageUtil.sendMessages(mes6, paramsList6);
}
break;
default:
break;