Browse Source

订单接口加字段

zengtx 2 năm trước cách đây
mục cha
commit
3447a7766a

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

@@ -96,15 +96,15 @@ public class MOMainController implements ApplicationContextAware {
                 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',ven.cVenDefine3 as 'supplierNumber',ven.cVenName as 'supplierName'," +
-                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenHand as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
                             "hr1.cPsn_Name as 'headerAttributeString10',mo.cMaker as 'customerContacts','采购业务实体名称' as poBusinessUnitCode," +
                             "'' as 'customerContactsPhone','0.00' as 'totalAmount','0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode'," +
                             "mo.iTaxRate as 'headerTaxRate',mo.dDate as 'customerDemandDate', mo.cMemo as 'remark',mo.dVerifyDate as dVerifyDate," +
-                            "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId'," +
+                            "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId',mo.cDefine11 as headerAttributeString13," +
                             "mo.cDefine5 as headerAttributeBigint2,ex.chdefine2 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
                             "mo.cVenAccount as headerAttributeString8,hr.cDept_num as 'headerAttributeString11',mo.cCurrentAuditor as headerAttributeString12," +
-                            "0 as 'totalAmount',mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3'," +
+                            "0 as 'totalAmount',mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3',de.cDepName as headerAttributeString14," +
                             "'' as 'headerAttributeString4'  from OM_MOMain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
                             " left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             " on mo.cMaker = hr.cPsn_Name " +
@@ -112,7 +112,8 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " left join OM_MOmain_extradefine ex on mo.MOID = ex.MOID"+
+                            " left join OM_MOmain_extradefine ex on mo.MOID = ex.MOID " +
+                            " left join Department de on hr.cDept_num = de.cDepCode "+
                             " 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";
 
                     List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
@@ -122,15 +123,15 @@ public class MOMainController implements ApplicationContextAware {
                 }else if(pkorgValue[0].equals("two")){
                     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',ven.cVenDefine3 as 'supplierNumber',ven.cVenName as 'supplierName'," +
-                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenHand as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
                             "hr1.cPsn_Name as 'headerAttributeString10',mo.cMaker as 'customerContacts','采购业务实体名称' as poBusinessUnitCode," +
                             "'' as 'customerContactsPhone','0.00' as 'totalAmount','0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode'," +
                             "mo.iTaxRate as 'headerTaxRate',mo.dDate as 'customerDemandDate', mo.cMemo as 'remark',mo.dVerifyDate as dVerifyDate," +
-                            "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId'," +
+                            "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId',mo.cDefine11 as headerAttributeString13," +
                             "mo.cDefine5 as headerAttributeBigint2,ex.chdefine2 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
                             "mo.cVenAccount as headerAttributeString8,hr.cDept_num as 'headerAttributeString11',mo.cCurrentAuditor as headerAttributeString12," +
-                            "0 as 'totalAmount',mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3'," +
+                            "0 as 'totalAmount',mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3',de.cDepName as headerAttributeString14," +
                             "'' as 'headerAttributeString4'  from OM_MOMain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
                             " left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             " on mo.cMaker = hr.cPsn_Name " +
@@ -138,7 +139,8 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " left join OM_MOmain_extradefine ex on mo.MOID = ex.MOID"+
+                            " left join OM_MOmain_extradefine ex on mo.MOID = ex.MOID " +
+                            " left join Department de on hr.cDept_num = de.cDepCode "+
                             " 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";
 
                     List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
@@ -148,15 +150,15 @@ public class MOMainController implements ApplicationContextAware {
                 }else if(pkorgValue[0].equals("three")){
                     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',ven.cVenDefine3 as 'supplierNumber',ven.cVenName as 'supplierName'," +
-                            "ven.cVenPerson as 'supplierContacts',ven.cVenBranchPhone as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenHand as 'supplierContactsPhone',mo.cPersonCode as 'salerCode',hr.cPsn_Num as 'headerAttributeString9'," +
                             "hr1.cPsn_Name as 'headerAttributeString10',mo.cMaker as 'customerContacts','采购业务实体名称' as poBusinessUnitCode," +
                             "'' as 'customerContactsPhone','0.00' as 'totalAmount','0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode'," +
                             "mo.iTaxRate as 'headerTaxRate',mo.dDate as 'customerDemandDate', mo.cMemo as 'remark',mo.dVerifyDate as dVerifyDate," +
-                            "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId'," +
+                            "'' as 'sourceDocNum',mo.cMaker as 'customerContacts',mo.dCreateTime  as 'publishDate',0 as 'tenantId',mo.cDefine11 as headerAttributeString13," +
                             "mo.cDefine5 as headerAttributeBigint2,ex.chdefine2 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
                             "mo.cVenAccount as headerAttributeString8,hr.cDept_num as 'headerAttributeString11',mo.cCurrentAuditor as headerAttributeString12," +
-                            "0 as 'totalAmount',mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3'," +
+                            "0 as 'totalAmount',mo.cCode as 'headerAttributeString2','' as 'headerAttributeString3',de.cDepName as headerAttributeString14," +
                             "'' as 'headerAttributeString4'  from OM_MOMain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
                             " left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
                             " on mo.cMaker = hr.cPsn_Name " +
@@ -164,7 +166,8 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " left join OM_MOmain_extradefine ex on mo.MOID = ex.MOID"+
+                            " left join OM_MOmain_extradefine ex on mo.MOID = ex.MOID " +
+                            " left join Department de on hr.cDept_num = de.cDepCode "+
                             " 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";
 
                     List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);

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

@@ -90,13 +90,13 @@ public class POPomainController implements ApplicationContextAware {
                     //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'," +
                             "ven.cVenDefine3 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',hr.cDept_num as 'headerAttributeString11'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenHand as 'supplierContactsPhone',hr.cDept_num as 'headerAttributeString11'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
-                            "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum'," +
+                            "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum',mo.cDefine11 as headerAttributeString13," +
                             "mo.cDefine5 as headerAttributeBigint2,ex.chdefine2 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
-                            "mo.cVenAccount as headerAttributeString8,mo.cCurrentAuditor as headerAttributeString12," +
+                            "mo.cVenAccount as headerAttributeString8,mo.cCurrentAuditor as headerAttributeString12,de.cDepName as headerAttributeString14," +
                             "mo.cMaker as 'customerContacts',hr1.cPsn_Name as headerAttributeString10,mo.cAuditDate as cAuditDate," +
                             " mo.cmaketime  as 'publishDate'  from PO_Pomain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
                             "left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
@@ -106,6 +106,7 @@ public class POPomainController implements ApplicationContextAware {
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
                             "left join PO_POmain_extradefine ex on mo.POID = ex.POID " +
+                            " left join Department de on hr.cDept_num = de.cDepCode "+
                             " 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";
                     List<Map<String, Object>> list = senYuDataSourceOne.queryForList(sql);
                     for(Map<String, Object> map:list){
@@ -116,13 +117,13 @@ public class POPomainController implements ApplicationContextAware {
                 else if(pkorgValue[0].equals("two")){
                     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'," +
                             "ven.cVenDefine3 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',hr.cDept_num as 'headerAttributeString11'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenHand as 'supplierContactsPhone',hr.cDept_num as 'headerAttributeString11'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
-                            "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum'," +
+                            "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum',mo.cDefine11 as headerAttributeString13," +
                             "mo.cDefine5 as headerAttributeBigint2,ex.chdefine2 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
-                            "mo.cVenAccount as headerAttributeString8,mo.cCurrentAuditor as headerAttributeString12," +
+                            "mo.cVenAccount as headerAttributeString8,mo.cCurrentAuditor as headerAttributeString12,de.cDepName as headerAttributeString14," +
                             "mo.cMaker as 'customerContacts',hr1.cPsn_Name as headerAttributeString10,mo.cAuditDate as cAuditDate," +
                             " mo.cmaketime  as 'publishDate'  from PO_Pomain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
                             "left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
@@ -132,6 +133,7 @@ public class POPomainController implements ApplicationContextAware {
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
                             "left join PO_POmain_extradefine ex on mo.POID = ex.POID " +
+                            " left join Department de on hr.cDept_num = de.cDepCode "+
                             "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";
                     List<Map<String, Object>> list = senYuDataSourceTwo.queryForList(sql);
                     for(Map<String, Object> map:list){
@@ -141,13 +143,13 @@ public class POPomainController implements ApplicationContextAware {
                 }else if(pkorgValue[0].equals("three")){
                     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'," +
                             "ven.cVenDefine3 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',hr.cDept_num as 'headerAttributeString11'," +
+                            "ven.cVenPerson as 'supplierContacts',ven.cVenHand as 'supplierContactsPhone',hr.cDept_num as 'headerAttributeString11'," +
                             "mo.cPOID as headerAttributeString2,'' as 'customerContactsPhone','0.00' as 'totalAmount'," +
                             "'0.00' as 'exTaxAmount', curr.cexch_code as 'currencyCode',mo.iTaxRate as 'headerTaxRate'," +
-                            "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum'," +
+                            "mo.dPODate as 'customerDemandDate', mo.cMemo as 'remark','' as 'sourceDocNum',mo.cDefine11 as headerAttributeString13," +
                             "mo.cDefine5 as headerAttributeBigint2,ex.chdefine2 as headerAttributeString1,mo.cDefine12 as headerAttributeString3," +
                             "mo.cDefine13 as headerAttributeString4,mo.cDefine14 as headerAttributeString5,mo.cVenBank as headerAttributeString7," +
-                            "mo.cVenAccount as headerAttributeString8,mo.cCurrentAuditor as headerAttributeString12," +
+                            "mo.cVenAccount as headerAttributeString8,mo.cCurrentAuditor as headerAttributeString12,de.cDepName as headerAttributeString14," +
                             "mo.cMaker as 'customerContacts',hr1.cPsn_Name as headerAttributeString10,mo.cAuditDate as cAuditDate," +
                             " mo.cmaketime  as 'publishDate'  from PO_Pomain mo left join Vendor ven on mo.cVenCode = ven.cVenCode " +
                             "left join (select cPsn_Num, cPsn_Name,cDept_num from hr_hi_person) hr " +
@@ -157,6 +159,7 @@ public class POPomainController implements ApplicationContextAware {
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
                             "left join PO_POmain_extradefine ex on mo.POID = ex.POID " +
+                            " left join Department de on hr.cDept_num = de.cDepCode "+
                             "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";
                     List<Map<String, Object>> list = iSenYuDataSourceThree.queryForList(sql);
                     for(Map<String, Object> map:list){