| | |
| | | if (wrkMast.getIoType() == 1) { |
| | | // 入库通知单 |
| | | if (!Cools.isEmpty(wrkMast.getBarcode())) { |
| | | // if(Cools.isEmpty(wrkMast.getPacked()){ |
| | | // JSONObject res = erpTokenService.stockIn(wrkMast.getBarcode()); |
| | | // if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) { |
| | | // JSONObject data = res.getJSONObject("data"); |
| | | // String tlocation = data == null ? null : data.getString("tlocation"); |
| | | // if (!Cools.isEmpty(tlocation) && !Cools.isEmpty(wrkMast.getLocNo())) { |
| | | // List<LocDetl> detls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | // .eq("loc_no", wrkMast.getLocNo())); |
| | | // if (!Cools.isEmpty(detls)) { |
| | | // for (LocDetl detl : detls) { |
| | | // detl.setStandby1(tlocation); |
| | | // locDetlService.updateById(detl); |
| | | // } |
| | | // JSONObject res = erpTokenService.stockIn(wrkMast.getBarcode()); |
| | | // if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) { |
| | | // JSONObject data = res.getJSONObject("data"); |
| | | // String tlocation = data == null ? null : data.getString("tlocation"); |
| | | // if (!Cools.isEmpty(tlocation) && !Cools.isEmpty(wrkMast.getLocNo())) { |
| | | // List<LocDetl> detls = locDetlService.selectList(new EntityWrapper<LocDetl>() |
| | | // .eq("loc_no", wrkMast.getLocNo())); |
| | | // if (!Cools.isEmpty(detls)) { |
| | | // for (LocDetl detl : detls) { |
| | | // detl.setStandby1(tlocation); |
| | | // locDetlService.updateById(detl); |
| | | // } |
| | | // } |
| | | // } |
| | |
| | | |
| | | // 出库 -------------------------------------------------------------------------------- |
| | | } else if (wrkMast.getWrkSts() == 15) { |
| | | // if(wrkMast.getIsSuplus()!=null && wrkMast.getIsSuplus()==1){ |
| | | // List<WrkDetl> wrkDetls1 = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | // WrkDetl wrkDetl = wrkDetls1.get(0); |
| | | // JSONObject res = erpTokenService.stockBack(wrkMast.getBarcode(),wrkDetl.getAnfme(),null); |
| | | // if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) { |
| | | // |
| | | // } |
| | | // }else{ |
| | | // JSONObject res = erpTokenService.stockOut(wrkMast.getBarcode(),null); |
| | | // if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) { |
| | | // |
| | | // } |
| | | // } |
| | | if(wrkMast.getIsSuplus()!=null && wrkMast.getIsSuplus()==1 && !Objects.isNull(wrkMast.getExitMk())){ |
| | | List<WrkDetl> wrkDetls1 = wrkDetlService.selectByWrkNo(wrkMast.getWrkNo()); |
| | | WrkDetl wrkDetl = wrkDetls1.get(0); |
| | | JSONObject res = erpTokenService.stockBack(wrkMast.getBarcode(),wrkDetl.getAnfme(),null); |
| | | if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) { |
| | | |
| | | } |
| | | }else if(Objects.isNull(wrkMast.getLocNo())){ |
| | | JSONObject res = erpTokenService.stockOut(wrkMast.getBarcode(),null); |
| | | if (res != null && Boolean.TRUE.equals(res.getBoolean("success"))) { |
| | | |
| | | } |
| | | } |
| | | |
| | | // if (!Objects.isNull(wrkMast.getWrkCode())) { |
| | | // return FAIL; |