|
|
@@ -292,8 +292,8 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
if(sy2.getOmpoIdItem()==null || sy2.getOmpoIdItem().equals("")){
|
|
|
continue;
|
|
|
}
|
|
|
- if(sy2.getOmpoIdItem()!=null && sy.getAccount()!=null){
|
|
|
- List<String> rsup = queryRSupplier(sy2.getOmpoIdItem(),sy.getAccount());
|
|
|
+ if(sy2.getOmpoIdItem()!=null && sy.getAccount()!=null && sy2.getSupplier()!=null){
|
|
|
+ List<String> rsup = queryRSupplier(sy2.getOmpoIdItem(),sy.getAccount(),sy2.getSupplier());
|
|
|
if(rsup.size()>0){
|
|
|
sy2.setRSupplierCode(rsup.get(0));
|
|
|
sy2.setRSupplier(rsup.get(1));
|
|
|
@@ -335,8 +335,8 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
if(sy2.getOmpoIdItem()==null || sy2.getOmpoIdItem().equals("")){
|
|
|
continue;
|
|
|
}
|
|
|
- if(sy2.getOmpoIdItem()!=null && sy.getAccount()!=null){
|
|
|
- List<String> rsup = queryRSupplier(sy2.getOmpoIdItem(),sy.getAccount());
|
|
|
+ if(sy2.getOmpoIdItem()!=null && sy.getAccount()!=null && sy2.getSupplier()!=null){
|
|
|
+ List<String> rsup = queryRSupplier(sy2.getOmpoIdItem(),sy.getAccount(),sy2.getSupplier());
|
|
|
if(rsup.size()>0){
|
|
|
sy2.setRSupplierCode(rsup.get(0));
|
|
|
sy2.setRSupplier(rsup.get(1));
|
|
|
@@ -547,7 +547,7 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
/*
|
|
|
* 查询染厂供应商编码 供应商名称
|
|
|
* */
|
|
|
- public List<String> queryRSupplier(String id,String zhangtao){
|
|
|
+ public List<String> queryRSupplier(String id,String zhangtao,String supplier){
|
|
|
/*
|
|
|
查询账套用于判断
|
|
|
*/
|
|
|
@@ -566,6 +566,25 @@ public class SyOrderDataServiceImpl extends ServiceImpl<SyOrderDataMapper, SyOrd
|
|
|
index++;
|
|
|
}
|
|
|
|
|
|
+ List<Map<String, Object>> supplierList = new ArrayList<>();
|
|
|
+ String supplierSql="select cvccode from Vendor where cVenAbbName='"+supplier+"'";
|
|
|
+ String cvccode="";
|
|
|
+ if(zhangtao.equals(account[0])){
|
|
|
+ supplierList= senYuDataSourceOne.queryForList(supplierSql);
|
|
|
+ }else if(zhangtao.equals(account[1])){
|
|
|
+ supplierList= senYuDataSourceTwo.queryForList(supplierSql);
|
|
|
+ }else if(zhangtao.equals(account[2])){
|
|
|
+ supplierList= senYuDataSourceThree.queryForList(supplierSql);
|
|
|
+ }
|
|
|
+ List<JSONObject> supplierObjects = JsonChangeUtils.toJSONObject(supplierList);
|
|
|
+ if(supplierObjects.size()>0){
|
|
|
+ for (JSONObject json:supplierObjects) {
|
|
|
+ cvccode= (String) json.get("cvccode");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!cvccode.equals("0105")){
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
String sql = "select om.cVenCode as cVenCode,v.cVenAbbName as cVenName From OM_MODetails o " +
|
|
|
"join ( " +
|
|
|
" select ommos.isosid,ommom.cInvCode from " +
|