接受交底人和完工验收多图片上传逻辑修改
parent
3cc4a13ad3
commit
e1033f8a41
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue