更改合并逻辑,一个文件复制时报错,修改仅对方签署时需要自动归档

dev
IT-xiaoXiong 2021-12-02 21:13:51 +08:00
parent 6a152c5af2
commit c572146997
4 changed files with 72 additions and 42 deletions

View File

@ -338,6 +338,9 @@ public class FaDDContractService {
if("1".equals(Util.null2String(ufContractInfoDTO.getSignedType()))){
update.put("contract_status", 4);
}
if("2".equals(Util.null2String(ufContractInfoDTO.getSignedType()))){
update.put("contract_status", 4);
}
}
}
@ -345,6 +348,7 @@ public class FaDDContractService {
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql("uf_contract_info", update,
Util.createPrepWhereImpl().whereAnd("id").whereEqual(ufContractInfoDTO.getId()));
RecordSet rs = new RecordSet();
toolUtil.writeDebuggerLog(String.format("合同签署回调,更新合同状态,更新语句{%s},更新参数{%s}",sqlResult.getSqlStr(),sqlResult.getArgs()));
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
// 查询合同状态,更新明细表
/* Map<String,Object> data = new HashMap<>();

View File

@ -129,7 +129,16 @@ public class ConvertPdfAction implements Action {
toolUtil.writeErrorLog("复制文件时文件转为base64出错文件转换出错" + e);
}
String base64 = Base64Utils.encode(bytes);
fileId = fileProcessor.Process("base64:" + base64, docCategorys, user, fileName);
fileId = fileProcessor.Process("base64:" + base64, docCategorys, user, fileName + ".pdf");
if(fileId <= 0){
toolUtil.writeErrorLog(docCategorys + "---------->" + fileName);
toolUtil.writeDebuggerLog("文件创建错误、错误id" + fileId);
toolUtil.writeErrorLog(base64);
// TODO 修改labelId
requestInfo.getRequestManager().setMessagecontent(Util.getHtmlLabelName(-88651,user.getLanguage(),"合并pdf错误请联系管理员"));
requestInfo.getRequestManager().setMessageid("1");
return Action.FAILURE_AND_CONTINUE;
}
}else{
fileId = createDocForJSGJXT.creatDoc(user, fileName, docCategory, docIds);
}

View File

@ -93,7 +93,7 @@ public class FaDDContractAction extends ToolUtil implements Action {
}
try {
faddContractUtil.signedContract();
faddContractUtil.signedContract(mainMap);
} catch (Exception e) {
toolUtil.writeErrorLog("合同已创建,但发起签署失败,失败原因:" + e);
// TODO 更换labelIndex

View File

@ -220,7 +220,7 @@ public class FaddContractUtil {
/**
*
*/
public void signedContract() {
public void signedContract(Map<String, Object> mainMap) {
// 获取配置表信息
FaDaDaConfigDTO faDaDaConfigDTO = faDDContractMapping.queryConfig(workflowId, 3);
// 查询接口配置树形结构
@ -241,6 +241,14 @@ public class FaddContractUtil {
// 顺序签署合同
if ("true".equals(queueSigned)) {
Map<String, Object> map = maps.get(0);
if (faDaDaConfigDTO.getSignedType() == 1) {
// 需要控制签署规则
if (Integer.parseInt(Util.null2String(mainMap.get(faDaDaConfigDTO.getFieldControl1()))) == faDaDaConfigDTO.getOnlyOther()) {
// 只需要对方签署
map.put("autoArchive", 2);
}
// 双方签署
}
signedRequest(map, apiConfigMainDTO);
// 将合同签署信息更新到合同信息表中
update.put("contract_status", 2);
@ -259,6 +267,14 @@ public class FaddContractUtil {
}
// 不是顺序签署
for (Map<String, Object> map : maps) {
if (faDaDaConfigDTO.getSignedType() == 1) {
// 需要控制签署规则
if (Integer.parseInt(Util.null2String(mainMap.get(faDaDaConfigDTO.getFieldControl1()))) == faDaDaConfigDTO.getOnlyOther()) {
// 只需要对方签署
map.put("autoArchive", 2);
}
// 双方签署
}
signedRequest(map, apiConfigMainDTO);
}
// 将合同签署信息更新到合同信息表中
@ -271,6 +287,7 @@ public class FaddContractUtil {
/**
*
*
* @param map
* @param apiConfigMainDTO
*/