Pārlūkot izejas kodu

手工匹配 正式服账套号配置

liuchaohui 2 gadi atpakaļ
vecāks
revīzija
15daafc55b

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

@@ -3,33 +3,33 @@
 <mapper namespace="org.jeecg.modules.documents.orderData.mapper.SySOAndOMMapper">
 
     <select id="querySOList" resultType="org.jeecg.modules.documents.orderData.entity.SySOAndOM" >
-        <if test="sy.account =='901'">
+        <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,901 as account
-            from UFDATA_901_2021.dbo.SO_SOMain sm
-            join UFDATA_901_2021.dbo.SO_SODetails sd on sm.id=sd.id
-            join UFDATA_901_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
+            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,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
             where sm.csocode=#{sy.orderNumber}
             order BY c.cInvName,sd.cFree1
         </if>
-        <if test="sy.account =='902'">
+        <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,902 as account
-            from UFDATA_902_2021.dbo.SO_SOMain sm
-            join UFDATA_902_2021.dbo.SO_SODetails sd on sm.id=sd.id
-            join UFDATA_902_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
+            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,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
             where sm.csocode=#{sy.orderNumber}
             order BY c.cInvName,sd.cFree1
         </if>
-        <if test="sy.account =='903'">
+        <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,903 as account
-            from UFDATA_903_2021.dbo.SO_SOMain sm
-            join UFDATA_903_2021.dbo.SO_SODetails sd on sm.id=sd.id
-            join UFDATA_903_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
+            c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,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
             where sm.csocode=#{sy.orderNumber}
             order BY c.cInvName,sd.cFree1
         </if>
@@ -46,7 +46,7 @@
     </select>
 
     <select id="queryOrderByCode" resultType="org.jeecg.modules.documents.orderData.entity.SyOrderData" >
-        <if test="sy.account =='901'">
+        <if test="sy.account =='101'">
             SELECT
             s.ID AS id,s.cSOCode AS orderNumber,s.dDate AS orderDate,s.cBusType AS businessTypeValue,
             s.cSTCode AS salesTypeValue,t.cSTName AS salesTypeText,cc.cCusAbbName AS customerAbbreviation,
@@ -56,22 +56,22 @@
             s.fbookratio AS depositRatio,s.iMoney AS deposit,s.cMemo AS orderRemarks,
             s.cDefine14 AS orderChangeDescription,s.cDefine12 AS garmentFactory,v.cVenCode AS garmentFactoryCode,
             s.cDefine5 AS garmentNmb,s.cMemo AS memo,f.chdefine4 AS priceRemarks,f.chdefine1 AS collaborativeRoute,
-            y.cexch_code AS currencyValue,p.cPayName AS termOfPayment,'901' AS account
+            y.cexch_code AS currencyValue,p.cPayName AS termOfPayment,'101' AS account
             FROM
-            UFDATA_901_2021.dbo.SO_SOMain s
-            LEFT JOIN UFDATA_901_2021.dbo.SO_SOMain_extradefine f ON s.ID = f.ID
-            LEFT JOIN UFDATA_901_2021.dbo.SaleType t ON s.cSTCode = t.cSTCode
-            LEFT JOIN UFDATA_901_2021.dbo.foreigncurrency y ON s.cexch_name = y.cexch_name
-            LEFT JOIN UFDATA_901_2021.dbo.PayCondition p ON s.cPayCode = p.cPayCode
-            LEFT JOIN UFDATA_901_2021.dbo.Department de ON s.cDepCode = de.cDepCode
-            LEFT JOIN UFDATA_901_2021.dbo.Customer cc ON s.cCusCode = cc.cCusCode
-            LEFT JOIN UFDATA_901_2021.dbo.Person pe ON s.cPersonCode = pe.cPersonCode
-            LEFT JOIN UFDATA_901_2021.dbo.Vendor v ON s.cDefine12 = v.cVenName
+            UFDATA_101_2021.dbo.SO_SOMain s
+            LEFT JOIN UFDATA_101_2021.dbo.SO_SOMain_extradefine f ON s.ID = f.ID
+            LEFT JOIN UFDATA_101_2021.dbo.SaleType t ON s.cSTCode = t.cSTCode
+            LEFT JOIN UFDATA_101_2021.dbo.foreigncurrency y ON s.cexch_name = y.cexch_name
+            LEFT JOIN UFDATA_101_2021.dbo.PayCondition p ON s.cPayCode = p.cPayCode
+            LEFT JOIN UFDATA_101_2021.dbo.Department de ON s.cDepCode = de.cDepCode
+            LEFT JOIN UFDATA_101_2021.dbo.Customer cc ON s.cCusCode = cc.cCusCode
+            LEFT JOIN UFDATA_101_2021.dbo.Person pe ON s.cPersonCode = pe.cPersonCode
+            LEFT JOIN UFDATA_101_2021.dbo.Vendor v ON s.cDefine12 = v.cVenName
             WHERE
             s.iStatus = 1
             AND s.cSOCode = #{sy.orderNumber}
         </if>
