修正发货单查询时会查询到入库单据为保存态数据问题
This commit is contained in:
parent
9dbb695773
commit
ed9ba1fefc
@ -63,7 +63,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode STORAGE_LOG_NOT_EXISTS = new ErrorCode(1_003_006, "库存日志不存在");
|
||||
ErrorCode STORAGE_CHECK_NOT_EXISTS = new ErrorCode(1_003_007, "库存盘点不存在");
|
||||
ErrorCode STORAGE_CHECK_MAT_NOT_EXISTS = new ErrorCode(1_003_008, "盘点物料不存在");
|
||||
|
||||
ErrorCode BEFORE_STORAGE_NOT_EXISTS = new ErrorCode(1_003_009, "物料原仓库查询错误");
|
||||
/************订单管理***********/
|
||||
ErrorCode PROJECT_ORDER_NOT_EXISTS = new ErrorCode(1_004_001, "项目订单不存在");
|
||||
/************发货管理***********/
|
||||
|
@ -87,7 +87,6 @@ public interface PgMasterLineMapper extends BaseMapperX<PgMasterLineDO> {
|
||||
query.orderByDesc(PgMasterLineDO::getPgNumber);
|
||||
}else{
|
||||
query.orderByAsc(PgMasterLineDO::getPgNumber);
|
||||
// query.orderByDesc(PlanDO::getId);
|
||||
}
|
||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||
.eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType())
|
||||
|
@ -74,6 +74,7 @@ public interface StorageMatMapper extends BaseMapperX<StorageMatDO> {
|
||||
.disableSubLogicDel()
|
||||
.eq(StorageMatDO::getProjectNo,subId)
|
||||
.eq(StorageMatDO::getMatId,materialId)
|
||||
.eq(StorageDO::getStatus,2)
|
||||
.eq(StorageDO::getStockType,"1")
|
||||
.eq(StorageDO::getStockInType,"1")
|
||||
;
|
||||
@ -92,6 +93,7 @@ public interface StorageMatMapper extends BaseMapperX<StorageMatDO> {
|
||||
.disableSubLogicDel()
|
||||
.eq(StorageMatDO::getProjectNo,subId)
|
||||
.eq(StorageMatDO::getMatId,materialId)
|
||||
.eq(StorageDO::getStatus,2)
|
||||
.eq(StorageDO::getStockType,"2")
|
||||
.eq(StorageDO::getStockInType,"5")
|
||||
;
|
||||
|
@ -270,7 +270,6 @@ public class DeliverOrderServiceImpl implements DeliverOrderService {
|
||||
//子订单号
|
||||
Long subId = o.getSaleOrderSubId();
|
||||
|
||||
System.out.println("子项目ID"+subId);
|
||||
//查询此订单已发货总数量
|
||||
DeliverOrderSubDO deliverOrderSubDO = deliverOrderSubMapper.searchNum(subId);
|
||||
//再获取订单中的生产数量
|
||||
|
@ -155,20 +155,25 @@ public class StorageMatServiceImpl implements StorageMatService {
|
||||
//上面是入库,下面是要从原仓出库
|
||||
//减原仓
|
||||
for (StorageMatFBSaveReqVO storageMatFBSaveReqVO : createReqVO) {
|
||||
String[] split = storageMatFBSaveReqVO.getWareHouseId().split("-");
|
||||
if (split.length == 3) {
|
||||
storageMatFBSaveReqVO.setWhId(Long.valueOf(split[0]));
|
||||
storageMatFBSaveReqVO.setRgId(Long.valueOf(split[1]));
|
||||
storageMatFBSaveReqVO.setPnId(Long.valueOf(split[2]));
|
||||
} else if (split.length == 2) {
|
||||
storageMatFBSaveReqVO.setWhId(Long.valueOf(split[0]));
|
||||
storageMatFBSaveReqVO.setRgId(Long.valueOf(split[1]));
|
||||
storageMatFBSaveReqVO.setPnId(null);
|
||||
} else {
|
||||
storageMatFBSaveReqVO.setWhId(Long.valueOf(split[0]));
|
||||
storageMatFBSaveReqVO.setRgId(null);
|
||||
storageMatFBSaveReqVO.setPnId(null);
|
||||
if (storageMatFBSaveReqVO.getWareHouseId()!=null){
|
||||
String[] split = storageMatFBSaveReqVO.getWareHouseId().split("-");
|
||||
if (split.length == 3) {
|
||||
storageMatFBSaveReqVO.setWhId(Long.valueOf(split[0]));
|
||||
storageMatFBSaveReqVO.setRgId(Long.valueOf(split[1]));
|
||||
storageMatFBSaveReqVO.setPnId(Long.valueOf(split[2]));
|
||||
} else if (split.length == 2) {
|
||||
storageMatFBSaveReqVO.setWhId(Long.valueOf(split[0]));
|
||||
storageMatFBSaveReqVO.setRgId(Long.valueOf(split[1]));
|
||||
storageMatFBSaveReqVO.setPnId(null);
|
||||
} else {
|
||||
storageMatFBSaveReqVO.setWhId(Long.valueOf(split[0]));
|
||||
storageMatFBSaveReqVO.setRgId(null);
|
||||
storageMatFBSaveReqVO.setPnId(null);
|
||||
}
|
||||
}else {
|
||||
throw exception(BEFORE_STORAGE_NOT_EXISTS);
|
||||
}
|
||||
|
||||
}
|
||||
Map<Long, List<StorageMatFBSaveReqVO>> outListByWhid = createReqVO.stream()
|
||||
.collect(Collectors.groupingBy(StorageMatFBSaveReqVO::getWhId));
|
||||
|
Loading…
Reference in New Issue
Block a user