|
@@ -361,20 +361,7 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
}
|
|
}
|
|
|
|
|
|
// 生成采集条码数据
|
|
// 生成采集条码数据
|
|
- if (oids.size()>0){
|
|
|
|
- for (OrderInstallDetail a :oids){
|
|
|
|
- log.info("生成采集条码表a {}",JSONObject.toJSONString(a));
|
|
|
|
-
|
|
|
|
- // 把条码信息放在采集条码表中使用
|
|
|
|
- if (StringUtils.isNotEmpty(a.getInsideCode())){
|
|
|
|
- outid = getInOutid(oidcs, outid, order, a, a.getInsideCode(), "1");
|
|
|
|
- }
|
|
|
|
- if (StringUtils.isNotEmpty(a.getOutCode())){
|
|
|
|
- outid = getInOutid(oidcs, outid, order, a, a.getOutCode(), "2");
|
|
|
|
- }
|
|
|
|
- log.info("生成采集条码表b {}",JSONObject.toJSONString(oidcs));
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ getOrderInstallDetailCode(oids, oidcs, outid, order);
|
|
|
|
|
|
|
|
|
|
if (oids.size()>0){
|
|
if (oids.size()>0){
|
|
@@ -395,6 +382,22 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
upSynStatusAzJykt(downloadTaskNo);
|
|
upSynStatusAzJykt(downloadTaskNo);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private void getOrderInstallDetailCode(List<OrderInstallDetail> oids, List<OrderInstallDetailCode> oidcs, int outid, OrderBase order) {
|
|
|
|
+ if (oids.size()>0){
|
|
|
|
+ for (OrderInstallDetail a : oids){
|
|
|
|
+ // log.info("生成采集条码表a {}",JSONObject.toJSONString(a));
|
|
|
|
+
|
|
|
|
+ // 把条码信息放在采集条码表中使用
|
|
|
|
+ if (StringUtils.isNotEmpty(a.getInsideCode())){
|
|
|
|
+ outid = getInOutid(oidcs, outid, order, a, a.getInsideCode(), "1");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtils.isNotEmpty(a.getOutCode())){
|
|
|
|
+ outid = getInOutid(oidcs, outid, order, a, a.getOutCode(), "2");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
private int getInOutid(List<OrderInstallDetailCode> oidcs, int outid, OrderBase order, OrderInstallDetail a, String insideCode, String s) {
|
|
private int getInOutid(List<OrderInstallDetailCode> oidcs, int outid, OrderBase order, OrderInstallDetail a, String insideCode, String s) {
|
|
OrderInstallDetailCode odf = new OrderInstallDetailCode();
|
|
OrderInstallDetailCode odf = new OrderInstallDetailCode();
|
|
odf.setId(IdWorker.getIdStr());
|
|
odf.setId(IdWorker.getIdStr());
|
|
@@ -438,9 +441,6 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
.eq(ItfTblAzWgmxJyktFjDownload::getDownloadTaskNo, downloadTaskNo)
|
|
.eq(ItfTblAzWgmxJyktFjDownload::getDownloadTaskNo, downloadTaskNo)
|
|
.eq(ItfTblAzWgmxJyktFjDownload::getSynStatus,0).list();
|
|
.eq(ItfTblAzWgmxJyktFjDownload::getSynStatus,0).list();
|
|
|
|
|
|
-
|
|
|
|
- log.info("采集明细 pgguid {}",pgguid);
|
|
|
|
-
|
|
|
|
// 提取采集数据
|
|
// 提取采集数据
|
|
oids = orderInstallDetailService.lambdaQuery()
|
|
oids = orderInstallDetailService.lambdaQuery()
|
|
.eq(OrderInstallDetail::getPgwcmxid,pgguid).list();
|
|
.eq(OrderInstallDetail::getPgwcmxid,pgguid).list();
|
|
@@ -449,17 +449,11 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
|
|
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(jykts)){
|
|
if (!CollectionUtils.isEmpty(jykts)){
|
|
- log.info("采集明细a {}", JSONObject.toJSONString(jykts));
|
|
|
|
-
|
|
|
|
- log.info("采集明细b {}", JSONObject.toJSONString(oids));
|
|
|
|
-
|
|
|
|
// 提取工单数据
|
|
// 提取工单数据
|
|
OrderBase order = orderBaseService.lambdaQuery()
|
|
OrderBase order = orderBaseService.lambdaQuery()
|
|
.eq(OrderBase::getId,oids.get(0).getOrderBaseId())
|
|
.eq(OrderBase::getId,oids.get(0).getOrderBaseId())
|
|
.last("limit 1").one();
|
|
.last("limit 1").one();
|
|
|
|
|
|
- log.info("采集明细c {}", JSONObject.toJSONString(order));
|
|
|
|
-
|
|
|
|
if (order!=null){
|
|
if (order!=null){
|
|
// 提取现有的采集附件数据
|
|
// 提取现有的采集附件数据
|
|
List<OrderDetailFile> fs = orderDetailFileService.lambdaQuery()
|
|
List<OrderDetailFile> fs = orderDetailFileService.lambdaQuery()
|
|
@@ -471,28 +465,19 @@ public class DetailDownloadServiceImpl implements DetailDownloadService {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
- log.info("采集明细 fsFjguid {}", JSONObject.toJSONString(fsFjguid));
|
|
|
|
-
|
|
|
|
for (ItfTblAzWgmxJyktFjDownload item :jykts){
|
|
for (ItfTblAzWgmxJyktFjDownload item :jykts){
|
|
-
|
|
|
|
- log.info("采集明细x ");
|
|
|
|
-
|
|
|
|
// 采集明细表未同步不处理
|
|
// 采集明细表未同步不处理
|
|
if (!oidsMap.containsKey(item.getPgwcmxid())){
|
|
if (!oidsMap.containsKey(item.getPgwcmxid())){
|
|
odfs.clear();
|
|
odfs.clear();
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
- log.info("采集明细 item {}", JSONObject.toJSONString(item));
|
|
|
|
-
|
|
|
|
// 生成采集附件明细数据 暂时忽略更新,无新增
|
|
// 生成采集附件明细数据 暂时忽略更新,无新增
|
|
if (!fsFjguid.contains(item.getFjguid())){
|
|
if (!fsFjguid.contains(item.getFjguid())){
|
|
OrderDetailFile a = new OrderDetailFile();
|
|
OrderDetailFile a = new OrderDetailFile();
|
|
getItfTblAzWgmxJyktFj(odfs,oidsMap.get(item.getPgwcmxid()).get(0), order, item, a);
|
|
getItfTblAzWgmxJyktFj(odfs,oidsMap.get(item.getPgwcmxid()).get(0), order, item, a);
|
|
|
|
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
- log.info("采集明细 odfs {}", JSONObject.toJSONString(odfs));
|
|
|
|
|
|
|
|
if (odfs.size()>0) {
|
|
if (odfs.size()>0) {
|
|
orderDetailFileService.saveBatch(odfs);
|
|
orderDetailFileService.saveBatch(odfs);
|