新增数据优化
This commit is contained in:
parent
256e7acf0c
commit
377bc47d6b
@ -5,7 +5,7 @@
|
||||
"groupId" : "55b38df92caf40b99b60fcc88e5ce361",
|
||||
"name" : "查询日志",
|
||||
"createTime" : null,
|
||||
"updateTime" : 1749615961240,
|
||||
"updateTime" : 1751937833473,
|
||||
"lock" : null,
|
||||
"createBy" : null,
|
||||
"updateBy" : null,
|
||||
|
@ -88,8 +88,8 @@ public class DesignController {
|
||||
String designDocName = designDocData.getString("name");
|
||||
|
||||
//当前单据的创建时间
|
||||
//String createTime = designDocData.getString("create_time");
|
||||
String createTime = designDocData.getString("last_modified_time");
|
||||
String createTime = designDocData.getString("create_time");
|
||||
//String createTime = designDocData.getString("last_modified_time");
|
||||
|
||||
//开始查询该单据是否已经集成过
|
||||
JSONObject isLog = new JSONObject();
|
||||
@ -115,7 +115,7 @@ public class DesignController {
|
||||
//判断组织编码
|
||||
String orgCode = designDocData.getString("my_company_name__c") != null ? designDocData.getString("my_company_name__c") : "";
|
||||
|
||||
if ("".equals(orgCode)){
|
||||
if ("".equals(orgCode)) {
|
||||
log.info("我方单位名称不存在,将不再继续向下执行");
|
||||
continue;
|
||||
}
|
||||
@ -125,8 +125,13 @@ public class DesignController {
|
||||
erpDesignMap.put("biztype_name", "物料类采购");//业务类型
|
||||
|
||||
//开始获取单据日期
|
||||
long bizTime = designDocData.getLong("document_date__c");
|
||||
Date date = new Date(bizTime);
|
||||
long bizTime = designDocData.getLong("document_date__c") != null ? designDocData.getLong("document_date__c") : 0;
|
||||
|
||||
Date date = null;
|
||||
|
||||
if (bizTime != 0) {
|
||||
date = new Date(bizTime);
|
||||
}
|
||||
|
||||
erpDesignMap.put("biztime", date);//单据日期
|
||||
|
||||
@ -527,13 +532,10 @@ public class DesignController {
|
||||
|
||||
//采购组织
|
||||
//判断组织编码
|
||||
String orgCode = "";
|
||||
if (designBGDocData.getString("change_erp_organization_sales_con__c") != null && !"".equals(designBGDocData.getString("change_erp_organization_sales_con__c"))) {
|
||||
orgCode = designBGDocData.getString("change_erp_organization_sales_con__c");
|
||||
} else if (designBGDocData.getString("change_erp_organization_pre_contr__c") != null && !"".equals(designBGDocData.getString("change_erp_organization_pre_contr__c"))) {
|
||||
orgCode = designBGDocData.getString("change_erp_organization_pre_contr__c");
|
||||
} else {
|
||||
log.info("当前单据没有组织编码,将不再向下执行");
|
||||
String orgCode = designBGDocData.getString("change_my_company_name__c") != null ? designBGDocData.getString("change_my_company_name__c") : "";
|
||||
|
||||
if ("".equals(orgCode)) {
|
||||
log.info("组织编码不存在,将不再继续向下执行");
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -609,7 +611,7 @@ public class DesignController {
|
||||
long siteDirectTime = designDocDetailData.getLong("change_direct_delivery_time__c") != null ? designDocDetailData.getLong("change_direct_delivery_time__c") : 0;
|
||||
Date siteDirectTimeDate = null;
|
||||
|
||||
if (siteDirectTime != 0){
|
||||
if (siteDirectTime != 0) {
|
||||
siteDirectTimeDate = new Date(siteDirectTime);
|
||||
}
|
||||
|
||||
|
@ -79,8 +79,8 @@ public class PastContractController {
|
||||
//合同名称
|
||||
String contractName = contractData.getString("name");
|
||||
//创建时间
|
||||
//String createTime = contractData.getString("create_time");
|
||||
String createTime = contractData.getString("last_modified_time");
|
||||
String createTime = contractData.getString("create_time");
|
||||
//String createTime = contractData.getString("last_modified_time");
|
||||
|
||||
//查看数据库表中是否已执行过当前数据
|
||||
JSONObject isLogRes = new JSONObject();
|
||||
@ -286,7 +286,7 @@ public class PastContractController {
|
||||
//是否招投标
|
||||
Boolean isBidding = null;
|
||||
|
||||
switch (contractData.getString("is_bidding__c")) {
|
||||
switch (contractData.getString("is_bidding__c") != null ? contractData.getString("is_bidding__c") : "") {
|
||||
case "yes":
|
||||
isBidding = true;
|
||||
break;
|
||||
@ -499,6 +499,7 @@ public class PastContractController {
|
||||
//同步成功
|
||||
logMap.put("log_status", "0");
|
||||
logMap.put("res_body", "同步成功");
|
||||
logMap.put("send_flag", contractRes.getJSONObject("data").getJSONArray("result").getJSONObject(0).getString("id") != null ? contractRes.getJSONObject("data").getJSONArray("result").getJSONObject(0).getString("id") : "");
|
||||
backReqMap.put("erp_id__c", contractRes.getJSONObject("data").getJSONArray("result").getJSONObject(0).getString("id"));
|
||||
backReqMap.put("sync_status__c", "option_sync_success__c");
|
||||
backReqMap.put("response_info__c", "期初合同同步成功");
|
||||
@ -529,6 +530,8 @@ public class PastContractController {
|
||||
|
||||
System.out.println("回写结果为:" + backRes);
|
||||
|
||||
logMap.put("send_memo", JSON.toJSONString(backRes));
|
||||
|
||||
//开始记录日志
|
||||
JSONObject logRes = new JSONObject();
|
||||
try {
|
||||
|
@ -627,8 +627,8 @@ public class PreContractController {
|
||||
System.out.println("当前正在处理的数据为:" + preContractData);
|
||||
|
||||
String preContractId = preContractData.getString("_id");
|
||||
//String createTime = preContractData.getString("create_time");
|
||||
String createTime = preContractData.getString("last_modified_time");
|
||||
String createTime = preContractData.getString("create_time");
|
||||
//String createTime = preContractData.getString("last_modified_time");
|
||||
|
||||
//根据唯一id和创建时间查询是否已经执行当前数据
|
||||
JSONObject preContractIsExist = new JSONObject();
|
||||
|
Loading…
x
Reference in New Issue
Block a user