pdf合并数量限制,一个文件时,不做合并逻辑,修改日志级别
parent
2a3d8dae93
commit
3c57e87b7f
|
@ -89,7 +89,7 @@ public class FaDDContractMapping {
|
||||||
rs.executeQuery(query);
|
rs.executeQuery(query);
|
||||||
rs.next();
|
rs.next();
|
||||||
String mainTable = rs.getString(1);
|
String mainTable = rs.getString(1);
|
||||||
toolUtil.writeErrorLog("mainTable:" + mainTable);
|
toolUtil.writeDebuggerLog("mainTable:" + mainTable);
|
||||||
return mainTable;
|
return mainTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ public class FaDDContractMapping {
|
||||||
public String getDetailTable(String workflowId, int type) {
|
public String getDetailTable(String workflowId, int type) {
|
||||||
FaDaDaConfigDTO faDaDaConfigDTO = this.queryConfig(workflowId, type);
|
FaDaDaConfigDTO faDaDaConfigDTO = this.queryConfig(workflowId, type);
|
||||||
String detailTable = faDaDaConfigDTO.getCheckSource();
|
String detailTable = faDaDaConfigDTO.getCheckSource();
|
||||||
toolUtil.writeErrorLog("detailTable:" + detailTable);
|
toolUtil.writeDebuggerLog("detailTable:" + detailTable);
|
||||||
return detailTable;
|
return detailTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,20 +52,20 @@ public class FaDDServiceMapping {
|
||||||
public List<Map<String, Object>> queryDetailInfo(String requestId,String workflowId,int type) {
|
public List<Map<String, Object>> queryDetailInfo(String requestId,String workflowId,int type) {
|
||||||
|
|
||||||
String mainTable = this.getMainTable(workflowId);
|
String mainTable = this.getMainTable(workflowId);
|
||||||
toolUtil.writeErrorLog("进入查询数据库方法");
|
toolUtil.writeDebuggerLog("进入查询数据库方法");
|
||||||
String query = "select id from " + mainTable + " where requestid = ?";
|
String query = "select id from " + mainTable + " where requestid = ?";
|
||||||
rs.executeQuery(query, requestId);
|
rs.executeQuery(query, requestId);
|
||||||
rs.next();
|
rs.next();
|
||||||
String mainId = rs.getString("id");
|
String mainId = rs.getString("id");
|
||||||
String detailTable = this.getDetailTable(workflowId, type);
|
String detailTable = this.getDetailTable(workflowId, type);
|
||||||
query = "select * from " + detailTable + " where mainid = ? and ( contract_status in (1,6) or contract_status is null) ";
|
query = "select * from " + detailTable + " where mainid = ? and ( contract_status in (1,6) or contract_status is null) ";
|
||||||
this.toolUtil.writeErrorLog(query);
|
this.toolUtil.writeDebuggerLog(query);
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
rs.executeQuery(query, mainId);
|
rs.executeQuery(query, mainId);
|
||||||
List<Map<String, Object>> maps = null;
|
List<Map<String, Object>> maps = null;
|
||||||
try {
|
try {
|
||||||
maps = Util.recordSet2MapList(rs);
|
maps = Util.recordSet2MapList(rs);
|
||||||
toolUtil.writeErrorLog("查询到状态:" + maps);
|
toolUtil.writeDebuggerLog("查询到状态:" + maps);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
toolUtil.writeErrorLog("工具类出现异常:" + e);
|
toolUtil.writeErrorLog("工具类出现异常:" + e);
|
||||||
|
@ -76,20 +76,20 @@ public class FaDDServiceMapping {
|
||||||
public List<Map<String, Object>> queryDetailDownInfo(String requestId,String workflowId,int type) {
|
public List<Map<String, Object>> queryDetailDownInfo(String requestId,String workflowId,int type) {
|
||||||
|
|
||||||
String mainTable = this.getMainTable(workflowId);
|
String mainTable = this.getMainTable(workflowId);
|
||||||
toolUtil.writeErrorLog("进入查询数据库方法");
|
toolUtil.writeDebuggerLog("进入查询数据库方法");
|
||||||
String query = "select id from " + mainTable + " where requestid = ?";
|
String query = "select id from " + mainTable + " where requestid = ?";
|
||||||
rs.executeQuery(query, requestId);
|
rs.executeQuery(query, requestId);
|
||||||
rs.next();
|
rs.next();
|
||||||
String mainId = rs.getString("id");
|
String mainId = rs.getString("id");
|
||||||
String detailTable = this.getDetailTable(workflowId, type);
|
String detailTable = this.getDetailTable(workflowId, type);
|
||||||
query = "select * from " + detailTable + " where mainid = ?";
|
query = "select * from " + detailTable + " where mainid = ?";
|
||||||
this.toolUtil.writeErrorLog(query);
|
this.toolUtil.writeDebuggerLog(query);
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
rs.executeQuery(query, mainId);
|
rs.executeQuery(query, mainId);
|
||||||
List<Map<String, Object>> maps = null;
|
List<Map<String, Object>> maps = null;
|
||||||
try {
|
try {
|
||||||
maps = Util.recordSet2MapList(rs);
|
maps = Util.recordSet2MapList(rs);
|
||||||
toolUtil.writeErrorLog("查询到状态:" + maps);
|
toolUtil.writeDebuggerLog("查询到状态:" + maps);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
toolUtil.writeErrorLog("工具类出现异常:" + e);
|
toolUtil.writeErrorLog("工具类出现异常:" + e);
|
||||||
|
@ -129,14 +129,14 @@ public class FaDDServiceMapping {
|
||||||
rs.executeQuery(query);
|
rs.executeQuery(query);
|
||||||
rs.next();
|
rs.next();
|
||||||
String mainTable = rs.getString(1);
|
String mainTable = rs.getString(1);
|
||||||
toolUtil.writeErrorLog("mainTable:" + mainTable);
|
toolUtil.writeDebuggerLog("mainTable:" + mainTable);
|
||||||
return mainTable;
|
return mainTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDetailTable(String workflowId, int type){
|
public String getDetailTable(String workflowId, int type){
|
||||||
FaDaDaConfigDTO faDaDaConfigDTO = this.queryConfig(workflowId, type);
|
FaDaDaConfigDTO faDaDaConfigDTO = this.queryConfig(workflowId, type);
|
||||||
String detailTable = faDaDaConfigDTO.getCheckSource();
|
String detailTable = faDaDaConfigDTO.getCheckSource();
|
||||||
toolUtil.writeErrorLog("detailTable:" + detailTable);
|
toolUtil.writeDebuggerLog("detailTable:" + detailTable);
|
||||||
return detailTable;
|
return detailTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ public class FaDDContractService {
|
||||||
// 处理数据
|
// 处理数据
|
||||||
List<Map<String, Object>> maps = objectAndListHandle(apiConfigMainDTO.getDetails(), dataArr);
|
List<Map<String, Object>> maps = objectAndListHandle(apiConfigMainDTO.getDetails(), dataArr);
|
||||||
if (maps == null) {
|
if (maps == null) {
|
||||||
toolUtil.writeErrorLog("service签署合同错误,错误原因:maps为null!");
|
toolUtil.writeDebuggerLog("service签署合同错误,错误原因:maps为null!");
|
||||||
throw new RuntimeException("service签署合同错误,错误原因:maps为null!");
|
throw new RuntimeException("service签署合同错误,错误原因:maps为null!");
|
||||||
}
|
}
|
||||||
if (maps.size() == 0) {
|
if (maps.size() == 0) {
|
||||||
|
@ -432,7 +432,7 @@ public class FaDDContractService {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
if (!"200".equals(response.get("code"))) {
|
if (!"200".equals(response.get("code"))) {
|
||||||
toolUtil.writeErrorLog("法大大接口签署合同失败!");
|
toolUtil.writeDebuggerLog("法大大接口签署合同失败!");
|
||||||
throw new RuntimeException("法大大接口签署合同失败!");
|
throw new RuntimeException("法大大接口签署合同失败!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -450,11 +450,11 @@ public class FaDDContractService {
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
rs.executeQuery(query, requestId);
|
rs.executeQuery(query, requestId);
|
||||||
Map<String, Object> result = Util.recordSet2Map(rs);
|
Map<String, Object> result = Util.recordSet2Map(rs);
|
||||||
this.toolUtil.writeErrorLog(result.toString());
|
this.toolUtil.writeDebuggerLog(result.toString());
|
||||||
boolean isAllSinged = false;
|
boolean isAllSinged = false;
|
||||||
boolean isSingedOneself = false;
|
boolean isSingedOneself = false;
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
toolUtil.writeErrorLog("查询到状态为null;sql:" + query + " ---> " + requestId);
|
toolUtil.writeDebuggerLog("查询到状态为null;sql:" + query + " ---> " + requestId);
|
||||||
return ParaMap.create().put("isAllSinged", false)
|
return ParaMap.create().put("isAllSinged", false)
|
||||||
.put("isSingedOneself", false);
|
.put("isSingedOneself", false);
|
||||||
}
|
}
|
||||||
|
@ -526,7 +526,7 @@ public class FaDDContractService {
|
||||||
update.put("contract_down_url", String.join(";",downloadUrlList));
|
update.put("contract_down_url", String.join(";",downloadUrlList));
|
||||||
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(contractInfoTable, update,
|
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(contractInfoTable, update,
|
||||||
Util.createPrepWhereImpl().whereAnd("workflow_request_id").whereEqual(requestId));
|
Util.createPrepWhereImpl().whereAnd("workflow_request_id").whereEqual(requestId));
|
||||||
toolUtil.writeErrorLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
||||||
// 获取流程中的合同字段的文档目录id
|
// 获取流程中的合同字段的文档目录id
|
||||||
rs.executeQuery("select formid from workflow_base where id = ?",ufContractInfoDTO.getWorkflowType());
|
rs.executeQuery("select formid from workflow_base where id = ?",ufContractInfoDTO.getWorkflowType());
|
||||||
|
@ -552,12 +552,12 @@ public class FaDDContractService {
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
toolUtil.writeErrorLog("创建文档发生错误:" + e);
|
toolUtil.writeErrorLog("创建文档发生错误:" + e);
|
||||||
}
|
}
|
||||||
toolUtil.writeErrorLog("生成的文档的id:" + docIds);
|
toolUtil.writeDebuggerLog("生成的文档的id:" + docIds);
|
||||||
// 将id保存到流程字段中
|
// 将id保存到流程字段中
|
||||||
sqlResult = Util.createSqlBuilder().updateSql(ufContractInfoDTO.getWorkflowMainTable(),
|
sqlResult = Util.createSqlBuilder().updateSql(ufContractInfoDTO.getWorkflowMainTable(),
|
||||||
ParaMap.create().put(faDaDaConfigDTO.getContractDoc(), docIds),
|
ParaMap.create().put(faDaDaConfigDTO.getContractDoc(), docIds),
|
||||||
Util.createPrepWhereImpl().whereAnd("id").whereEqual(ufContractInfoDTO.getMainId()));
|
Util.createPrepWhereImpl().whereAnd("id").whereEqual(ufContractInfoDTO.getMainId()));
|
||||||
toolUtil.writeErrorLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(),sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(),sqlResult.getArgs());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -597,10 +597,10 @@ public class FaDDContractService {
|
||||||
this.toolUtil.writeErrorLog(ufContractInfoDTO.toString());
|
this.toolUtil.writeErrorLog(ufContractInfoDTO.toString());
|
||||||
String base64 = Base64Utils.encode(byteArray);
|
String base64 = Base64Utils.encode(byteArray);
|
||||||
FileProcessor fileProcessor = new FileProcessor();
|
FileProcessor fileProcessor = new FileProcessor();
|
||||||
toolUtil.writeErrorLog("base64:" + "base64:" + base64);
|
// toolUtil.writeDebuggerLog("base64:" + "base64:" + base64);
|
||||||
toolUtil.writeErrorLog("category:" + category);
|
toolUtil.writeDebuggerLog("category:" + category);
|
||||||
toolUtil.writeErrorLog("user:" + JSON.toJSONString(user));
|
// toolUtil.writeDebuggerLog("user:" + JSON.toJSONString(user));
|
||||||
toolUtil.writeErrorLog("fileName:" + ufContractInfoDTO.getFileName());
|
toolUtil.writeDebuggerLog("fileName:" + ufContractInfoDTO.getFileName());
|
||||||
docIds.add(String.valueOf(fileProcessor.Process("base64:" + base64, category, user, ufContractInfoDTO.getFileName())));
|
docIds.add(String.valueOf(fileProcessor.Process("base64:" + base64, category, user, ufContractInfoDTO.getFileName())));
|
||||||
}, apiConfigMainDTO.getApiUrl());
|
}, apiConfigMainDTO.getApiUrl());
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,7 @@ public class FaDDContractService {
|
||||||
String fileNames = Util.null2String(ufContractInfoDTO.getFileName());
|
String fileNames = Util.null2String(ufContractInfoDTO.getFileName());
|
||||||
String[] contractNoArr = contractNos.split(",");
|
String[] contractNoArr = contractNos.split(",");
|
||||||
String[] fileNameArr = fileNames.split(",");
|
String[] fileNameArr = fileNames.split(",");
|
||||||
toolUtil.writeErrorLog("下载合同download4mFDD!");
|
toolUtil.writeDebuggerLog("下载合同download4mFDD!");
|
||||||
if(contractNoArr.length >= 2){
|
if(contractNoArr.length >= 2){
|
||||||
// 多个文件,需要下载压缩包
|
// 多个文件,需要下载压缩包
|
||||||
return outputStream -> {
|
return outputStream -> {
|
||||||
|
@ -684,7 +684,7 @@ public class FaDDContractService {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return outputStream->{
|
return outputStream->{
|
||||||
toolUtil.writeErrorLog("download4mFDD单文件下载!");
|
toolUtil.writeDebuggerLog("download4mFDD单文件下载!");
|
||||||
// InputStream inputStream = downloadContract(contractNos,String.valueOf(ufContractInfoDTO.getWorkflowType()));
|
// InputStream inputStream = downloadContract(contractNos,String.valueOf(ufContractInfoDTO.getWorkflowType()));
|
||||||
Map<String, Object> data = new HashMap<>();
|
Map<String, Object> data = new HashMap<>();
|
||||||
data.put("contractNo", contractNos);
|
data.put("contractNo", contractNos);
|
||||||
|
|
|
@ -178,8 +178,8 @@ public class FaDDRequestUtils {
|
||||||
TOOL_UTIL.writeErrorLog("查询到的FDD_appKey为空!");
|
TOOL_UTIL.writeErrorLog("查询到的FDD_appKey为空!");
|
||||||
appKey = "L7P59oqA2An0XgJ1LeMN0fRu1";
|
appKey = "L7P59oqA2An0XgJ1LeMN0fRu1";
|
||||||
}
|
}
|
||||||
TOOL_UTIL.writeErrorLog("app签名:" + appKey);
|
TOOL_UTIL.writeDebuggerLog("app签名:" + appKey);
|
||||||
TOOL_UTIL.writeErrorLog("signStr:" + signStr);
|
TOOL_UTIL.writeDebuggerLog("signStr:" + signStr);
|
||||||
TOOL_UTIL.writeDebuggerLog("请求头信息:" + JSONObject.toJSONString(header));
|
TOOL_UTIL.writeDebuggerLog("请求头信息:" + JSONObject.toJSONString(header));
|
||||||
// String appKey = "L7P59oqA2An0XgJ1LeMN0fRu1";
|
// String appKey = "L7P59oqA2An0XgJ1LeMN0fRu1";
|
||||||
String sha256 = string2SHA256(signStr) + appKey;
|
String sha256 = string2SHA256(signStr) + appKey;
|
||||||
|
|
|
@ -504,6 +504,11 @@ public class SyncOrganizationUtils extends ToolUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取直接上级
|
||||||
|
* @param employee 人员对象
|
||||||
|
* @return 获取人员直接上级,分部id和部门id
|
||||||
|
*/
|
||||||
private Map<String, Object> getSubIdAndManagerId(Employee employee) {
|
private Map<String, Object> getSubIdAndManagerId(Employee employee) {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
@ -594,6 +599,12 @@ public class SyncOrganizationUtils extends ToolUtil {
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行插入SQL
|
||||||
|
* @param insertFieldBuilder 需要插入的的字段
|
||||||
|
* @param insertValueBuilder 需要插入的字段对应的值
|
||||||
|
* @param table 表名
|
||||||
|
*/
|
||||||
private void executeInsertData(StringBuilder insertFieldBuilder, StringBuilder insertValueBuilder, String table) {
|
private void executeInsertData(StringBuilder insertFieldBuilder, StringBuilder insertValueBuilder, String table) {
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
if (insertFieldBuilder.lastIndexOf(",") != -1 && insertValueBuilder.lastIndexOf(",") != -1) {
|
if (insertFieldBuilder.lastIndexOf(",") != -1 && insertValueBuilder.lastIndexOf(",") != -1) {
|
||||||
|
@ -611,6 +622,12 @@ public class SyncOrganizationUtils extends ToolUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 执行更新语句
|
||||||
|
* @param updateSqlBuilder 更新SQL的字符串
|
||||||
|
* @param table 表名
|
||||||
|
* @param conditions 条件
|
||||||
|
*/
|
||||||
private void executeUpdateData(StringBuilder updateSqlBuilder, String table, String conditions) {
|
private void executeUpdateData(StringBuilder updateSqlBuilder, String table, String conditions) {
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
if (updateSqlBuilder.lastIndexOf(",") != -1) {
|
if (updateSqlBuilder.lastIndexOf(",") != -1) {
|
||||||
|
@ -647,6 +664,11 @@ public class SyncOrganizationUtils extends ToolUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分部信息处理
|
||||||
|
* @param department 部门
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
private Map<String, Integer> subCompanyHandler(Department department) {
|
private Map<String, Integer> subCompanyHandler(Department department) {
|
||||||
// 企业(总部)id
|
// 企业(总部)id
|
||||||
int companyid = 1;
|
int companyid = 1;
|
||||||
|
|
|
@ -37,7 +37,7 @@ public class ConvertPdfAction implements Action {
|
||||||
@Override
|
@Override
|
||||||
public String execute(RequestInfo requestInfo) {
|
public String execute(RequestInfo requestInfo) {
|
||||||
ToolUtil toolUtil = new ToolUtil();
|
ToolUtil toolUtil = new ToolUtil();
|
||||||
toolUtil.writeErrorLog("进入PDF转换action!");
|
toolUtil.writeDebuggerLog("进入PDF转换action!");
|
||||||
User user = requestInfo.getRequestManager().getUser();
|
User user = requestInfo.getRequestManager().getUser();
|
||||||
String billTableName = requestInfo.getRequestManager().getBillTableName();
|
String billTableName = requestInfo.getRequestManager().getBillTableName();
|
||||||
String requestId = requestInfo.getRequestid();
|
String requestId = requestInfo.getRequestid();
|
||||||
|
@ -56,17 +56,20 @@ public class ConvertPdfAction implements Action {
|
||||||
String query = "select * from " + billTableName + " where requestid = ?";
|
String query = "select * from " + billTableName + " where requestid = ?";
|
||||||
rs.executeQuery(query,requestId);
|
rs.executeQuery(query,requestId);
|
||||||
Map<String, Object> workflowData = Util.recordSet2Map(rs);
|
Map<String, Object> workflowData = Util.recordSet2Map(rs);
|
||||||
toolUtil.writeErrorLog("流程数据:" + workflowData);
|
toolUtil.writeDebuggerLog("流程数据:" + workflowData);
|
||||||
if(workflowData == null){
|
if(workflowData == null){
|
||||||
toolUtil.writeErrorLog("未查询到流程数据:" + query + " --> " + requestId);
|
toolUtil.writeErrorLog("未查询到流程数据:" + query + " --> " + requestId);
|
||||||
return Action.SUCCESS;
|
return Action.SUCCESS;
|
||||||
}
|
}
|
||||||
// 获取文件id
|
// 获取文件id
|
||||||
String docIds = Util.null2String(workflowData.get(mergeField));
|
String docIds = Util.null2String(workflowData.get(mergeField));
|
||||||
toolUtil.writeErrorLog("文件id:" + docIds);
|
toolUtil.writeDebuggerLog("文件id:" + docIds);
|
||||||
if(StringUtils.isNullOrEmpty(docIds)){
|
if(StringUtils.isNullOrEmpty(docIds)){
|
||||||
return Action.SUCCESS;
|
return Action.SUCCESS;
|
||||||
}
|
}
|
||||||
|
if(docIds.split(",").length <= 1){
|
||||||
|
return Action.SUCCESS;
|
||||||
|
}
|
||||||
// 查询字段的目录
|
// 查询字段的目录
|
||||||
String docCategorys = Util.getDocCategorys(workflowId, mergeField);
|
String docCategorys = Util.getDocCategorys(workflowId, mergeField);
|
||||||
CreateDocForJSGJXT createDocForJSGJXT = new CreateDocForJSGJXT();
|
CreateDocForJSGJXT createDocForJSGJXT = new CreateDocForJSGJXT();
|
||||||
|
@ -103,10 +106,10 @@ public class ConvertPdfAction implements Action {
|
||||||
if(StringUtils.isNullOrEmpty(fileName)){
|
if(StringUtils.isNullOrEmpty(fileName)){
|
||||||
fileName = defaultFileName;
|
fileName = defaultFileName;
|
||||||
}
|
}
|
||||||
toolUtil.writeErrorLog("合并文件参数:fileName:" + fileName + " docCategory:" + docCategory + " docIds:" + docIds);
|
toolUtil.writeDebuggerLog("合并文件参数:fileName:" + fileName + " docCategory:" + docCategory + " docIds:" + docIds);
|
||||||
int fileId = createDocForJSGJXT.creatDoc(user, fileName, docCategory, docIds);
|
int fileId = createDocForJSGJXT.creatDoc(user, fileName, docCategory, docIds);
|
||||||
if(fileId <= 0){
|
if(fileId <= 0){
|
||||||
toolUtil.writeErrorLog("文件合并错误!(-2:用户为空,-1:文档获取异常)、错误id:" + fileId);
|
toolUtil.writeDebuggerLog("文件合并错误!(-2:用户为空,-1:文档获取异常)、错误id:" + fileId);
|
||||||
// TODO 修改labelId
|
// TODO 修改labelId
|
||||||
requestInfo.getRequestManager().setMessagecontent(Util.getHtmlLabelName(-88651,user.getLanguage(),"合并pdf错误,请联系管理员!"));
|
requestInfo.getRequestManager().setMessagecontent(Util.getHtmlLabelName(-88651,user.getLanguage(),"合并pdf错误,请联系管理员!"));
|
||||||
requestInfo.getRequestManager().setMessageid("1");
|
requestInfo.getRequestManager().setMessageid("1");
|
||||||
|
@ -115,7 +118,7 @@ public class ConvertPdfAction implements Action {
|
||||||
// 将合并的文件回写到流程中
|
// 将合并的文件回写到流程中
|
||||||
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(billTableName, ParaMap.create().put(mergeToField, fileId),
|
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(billTableName, ParaMap.create().put(mergeToField, fileId),
|
||||||
Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestId));
|
Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestId));
|
||||||
toolUtil.writeErrorLog("数据回写:" + sqlResult.getSqlStr() + " --> 参数: " + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog("数据回写:" + sqlResult.getSqlStr() + " --> 参数: " + sqlResult.getArgs());
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(),sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(),sqlResult.getArgs());
|
||||||
return Action.SUCCESS;
|
return Action.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,10 +39,10 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action {
|
||||||
RecordSet rs_1 = new RecordSet();
|
RecordSet rs_1 = new RecordSet();
|
||||||
// 查询流程数据
|
// 查询流程数据
|
||||||
String query = "select * from " + billTableName + " where requestid = ?";
|
String query = "select * from " + billTableName + " where requestid = ?";
|
||||||
toolUtil.writeErrorLog("进入保密协议action!");
|
toolUtil.writeDebuggerLog("进入保密协议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.writeErrorLog(requestData.toString());
|
toolUtil.writeDebuggerLog(requestData.toString());
|
||||||
|
|
||||||
// 查询配置表,获取配置数据
|
// 查询配置表,获取配置数据
|
||||||
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, " +
|
||||||
|
@ -108,24 +108,24 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action {
|
||||||
.attachmentTableName(attachmentTableName)
|
.attachmentTableName(attachmentTableName)
|
||||||
.attachmentFieldId(attachmentFieldId)
|
.attachmentFieldId(attachmentFieldId)
|
||||||
.builder();
|
.builder();
|
||||||
toolUtil.writeErrorLog("保密协议数据:" + configEmpty.toString());
|
toolUtil.writeDebuggerLog("保密协议数据:" + configEmpty.toString());
|
||||||
// 如果不控制是否使用模板,那就默认不添加保密协议
|
// 如果不控制是否使用模板,那就默认不添加保密协议
|
||||||
if ("1".equals(isTemplateShow)) {
|
if ("1".equals(isTemplateShow)) {
|
||||||
// 不使用模板
|
// 不使用模板
|
||||||
toolUtil.writeErrorLog("不使用安全协议数据!因为不控制模板的使用!");
|
toolUtil.writeDebuggerLog("不使用安全协议数据!因为不控制模板的使用!");
|
||||||
return Action.SUCCESS;
|
return Action.SUCCESS;
|
||||||
}
|
}
|
||||||
String showFieldValue = String.valueOf(requestData.get(configEmpty.getShowField()));
|
String showFieldValue = String.valueOf(requestData.get(configEmpty.getShowField()));
|
||||||
// 不使用保密协议模板
|
// 不使用保密协议模板
|
||||||
if (configEmpty.getShowValue() != Integer.parseInt(showFieldValue)) {
|
if (configEmpty.getShowValue() != Integer.parseInt(showFieldValue)) {
|
||||||
toolUtil.writeErrorLog("不使用安全协议数据!因为不使用保密协议!");
|
toolUtil.writeDebuggerLog("不使用安全协议数据!因为不使用保密协议!");
|
||||||
return Action.SUCCESS;
|
return Action.SUCCESS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(configEmpty != null){
|
if(configEmpty != null){
|
||||||
// 使用保密协议模板
|
// 使用保密协议模板
|
||||||
String docIds = copyFile(user, configEmpty,String.valueOf(requestData.get(configEmpty.getTemplateField())));
|
String docIds = copyFile(user, configEmpty,String.valueOf(requestData.get(configEmpty.getTemplateField())));
|
||||||
toolUtil.writeErrorLog("复制完成文件id:" + docIds);
|
toolUtil.writeDebuggerLog("复制完成文件id:" + docIds);
|
||||||
if (StringUtils.isNullOrEmpty(docIds)) {
|
if (StringUtils.isNullOrEmpty(docIds)) {
|
||||||
requestInfo.getRequestManager().setMessageid("1");
|
requestInfo.getRequestManager().setMessageid("1");
|
||||||
// TODO 修改htmlLabel
|
// TODO 修改htmlLabel
|
||||||
|
@ -141,7 +141,7 @@ public class CopyAttachmentSecretAction extends ToolUtil implements Action {
|
||||||
// 修改流程数据,将保密协议的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)),
|
||||||
Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestId));
|
Util.createPrepWhereImpl().whereAnd("requestid").whereEqual(requestId));
|
||||||
toolUtil.writeErrorLog("sql : " + sqlResult.getSqlStr() + " 参数: ---> " + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog("sql : " + sqlResult.getSqlStr() + " 参数: ---> " + sqlResult.getArgs());
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
||||||
}
|
}
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
|
|
@ -114,7 +114,7 @@ public class FaddContractUtil {
|
||||||
.put("file_name", joinFileName);
|
.put("file_name", joinFileName);
|
||||||
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(this.mainTableName, updateMap,
|
PrepSqlResultImpl sqlResult = Util.createSqlBuilder().updateSql(this.mainTableName, updateMap,
|
||||||
Util.createPrepWhereImpl().whereAnd("id").whereEqual(mainMap.get("id")));
|
Util.createPrepWhereImpl().whereAnd("id").whereEqual(mainMap.get("id")));
|
||||||
toolUtil.writeErrorLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
||||||
// 将合同信息和流程表信息保存到自定义的建模表中
|
// 将合同信息和流程表信息保存到自定义的建模表中
|
||||||
updateMap.put("workflow_type",workflowId);
|
updateMap.put("workflow_type",workflowId);
|
||||||
|
@ -135,12 +135,12 @@ public class FaddContractUtil {
|
||||||
if(rs.next()){
|
if(rs.next()){
|
||||||
sqlResult = Util.createSqlBuilder().updateSql(contractInfoTable,updateMap,
|
sqlResult = Util.createSqlBuilder().updateSql(contractInfoTable,updateMap,
|
||||||
Util.createPrepWhereImpl().whereAnd("workflow_request_id").whereEqual(requestId));
|
Util.createPrepWhereImpl().whereAnd("workflow_request_id").whereEqual(requestId));
|
||||||
toolUtil.writeErrorLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
||||||
// 权限重构
|
// 权限重构
|
||||||
ModeRightInfo mri = new ModeRightInfo();
|
ModeRightInfo mri = new ModeRightInfo();
|
||||||
int dataId = rs.getInt("id");
|
int dataId = rs.getInt("id");
|
||||||
toolUtil.writeErrorLog("id:" + dataId);
|
toolUtil.writeDebuggerLog("id:" + dataId);
|
||||||
mri.rebuildModeDataShareByEdit(1,Util.getIntValue(formModeId,-1),dataId);
|
mri.rebuildModeDataShareByEdit(1,Util.getIntValue(formModeId,-1),dataId);
|
||||||
}else{
|
}else{
|
||||||
ModeDataIdUpdate mdu = ModeDataIdUpdate.getInstance();
|
ModeDataIdUpdate mdu = ModeDataIdUpdate.getInstance();
|
||||||
|
@ -150,7 +150,7 @@ public class FaddContractUtil {
|
||||||
TimeUtil.getOnlyCurrentTimeString());
|
TimeUtil.getOnlyCurrentTimeString());
|
||||||
sqlResult = Util.createSqlBuilder().updateSql(contractInfoTable, updateMap,
|
sqlResult = Util.createSqlBuilder().updateSql(contractInfoTable, updateMap,
|
||||||
Util.createPrepWhereImpl().whereAnd("id").whereEqual(dataId));
|
Util.createPrepWhereImpl().whereAnd("id").whereEqual(dataId));
|
||||||
toolUtil.writeErrorLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
toolUtil.writeDebuggerLog(sqlResult.getSqlStr() + ",参数:" + sqlResult.getArgs());
|
||||||
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
rs.executeUpdate(sqlResult.getSqlStr(), sqlResult.getArgs());
|
||||||
ModeRightInfo mri = new ModeRightInfo();
|
ModeRightInfo mri = new ModeRightInfo();
|
||||||
mri.rebuildModeDataShareByEdit(1,Util.getIntValue(formModeId,-1),dataId);
|
mri.rebuildModeDataShareByEdit(1,Util.getIntValue(formModeId,-1),dataId);
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class AddCustomer_Action extends ToolUtil implements Action {
|
||||||
String requestid = Util.null2String(requestInfo.getRequestid());
|
String requestid = Util.null2String(requestInfo.getRequestid());
|
||||||
//流程表单名称
|
//流程表单名称
|
||||||
this.tableName = requestInfo.getRequestManager().getBillTableName();
|
this.tableName = requestInfo.getRequestManager().getBillTableName();
|
||||||
this.writeErrorLog("这个是创建者id:" + requestInfo.getRequestManager().getCreater());
|
this.writeDebuggerLog("这个是创建者id:" + requestInfo.getRequestManager().getCreater());
|
||||||
// 通过流程id查询表名
|
// 通过流程id查询表名
|
||||||
if ("".equals(this.tableName)) {
|
if ("".equals(this.tableName)) {
|
||||||
this.tableName = getBillTableNameByWorkflowId(workflowid);
|
this.tableName = getBillTableNameByWorkflowId(workflowid);
|
||||||
|
|
|
@ -179,11 +179,11 @@ public class CRM_Config extends ToolUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.writeErrorLog("configList: "+configList.toString());
|
this.writeDebuggerLog("configList: "+configList.toString());
|
||||||
this.writeErrorLog("configList: "+configMap.toString());
|
this.writeDebuggerLog("configList: "+configMap.toString());
|
||||||
// 获取客户基本信息
|
// 获取客户基本信息
|
||||||
this.configResult.put("CRM_CustomerInfo",this.getCRM_CustomerInfoSqlMapList(configList,configMap));
|
this.configResult.put("CRM_CustomerInfo",this.getCRM_CustomerInfoSqlMapList(configList,configMap));
|
||||||
this.writeErrorLog("configList: "+this.configResult.toString());
|
this.writeDebuggerLog("configList: "+this.configResult.toString());
|
||||||
// 判断是否需要创建外部用户
|
// 判断是否需要创建外部用户
|
||||||
if (this.mainResult.getIsOutUser() == 0) {
|
if (this.mainResult.getIsOutUser() == 0) {
|
||||||
// 需要创建外部用户,获取外部用户字段映射信息
|
// 需要创建外部用户,获取外部用户字段映射信息
|
||||||
|
@ -250,10 +250,10 @@ public class CRM_Config extends ToolUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Map<String,Object>> getSqlMapList(List<TableFieldRelation> configList, Set<String> set){
|
public List<Map<String,Object>> getSqlMapList(List<TableFieldRelation> configList, Set<String> set){
|
||||||
this.writeErrorLog("getSqlMapList: configList: " + configList.toString());
|
this.writeDebuggerLog("getSqlMapList: configList: " + configList.toString());
|
||||||
this.writeErrorLog("getSqlMapList: set: " + set.toString());
|
this.writeDebuggerLog("getSqlMapList: set: " + set.toString());
|
||||||
if(Objects.isNull(configList) || configList.size() == 0 || Objects.isNull(set) || set.size() == 0){
|
if(Objects.isNull(configList) || configList.size() == 0 || Objects.isNull(set) || set.size() == 0){
|
||||||
this.writeErrorLog("table mapping error,error args is configList = [" + configList + "] and set = [" + set + "]");
|
this.writeDebuggerLog("table mapping error,error args is configList = [" + configList + "] and set = [" + set + "]");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
RecordSet rs = new RecordSet();
|
RecordSet rs = new RecordSet();
|
||||||
|
@ -296,7 +296,7 @@ public class CRM_Config extends ToolUtil {
|
||||||
customSql.contains("exec") || customSql.contains("drop") ||
|
customSql.contains("exec") || customSql.contains("drop") ||
|
||||||
customSql.contains("truncate")) {
|
customSql.contains("truncate")) {
|
||||||
// sql 不包含delete,update,exec,drop,truncate等危险关键字
|
// sql 不包含delete,update,exec,drop,truncate等危险关键字
|
||||||
writeErrorLog("warning sql: " + customSql);
|
writeDebuggerLog("warning sql: " + customSql);
|
||||||
} else if (customSql.contains("select")) {
|
} else if (customSql.contains("select")) {
|
||||||
// 包含查询关键词
|
// 包含查询关键词
|
||||||
try {
|
try {
|
||||||
|
@ -355,7 +355,7 @@ public class CRM_Config extends ToolUtil {
|
||||||
sqlMapList.add(sqlMap);
|
sqlMapList.add(sqlMap);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
writeErrorLog("select workflow date error, error sql is: "
|
writeDebuggerLog("select workflow date error, error sql is: "
|
||||||
+ selectSql + " args is: " + this.workflowId);
|
+ selectSql + " args is: " + this.workflowId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue