| 
					
				 | 
			
			
				@@ -12,6 +12,7 @@ import org.jeecg.modules.documents.orderData.service.ISyOrderDataService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.openApi.entity.DxpDataPlan; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.openApi.service.IDxpDataPlanService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.openApi.service.ISenYuDataSourceOne; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.jeecg.modules.openApi.service.ISenYuDataSourceTwo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.jeecg.modules.system.util.JsonChangeUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.BeansException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,6 +47,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private static ISyOrderDataItemService syOrderDataItemService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     //数据源one 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private static ISenYuDataSourceOne senYuDataSourceOne; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private static ISenYuDataSourceTwo senYuDataSourceTwo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void doQuerySyOrder() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -134,7 +136,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "cc.cCusName AS customerName," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.iExchRate AS exchangeRate," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "de.cDepName AS salesDepartment," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "s.cCrmpersonName AS salesman," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "pe.cPersonName  AS salesman," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.cexch_name AS currencyText," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.cdefine2 as brandSide," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "s.cdefine1 as thirdParty," + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -151,8 +153,8 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "f.chdefine4 AS priceRemarks," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "f.chdefine1 AS collaborativeRoute," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         "y.cexch_code AS currencyValue," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "p.cPayName AS termOfPayment," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        "903 AS account " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        "p.cPayName AS termOfPayment," +account+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        " AS account " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " FROM" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " SO_SOMain s" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " LEFT JOIN SO_SOMain_extradefine f ON s.ID = f.ID" + 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -161,12 +163,13 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " LEFT JOIN PayCondition p ON s.cPayCode = p.cPayCode" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " LEFT JOIN Department de ON s.cDepCode = de.cDepCode" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " LEFT JOIN Customer cc ON s.cCusCode = cc.cCusCode" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        " LEFT JOIN Person  pe ON s.cPersonCode = pe.cPersonCode" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " left join Vendor v on s.cCusCode=v.cVenCode where s.dDate > '"+lastTimeSf+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<Map<String, Object>> list = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if(pkorgValue[0].equals("one")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     list = senYuDataSourceOne.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 }else if(pkorgValue[0].equals("two")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    list = senYuDataSourceTwo.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -217,10 +220,10 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " left join ComputationUnit d on d.cComunitCode=c.cComUnitCode"+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         " where s.ID = "+ID; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<Map<String, Object>> listSon = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(sy.getAccount().equals("903")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if(sy.getAccount().equals("901")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     listSon = senYuDataSourceOne.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }else if(sy.getAccount().equals("888")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }else if(sy.getAccount().equals("902")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    listSon = senYuDataSourceTwo.queryForList(sql); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 List<JSONObject> jianSon = JsonChangeUtils.toJSONObject(listSon); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (JSONObject Object:jianSon) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -242,6 +245,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.dxpDataPlanService = applicationContext.getBean(IDxpDataPlanService.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.senYuDataSourceOne = applicationContext.getBean(ISenYuDataSourceOne.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        this.senYuDataSourceTwo = applicationContext.getBean(ISenYuDataSourceTwo.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.syOrderDataItemService = applicationContext.getBean(SyOrderDataItemServiceImpl.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.syOrderDataMapper = applicationContext.getBean(SyOrderDataMapper.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |