Преглед изворни кода

手工匹配 复制行逻辑添加

liuchaohui пре 2 година
родитељ
комит
a5bdb5a3bb

+ 5 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/orderData/controller/SySOAndOMController.java

@@ -171,7 +171,11 @@ public class SySOAndOMController extends JeecgController<SySOAndOM, ISySOAndOMSe
                     syOrderDataItem.setRSupplier(rsup.get(1));
                 }
             }
-            syOrderDataItem.setId(syOrderData.getAccount()+syOrderDataItem.getId());
+            if(sy.getCopyRow()==0){
+                syOrderDataItem.setId(syOrderData.getAccount()+syOrderDataItem.getId());
+            }else{
+                syOrderDataItem.setId(syOrderData.getAccount()+syOrderDataItem.getId()+"-"+sy.getCopyRow());
+            }
             syOrderDataItem.setSyOrderDataId(syOrderData.getAccount()+syOrderDataItem.getSyOrderDataId());
             syOrderDataItemService.save(syOrderDataItem);
         }

+ 8 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/orderData/entity/SySOAndOM.java

@@ -28,6 +28,10 @@ public class SySOAndOM {
     @Excel(name = "存货分类编码", width = 15)
     @ApiModelProperty(value = "存货分类编码")
     private java.lang.String inventoryCcode;
+    /**存货分类编码*/
+    @Excel(name = "数量", width = 15)
+    @ApiModelProperty(value = "数量")
+    private double quantity;
     /**存货名称*/
     @Excel(name = "存货名称", width = 15)
     @ApiModelProperty(value = "存货名称")
@@ -40,6 +44,10 @@ public class SySOAndOM {
     @Excel(name = "颜色", width = 15)
     @ApiModelProperty(value = "颜色")
     private java.lang.String colour;
+    /**复制行*/
+    @Excel(name = "复制行", width = 15)
+    @ApiModelProperty(value = "复制行")
+    private int copyRow;
 
     /**同步状态*/
     @Excel(name = "同步状态", width = 15)

+ 4 - 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/orderData/mapper/xml/SySOAndOMMapper.xml

@@ -6,7 +6,7 @@
         <if test="sy.account =='101'">
             select
             sm.cSOCode as orderNumber,sd.iRowNo,sd.cInvCode AS inventoryCode,c.cInvCcode AS inventoryCcode,
-            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,101 as account
+            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,sd.iQuantity as quantity,101 as account
             from UFDATA_101_2021.dbo.SO_SOMain sm
             join UFDATA_101_2021.dbo.SO_SODetails sd on sm.id=sd.id
             join UFDATA_101_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
@@ -16,7 +16,7 @@
         <if test="sy.account =='102'">
             select
             sm.cSOCode as orderNumber,sd.iRowNo,sd.cInvCode AS inventoryCode,c.cInvCcode AS inventoryCcode,
-            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,102 as account
+            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,sd.iQuantity as quantity,102 as account
             from UFDATA_102_2021.dbo.SO_SOMain sm
             join UFDATA_102_2021.dbo.SO_SODetails sd on sm.id=sd.id
             join UFDATA_102_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
@@ -26,7 +26,7 @@
         <if test="sy.account =='103'">
             select
             sm.cSOCode as orderNumber,sd.iRowNo,sd.cInvCode AS inventoryCode,c.cInvCcode AS inventoryCcode,
-            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,103 as account
+            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,sd.iQuantity as quantity,103 as account
             from UFDATA_103_2021.dbo.SO_SOMain sm
             join UFDATA_103_2021.dbo.SO_SODetails sd on sm.id=sd.id
             join UFDATA_103_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
@@ -37,7 +37,7 @@
 
     <select id="queryOMList" resultType="org.jeecg.modules.documents.orderData.entity.SySOAndOM" >
         select om.cCode,od.iVouchRowNo,od.cInvCode AS inventoryCode,
-            c.cInvName AS inventoryName,od.cFree1 AS colour,c.cInvStd as specificationAndModel
+            c.cInvName AS inventoryName,od.cFree1 AS colour,c.cInvStd as specificationAndModel,od.iQuantity as quantity
         from OM_MOMain om
         join OM_MODetails od on om.MOID =od.MOID
         join Inventory c on c.cInvCode=od.cInvCode