修改安全协议添加的逻辑判断,只有第一次添加的时候才会进行选择
parent
c572146997
commit
44c34ece0b
|
@ -306,6 +306,7 @@ public class FaDDContractService {
|
||||||
public void signedCallBack(String contractNo) {
|
public void signedCallBack(String contractNo) {
|
||||||
// 查询合同信息表中的数据
|
// 查询合同信息表中的数据
|
||||||
UfContractInfoDTO ufContractInfoDTO = faDDContractMapping.queryContractInfo(contractNo);
|
UfContractInfoDTO ufContractInfoDTO = faDDContractMapping.queryContractInfo(contractNo);
|
||||||
|
toolUtil.writeDebuggerLog("回调,获取到合同信息参数:" + JSON.toJSONString(ufContractInfoDTO));
|
||||||
Map<String, Object> update = new HashMap<>();
|
Map<String, Object> update = new HashMap<>();
|
||||||
if (ufContractInfoDTO.getQueueSigned() == 1) {
|
if (ufContractInfoDTO.getQueueSigned() == 1) {
|
||||||
// 属于顺序签署合同,更新单份合同已签蜀几个文件
|
// 属于顺序签署合同,更新单份合同已签蜀几个文件
|
||||||
|
|
|
@ -67,6 +67,7 @@ public class FaDDContractController {
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
public String signedCallBack(@RequestBody Map<String, Object> params) {
|
public String signedCallBack(@RequestBody Map<String, Object> params) {
|
||||||
|
toolUtil.writeErrorLog("回调方法,获取到的请求参数:" + JSON.toJSONString(params));
|
||||||
Map<String, Object> result = new HashMap<>();
|
Map<String, Object> result = new HashMap<>();
|
||||||
result.put("code", 200);
|
result.put("code", 200);
|
||||||
result.put("msg", "操作成功!");
|
result.put("msg", "操作成功!");
|
||||||
|
|
|
@ -25,8 +25,16 @@ import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
public class CopyAttachmentSecretAction extends ToolUtil implements Action {
|
public class CopyAttachmentSecretAction extends ToolUtil implements Action {
|
||||||
|
// 模板id
|
||||||
private String attachmentTemplateId;
|
private String attachmentTemplateId;
|
||||||
|
// 是否属于浏览框
|
||||||
private String isBrowseBox;
|
private String isBrowseBox;
|
||||||
|
// 第一次添加附件标识字段
|
||||||
|
private String firstAddField;
|
||||||
|
// 第一次添加附件的值
|
||||||
|
private String firstAddValue;
|
||||||
|
// 第一次添加成功后的回写值
|
||||||
|
private String addSuccessValue;
|
||||||
@Override
|
@Override
|
||||||
public String execute(RequestInfo requestInfo) {
|
public String execute(RequestInfo requestInfo) {
|
||||||
ToolUtil toolUtil = new ToolUtil();
|
ToolUtil toolUtil = new ToolUtil();
|
||||||
|
@ -43,7 +51,10 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action {
|
||||||
rs_1.executeQuery(query, requestId);
|
rs_1.executeQuery(query, requestId);
|
||||||
Map<String, Object> requestData = Util.recordSet2Map(rs_1);
|
Map<String, Object> requestData = Util.recordSet2Map(rs_1);
|
||||||
toolUtil.writeDebuggerLog(requestData.toString());
|
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, " +
|
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, " +
|
"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()));
|
list.addAll(Arrays.stream(split1).collect(Collectors.toList()));
|
||||||
|
|
||||||
// 修改流程数据,将保密协议的docid更新到流程中
|
// 修改流程数据,将保密协议的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));
|
Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestId));
|
||||||
toolUtil.writeDebuggerLog("sql : " + sqlResult.getSqlStr() + " 参数: ---> " + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog("sql : " + sqlResult.getSqlStr() + " 参数: ---> " + sqlResult.getArgs());
|
||||||
rs.executeUpdate(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 = String.valueOf(configEmpty.getId());
|
||||||
String configId;
|
String configId;
|
||||||
if("true".equals(isBrowseBox)){
|
if("true".equals(isBrowseBox)){
|
||||||
|
// 如果是流程中的某个浏览框,则读取配置文件的浏览框值,否则直接赋值为action中配置的模板id
|
||||||
configId = browseBoxId;
|
configId = browseBoxId;
|
||||||
}else {
|
}else {
|
||||||
configId = attachmentTemplateId;
|
configId = attachmentTemplateId;
|
||||||
|
@ -206,4 +220,28 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action {
|
||||||
public void setIsBrowseBox(String isBrowseBox) {
|
public void setIsBrowseBox(String isBrowseBox) {
|
||||||
this.isBrowseBox = 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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -245,7 +245,7 @@ public class FaddContractUtil {
|
||||||
// 需要控制签署规则
|
// 需要控制签署规则
|
||||||
if (Integer.parseInt(Util.null2String(mainMap.get(faDaDaConfigDTO.getFieldControl1()))) == faDaDaConfigDTO.getOnlyOther()) {
|
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()) {
|
if (Integer.parseInt(Util.null2String(mainMap.get(faDaDaConfigDTO.getFieldControl1()))) == faDaDaConfigDTO.getOnlyOther()) {
|
||||||
// 只需要对方签署
|
// 只需要对方签署
|
||||||
map.put("autoArchive", 2);
|
map.put("autoArchive", 1);
|
||||||
}
|
}
|
||||||
// 双方签署
|
// 双方签署
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue