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

liujun0703-新项目开发^2^2
liujun 2024-06-20 14:36:01 +08:00
commit c5f5081596
1 changed files with 19 additions and 4 deletions

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;
@ -249,18 +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")));
List<String> filePaths = Warden.saveFiles(files, request.getString("CORPINFO_ID"));
entity.put("APPROVAL_SIGNATURE", String.join(";", filePaths));
// 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