|
@@ -1,5 +1,6 @@
|
|
|
package com.zfire.jiasm.syncdata.service.impl;
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
import com.zfire.jiasm.syncdata.dao.mapper.*;
|
|
@@ -13,6 +14,7 @@ import com.zfire.jiasm.syncdata.response.WorderInfo;
|
|
|
import com.zfire.jiasm.syncdata.service.DetailDownloadService;
|
|
|
import com.zfire.jiasm.syncdata.service.PublicService;
|
|
|
import com.zfire.jiasm.syncdata.utils.MyBeanUtils;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -28,6 +30,7 @@ import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
+@Slf4j
|
|
|
@Service
|
|
|
public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
|
@Autowired
|
|
@@ -374,6 +377,9 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
|
.eq(ItfTblAzWgmxJyktFjDownload::getDownloadTaskNo, downloadTaskNo)
|
|
|
.eq(ItfTblAzWgmxJyktFjDownload::getSynStatus,0).list();
|
|
|
|
|
|
+
|
|
|
+ log.info("采集明细");
|
|
|
+
|
|
|
// 提取采集数据
|
|
|
oids = orderInstallDetailService.lambdaQuery()
|
|
|
.select(OrderInstallDetail::getPgwcmxid,OrderInstallDetail::getId)
|
|
@@ -381,6 +387,8 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
|
oidsMap = oids.stream().collect(Collectors.groupingBy(OrderInstallDetail::getPgwcmxid));
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(jykts)){
|
|
|
+ log.info("采集明细a {}", JSONObject.toJSONString(jykts));
|
|
|
+
|
|
|
// 提取工单数据
|
|
|
OrderBase order = orderBaseService.lambdaQuery()
|
|
|
.eq(OrderBase::getId,oids.get(0).getOrderBaseId())
|
|
@@ -396,17 +404,23 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ log.info("采集明细 fsFjguid {}", JSONObject.toJSONString(fsFjguid));
|
|
|
+
|
|
|
for (ItfTblAzWgmxJyktFjDownload item :jykts){
|
|
|
// 采集明细表未同步不处理
|
|
|
if (!oidsMap.containsKey(item.getPgwcmxid())){
|
|
|
odfs.clear();
|
|
|
break;
|
|
|
}
|
|
|
+ log.info("采集明细 item {}", JSONObject.toJSONString(item));
|
|
|
+
|
|
|
// 生成采集附件明细数据 暂时忽略更新,无新增
|
|
|
if (!fsFjguid.contains(item.getFjguid())){
|
|
|
getItfTblAzWgmxJyktFj(odfs,oidsMap.get(item.getPgwcmxid()).get(0), order, item);
|
|
|
}
|
|
|
}
|
|
|
+ log.info("采集明细 odfs {}", JSONObject.toJSONString(odfs));
|
|
|
+
|
|
|
if (odfs.size()>0) {
|
|
|
orderDetailFileService.saveBatch(odfs);
|
|
|
odfs.clear();
|