| | |
| | | // 校验库位是否已绑定 |
| | | for (LocMast mast : locMasts) { |
| | | LocAroundBind aroundBind = this.selectOne(new EntityWrapper<LocAroundBind>() |
| | | .eq("dev_no", params.getDevNo()) |
| | | .eq("b_loc_no", mast.getLocNo())); |
| | | if (!Objects.isNull(aroundBind)) { |
| | | continue; |
| | |
| | | if (!this.insert(bind)) { |
| | | throw new CoolException("绑定库位失败"); |
| | | } |
| | | |
| | | LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", bind.getBLocNo())); |
| | | locMast.setLocSts(LocStsType.LOC_STS_TYPE_X.type); |
| | | locMast.setDeleted(1); |
| | | locMast.setFrozen(1); |
| | | |
| | | if (!locMastService.updateById(locMast)) { |
| | | return R.error("原库禁用失败!!"); |
| | | } |
| | | |
| | | } |
| | | return R.ok("绑定库位成功"); |
| | | } |