Przeglądaj źródła

Merge remote-tracking branch 'origin/master'

wanfa99 2 lat temu
rodzic
commit
c48eb771d6

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

@@ -112,7 +112,7 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " where  mo.iVerifyStateNew = 2 and (mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"') and cDefine16 is null  order by mo.dCreateTime desc";
+                            " 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);
                     for(Map<String, Object> map:list){
@@ -137,7 +137,7 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " where  mo.iVerifyStateNew = 2 and (mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"') and cDefine16 is null  order by mo.dCreateTime desc";
+                            " 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);
                     for(Map<String, Object> map:list){
@@ -162,7 +162,7 @@ public class MOMainController implements ApplicationContextAware {
                             " on mo.cPersonCode = hr1.cPsn_Num " +
                             " left join foreigncurrency curr " +
                             " on mo.cexch_name = curr.cexch_name " +
-                            " where  mo.iVerifyStateNew = 2 and (mo.dVerifyTime>'"+lasttimeSf+"' or mo.dChangeVerifyTime >'"+lasttimeSf+"') and cDefine16 is null  order by mo.dCreateTime desc";
+                            " 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);
                     for(Map<String, Object> map:list){

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

@@ -106,7 +106,7 @@ public class POPomainController implements ApplicationContextAware {
                             "on mo.cPersonCode = hr1.cPsn_Num " +
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
-                            "where (cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"') and mo.iverifystateex = 2 and cDefine16 is null order by mo.cAuditTime desc";
+                            "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){
                         sumlist.add(map);
@@ -131,7 +131,7 @@ public class POPomainController implements ApplicationContextAware {
                             "on mo.cPersonCode = hr1.cPsn_Num " +
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
-                            "where (cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"') and mo.iverifystateex = 2 and cDefine16 is null order by mo.cAuditTime desc";
+                            "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){
                         sumlist.add(map);
@@ -155,7 +155,7 @@ public class POPomainController implements ApplicationContextAware {
                             "on mo.cPersonCode = hr1.cPsn_Num " +
                             "left join foreigncurrency curr " +
                             "on mo.cexch_name = curr.cexch_name " +
-                            "where (cAuditTime>'"+lasttimeSf+"' or cChangAuditTime >'"+lasttimeSf+"') and mo.iverifystateex = 2 and cDefine16 is null order by mo.cAuditTime desc";
+                            "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){
                         sumlist.add(map);

+ 19 - 19
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/service/impl/PurchaseWarehousingServiceImpl.java

@@ -265,21 +265,21 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
                 }
                 this.baseMapper.saveRdRecord01One(map);
                 //调拨单
-                //是否委外入库 判断接收方是否有只值 宁波森语 马菲羊 森语集团
-//                if(map.get("cVenCodeReceiver")!=null&&!String.valueOf(map.get("cVenCodeReceiver")).equals("")){
-//                    //根据接收方获取供应商信息
-//                    Map<String,Object> mapVenCode= this.baseMapper.getWhCodeByVenCode(String.valueOf(map.get("cVenCodeReceiver")));
-//                    if(mapVenCode!=null){
-//                        String cVenAbbName=String.valueOf(mapVenCode.get("cVenAbbName"));//供应商简称
-//                        //判断是否外部供应商  外部则进入下一波做调拨单 非则不做
-//                        if(!cVenAbbName.equals("宁波森语")&&!cVenAbbName.equals("马菲羊")&&!cVenAbbName.equals("森语集团")){
-//                            //保存调拨单
-//                            saveTransVouch(map,itemList);
-//                        }
-//                    }else{
-//                        throw new RuntimeException("未能找到接收方信息");
-//                    }
-//                }
+                //判断接收方是否有只值 宁波森语 马菲羊 森语集团
+                if(map.get("cVenCodeReceiver")!=null&&!String.valueOf(map.get("cVenCodeReceiver")).equals("")){
+                    //根据接收方获取供应商信息
+                    Map<String,Object> mapVenCode= this.baseMapper.getWhCodeByVenCode(String.valueOf(map.get("cVenCodeReceiver")));
+                    if(mapVenCode!=null){
+                        String cVenAbbName=String.valueOf(mapVenCode.get("cVenAbbName"));//供应商简称
+                        //判断是否外部供应商  外部则进入下一波做调拨单 非则不做
+                        if(!cVenAbbName.equals("宁波森语")&&!cVenAbbName.equals("马菲羊")&&!cVenAbbName.equals("森语集团")){
+                            //保存调拨单
+                            saveTransVouch(map,itemList);
+                        }
+                    }else{
+                        throw new RuntimeException("未能找到接收方信息");
+                    }
+                }
             }
         }
     }
@@ -487,13 +487,13 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
         }
 //        transVouchMao.put("cIWhCode","");
         //通过下游订单号获取订单数据
-        Map<String,Object> OM_MOmainMap=this.baseMapper.getOM_MOmainBycCode(String.valueOf(rdRecord01Map.get("cOrderCode")));
+        Map<String,Object> OM_MOmainMap=this.baseMapper.getOM_MOmainBycCode(String.valueOf(rdRecords01List.get(0).get("downstreamOrderNumber")));
         if(OM_MOmainMap==null){
             throw new RuntimeException("未找到下游订单");
         }
         //订单号
-        transVouchMao.put("cMPoCode",rdRecord01Map.get("cOrderCode"));//1
-        transVouchMao.put("cDefine13",rdRecord01Map.get("cOrderCode"));//1
+        transVouchMao.put("cMPoCode",rdRecords01List.get(0).get("downstreamOrderNumber"));//1
+        transVouchMao.put("cDefine13",rdRecords01List.get(0).get("downstreamOrderNumber"));//1
         //业务员
         transVouchMao.put("cPersonCode",OM_MOmainMap.get("cPersonCode"));
         this.baseMapper.saveTransVouch(transVouchMao);
@@ -504,7 +504,7 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
             for(Map<String,Object> recordsMap:rdRecords01List){
                 Map<String,Object> vouchsMap=new HashMap<>();
                 //获取下游委外订单行数据
-                Map<String,Object> mapOMMODetails=this.baseMapper.getOMMODetails("");//1
+                Map<String,Object> mapOMMODetails=this.baseMapper.getOMMODetails(String.valueOf(recordsMap.get("downstreamRowId")));//1
                 if(mapOMMODetails==null){
                     throw new RuntimeException("第"+vI+"行未找到对应下游委外订单表体行");
                 }