yaozhixue il y a 1 an
Parent
commit
e1963720ff

+ 3 - 45
src/main/java/com/zfire/jiasm/syncdata/service/impl/InstallProduceDataUploadServiceImpl.java

@@ -202,6 +202,8 @@ public class InstallProduceDataUploadServiceImpl implements InstallProduceDataUp
                             // 222 - TL_PrePareSynDataby_az_assign_wg
 
                             if (uploadTaskType==22){
+                                // 采集表与采集条码表ID超范围 - 采集表及采集条码明细表中的outid统一修改
+                                orderBaseInstallCjOrWgService.upOutId(ojtutl.getId());
                                 if (!orderBaseInstall(brand, ojtutl, CategoryRefmap)) {
                                     continue;
                                 }
@@ -494,7 +496,6 @@ public class InstallProduceDataUploadServiceImpl implements InstallProduceDataUp
                 .eq(OrderBase::getId, ojtutl.getId())
                 .last("limit 1")
                 .one();
-
         if (orderBase !=null ){
             // 若工单被删除不再同步 不写生成数据
 
@@ -797,7 +798,7 @@ public class InstallProduceDataUploadServiceImpl implements InstallProduceDataUp
         upInstallDetailPgguid(orderBase);
 
         // 采集表与采集条码表ID超范围 - 采集表及采集明细表中的outid统一修改
-        upOutId(detail);
+        // upOutId(detail);
 
 
         // 采集标志 1100:保存,1110:作废,1120:转结算
@@ -845,49 +846,6 @@ public class InstallProduceDataUploadServiceImpl implements InstallProduceDataUp
         }
     }
 
-    private void upOutId(OrderInstallDetail detail) {
-        List<OrderInstallDetail> upList = new ArrayList<>();
-        List<OrderInstallDetail> detaillist = orderInstallDetailService.lambdaQuery()
-                .eq(OrderInstallDetail::getOrderBaseId, detail.getOrderBaseId())
-                .orderByAsc(OrderInstallDetail::getCreateTime).list();
-        // 找出最大的序 默认值为0
-        int outId=0;
-        if (detaillist!=null && detaillist.size()>0){
-            for (OrderInstallDetail item:detaillist){
-                if (outId<item.getOutId()){
-                    outId = item.getOutId();
-                }
-            }
-            for (OrderInstallDetail ite:detaillist){
-                if (ite.getOutId() == 0){
-                    outId++;
-                    OrderInstallDetail n = new OrderInstallDetail();
-                    n.setId(ite.getId());
-                    n.setOutId(outId);
-                    upList.add(n);
-                }
-            }
-            // 修改序
-            if (upList.size()>0){
-                orderInstallDetailService.updateBatchById(upList);
-                upList.clear();
-            }
-
-            detaillist.clear();
-        }
-
-        // 采集条码码 outid统一修改
-        // 采集表与采集条码表ID超范围 - 采集表及采集明细表中的outid统一修改
-        List<OrderInstallDetailCode> codelist = orderInstallDetailCodeService.lambdaQuery()
-                .eq(OrderInstallDetailCode::getOrderBaseId, detail.getOrderBaseId())
-                .eq(OrderInstallDetailCode::getOutId,0).list();
-        if (codelist!=null && codelist.size()>0){
-            InstalDetailCode codep = new InstalDetailCode();
-            codep.setOrderNo(detail.getOrderBaseId());
-            codeOrderInstallDetailMapper.updateCodeOutId(codep);
-        }
-    }
-
     // 处理附件采集数据上传
     public Boolean getcjfjdata(OrderBase orderBase, OrderInstallDetail detail, String mainName) {
         String oldFile ="";

+ 0 - 4
src/main/java/com/zfire/jiasm/syncdata/service/impl/OrderBaseInstallCjOrWgServiceImpl.java

@@ -143,20 +143,16 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
                     // 根据产品类别名称 生成不同的完工明细数据
                     String mainName = CategoryRefmap.get(orderBase.getMainId()).get(0).getRefDictName();
 
-                    log.info("details:{}",details);
                     // 数据生成
                     if (! installDtailJS(cjOrWg, brand, orderBase, lcls, detail, taskno, mainName,ojtutl.getSynReqId())){
                         return Boolean.FALSE;
                     }
 
-                    log.info("details:{}",details);
                     // 数据明细检查(如果明细不存在则不写主表以免数据不完整)
                     if (!checkInstallitem(cjOrWg,taskno,detail,lcls,ojtutl)){
                         return Boolean.FALSE;
                     }
-                    log.info("details:{}",details);
                 }
-                log.info("details:{}",details);
             }
         }
         // 修改数据上传任务表中的状态   这里固定值 221