-        <if test="sy.account =='902'">
+        <if test="sy.account =='102'">
             SELECT
             s.ID AS id,s.cSOCode AS orderNumber,s.dDate AS orderDate,s.cBusType AS businessTypeValue,
             s.cSTCode AS salesTypeValue,t.cSTName AS salesTypeText,cc.cCusAbbName AS customerAbbreviation,
@@ -81,22 +81,22 @@
             s.fbookratio AS depositRatio,s.iMoney AS deposit,s.cMemo AS orderRemarks,
             s.cDefine14 AS orderChangeDescription,s.cDefine12 AS garmentFactory,v.cVenCode AS garmentFactoryCode,
             s.cDefine5 AS garmentNmb,s.cMemo AS memo,f.chdefine4 AS priceRemarks,f.chdefine1 AS collaborativeRoute,
-            y.cexch_code AS currencyValue,p.cPayName AS termOfPayment,'902' AS account
+            y.cexch_code AS currencyValue,p.cPayName AS termOfPayment,'102' AS account
             FROM
-            UFDATA_902_2021.dbo.SO_SOMain s
-            LEFT JOIN UFDATA_902_2021.dbo.SO_SOMain_extradefine f ON s.ID = f.ID
-            LEFT JOIN UFDATA_902_2021.dbo.SaleType t ON s.cSTCode = t.cSTCode
-            LEFT JOIN UFDATA_902_2021.dbo.foreigncurrency y ON s.cexch_name = y.cexch_name
-            LEFT JOIN UFDATA_902_2021.dbo.PayCondition p ON s.cPayCode = p.cPayCode
-            LEFT JOIN UFDATA_902_2021.dbo.Department de ON s.cDepCode = de.cDepCode
-            LEFT JOIN UFDATA_902_2021.dbo.Customer cc ON s.cCusCode = cc.cCusCode
-            LEFT JOIN UFDATA_902_2021.dbo.Person pe ON s.cPersonCode = pe.cPersonCode
-            LEFT JOIN UFDATA_902_2021.dbo.Vendor v ON s.cDefine12 = v.cVenName
+            UFDATA_102_2021.dbo.SO_SOMain s
+            LEFT JOIN UFDATA_102_2021.dbo.SO_SOMain_extradefine f ON s.ID = f.ID
+            LEFT JOIN UFDATA_102_2021.dbo.SaleType t ON s.cSTCode = t.cSTCode
+            LEFT JOIN UFDATA_102_2021.dbo.foreigncurrency y ON s.cexch_name = y.cexch_name
+            LEFT JOIN UFDATA_102_2021.dbo.PayCondition p ON s.cPayCode = p.cPayCode
+            LEFT JOIN UFDATA_102_2021.dbo.Department de ON s.cDepCode = de.cDepCode
+            LEFT JOIN UFDATA_102_2021.dbo.Customer cc ON s.cCusCode = cc.cCusCode
+            LEFT JOIN UFDATA_102_2021.dbo.Person pe ON s.cPersonCode = pe.cPersonCode
+            LEFT JOIN UFDATA_102_2021.dbo.Vendor v ON s.cDefine12 = v.cVenName
             WHERE
             s.iStatus = 1
             AND s.cSOCode = #{sy.orderNumber}
         </if>
-        <if test="sy.account =='903'">
+        <if test="sy.account =='103'">
             SELECT
             s.ID AS id,s.cSOCode AS orderNumber,s.dDate AS orderDate,s.cBusType AS businessTypeValue,
             s.cSTCode AS salesTypeValue,t.cSTName AS salesTypeText,cc.cCusAbbName AS customerAbbreviation,
@@ -106,17 +106,17 @@
             s.fbookratio AS depositRatio,s.iMoney AS deposit,s.cMemo AS orderRemarks,
             s.cDefine14 AS orderChangeDescription,s.cDefine12 AS garmentFactory,v.cVenCode AS garmentFactoryCode,
             s.cDefine5 AS garmentNmb,s.cMemo AS memo,f.chdefine4 AS priceRemarks,f.chdefine1 AS collaborativeRoute,
-            y.cexch_code AS currencyValue,p.cPayName AS termOfPayment,'903' AS account
+            y.cexch_code AS currencyValue,p.cPayName AS termOfPayment,'103' AS account
             FROM
