Browse Source

待出库添加sn信息

yzc 1 năm trước cách đây
mục cha
commit
81358e0911

+ 1 - 0
hx-jxst/src/main/java/com/fjhx/jxst/service/sales/impl/SalesContractServiceImpl.java

@@ -432,6 +432,7 @@ public class SalesContractServiceImpl extends ServiceImpl<SalesContractMapper, S
             stockWaitDetails.setQuantity(BigDecimal.ONE);
             stockWaitDetails.setBusinessDetailsId(productionTaskDetail.getId());
             stockWaitDetails.setRemark(productionTaskDetail.getProductSn());
+            stockWaitDetails.setProductionTaskDetailId(productionTaskDetail.getId());
             stockWaitDetailsList.add(stockWaitDetails);
         }
 

+ 2 - 1
hx-wms/src/main/resources/mapper/stock/StockWaitDetailsMapper.xml

@@ -18,7 +18,8 @@
             swd.update_time,
             swd.victoriatourist_json,
             swd.purchase_detail_id,
-            if(sw.business_type =2,(SELECT ptd.product_sn from bytesailing_mes.production_task_detail ptd where ptd.id=sw.business_id),'') as productSn,
+            if(sw.business_type =2,(SELECT ptd.product_sn from bytesailing_mes.production_task_detail ptd where ptd.id=sw.business_id),
+                (SELECT ptd.product_sn from bytesailing_mes.production_task_detail ptd where ptd.id=swd.production_task_detail_id)) as productSn,
             IF( sw.business_type = 2,( SELECT sc.customer_id FROM bytesailing_jxst.sales_contract sc
                 LEFT JOIN bytesailing_mes.work_order wo ON wo.source_id = sc.id AND wo.del_flag = 0
                 LEFT JOIN bytesailing_mes.production_plan pp ON pp.work_order_id = wo.id AND pp.del_flag = 0