From e1033f8a413a531cc9de4afbd6a84301cd5b770b Mon Sep 17 00:00:00 2001 From: WenShiJun Date: Thu, 20 Jun 2024 14:02:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=8F=97=E4=BA=A4=E5=BA=95=E4=BA=BA?= =?UTF-8?q?=E5=92=8C=E5=AE=8C=E5=B7=A5=E9=AA=8C=E6=94=B6=E5=A4=9A=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E4=B8=8A=E4=BC=A0=E9=80=BB=E8=BE=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/HotworkCfdServiceImpl.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) 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