yaozhixue před 1 rokem
rodič
revize
0c6dfd984d

+ 16 - 4
src/main/java/com/zfire/jiasm/syncdata/service/impl/AddInstallBusinessImpl.java

@@ -2520,7 +2520,7 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
             totalnum=1;
         }
         while (insertnum <=totalnum){
-            OrderInstallDetail add = getOrderInstallDetail(orderBase, oids, outid, op);
+            OrderInstallDetail add = getOrderInstallDetail(orderBase, oids, outid, op,mx);
             insertnum++;
             outid++;
 
@@ -2597,7 +2597,8 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
     }
 
     @NotNull
-    private OrderInstallDetail getOrderInstallDetail(OrderBase orderBase, List<OrderInstallDetail> oids, int outid, OrderProduct op) {
+    private OrderInstallDetail getOrderInstallDetail(OrderBase orderBase, List<OrderInstallDetail> oids,
+                                                     int outid, OrderProduct op, ItfTblAzAssignMxDownload mx) {
         String pgwcmxid = UUID.randomUUID().toString();
         OrderInstallDetail add = new OrderInstallDetail();
         add.setId(IdWorker.getIdStr());
@@ -2612,8 +2613,19 @@ public class AddInstallBusinessImpl implements AddInstallBusiness {
         add.setSmallName(op.getSmallName());
         add.setSeriesId(op.getSeriesId());
         add.setSeriesName(op.getSeriesName());
-        add.setProductId(op.getProductId());
-        add.setProductName(op.getProductName());
+        if (mx.getJxno()==null){
+            add.setProductId("0");
+        } else {
+            add.setProductId(mx.getJxno());
+        }
+        //add.setProductId(op.getProductId());
+        //add.setProductName(op.getProductName());
+        if (mx.getJxmc()==null){
+            add.setProductName("");
+        } else {
+            add.setProductName(mx.getJxmc());
+        }
+
         add.setOutId(outid);
         add.setCodeIndex(outid);
         add.setInsideNum(op.getInsideNum());

+ 3 - 4
src/main/resources/mapper/GetOrderProductMapper.xml

@@ -7,7 +7,8 @@
                a.create_time as created_date,'guangfo' as last_modified_by,a.update_time as last_modified_date,
                a.pgid,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,
-               0 as jxid,IFNULL(f.name,'') as jxmc,IFNULL(f.jxid,'') as jxno,a.buy_time as gmsj,a.create_time as czsj,
+               0 as jxid,IFNULL(a.product_name, '') as jxmc,IFNULL(a.product_id, 0) as jxno,
+               a.buy_time as gmsj,a.create_time as czsj,
                '' as gzwz,a.fault_reason as gzxx, a.create_by as czren,a.sale_websit as xsdw,
                a.sale_websit_mobile as xsdwdh,a.service_websit_mobile as fwdwdh,
                a.remark as beiz,'' as qqlyxh,'' as pinpai,a.price as fee,0 as xxfee,
@@ -16,7 +17,6 @@
                  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
         where a.id = #{request.id}
     </select>
 
@@ -25,13 +25,12 @@
                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,
-               f.name as jxmc,f.jxid as jxno,a.create_time as czsj,a.price as jiage,
+               a.product_name as jxmc,a.product_name 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 product f on f.product_id = a.product_id
         where a.id = #{request.id}
     </select>
 

+ 1 - 1
src/main/resources/mapper/RepairMxDownloadMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.zfire.jiasm.syncdata.dao.mapper.RepairMxDownloadMapper">
 
     <select id="getMx" parameterType="com.zfire.jiasm.syncdata.parameter.OrderPar" resultType="com.zfire.jiasm.syncdata.plus.entity.OrderProduct">
-        select pgmxid,jxno as province_id,jxmc as product_name,njtm as inside_code,wjtm as out_code,
+        select pgmxid,IFNULL(jxno, 0) as product_id,IFNULL(jxmc, '') as product_name,njtm as inside_code,wjtm as out_code,
                fee as price,shul as num,wwsl as undone_num,created_by,created_date as create_time,
                last_modified_by as update_by,last_modified_date as update_time,gzxx as fault_reason,
                xsdw as sale_websit,xsdwdh as sale_websit_mobile,fwdw as service_websit,