Browse Source

变更时间的订单不传

zengtx 3 years ago
parent
commit
a7bac08597

+ 5 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/MOMainController.java

@@ -92,8 +92,8 @@ public class MOMainController implements ApplicationContextAware {
             for (String str : pkorgSplit) {
                 String pkorgStr = str;
                 String pkorgValue[] = pkorgStr.split(":");
-                String ac = pkorgValue[1];
-                if (pkorgValue[0].equals("one")) {//mo.cPersonCode as 'salerId',hr.cPsn_Num as 'buyerId',
+                String ac = pkorgValue[1]; //or mo.dChangeVerifyTime >'"+lasttimeSf+"'
+                if (pkorgValue[0].equals("one")) {
                     String sql = "select mo.MOID as 'moId',mo.MOID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus'," +
                             "mo.cCode as 'poNum','SUBCONTRACTOR_PO' as 'poType',mo.cVenCode as 'supplierNumber',ven.cVenName as 'supplierName'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
@@ -112,7 +112,7 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " where  mo.iVerifyStateNew = 2 and ((mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"' and cDefine16 is null) or (mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"' and cDefine16 =1))  order by mo.dCreateTime desc";
+                            " where  mo.iVerifyStateNew = 2 and ((mo.dVerifyTime>'"+lasttimeSf+"'  and cDefine16 is null) or (mo.dVerifyTime>'"+lasttimeSf+"' and cDefine16 =1)) and mo.dChangeVerifyTime is null  order by mo.dCreateTime desc";
 
                     List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
                     for(Map<String, Object> map:list){
@@ -137,7 +137,7 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " where  mo.iVerifyStateNew = 2 and ((mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"' and cDefine16 is null) or (mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"' and cDefine16 =1))  order by mo.dCreateTime desc";
+                            " where  mo.iVerifyStateNew = 2 and ((mo.dVerifyTime>'"+lasttimeSf+"'  and cDefine16 is null) or (mo.dVerifyTime>'"+lasttimeSf+"'  and cDefine16 =1))  and mo.dChangeVerifyTime is null order by mo.dCreateTime desc";
 
                     List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
                     for(Map<String, Object> map:list){
@@ -162,7 +162,7 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " where  mo.iVerifyStateNew = 2 and ((mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"' and cDefine16 is null) or (mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"' and cDefine16 =1))  order by mo.dCreateTime desc";
+                            " where  mo.iVerifyStateNew = 2 and ((mo.dVerifyTime>'"+lasttimeSf+"'  and cDefine16 is null) or (mo.dVerifyTime>'"+lasttimeSf+"'  and cDefine16 =1))  and mo.dChangeVerifyTime is null order by mo.dCreateTime desc";
 
                     List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);
                     for(Map<String, Object> map:list){

+ 4 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/controller/POPomainController.java

@@ -87,8 +87,7 @@ public class POPomainController implements ApplicationContextAware {
                 String pkorgValue[] = pkorgStr.split(":");
                 String ac = pkorgValue[1];
                 if (pkorgValue[0].equals("one")) {
-                    //ven.cVenName,mo.cVenCode mo.cPersonCode as salerId,hr.cPsn_Num as 'buyerId',
-                    //cAuditTime>'"+lasttimeSf+"' and mo.iverifystateex = 2
+                    //or cChangAuditTime >'"+lasttimeSf+"'
                     String sql = "select mo.POID as 'moId','"+ac+"' as accId,'"+pkorgValue[0]+"' as pkorg,mo.cState as 'poStatus',mo.cPOID as 'poNum','STANDARD_PO' as 'poType'," +
                             "mo.cVenCode as 'supplierNumber','采购业务实体名称' as 'poBusinessUnitCode',ven.cVenName as 'supplierName',mo.cPersonCode as salerCode,hr.cPsn_Num as 'headerAttributeString9'," +
                             "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone'," +
@@ -106,7 +105,7 @@ public class POPomainController implements ApplicationContextAware {
                             "on mo.cPersonCode = hr1.cPsn_Num " +
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
-                            "where ((cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"' and cDefine16 is null) or(cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"' and cDefine16 = 1)) and mo.iverifystateex = 2 order by mo.cAuditTime desc";
+                            "where ((cAuditTime>'"+lasttimeSf+"' and cDefine16 is null) or(cAuditTime>'"+lasttimeSf+"' and cDefine16 = 1)) and mo.iverifystateex = 2 and mo.cChangAuditTime is null order by mo.cAuditTime desc";
                     List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
                     for(Map<String, Object> map:list){
                         sumlist.add(map);
@@ -131,7 +130,7 @@ public class POPomainController implements ApplicationContextAware {
                             "on mo.cPersonCode = hr1.cPsn_Num " +
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
-                            "where ((cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"' and cDefine16 is null) or(cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"' and cDefine16 = 1)) and mo.iverifystateex = 2 order by mo.cAuditTime desc";
+                            "where ((cAuditTime>'"+lasttimeSf+"' and cDefine16 is null) or(cAuditTime>'"+lasttimeSf+"' and cDefine16 = 1)) and mo.iverifystateex = 2  and mo.cChangAuditTime is null order by mo.cAuditTime desc";
                     List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
                     for(Map<String, Object> map:list){
                         sumlist.add(map);
@@ -155,7 +154,7 @@ public class POPomainController implements ApplicationContextAware {
                             "on mo.cPersonCode = hr1.cPsn_Num " +
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
-                            "where ((cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"' and cDefine16 is null) or(cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"' and cDefine16 = 1)) and mo.iverifystateex = 2 order by mo.cAuditTime desc";
+                            "where ((cAuditTime>'"+lasttimeSf+"' and cDefine16 is null) or(cAuditTime>'"+lasttimeSf+"' and cDefine16 = 1)) and mo.iverifystateex = 2  and mo.cChangAuditTime is null order by mo.cAuditTime desc";
                     List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);
                     for(Map<String, Object> map:list){
                         sumlist.add(map);