| | |
| | | import com.zy.asrs.wms.apis.wcs.entity.response.CommonReponse;
|
| | | import com.zy.asrs.wms.apis.wcs.utils.HttpEssUtils;
|
| | | import com.zy.asrs.wms.asrs.entity.*;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.MatnrDetlDto;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.PickSheetDetlDto;
|
| | | import com.zy.asrs.wms.asrs.entity.dto.ShippingOrderDetlDto;
|
| | | import com.zy.asrs.wms.asrs.entity.enums.*;
|
| | |
| | | List<LocDetl> detls = locDetlService.list(new LambdaQueryWrapper<LocDetl>()
|
| | | .eq(LocDetl::getLocNo, barcode));
|
| | | for (int i = 0; i < detls.size(); i++) {
|
| | | // detls.get(i).setMats(matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getMatnr, detls.get(i).getMatnr())));
|
| | | Mat mat = matService.getOne(new LambdaQueryWrapper<Mat>().eq(Mat::getId, detls.get(i).getMatId()));
|
| | | MatnrDetlDto detlDto = new MatnrDetlDto();
|
| | | detlDto.setTspec(mat.getSpecs())
|
| | | .setType(mat.getModel())
|
| | | .setMatnrName(mat.getMaktx())
|
| | | .setMatnrNo(mat.getMatnr());
|
| | | detls.get(i).setMats(detlDto);
|
| | | }
|
| | | return detls;
|
| | | }
|
| | |
| | | .eq(Loc::getLocStsId, LocStsType.F.val())
|
| | | .eq(Loc::getLocNo, param.get("barcode")));
|
| | | if (Objects.isNull(barcode)) {
|
| | | throw new CoolException("源库位明细不存在!!");
|
| | | throw new CoolException(param.get("barcode") + "库位状态不可执行此操作!!");
|
| | | }
|
| | | Loc tarCode = locService.getOne(new LambdaQueryWrapper<Loc>()
|
| | | .eq(Loc::getLocStsId, LocStsType.O.val())
|
| | |
| | | List<LocArea> locAreas = locAreaService.list(new LambdaQueryWrapper<LocArea>()
|
| | | .in(LocArea::getLocId, ids)
|
| | | .eq(LocArea::getTypeId, LocAreaTypeSts.LOC_AREA_TYPE_FLAT.id));
|
| | | if (!locAreas.isEmpty() && locAreas.size() == ids.size()) {
|
| | | if (!locAreas.isEmpty() && locAreas.size() != ids.size()) {
|
| | | throw new CoolException("非平库不可执行此操作!!");
|
| | | }
|
| | |
|
| | |
| | | return R.error("库位明细不存在!!");
|
| | | }
|
| | |
|
| | | if (!locService.update(new LambdaUpdateWrapper<Loc>()
|
| | | .eq(Loc::getLocNo, barcode.getLocNo())
|
| | | .set(Loc::getBarcode, null)
|
| | | .set(Loc::getLocStsId, LocStsType.O.val()))) {
|
| | | throw new CoolException("源库位状态修改失败!!");
|
| | | }
|
| | |
|
| | | if (!locService.update(new LambdaUpdateWrapper<Loc>().eq(Loc::getLocNo, tarCode.getLocNo())
|
| | | .set(Loc::getBarcode, barcode.getBarcode())
|
| | | .set(Loc::getLocStsId, LocStsType.F.val()))) {
|
| | | throw new CoolException("目标库位修改失败!!");
|
| | | }
|
| | |
|
| | | if (!locDetlService.update(new LambdaUpdateWrapper<LocDetl>()
|
| | | .eq(LocDetl::getLocId, barcode.getId())
|
| | | .set(LocDetl::getLocId, tarCode.getId())
|