yaozhixue 1 年之前
父节点
当前提交
10bb564743

+ 2 - 0
src/main/java/com/zfire/jiasm/syncdata/service/impl/AddInstallBusinessImpl.java

@@ -1159,6 +1159,7 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
         if (productMap.containsKey(mx.getJxno())){
             op.setProductId(productMap.get(mx.getJxno()));
         }
+        op.setOutJxno(mx.getJxno());
 
         op.setProductName(mx.getJxmc());
         op.setInsideCode(mx.getNjtm());
@@ -2696,6 +2697,7 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
         if (productMap.containsKey(mx.getJxno())){
             op.setProductId(productMap.get(mx.getJxno()));
         }
+        op.setOutJxno(mx.getJxno());
 
         op.setProductName(mx.getJxmc());
         op.setInsideCode(mx.getNjtm());

+ 3 - 0
src/main/java/com/zfire/jiasm/syncdata/service/impl/AddRepairBusinessServiceImpl.java

@@ -2550,6 +2550,8 @@ public class AddRepairBusinessServiceImpl implements AddRepairBusinessService {
             } else {
                 op.setProductId("");
             }
+            op.setOutJxno(rec.getJxno());
+
 
             // 销售单位处理 sale_websit
             websitFWS = publicService.shxswdToptxswd(op.getSaleWebsit(),order);
@@ -2721,6 +2723,7 @@ public class AddRepairBusinessServiceImpl implements AddRepairBusinessService {
         } else {
             op.setProductId("");
         }
+        op.setOutJxno(rec.getJxno());
 
         // 其他部分参数赋值
         // 销售单位处理 sale_websit

+ 5 - 5
src/main/resources/mapper/GetOrderProductMapper.xml

@@ -7,8 +7,7 @@
                a.create_time as created_date,'guangfo' as last_modified_by,a.update_time as last_modified_date,
                a.pgid,IFNULL(c.ref_dict_code,'') as spid,IFNULL(c.ref_dict_name,'') as spmc,IFNULL(d.ref_dict_code,'') as xlid,IFNULL(d.ref_dict_name,'') as xlmc,
                (case when e.ref_dict_code > 99999 then 0 else e.ref_dict_code end) as xiid,IFNULL(e.ref_dict_name, '') as ximc,
-               0 as jxid,IFNULL(a.product_name, '') as jxmc,
-               case when length(a.product_id) >30  then left(a.product_id,30) else IFNULL(a.product_id,'') end as jxno,
+               0 as jxid,IFNULL(a.product_name, '') as jxmc,IFNULL(a.out_jxno,f.jxid) as jxno,
                a.buy_time as gmsj,a.create_time as czsj,
                '' as gzwz,IFNULL(a.fault_reason,'') as gzxx, IFNULL(a.create_by,'') as czren,IFNULL(a.sale_websit,'') as xsdw,
             IFNULL(a.sale_websit_mobile,'') as xsdwdh,a.service_websit_mobile as fwdwdh,
@@ -18,6 +17,7 @@
                  left join sys_dict_ref c on c.dict_code=a.main_id and c.brand_id = #{request.brandId} and c.dict_type='MAIN_TYPE'
                  left join sys_dict_ref d on d.dict_code=a.small_id and d.brand_id = #{request.brandId} and d.dict_type='SMALL_TYPE'
                  left join sys_dict_ref e on e.dict_code=a.series_id and e.brand_id = #{request.brandId} and e.dict_type='SERIES'
+            left join product f on f.product_id=a.product_id and e.product_brand_id = #{request.brandId}
         where a.id = #{request.id}
     </select>
 
@@ -26,14 +26,14 @@
                a.create_time as created_date,'guangfo' as last_modified_by,a.update_time as last_modified_date,
                c.ref_dict_code as spid,c.ref_dict_name as spmc,d.ref_dict_code as xlid,d.ref_dict_name as xlmc,
                (case when e.ref_dict_code > 99999 then 0 else e.ref_dict_code end) as xiid,IFNULL(e.ref_dict_name, '') as ximc,
-               a.product_name as jxmc,
-               case when length(a.product_id) >30  then left(a.product_id,30) else IFNULL(a.product_id,'') end as jxno,
+               a.product_name as jxmc,IFNULL(a.out_jxno,f.jxid) as jxno,
                a.create_time as czsj,a.price as jiage,
                a.num as shul,IFNULL(a.unit, '套') as danw,a.out_num as wjsl,a.inside_num as njsl,a.material_number as wldm
         from order_product a
                  left join sys_dict_ref c on c.dict_code=a.main_id and c.brand_id = #{request.brandId} and c.dict_type='MAIN_TYPE'
                  left join sys_dict_ref d on d.dict_code=a.small_id and d.brand_id = #{request.brandId} and d.dict_type='SMALL_TYPE'
-                 left join sys_dict_ref e on e.dict_code=a.series_id and e.brand_id = #{request.brandId} and e.dict_type='SERIES'
+            left join sys_dict_ref e on e.dict_code=a.series_id and e.brand_id = #{request.brandId} and e.dict_type='SERIES'
+            left join product f on f.product_id=a.product_id and e.product_brand_id = #{request.brandId}
         where a.id = #{request.id}
     </select>