Browse Source

销售订单 强制同步接口

liuchaohui 2 years ago
parent
commit
0ca7e99768

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

@@ -34,16 +34,17 @@ public class SySOAndOMController extends JeecgController<SySOAndOM, ISySOAndOMSe
         if(sySOAndOM==null){
         if(sySOAndOM==null){
             return Result.error("请检查查询条件!!!");
             return Result.error("请检查查询条件!!!");
         }
         }
+        if(sySOAndOM.getOrderNumber()==null && sySOAndOM.getOrderNumber().equals("")){
+            return Result.error("请输入订单号!!!");
+        }
         if(sySOAndOM.getAccount().equals("901") || sySOAndOM.getAccount().equals("902") ||
         if(sySOAndOM.getAccount().equals("901") || sySOAndOM.getAccount().equals("902") ||
                 sySOAndOM.getAccount().equals("903")){
                 sySOAndOM.getAccount().equals("903")){
+            Page<SySOAndOM> page = new Page<SySOAndOM>(pageNo, pageSize);
+            IPage<SySOAndOM> pageList = sySOAndOMService.querySOList(sySOAndOM,page);
+            return Result.OK(pageList);
+        }else {
             return Result.error("请选择账套号!!!");
             return Result.error("请选择账套号!!!");
         }
         }
-        if(sySOAndOM.getOrderNumber()==null && sySOAndOM.getOrderNumber().equals("")){
-            return Result.error("请输入订单号!!!");
-        }
-        Page<SySOAndOM> page = new Page<SySOAndOM>(pageNo, pageSize);
-        IPage<SySOAndOM> pageList = sySOAndOMService.querySOList(sySOAndOM,page);
-        return Result.OK(pageList);
     }
     }
 
 
     @AutoLog(value = "订单数据同步接口-分页列表查询委外订单")
     @AutoLog(value = "订单数据同步接口-分页列表查询委外订单")

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

@@ -3,7 +3,7 @@
 <mapper namespace="org.jeecg.modules.documents.orderData.mapper.SySOAndOMMapper">
 <mapper namespace="org.jeecg.modules.documents.orderData.mapper.SySOAndOMMapper">
 
 
     <select id="querySOList" resultType="org.jeecg.modules.documents.orderData.entity.SySOAndOM" >
     <select id="querySOList" resultType="org.jeecg.modules.documents.orderData.entity.SySOAndOM" >
-        <if test="sy.account !='901'">
+        <if test="sy.account =='901'">
             select
             select
             sm.cSOCode as orderNumber,sd.iRowNo,sd.cInvCode AS inventoryCode,c.cInvCcode AS inventoryCcode,
             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
             c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,901 as account
@@ -12,7 +12,7 @@
             join UFDATA_901_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
             join UFDATA_901_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
             where sm.csocode=#{sy.orderNumber}
             where sm.csocode=#{sy.orderNumber}
         </if>
         </if>
-        <if test="sy.account !='902'">
+        <if test="sy.account =='902'">
             select
             select
             sm.cSOCode as orderNumber,sd.iRowNo,sd.cInvCode AS inventoryCode,c.cInvCcode AS inventoryCcode,
             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
             c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,902 as account
@@ -21,7 +21,7 @@
             join UFDATA_902_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
             join UFDATA_902_2021.dbo.Inventory c on c.cInvCode=sd.cInvCode
             where sm.csocode=#{sy.orderNumber}
             where sm.csocode=#{sy.orderNumber}
         </if>
         </if>
-        <if test="sy.account !='903'">
+        <if test="sy.account =='903'">
             select
             select
             sm.cSOCode as orderNumber,sd.iRowNo,sd.cInvCode AS inventoryCode,c.cInvCcode AS inventoryCcode,
             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
             c.cInvName AS inventoryName,sd.cFree1 AS colour,c.cInvStd as specificationAndModel,903 as account