From 1fadec3af22fd7d8628006c6861f6936c1735258 Mon Sep 17 00:00:00 2001 From: erzhongxmu Date: Thu, 8 Oct 2020 16:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=93=E5=AD=98=E7=A7=BB=E5=8A=A8=E6=9F=A5?= =?UTF-8?q?=E6=89=BE=E4=B8=8B=E6=9E=B6=E6=AC=A1=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zzjee/api/wmomController.java | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zzjee/api/wmomController.java b/src/main/java/com/zzjee/api/wmomController.java index 2be90e3e..5bb456e5 100644 --- a/src/main/java/com/zzjee/api/wmomController.java +++ b/src/main/java/com/zzjee/api/wmomController.java @@ -327,9 +327,6 @@ public class wmomController { } return Result.success("下架成功"); } - - - @RequestMapping(value = "/getmove", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "获取移动列表", notes = "获取移动列表", httpMethod = "GET", produces = "application/json") @@ -342,6 +339,25 @@ public class wmomController { if(listmove!=null&&listmove.size()==0){ return Result.error("不存在移动"); } + List listmovenew = new ArrayList<>(); + //第一个写法 + for( WmToMoveGoodsEntity t: listmove ){ + if(StringUtil.isNotEmpty(t.getBinFrom())){ + try{ + String chuhuokou = ""; + MdBinEntity mdBinEntity = systemService.findUniqueByProperty(MdBinEntity.class,"kuWeiBianMa",t.getBinFrom()); + t.setToCusName(mdBinEntity.getQuHuoCiXu()); + }catch (Exception e){ + } + } + listmovenew.add(t); + } + Collections.sort(listmovenew, new Comparator() { + @Override + public int compare(WmToMoveGoodsEntity o1, WmToMoveGoodsEntity o2) { + return o2.getToCusName().compareTo(o1.getToCusName()); + } + }); return Result.success(listmove); } @RequestMapping(value = "/setmove/{id}", method = RequestMethod.GET)