| | |
| | | String s = Utils.convertLocFormat(params.getLocNo()); |
| | | LocAroundBind bind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", s)); |
| | | if (!Objects.isNull(bind)&&Cools.isEmpty(wrkMast.getStaNo())) { |
| | | if (!Objects.isNull(bind)) { |
| | | bind.setFreeze(1); |
| | | locAroundBindService.updateById(bind); |
| | | //冻结相邻库位 |
| | |
| | | } |
| | | Double realQty = Math.round((wrkDetl.getStockQty() - wrkDetl.getAnfme()) * 10000) / 10000.0; |
| | | if (!Cools.isEmpty(weight)) { |
| | | Double val = Math.round((weight - 2.35) * 10000) / 10000.0; |
| | | Double val = Math.round((weight - 3) * 10000) / 10000.0; |
| | | //称重后,计算出真实长度 |
| | | realQty = val * matnr.getVolume(); |
| | | if (realQty<matnr.getSafeQty()){ |
| | |
| | | @Autowired |
| | | private WrkMastService wrkMastService; |
| | | @Autowired |
| | | private WaitPakinService waitPakinService; |
| | | @Autowired |
| | | private WrkDetlService wrkDetlService; |
| | | |
| | | @PostMapping("/order/matSync/default/v2") |
| | |
| | | map.put("wrkDetls", wrkDetls); |
| | | return R.ok().add(map); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 任务查询接口 |
| | | */ |
| | | @PostMapping("/queryTaskByBarcode") |
| | | public synchronized R queryTask(@RequestBody QueryTaskByBarcodeParam param) { |
| | | if (Cools.isEmpty(param)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | if (Cools.isEmpty(param.getBarcode())) { |
| | | return R.error("条码不能为空"); |
| | | } |
| | | |
| | | |
| | | List<WaitPakin> waitPakins = waitPakinService.selectList(new EntityWrapper<WaitPakin>().eq("zpallet", param.getBarcode())); |
| | | if (waitPakins.isEmpty()) { |
| | | return R.error("数据不存在"); |
| | | } |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("taskNo", null); |
| | | map.put("ioType", "1"); |
| | | map.put("waitPakins", waitPakins); |
| | | return R.ok().add(map); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.zy.asrs.entity.param; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class QueryTaskByBarcodeParam { |
| | | private String barcode; |
| | | |
| | | } |
| | |
| | | .eq("b_loc_no", wrkMast.getLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (Cools.isEmpty(locAroundBind)) { |
| | | locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getSourceLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (!Cools.isEmpty(locAroundBind)) { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("源库位被冻结")); |
| | | continue; |
| | | } |
| | | } else { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("目标库位被冻结")); |
| | | continue; |
| | | } |
| | | locAroundBind = locAroundBindService.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("b_loc_no", wrkMast.getSourceLocNo()) |
| | | .eq("freeze", 1)); |
| | | if (!Cools.isEmpty(locAroundBind)) { |
| | | markPublishError(wrkMast.getWrkNo(), String.valueOf("源库位被冻结")); |
| | | continue; |
| | | } |
| | | Integer crnNo = wrkMast.getCrnNo(); |