更改合并逻辑,一个文件复制时报错,修改仅对方签署时需要自动归档
parent
6a152c5af2
commit
c572146997
|
@ -338,6 +338,9 @@ public class FaDDContractService {
|
||||||
if("1".equals(Util.null2String(ufContractInfoDTO.getSignedType()))){
|
if("1".equals(Util.null2String(ufContractInfoDTO.getSignedType()))){
|
||||||
update.put("contract_status", 4);
|
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,
|
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql("uf_contract_info", update,
|
||||||
Util.createPrepWhereImpl().whereAnd("id").whereEqual(ufContractInfoDTO.getId()));
|
Util.createPrepWhereImpl().whereAnd("id").whereEqual(ufContractInfoDTO.getId()));
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
toolUtil.writeDebuggerLog(String.format("合同签署回调,更新合同状态,更新语句{%s},更新参数{%s}",sqlResult.getSqlStr(),sqlResult.getArgs()));
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
||||||
// 查询合同状态,更新明细表
|
// 查询合同状态,更新明细表
|
||||||
/* Map<String,Object> data = new HashMap<>();
|
/* Map<String,Object> data = new HashMap<>();
|
||||||
|
|
|
@ -129,7 +129,16 @@ public class ConvertPdfAction implements Action {
|
||||||
toolUtil.writeErrorLog("复制文件时,文件转为base64出错,文件转换出错!" + e);
|
toolUtil.writeErrorLog("复制文件时,文件转为base64出错,文件转换出错!" + e);
|
||||||
}
|
}
|
||||||
String base64 = Base64Utils.encode(bytes);
|
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{
|
}else{
|
||||||
fileId = createDocForJSGJXT.creatDoc(user, fileName, docCategory, docIds);
|
fileId = createDocForJSGJXT.creatDoc(user, fileName, docCategory, docIds);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class FaDDContractAction extends ToolUtil implements Action {
|
||||||
|
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
faddContractUtil.signedContract();
|
faddContractUtil.signedContract(mainMap);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
toolUtil.writeErrorLog("合同已创建,但发起签署失败,失败原因:" + e);
|
toolUtil.writeErrorLog("合同已创建,但发起签署失败,失败原因:" + e);
|
||||||
// TODO 更换labelIndex
|
// TODO 更换labelIndex
|
||||||
|
|
|
@ -220,7 +220,7 @@ public class FaddContractUtil {
|
||||||
/**
|
/**
|
||||||
* 签署合同
|
* 签署合同
|
||||||
*/
|
*/
|
||||||
public void signedContract() {
|
public void signedContract(Map<String, Object> mainMap) {
|
||||||
// 获取配置表信息
|
// 获取配置表信息
|
||||||
FaDaDaConfigDTO faDaDaConfigDTO = faDDContractMapping.queryConfig(workflowId, 3);
|
FaDaDaConfigDTO faDaDaConfigDTO = faDDContractMapping.queryConfig(workflowId, 3);
|
||||||
// 查询接口配置树形结构
|
// 查询接口配置树形结构
|
||||||
|
@ -241,6 +241,14 @@ public class FaddContractUtil {
|
||||||
// 顺序签署合同
|
// 顺序签署合同
|
||||||
if ("true".equals(queueSigned)) {
|
if ("true".equals(queueSigned)) {
|
||||||
Map<String, Object> map = maps.get(0);
|
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);
|
signedRequest(map, apiConfigMainDTO);
|
||||||
// 将合同签署信息更新到合同信息表中
|
// 将合同签署信息更新到合同信息表中
|
||||||
update.put("contract_status", 2);
|
update.put("contract_status", 2);
|
||||||
|
@ -259,6 +267,14 @@ public class FaddContractUtil {
|
||||||
}
|
}
|
||||||
// 不是顺序签署
|
// 不是顺序签署
|
||||||
for (Map<String, Object> map : maps) {
|
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);
|
signedRequest(map, apiConfigMainDTO);
|
||||||
}
|
}
|
||||||
// 将合同签署信息更新到合同信息表中
|
// 将合同签署信息更新到合同信息表中
|
||||||
|
@ -271,6 +287,7 @@ public class FaddContractUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合同签署发送请求
|
* 合同签署发送请求
|
||||||
|
*
|
||||||
* @param map
|
* @param map
|
||||||
* @param apiConfigMainDTO
|
* @param apiConfigMainDTO
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue