diff --git a/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java b/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java index 6b385b51..541c0a78 100644 --- a/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java +++ b/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java @@ -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 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 filePaths = Warden.saveFiles(files, request.getString("CORPINFO_ID")); - entity.put("APPROVAL_SIGNATURE", String.join(";", filePaths)); +// List 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