diff --git a/com/api/aiyh_pcn/fadada/service/impl/FaDDContractService.java b/com/api/aiyh_pcn/fadada/service/impl/FaDDContractService.java index 6b19250..121392d 100644 --- a/com/api/aiyh_pcn/fadada/service/impl/FaDDContractService.java +++ b/com/api/aiyh_pcn/fadada/service/impl/FaDDContractService.java @@ -306,6 +306,7 @@ public class FaDDContractService { public void signedCallBack(String contractNo) { // 查询合同信息表中的数据 UfContractInfoDTO ufContractInfoDTO = faDDContractMapping.queryContractInfo(contractNo); + toolUtil.writeDebuggerLog("回调,获取到合同信息参数:" + JSON.toJSONString(ufContractInfoDTO)); Map update = new HashMap<>(); if (ufContractInfoDTO.getQueueSigned() == 1) { // 属于顺序签署合同,更新单份合同已签蜀几个文件 diff --git a/com/api/aiyh_pcn/fadada/web/FaDDContractController.java b/com/api/aiyh_pcn/fadada/web/FaDDContractController.java index 37fae76..7794381 100644 --- a/com/api/aiyh_pcn/fadada/web/FaDDContractController.java +++ b/com/api/aiyh_pcn/fadada/web/FaDDContractController.java @@ -67,6 +67,7 @@ public class FaDDContractController { @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public String signedCallBack(@RequestBody Map params) { + toolUtil.writeErrorLog("回调方法,获取到的请求参数:" + JSON.toJSONString(params)); Map result = new HashMap<>(); result.put("code", 200); result.put("msg", "操作成功!"); diff --git a/weaver/aiyh_pcn/copy_attachment/CopyAttachmentSecretAction.java b/weaver/aiyh_pcn/copy_attachment/CopyAttachmentSecretAction.java index dcb6fee..4dac9e8 100644 --- a/weaver/aiyh_pcn/copy_attachment/CopyAttachmentSecretAction.java +++ b/weaver/aiyh_pcn/copy_attachment/CopyAttachmentSecretAction.java @@ -25,8 +25,16 @@ import java.util.stream.Collectors; public class CopyAttachmentSecretAction extends ToolUtil implements Action { +// 模板id private String attachmentTemplateId; +// 是否属于浏览框 private String isBrowseBox; +// 第一次添加附件标识字段 + private String firstAddField; +// 第一次添加附件的值 + private String firstAddValue; +// 第一次添加成功后的回写值 + private String addSuccessValue; @Override public String execute(RequestInfo requestInfo) { ToolUtil toolUtil = new ToolUtil(); @@ -43,7 +51,10 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action { rs_1.executeQuery(query, requestId); Map requestData = Util.recordSet2Map(rs_1); toolUtil.writeDebuggerLog(requestData.toString()); - +// 如果不是第一次添加,则直接返回 TODO 隐藏bug,如果用户第一次选择添加,后面被退回后,将附件清空了,重新上传,然后又需要安全协议,但是已经不是第一次添加了,所以并不会生效 + if(!Util.null2String(firstAddValue).equals(String.valueOf(requestData.get(firstAddField)))){ + return Action.SUCCESS; + } // 查询配置表,获取配置数据 String querySql = "select ufta.id,ufta.workflow_type,wftva.fieldname as template_field, " + "wftvb.fieldname as attachment_field,wftv.fieldname as show_field, wftvb.id as attachment_field_id, " + @@ -139,7 +150,9 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action { list.addAll(Arrays.stream(split1).collect(Collectors.toList())); // 修改流程数据,将保密协议的docid更新到流程中 - PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(billTableName, ParaMap.create().put(configEmpty.getAttachmentField(), String.join(",", list)), + PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(billTableName, + ParaMap.create().put(configEmpty.getAttachmentField(), String.join(",", list)) + .put(firstAddField,addSuccessValue), Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestId)); toolUtil.writeDebuggerLog("sql : " + sqlResult.getSqlStr() + " 参数: ---> " + sqlResult.getArgs()); rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs()); @@ -162,6 +175,7 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action { // String configId = String.valueOf(configEmpty.getId()); String configId; if("true".equals(isBrowseBox)){ +// 如果是流程中的某个浏览框,则读取配置文件的浏览框值,否则直接赋值为action中配置的模板id configId = browseBoxId; }else { configId = attachmentTemplateId; @@ -206,4 +220,28 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action { public void setIsBrowseBox(String isBrowseBox) { this.isBrowseBox = isBrowseBox; } + + public String getFirstAddField() { + return firstAddField; + } + + public void setFirstAddField(String firstAddField) { + this.firstAddField = firstAddField; + } + + public String getFirstAddValue() { + return firstAddValue; + } + + public void setFirstAddValue(String firstAddValue) { + this.firstAddValue = firstAddValue; + } + + public String getAddSuccessValue() { + return addSuccessValue; + } + + public void setAddSuccessValue(String addSuccessValue) { + this.addSuccessValue = addSuccessValue; + } } diff --git a/weaver/aiyh_pcn/fadada/util/FaddContractUtil.java b/weaver/aiyh_pcn/fadada/util/FaddContractUtil.java index 86b87ca..0bdfb92 100644 --- a/weaver/aiyh_pcn/fadada/util/FaddContractUtil.java +++ b/weaver/aiyh_pcn/fadada/util/FaddContractUtil.java @@ -245,7 +245,7 @@ public class FaddContractUtil { // 需要控制签署规则 if (Integer.parseInt(Util.null2String(mainMap.get(faDaDaConfigDTO.getFieldControl1()))) == faDaDaConfigDTO.getOnlyOther()) { // 只需要对方签署 - map.put("autoArchive", 2); + map.put("autoArchive", 1); } // 双方签署 } @@ -271,7 +271,7 @@ public class FaddContractUtil { // 需要控制签署规则 if (Integer.parseInt(Util.null2String(mainMap.get(faDaDaConfigDTO.getFieldControl1()))) == faDaDaConfigDTO.getOnlyOther()) { // 只需要对方签署 - map.put("autoArchive", 2); + map.put("autoArchive", 1); } // 双方签署 }