yaozhixue il y a 1 an
Parent
commit
a87040333b

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

@@ -369,7 +369,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
     }
 
 
-    private Boolean generateCJData(Brand brand, Map<String, List<SysDictRef>> CategoryRefmap, OrderBase orderBase, ItfTblAzAssignLcLsUpload lcls) {
+    public Boolean generateCJData(Brand brand, Map<String, List<SysDictRef>> CategoryRefmap, OrderBase orderBase, ItfTblAzAssignLcLsUpload lcls) {
         // 工单状态order_status 6, 7, 9, 10 且为非预派工订单
         if ((orderBase.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G6.getCode()) ||
                 orderBase.getOrderStatus().equals(GDOrderStatusEnum.INSTALL_STATUS_G7.getCode()) ||
@@ -409,7 +409,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
         return Boolean.TRUE;
     }
 
-    private void getDetailCode(OrderBase orderBase, OrderInstallDetail detail, String mainName) {
+    public void getDetailCode(OrderBase orderBase, OrderInstallDetail detail, String mainName) {
         String oldFile ="";
         String newFile ="";
 
@@ -457,7 +457,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
         }
     }
 
-    private void generateDetailCode(OrderBase orderBase, OrderInstallDetailCode code, String mainName) {
+    public void generateDetailCode(OrderBase orderBase, OrderInstallDetailCode code, String mainName) {
         // 采集条码表中的pgguid 统一改成工单基础表的pgguid
         /*InstalDetailCode upcode = new InstalDetailCode();
         upcode.setOrderNo(code.getOrderBaseId());
@@ -491,7 +491,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
     }
 
     @Nullable
-    private void getCJMXData(Brand brand, OrderBase orderBase, ItfTblAzAssignLcLsUpload lcls,
+    public void getCJMXData(Brand brand, OrderBase orderBase, ItfTblAzAssignLcLsUpload lcls,
                              OrderInstallDetail detail,String mainName) {
 
         /*// 修改采集明细的序 pgwcmxid 生成格力总部-采集明细序号
@@ -709,7 +709,7 @@ public class OrderBaseInstallCjOrWgServiceImpl implements orderBaseInstallCjOrWg
         return result;
     }
 
-    private Boolean getFeeUpload(OrderBase orderBase) {
+    public Boolean getFeeUpload(OrderBase orderBase) {
         // 根据辅材订单支付表存在支付时生成安装费用数据
         List<OrderPayOutlayItem> pitems = orderPayOutlayItemService.lambdaQuery()
                 .eq(OrderPayOutlayItem::getOrderBaseId, orderBase.getId()).list();

+ 13 - 5
src/main/java/com/zfire/jiasm/syncdata/service/impl/RepairProduceDataUploadServiceImpl.java

@@ -203,6 +203,14 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
                         // 维修工单 基础表数据同步
                         if (row.getTableName().equals("order_base") &&
                                 row.getOrderType().equals(OrderTypeEnum.ORDER_TYPE_REPAIR.getCode())){
+
+                            // 提取工单数据
+                            OrderBase orderBase = orderBaseService.lambdaQuery()
+                                    .eq(OrderBase::getId, sourceData.getOrderNo()).one();
+                            if (orderBase !=null && orderBase.getUploadFlag()){
+                                // 增加初始化处理,不需要事务
+                                dataInit(sourceData, newDykh, orderBase);
+                            }
                             if (uploadTaskType==66){
                                 generateItfTblAssignUpload(brand, sysDictRefXLMapXq, taskId,
                                         sourceData, newDykh, row);
@@ -695,10 +703,10 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
                 return true;
             }
             // 品牌方fileindex未获取上传被忽略
-            if (StringUtils.isEmpty(file.getBrandFileIndex())){
+            if (StringUtils.isEmpty(file.getBrandFilePath())){
                 return true;
             }
-            // 修改附件的fjguid
+           /* // 修改附件的fjguid
             if (StringUtils.isEmpty(file.getFjguid())){
                 OrderDetailFile upf = new OrderDetailFile();
                 upf.setId(file.getId());
@@ -713,7 +721,7 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
                 upf.setPgwcmxid(UUID.randomUUID().toString());
                 orderDetailFileService.updateById(upf);
                 file.setPgwcmxid(upf.getPgwcmxid());
-            }
+            }*/
             // 生成附件数据
             ItfTblWxjsFjJyktUpload fj = generateInstallCJDetailFile(orderBase, file);
             // 生成附件2表数据
@@ -758,7 +766,7 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
                 continue;
             }
             // 修改 维修现象主键、维修明细主键
-            upxxyyguid(r);
+            // upxxyyguid(r);
             // 生成维修现象数据
             ItfTblWxjsXxyyJyktUpload add = generateJyktUT(item, r);
             // 生成维修现象2表数据
@@ -921,7 +929,7 @@ public class RepairProduceDataUploadServiceImpl implements RepairProduceDataUplo
                 .eq(OrderBase::getId, sourceData.getOrderNo()).one();
         if (orderBase !=null && orderBase.getUploadFlag()){
             // 增加初始化处理,不需要事务
-            dataInit(sourceData, newDykh, orderBase);
+            // dataInit(sourceData, newDykh, orderBase);
 
             itfTblAssignUpload(brand, sysDictRefXLMapXq,taskId, sourceData, newDykh,row, orderBase);
         }

+ 6 - 6
src/main/resources/mapper/DetailOrderInstallMapper.xml

@@ -9,7 +9,7 @@
                e.ref_dict_code as xiid,IFNULL(e.ref_dict_name, '') as ximc,a.inside_number as jxmc,a.out_number as jxno,
                IFNULL(substr(a.inside_code, 1, 13), '') as njtm,'' as njtm2,
                case when a.out_code is null then ''
-                    when length(a.out_code)>13 then left(a.out_code,13) end as wjtm,
+                    when length(a.out_code)>13 then left(a.out_code,13) else a.out_code end as wjtm,
                '' as beiz,'' as installambient,
                case a.type when 'inside' 	then '更换内机'
                            when 'out' 	then '更换外机'
@@ -44,7 +44,7 @@
                e.ref_dict_code as xiid,IFNULL(e.ref_dict_name, '') as ximc,a.inside_number as jxmc,a.out_number as jxno,
                IFNULL(substr(a.inside_code, 1, 13), '') as njtm,'' as njtm2,
                case when a.out_code is null then ''
-                    when length(a.out_code)>13 then left(a.out_code,13) end as wjtm,
+                    when length(a.out_code)>13 then left(a.out_code,13) else a.out_code end as wjtm,
                '' as beiz,'' as installambient,
                case a.type when 'inside' 	then '更换内机'
                            when 'out' 	then '更换外机'
@@ -80,7 +80,7 @@
                e.ref_dict_code as xiid,IFNULL(e.ref_dict_name, '') as ximc,a.inside_number as jxmc,a.out_number as jxno,
                IFNULL(substr(a.inside_code, 1, 13), '') as njtm,'' as njtm2,
                case when a.out_code is null then ''
-                    when length(a.out_code)>13 then left(a.out_code,13) end as wjtm,
+                    when length(a.out_code)>13 then left(a.out_code,13) else a.out_code end as wjtm,
                '' as beiz,'' as installambient,
                case a.type when 'inside' 	then '更换内机'
                            when 'out' 	then '更换外机'
@@ -115,7 +115,7 @@
                e.ref_dict_code as xiid,IFNULL(e.ref_dict_name, '') as ximc,a.inside_number as jxmc,a.out_number as jxno,
                IFNULL(substr(a.inside_code, 1, 13), '') as njtm,'' as njtm2,
                case when a.out_code is null then ''
-                    when length(a.out_code)>13 then left(a.out_code,13) end as wjtm,
+                    when length(a.out_code)>13 then left(a.out_code,13) else a.out_code end as wjtm,
                '' as beiz,'' as installambient,
                case a.type when 'inside' 	then '更换内机'
                            when 'out' 	then '更换外机'
@@ -150,7 +150,7 @@
                e.ref_dict_code as xiid,IFNULL(e.ref_dict_name, '') as ximc,a.inside_number as jxmc,a.out_number as jxno,
                IFNULL(substr(a.inside_code, 1, 13), '') as njtm,'' as njtm2,
                case when a.out_code is null then ''
-                    when length(a.out_code)>13 then left(a.out_code,13) end as wjtm,
+                    when length(a.out_code)>13 then left(a.out_code,13) else a.out_code end as wjtm,
                '' as beiz,'' as installambient,
                case a.type when 'inside' 	then '更换内机'
                            when 'out' 	then '更换外机'
@@ -185,7 +185,7 @@
                e.ref_dict_code as xiid,IFNULL(e.ref_dict_name, '') as ximc,a.inside_number as jxmc,a.out_number as jxno,
                IFNULL(substr(a.inside_code, 1, 13), '') as njtm,'' as njtm2,
                case when a.out_code is null then ''
-                    when length(a.out_code)>13 then left(a.out_code,13) end as wjtm,
+                    when length(a.out_code)>13 then left(a.out_code,13) else a.out_code end as wjtm,
                '' as beiz,'' as installambient,
                case a.type when 'inside' 	then '更换内机'
                            when 'out' 	then '更换外机'

+ 2 - 2
src/main/resources/mapper/FileOrderDetailMapper.xml

@@ -16,14 +16,14 @@
         select id
         from order_detail_file
         where order_base_id = #{request.orderNo} and
-            (file_path is null or file_path = '' or brand_file_index is null or brand_file_index = '')
+            (file_path is null or file_path = '' or brand_file_path is null or brand_file_path = '')
     </select>
 
     <select id="getIdReT" parameterType="com.zfire.jiasm.syncdata.parameter.InstallCJDetailFile" resultType="com.zfire.jiasm.syncdata.plus.entity.OrderDetailFile">
         select id,order_detail_id
         from order_detail_file
         where order_base_id = #{request.orderNo} and file_type = #{request.type}  and
-            (file_path is null or file_path = '' or brand_file_index is null or brand_file_index = '') limit 1
+            (file_path is null or file_path = '' or brand_file_path is null or brand_file_path = '') limit 1
     </select>
 
     <select id="getFileUpload" parameterType="com.zfire.jiasm.syncdata.parameter.InstallCJDetailFile" resultType="com.zfire.jiasm.syncdata.plus.entity.ItfTblAzWgmxJyktFjUpload">