Browse Source

生产退料直接生成记录

master
陈薪名 2 years ago
parent
commit
17de40acb2
  1. 1
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/productionreturnRecord/vo/ProductionreturnRecordMainBaseVO.java
  2. 16
      win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnRecord/ProductionreturnRecordMainServiceImpl.java

1
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/controller/productionreturnRecord/vo/ProductionreturnRecordMainBaseVO.java

@ -24,7 +24,6 @@ public class ProductionreturnRecordMainBaseVO {
private Long id;
@Schema(description = "申请单号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotNull(message = "申请单号不能为空")
private String requestNumber;
@Schema(description = "任务单号")

16
win-module-wms/win-module-wms-biz/src/main/java/com/win/module/wms/service/productionreturnRecord/ProductionreturnRecordMainServiceImpl.java

@ -124,13 +124,13 @@ public class ProductionreturnRecordMainServiceImpl implements ProductionreturnRe
for (ProductionreturnRecordDetailDO detailDO : subDOList) {
detailDO.setMasterId(mainDO.getId());
detailDO.setNumber(number);
LocationDO locationDOFrom = locationService.selectLocation(detailDO.getFromLocationCode());
if(locationDOFrom != null) {
detailDO.setFromAreaCode(locationDOFrom.getAreaCode());
detailDO.setFromLocationGroupCode(locationDOFrom.getLocationGroupCode());
} else {
throw exception(LOCATION_NOT_EXISTS);
}
// LocationDO locationDOFrom = locationService.selectLocation(detailDO.getFromLocationCode());
// if(locationDOFrom != null) {
// detailDO.setFromAreaCode(locationDOFrom.getAreaCode());
// detailDO.setFromLocationGroupCode(locationDOFrom.getLocationGroupCode());
// } else {
// throw exception(LOCATION_NOT_EXISTS);
// }
LocationDO locationDOTo = locationService.selectLocation(detailDO.getToLocationCode());
if(locationDOTo != null) {
detailDO.setToAreaCode(locationDOTo.getAreaCode());
@ -149,7 +149,7 @@ public class ProductionreturnRecordMainServiceImpl implements ProductionreturnRe
throw exception(ITEMBASIC_NOT_EXISTS);
}
//查询库存余额
BalanceDO balanceDO = balanceMapper.getBalanceQty(detailDO.getFromPackingNumber(), detailDO.getItemCode(), detailDO.getFromBatch(), detailDO.getInventoryStatus(), detailDO.getFromLocationCode());
BalanceDO balanceDO = balanceMapper.getBalanceQty(detailDO.getFromPackingNumber(), detailDO.getItemCode(), detailDO.getFromBatch(), detailDO.getInventoryStatus(), detailDO.getToLocationCode());
if (balanceDO == null) {
throw exception(UNPLANNEDISSUE_REQUEST_DETAIL_BALANCE_NOT_EXISTS);
}

Loading…
Cancel
Save