修改安全协议添加的逻辑判断,只有第一次添加的时候才会进行选择

dev
IT-xiaoXiong 2021-12-02 23:00:54 +08:00
parent c572146997
commit 44c34ece0b
4 changed files with 44 additions and 4 deletions

View File

@ -306,6 +306,7 @@ public class FaDDContractService {
public void signedCallBack(String contractNo) {
// 查询合同信息表中的数据
UfContractInfoDTO ufContractInfoDTO = faDDContractMapping.queryContractInfo(contractNo);
toolUtil.writeDebuggerLog("回调,获取到合同信息参数:" + JSON.toJSONString(ufContractInfoDTO));
Map<String, Object> update = new HashMap<>();
if (ufContractInfoDTO.getQueueSigned() == 1) {
// 属于顺序签署合同,更新单份合同已签蜀几个文件

View File

@ -67,6 +67,7 @@ public class FaDDContractController {
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public String signedCallBack(@RequestBody Map<String, Object> params) {
toolUtil.writeErrorLog("回调方法,获取到的请求参数:" + JSON.toJSONString(params));
Map<String, Object> result = new HashMap<>();
result.put("code", 200);
result.put("msg", "操作成功!");

View File

@ -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<String, Object> 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;
}
}

View File

@ -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);
}
// 双方签署
}