-            UFDATA_903_2021.dbo.SO_SOMain s
-            LEFT JOIN UFDATA_903_2021.dbo.SO_SOMain_extradefine f ON s.ID = f.ID
-            LEFT JOIN UFDATA_903_2021.dbo.SaleType t ON s.cSTCode = t.cSTCode
-            LEFT JOIN UFDATA_903_2021.dbo.foreigncurrency y ON s.cexch_name = y.cexch_name
-            LEFT JOIN UFDATA_903_2021.dbo.PayCondition p ON s.cPayCode = p.cPayCode
-            LEFT JOIN UFDATA_903_2021.dbo.Department de ON s.cDepCode = de.cDepCode
-            LEFT JOIN UFDATA_903_2021.dbo.Customer cc ON s.cCusCode = cc.cCusCode
-            LEFT JOIN UFDATA_903_2021.dbo.Person pe ON s.cPersonCode = pe.cPersonCode
-            LEFT JOIN UFDATA_903_2021.dbo.Vendor v ON s.cDefine12 = v.cVenName
+            UFDATA_103_2021.dbo.SO_SOMain s
+            LEFT JOIN UFDATA_103_2021.dbo.SO_SOMain_extradefine f ON s.ID = f.ID
+            LEFT JOIN UFDATA_103_2021.dbo.SaleType t ON s.cSTCode = t.cSTCode
+            LEFT JOIN UFDATA_103_2021.dbo.foreigncurrency y ON s.cexch_name = y.cexch_name
+            LEFT JOIN UFDATA_103_2021.dbo.PayCondition p ON s.cPayCode = p.cPayCode
+            LEFT JOIN UFDATA_103_2021.dbo.Department de ON s.cDepCode = de.cDepCode
+            LEFT JOIN UFDATA_103_2021.dbo.Customer cc ON s.cCusCode = cc.cCusCode
+            LEFT JOIN UFDATA_103_2021.dbo.Person pe ON s.cPersonCode = pe.cPersonCode
+            LEFT JOIN UFDATA_103_2021.dbo.Vendor v ON s.cDefine12 = v.cVenName
             WHERE
             s.iStatus = 1
             AND s.cSOCode = #{sy.orderNumber}
@@ -124,7 +124,7 @@
     </select>
 
     <select id="queryOrderItemByCode" resultType="org.jeecg.modules.documents.orderData.entity.SyOrderDataItem" >
-        <if test="sy.account =='901'">
+        <if test="sy.account =='101'">
             SELECT
             s.AutoID AS id,s.ID AS syOrderDataId,s.cDefine22 AS itemNumber,s.dPreDate AS preDeliveryDate,
             s.dPreMoDate AS preCompletionDate,s.cDefine32 AS packId,s.cDefine28 AS smallPo,
@@ -139,15 +139,15 @@
             AS numberOfSets,
             s.cSCloser AS bankClosedBy,be.cbdefine2 AS ymoney
             FROM
-            UFDATA_901_2021.dbo.SO_SODetails s
-            JOIN UFDATA_901_2021.dbo.SO_SOMain sm on sm.id=s.id
-            LEFT JOIN UFDATA_901_2021.dbo.Inventory c ON c.cInvCode= s.cInvCode
-            LEFT JOIN UFDATA_901_2021.dbo.ComputationUnit d ON d.cComunitCode= c.cComUnitCode
-            LEFT JOIN UFDATA_901_2021.dbo.SO_SODetails_extradefine be ON be.iSOsID= s.iSOsID
+            UFDATA_101_2021.dbo.SO_SODetails s
+            JOIN UFDATA_101_2021.dbo.SO_SOMain sm on sm.id=s.id
+            LEFT JOIN UFDATA_101_2021.dbo.Inventory c ON c.cInvCode= s.cInvCode
+            LEFT JOIN UFDATA_101_2021.dbo.ComputationUnit d ON d.cComunitCode= c.cComUnitCode
+            LEFT JOIN UFDATA_101_2021.dbo.SO_SODetails_extradefine be ON be.iSOsID= s.iSOsID
             WHERE
             sm.csocode=#{sy.orderNumber} and sd.iRowNo=#{sy.iRowNo}
         </if>
-        <if test="sy.account =='902'">
+        <if test="sy.account =='102'">
             SELECT
             s.AutoID AS id,s.ID AS syOrderDataId,s.cDefine22 AS itemNumber,s.dPreDate AS preDeliveryDate,
             s.dPreMoDate AS preCompletionDate,s.cDefine32 AS packId,s.cDefine28 AS smallPo,
@@ -162,15 +162,15 @@
             AS numberOfSets,
             s.cSCloser AS bankClosedBy,be.cbdefine2 AS ymoney
             FROM
