wms修改
This commit is contained in:
parent
0df488ba0c
commit
f76e078237
|
|
@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.nflg.wms.admin.pojo.dto.*;
|
import com.nflg.wms.admin.pojo.dto.*;
|
||||||
import com.nflg.wms.admin.pojo.request.UnqualifiedWarehousingRequest;
|
import com.nflg.wms.admin.pojo.request.UnqualifiedWarehousingRequest;
|
||||||
import com.nflg.wms.admin.service.NormalQMControllerService;
|
import com.nflg.wms.admin.service.NormalQMControllerService;
|
||||||
|
import com.nflg.wms.admin.service.SapService;
|
||||||
import com.nflg.wms.common.constant.BarCodeProcessStage;
|
import com.nflg.wms.common.constant.BarCodeProcessStage;
|
||||||
import com.nflg.wms.common.pojo.ApiResult;
|
import com.nflg.wms.common.pojo.ApiResult;
|
||||||
import com.nflg.wms.common.pojo.PageData;
|
import com.nflg.wms.common.pojo.PageData;
|
||||||
|
|
@ -74,8 +75,11 @@ public class NormalQMController extends BaseController {
|
||||||
@Resource
|
@Resource
|
||||||
private IWmsQrCodeMasterService qrCodeMasterService;
|
private IWmsQrCodeMasterService qrCodeMasterService;
|
||||||
|
|
||||||
|
private SapService sapService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取SRM推送过来的质检单信息
|
* 获取SRM推送过来的质检单信息
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -87,6 +91,7 @@ public class NormalQMController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出质检单
|
* 导出质检单
|
||||||
|
*
|
||||||
* @param request 查询条件
|
* @param request 查询条件
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -100,6 +105,7 @@ public class NormalQMController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检物料上架任务(PDA)
|
* 质检物料上架任务(PDA)
|
||||||
|
*
|
||||||
* @param orderNo 送货单号或任务单号
|
* @param orderNo 送货单号或任务单号
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -112,6 +118,7 @@ public class NormalQMController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检物料上架物料详情
|
* 质检物料上架物料详情
|
||||||
|
*
|
||||||
* @param taskId 任务ID
|
* @param taskId 任务ID
|
||||||
**/
|
**/
|
||||||
@GetMapping("PDA/task/item")
|
@GetMapping("PDA/task/item")
|
||||||
|
|
@ -123,6 +130,7 @@ public class NormalQMController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 质检物料上架任务确认
|
* 质检物料上架任务确认
|
||||||
|
*
|
||||||
* @param request
|
* @param request
|
||||||
**/
|
**/
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
@ -368,6 +376,7 @@ public class NormalQMController extends BaseController {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 无码质检任务上架确认
|
* 无码质检任务上架确认
|
||||||
|
*
|
||||||
* @param request 任务ID
|
* @param request 任务ID
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
@ -478,7 +487,16 @@ public class NormalQMController extends BaseController {
|
||||||
WmsSrmQualityInspection inspection = wmsSrmQualityInspectionService.getById(request.getId());
|
WmsSrmQualityInspection inspection = wmsSrmQualityInspectionService.getById(request.getId());
|
||||||
VUtil.trueThrowBusinessError(Objects.isNull(inspection)).throwMessage("无效的质检单");
|
VUtil.trueThrowBusinessError(Objects.isNull(inspection)).throwMessage("无效的质检单");
|
||||||
VUtil.trueThrowBusinessError(!inspection.getInspectionResult().equals("不合格")).throwMessage("该质检单不是不合格单");
|
VUtil.trueThrowBusinessError(!inspection.getInspectionResult().equals("不合格")).throwMessage("该质检单不是不合格单");
|
||||||
VUtil.trueThrowBusinessError(inspection.getReceiveQty().compareTo(BigDecimal.ZERO) > 0).throwMessage("该质检单已生成上架任务");
|
VUtil.trueThrowBusinessError(inspection.getReceiveQty().compareTo(BigDecimal.ZERO) > 0).throwMessage("该质检单已完成冲销");
|
||||||
|
List<ZWM3A27ItemDTO> itemDTOs = new ArrayList<>();
|
||||||
|
ZWM3A27ItemDTO itemDTO = new ZWM3A27ItemDTO()
|
||||||
|
.setEbeln(inspection.getPoNum())
|
||||||
|
.setEbeln(inspection.getPoNum()).
|
||||||
|
setEbelp(Integer.valueOf(inspection.getPoLineNumber())).
|
||||||
|
setMenge(inspection.getDeliveryQty()).setMatDoc(inspection.getMaterialDoc105())
|
||||||
|
.setDocYear(inspection.getMaterialDocYear105());
|
||||||
|
itemDTOs.add(itemDTO);
|
||||||
|
sapService.zwm3a27(inspection.getMaterialDoc105(), inspection.getMaterialDocYear105(), itemDTOs);
|
||||||
inspection.setReceiveQty(request.getReceiveQty());
|
inspection.setReceiveQty(request.getReceiveQty());
|
||||||
wmsSrmQualityInspectionService.updateById(inspection);
|
wmsSrmQualityInspectionService.updateById(inspection);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
|
|
|
||||||
|
|
@ -619,37 +619,26 @@ public class NormalPGIControllerService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//编码管理
|
// 这里需要同步一个信息,就是把箱码的状态也要改为收货状态,
|
||||||
// if (CollectionUtil.isNotEmpty(dto.getQrCodes())) {
|
List<Long> parentIds = dto.getQrCodes().stream()
|
||||||
// //同步箱码信息到物料码中
|
.filter(qrCode -> qrCode.getPackagingType() == 0)
|
||||||
// List<WmsQrCodeMaster> parents = dto.getQrCodes()
|
.map(WmsQrCodeMaster::getId)
|
||||||
// .stream()
|
.distinct()
|
||||||
// .filter(qrCode -> qrCode.getPackagingType() == 1)
|
.toList();
|
||||||
// .toList();
|
if (CollectionUtil.isNotEmpty(parentIds)) {
|
||||||
// if (CollectionUtil.isNotEmpty(parents)) {
|
// 获取所有的父级物料信息
|
||||||
// List<WmsQrCodeMaster> children = qrCodeMasterService.lambdaQuery()
|
List<WmsQrCodeMaster> parents2 = qrCodeMasterService.lambdaQuery()
|
||||||
// .in(WmsQrCodeMaster::getParentBarcodeId, parents
|
.in(WmsQrCodeMaster::getId, parentIds)
|
||||||
// .stream()
|
.list();
|
||||||
// .map(WmsQrCodeMaster::getId)
|
for (WmsQrCodeMaster parent : parents2) {
|
||||||
// .toList()
|
boolean exists = dto.getQrCodes().stream().anyMatch(qrCode ->
|
||||||
// )
|
qrCode.getBarcodeCode().equals(parent.getBarcodeCode()));
|
||||||
// .list();
|
if (!exists) {
|
||||||
// parents.forEach(p -> {
|
dto.getQrCodes().add(parent);
|
||||||
// children.stream()
|
}
|
||||||
// .filter(c -> c.getParentBarcodeId().equals(p.getId()))
|
}
|
||||||
// .forEach(c -> {
|
}
|
||||||
// c.setProcessStage(p.getProcessStage());
|
|
||||||
// c.setLastScanBy(UserUtil.getUserId());
|
|
||||||
// c.setLastScanByname(UserUtil.getUserName());
|
|
||||||
// c.setLastScanTime(LocalDateTime.now());
|
|
||||||
// c.setFactoryCode(p.getFactoryCode());
|
|
||||||
// c.setStorageLocation(p.getStorageLocation());
|
|
||||||
// c.setBinLocation(p.getBinLocation());
|
|
||||||
// c.setReceiptItemId(p.getReceiptItemId());
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
// dto.getQrCodes().addAll(children);
|
|
||||||
// }
|
|
||||||
qrCodeMasterService.updateBarCode(dto.getQrCodes());
|
qrCodeMasterService.updateBarCode(dto.getQrCodes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue