|
|
@ -381,27 +381,28 @@ public class IoOrderServiceImpl implements IoOrderService {
|
|
|
|
if (bussinessTypeEntity.isPreIn()) {
|
|
|
|
if (bussinessTypeEntity.isPreIn()) {
|
|
|
|
invPreinOrderService.deleteByOrderId(billNo);
|
|
|
|
invPreinOrderService.deleteByOrderId(billNo);
|
|
|
|
invPreinDetailService.deleteByOrderId(billNo);
|
|
|
|
invPreinDetailService.deleteByOrderId(billNo);
|
|
|
|
return true;
|
|
|
|
}else {
|
|
|
|
}
|
|
|
|
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.selectByOrderIdFk(billNo);
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(invProductDetailEntities)) {
|
|
|
|
List<InvProductDetailEntity> invProductDetailEntities = invProductDetailService.selectByOrderIdFk(billNo);
|
|
|
|
for (InvProductDetailEntity invProductDetailEntity : invProductDetailEntities) {
|
|
|
|
if (CollUtil.isNotEmpty(invProductDetailEntities)) {
|
|
|
|
InvProductEntity invProductEntity = invProductService.selectByUnique(invProductDetailEntity.getRelId(), invProductDetailEntity.getBatchNo(), invProductDetailEntity.getSupId(),
|
|
|
|
for (InvProductDetailEntity invProductDetailEntity : invProductDetailEntities) {
|
|
|
|
invProductDetailEntity.getDeptCode(), invProductDetailEntity.getInvCode());
|
|
|
|
InvProductEntity invProductEntity = invProductService.selectByUnique(invProductDetailEntity.getRelId(), invProductDetailEntity.getBatchNo(), invProductDetailEntity.getSupId(),
|
|
|
|
|
|
|
|
invProductDetailEntity.getDeptCode(), invProductDetailEntity.getInvCode());
|
|
|
|
if (ConstantType.TYPE_PUT.equals(invProductDetailEntity.getMainAction())) {
|
|
|
|
|
|
|
|
int count = invProductEntity.getInCount() - invProductDetailEntity.getReCount();
|
|
|
|
if (ConstantType.TYPE_PUT.equals(invProductDetailEntity.getMainAction())) {
|
|
|
|
invProductEntity.setInCount(count);
|
|
|
|
int count = invProductEntity.getInCount() - invProductDetailEntity.getReCount();
|
|
|
|
} else if (ConstantType.TYPE_OUT.equals(invProductDetailEntity.getMainAction())) {
|
|
|
|
invProductEntity.setInCount(count);
|
|
|
|
int count = invProductEntity.getOutCount() - invProductDetailEntity.getReCount();
|
|
|
|
} else if (ConstantType.TYPE_OUT.equals(invProductDetailEntity.getMainAction())) {
|
|
|
|
invProductEntity.setOutCount(count);
|
|
|
|
int count = invProductEntity.getOutCount() - invProductDetailEntity.getReCount();
|
|
|
|
}
|
|
|
|
invProductEntity.setOutCount(count);
|
|
|
|
invProductService.update(invProductEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
invProductService.update(invProductEntity);
|
|
|
|
invProductDetailService.deleteByOrderId(billNo);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
invProductDetailService.deleteByOrderId(billNo);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS);
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS);
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
@ -509,6 +510,7 @@ public class IoOrderServiceImpl implements IoOrderService {
|
|
|
|
case Constant.ORDER_STATUS_NEW_ORDER:
|
|
|
|
case Constant.ORDER_STATUS_NEW_ORDER:
|
|
|
|
filterOrderRequest.setStatuses(Arrays.asList(1, 2, 4));
|
|
|
|
filterOrderRequest.setStatuses(Arrays.asList(1, 2, 4));
|
|
|
|
filterOrderRequest.setDealStatuses(Arrays.asList(1, 2));
|
|
|
|
filterOrderRequest.setDealStatuses(Arrays.asList(1, 2));
|
|
|
|
|
|
|
|
filterOrderRequest.setOrderType(ConstantStatus.ORDER_TYPE_NORMAL);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case Constant.ORDER_STATUS_UN_CHECK:
|
|
|
|
case Constant.ORDER_STATUS_UN_CHECK:
|
|
|
|
filterOrderRequest.setStatuses(Arrays.asList(3));
|
|
|
|
filterOrderRequest.setStatuses(Arrays.asList(3));
|
|
|
|