-            UFDATA_902_2021.dbo.SO_SODetails s
-            JOIN UFDATA_902_2021.dbo.SO_SOMain sm on sm.id=s.id
-            LEFT JOIN UFDATA_902_2021.dbo.Inventory c ON c.cInvCode= s.cInvCode
-            LEFT JOIN UFDATA_902_2021.dbo.ComputationUnit d ON d.cComunitCode= c.cComUnitCode
-            LEFT JOIN UFDATA_902_2021.dbo.SO_SODetails_extradefine be ON be.iSOsID= s.iSOsID
+            UFDATA_102_2021.dbo.SO_SODetails s
+            JOIN UFDATA_102_2021.dbo.SO_SOMain sm on sm.id=s.id
+            LEFT JOIN UFDATA_102_2021.dbo.Inventory c ON c.cInvCode= s.cInvCode
+            LEFT JOIN UFDATA_102_2021.dbo.ComputationUnit d ON d.cComunitCode= c.cComUnitCode
+            LEFT JOIN UFDATA_102_2021.dbo.SO_SODetails_extradefine be ON be.iSOsID= s.iSOsID
             WHERE
             sm.csocode=#{sy.orderNumber} and sd.iRowNo=#{sy.iRowNo}
         </if>
-        <if test="sy.account =='903'">
+        <if test="sy.account =='103'">
             SELECT
             s.AutoID AS id,s.ID AS syOrderDataId,s.cDefine22 AS itemNumber,s.dPreDate AS preDeliveryDate,
             s.dPreMoDate AS preCompletionDate,s.cDefine32 AS packId,s.cDefine28 AS smallPo,
@@ -185,25 +185,25 @@
             AS numberOfSets,
             s.cSCloser AS bankClosedBy,be.cbdefine2 AS ymoney
             FROM
-            UFDATA_903_2021.dbo.SO_SODetails s
-            JOIN UFDATA_903_2021.dbo.SO_SOMain sm on sm.id=s.id
-            LEFT JOIN UFDATA_903_2021.dbo.Inventory c ON c.cInvCode= s.cInvCode
-            LEFT JOIN UFDATA_903_2021.dbo.ComputationUnit d ON d.cComunitCode= c.cComUnitCode
-            LEFT JOIN UFDATA_903_2021.dbo.SO_SODetails_extradefine be ON be.iSOsID= s.iSOsID
+            UFDATA_103_2021.dbo.SO_SODetails s
+            JOIN UFDATA_103_2021.dbo.SO_SOMain sm on sm.id=s.id
+            LEFT JOIN UFDATA_103_2021.dbo.Inventory c ON c.cInvCode= s.cInvCode
+            LEFT JOIN UFDATA_103_2021.dbo.ComputationUnit d ON d.cComunitCode= c.cComUnitCode
+            LEFT JOIN UFDATA_103_2021.dbo.SO_SODetails_extradefine be ON be.iSOsID= s.iSOsID
             WHERE
             sm.csocode=#{sy.orderNumber} and s.iRowNo=#{sy.iRowNo}
         </if>
     </select>
 
     <update id="updateSO" >
-        <if test="sy.account =='901'">
-            UPDATE UFDATA_901_2021.dbo.SO_SOMain SET cdefine15 = #{sy.flag} WHERE cSOCode = #{sy.orderNumber}
+        <if test="sy.account =='101'">
+            UPDATE UFDATA_101_2021.dbo.SO_SOMain SET cdefine15 = #{sy.flag} WHERE cSOCode = #{sy.orderNumber}
         </if>
-        <if test="sy.account =='902'">
-            UPDATE UFDATA_902_2021.dbo.SO_SOMain SET cdefine15 = #{sy.flag} WHERE cSOCode = #{sy.orderNumber}
+        <if test="sy.account =='102'">
+            UPDATE UFDATA_102_2021.dbo.SO_SOMain SET cdefine15 = #{sy.flag} WHERE cSOCode = #{sy.orderNumber}
         </if>
-        <if test="sy.account =='903'">
-            UPDATE UFDATA_903_2021.dbo.SO_SOMain SET cdefine15 = #{sy.flag} WHERE cSOCode = #{sy.orderNumber}
+        <if test="sy.account =='103'">
+            UPDATE UFDATA_103_2021.dbo.SO_SOMain SET cdefine15 = #{sy.flag} WHERE cSOCode = #{sy.orderNumber}
         </if>
     </update>
 
@@ -212,7 +212,7 @@
             om.cCode as ompoCode,om.MOID as ompoId,od.MODetailsID as ompoIdItem,
                             v.cVenAbbName as supplier,
             od.cDefine23  as guangpeiGateWidth,od.dArriveDate,
-            om.cVenCode as supplierCode,od.iTaxPrice,'903' as ompoAccount
+            om.cVenCode as supplierCode,od.iTaxPrice,'103' as ompoAccount
         FROM OM_MOMain om
         LEFT JOIN OM_MODetails od on om.MOID=od.MOID
         LEFT JOIN Vendor v on om.cVenCode=v.cVenCode