| 
					
				 | 
			
			
				@@ -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); 
			 |