|
@@ -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() {
|
|
@@ -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" +
|
|
@@ -166,7 +168,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
if(pkorgValue[0].equals("one")){
|
|
|
list = senYuDataSourceOne.queryForList(sql);
|
|
|
}else if(pkorgValue[0].equals("two")){
|
|
|
-
|
|
|
+ list = senYuDataSourceTwo.queryForList(sql);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -217,10 +219,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 +244,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);
|
|
|
|