提交 f4b35fc2 authored 作者: 李炎's avatar 李炎

微调

上级 bb14e367
......@@ -44,6 +44,10 @@ public class KingDeeCommonSyncServiceImpl implements IKingDeeCommonSyncService {
@Override
public void synchronization(Integer id, String sFormId, String dataId, String entryId) {
System.out.println("id"+id);
System.out.println("sFormId"+sFormId);
System.out.println("dataId"+dataId);
System.out.println("entryId"+entryId);
//查询表单配置
List<Map<String, String>> configList = kingDeeCommonSyncConstants.get(sFormId);
if (CollectionUtils.isEmpty(configList)) {
......@@ -70,9 +74,11 @@ public class KingDeeCommonSyncServiceImpl implements IKingDeeCommonSyncService {
Map<String, Object> response = new LinkedHashMap<>();
KingDeeCommonSyncConstants.encapsulationThirdPartyFieldBySql(dataList, fieldList, response);
request.add(response);
System.out.println("response===="+response);
kingDeeCommonSyncApi.databaseTableDataCreateBySql(config.get("docType"), queueId, dataList, fieldList, primaryKeyField);
}
System.out.println("request1===="+request);
} else {
//设置需要同步的主键
Map<String, String> where = new HashMap<>(1);
......@@ -85,6 +91,7 @@ public class KingDeeCommonSyncServiceImpl implements IKingDeeCommonSyncService {
}
request = kingDeeCommonSyncApi.synchronization(config, queueId, fieldList, where);
System.out.println("request2===="+request);
if (request.get(0).containsKey(Constants.FALSE)) {
synchronizationRecordsMapper.synchronizationRecordsUpdate(new SynchronizationRecordsUpdateInVo(id, queueId, request.get(0).get(Constants.FALSE).toString(), 2));
return;
......@@ -95,8 +102,10 @@ public class KingDeeCommonSyncServiceImpl implements IKingDeeCommonSyncService {
if (StringUtil.isNotBlank(plugInUrl)) {
List<Map<String, Object>> tempList = this.encapsulationGetByHttp(config, queueId, id, plugInUrl, request, dataList);
if (!CollectionUtils.isEmpty(tempList)) {
System.out.println("tempList===="+tempList);
request = tempList;
}
System.out.println("request3===="+request);
}
this.encapsulationRequest(config, queueId, id, request);
......@@ -187,6 +196,7 @@ public class KingDeeCommonSyncServiceImpl implements IKingDeeCommonSyncService {
private void encapsulationRequest(Map<String, String> config, String queueId, Integer id, List<Map<String, Object>> dataList) {
for(Map<String, Object> curData:dataList){
curData.put("docType",config.get("docType"));
System.out.println("curData"+curData);
String response = kingDeeCommonSyncApi.sendThirdParty(JsonUtil.toString(curData));
response = unicodeToString(response);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论