设计文件变更单筛选条件优化,将筛选条件从创建时间改为了最后修改时间

This commit is contained in:
itzhang 2025-07-17 21:50:37 +08:00
parent ed0152efca
commit e82da66ca0

View File

@ -426,7 +426,7 @@ public class DesignController {
JSONObject getDesignBGDoc = crmRequestUtil.getCRMList(Arrays.asList(
//new Filter("EQ", "name", Arrays.asList("2025-06-24-00007")),
new Filter("GT", "create_time", Arrays.asList(String.valueOf(twoDaysAgo))),
new Filter("GT", "last_modified_time", Arrays.asList(String.valueOf(twoDaysAgo))),
new Filter("EQ", "life_status", Arrays.asList("normal"))
), "design_file__c__changeObj__c");
@ -751,6 +751,37 @@ public class DesignController {
}
System.out.println("日志插入结果为:" + logRes);
//判断一下设计文件的状态没有成功就不传了
if (!"0".equals(designDocRes.getString("errorCode"))) {
continue;
}
//开始封装明细回写程序
for (Object resultObj : designDocRes.getJSONObject("data").getJSONArray("entry")) {
JSONObject resultData = JSON.parseObject(JSON.toJSONString(resultObj));
String erpLineId = resultData.getString("entryid");
String crmLineId = resultData.getString("crmentryid");
//开始封装
Map backMap = new HashMap();
backMap.put("_id", crmLineId);
backMap.put("erp_line_id__c", erpLineId);
backMap.put("dataObjectApiName", "design_file_details__c");
JSONObject detailReq = crmRequestUtil.updateCRM(backMap);
JSONObject detailRes = new JSONObject();
try {
detailRes = restTemplate.postForObject(URLConstant.UPDATE_CRM_CUSTOMIZE, detailReq, JSONObject.class);
} catch (RestClientException e) {
e.printStackTrace();
}
System.out.println("明细回写结果为:" + detailRes);
}
}
}
}