From 8b3aceac0c0729007cc1d90e4867f17158f8e065 Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Fri, 15 May 2020 00:51:38 +0800 Subject: [PATCH] =?UTF-8?q?TMS=E5=A2=9E=E5=8A=A0=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/TmsYwDingdanController.java | 35 +++--------- .../wm/controller/WmOmNoticeHController.java | 55 +++++++++++++------ 2 files changed, 47 insertions(+), 43 deletions(-) diff --git a/src/main/java/com/zzjee/tms/controller/TmsYwDingdanController.java b/src/main/java/com/zzjee/tms/controller/TmsYwDingdanController.java index 11d97479..d90b4059 100644 --- a/src/main/java/com/zzjee/tms/controller/TmsYwDingdanController.java +++ b/src/main/java/com/zzjee/tms/controller/TmsYwDingdanController.java @@ -522,18 +522,15 @@ public class TmsYwDingdanController extends BaseController { ResultDO D0 = new ResultDO(); D0.setOK(true); String hql="from WmTmsNoticeHEntity "; -// String hql="from WmTmsNoticeHEntity where omSta = "; List listWaveToDowns =new ArrayList<>(); -// if(StringUtil.isNotEmpty(searchstr)){ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? and omNoticeId = ?"; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username,searchstr); -// }else{ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? "; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username); -// -// } - listWaveToDowns = wmOmNoticeHService.findHql(hql); -// listWaveToDowns = wmOmNoticeHService.findHql(hql,"已装车"); + if(StringUtil.isNotEmpty(searchstr)){ + hql="from WmTmsNoticeHEntity where omSta <> ? and reMember = ? and omNoticeId = ?"; + listWaveToDowns = wmOmNoticeHService.findHql(hql,"已送货",username,searchstr); + }else{ + hql="from WmTmsNoticeHEntity where omSta <> ? and reMember = ? "; + listWaveToDowns = wmOmNoticeHService.findHql(hql,"已送货",username); + + } D0.setObj(listWaveToDowns); return new ResponseEntity(D0, HttpStatus.OK); } @@ -546,14 +543,6 @@ public class TmsYwDingdanController extends BaseController { D0.setOK(true); String hql="from WmTmsNoticeIEntity where omNoticeId = ?"; List listWaveToDowns =new ArrayList<>(); -// if(StringUtil.isNotEmpty(searchstr)){ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? and omNoticeId = ?"; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username,searchstr); -// }else{ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? "; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username); -// -// } listWaveToDowns = wmOmNoticeHService.findHql(hql,omnoticeid); D0.setObj(listWaveToDowns); return new ResponseEntity(D0, HttpStatus.OK); @@ -574,14 +563,6 @@ public class TmsYwDingdanController extends BaseController { t.setOmSta("已送货"); wmOmNoticeHService.updateEntitie(t); } -// if(StringUtil.isNotEmpty(searchstr)){ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? and omNoticeId = ?"; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username,searchstr); -// }else{ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? "; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username); -// -// } D0.setObj(listWaveToDowns); return new ResponseEntity(D0, HttpStatus.OK); } diff --git a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java index c6c5253a..033576ea 100644 --- a/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java +++ b/src/main/java/com/zzjee/wm/controller/WmOmNoticeHController.java @@ -2458,6 +2458,7 @@ public class WmOmNoticeHController extends BaseController { try{ MdGoodsEntity md =systemService.findUniqueByProperty(MdGoodsEntity.class,"shpBianMa",t.getGoodsId()); t.setCusCode(md.getSuoShuKeHu()); + wmOmNoticeH.setOmSta("未送货"); wmOmNoticeH.setCusCode(md.getSuoShuKeHu()); }catch ( Exception e){ @@ -2517,14 +2518,14 @@ public class WmOmNoticeHController extends BaseController { String hql="from WmOmNoticeHEntity "; List listWaveToDowns =new ArrayList<>(); -// if(StringUtil.isNotEmpty(searchstr)){ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? and omNoticeId = ?"; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username,searchstr); -// }else{ -// hql="from WmOmNoticeHEntity where omSta = ? and reMember = ? "; -// listWaveToDowns = wmOmNoticeHService.findHql(hql,searchstr2,username); -// -// } + if(StringUtil.isNotEmpty(searchstr)){ + hql="from WmOmNoticeHEntity where omSta <> ? and reMember = ? and omNoticeId = ?"; + listWaveToDowns = wmOmNoticeHService.findHql(hql,"复核完成",username,searchstr); + }else{ + hql="from WmOmNoticeHEntity where omSta <> ? and reMember = ? "; + listWaveToDowns = wmOmNoticeHService.findHql(hql,"复核完成",username); + + } listWaveToDowns = wmOmNoticeHService.findHql(hql); D0.setObj(listWaveToDowns); return new ResponseEntity(D0, HttpStatus.OK); @@ -2539,10 +2540,10 @@ public class WmOmNoticeHController extends BaseController { List listWaveToDowns =new ArrayList<>(); // hql="from WmImNoticeIEntity where noticeiSta <> ? and omNoticeId = ?"; // listWaveToDowns = wmOmNoticeHService.findHql(hql,"已核货",searchstr); - hql="from WmOmNoticeIEntity "; -// hql="from WmOmNoticeIEntity where omSta = ? and omNoticeId = ?"; - listWaveToDowns = wmOmNoticeHService.findHql(hql); -// listWaveToDowns = wmOmNoticeHService.findHql(hql,"Y", omnoticeid); +// hql="from WmOmNoticeIEntity "; + hql="from WmOmNoticeIEntity where omNoticeId = ?"; +// listWaveToDowns = wmOmNoticeHService.findHql(hql); + listWaveToDowns = wmOmNoticeHService.findHql(hql, omnoticeid); D0.setObj(listWaveToDowns); return new ResponseEntity(D0, HttpStatus.OK); } @@ -2554,12 +2555,34 @@ public class WmOmNoticeHController extends BaseController { D0.setOK(true); String hql="from WmImNoticeIEntity where id = ? "; List listWaveToDowns =new ArrayList<>(); - hql="from WmOmNoticeIEntity where id = ?"; + hql=" from WmOmNoticeIEntity where id = ?"; listWaveToDowns = wmOmNoticeHService.findHql(hql,id); - for(WmOmNoticeIEntity t: listWaveToDowns){ - t.setOmSta("YH"); - wmOmNoticeHService.updateEntitie(t); + if(listWaveToDowns!=null&&listWaveToDowns.size()>0){ + String noticeid = listWaveToDowns.get(0).getOmNoticeId(); + String hqlh=" from WmOmNoticeHEntity where omNoticeId = ? "; + List listWaveToDowns11 = wmOmNoticeHService.findHql(hqlh,noticeid); + + for(WmOmNoticeHEntity t: listWaveToDowns11){ + t.setOmSta("复核完成"); + wmOmNoticeHService.updateEntitie(t); + } + }else{ + String hql1=" from WmOmNoticeHEntity where omNoticeId = ? "; + List listWaveToDowns11 = wmOmNoticeHService.findHql(hql1,id); + for(WmOmNoticeHEntity t: listWaveToDowns11){ + t.setOmSta("复核完成"); + wmOmNoticeHService.updateEntitie(t); + } + + String hql2=" from WmOmNoticeHEntity where id = ? "; + List listWaveToDowns12 = wmOmNoticeHService.findHql(hql2,id); + for(WmOmNoticeHEntity t: listWaveToDowns12){ + t.setOmSta("复核完成"); + wmOmNoticeHService.updateEntitie(t); + } + } + D0.setObj(listWaveToDowns); return new ResponseEntity(D0, HttpStatus.OK); }