|
|
|
@ -184,10 +184,10 @@ public class IoOrderServiceImpl implements IoOrderService {
|
|
|
|
|
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_AUDITED) {
|
|
|
|
|
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
//判断单据是否是预验收单据,如果是预验收单据,则删除预验收库库存
|
|
|
|
|
if (basicBussinessTypeEntity.isPreIn()) {
|
|
|
|
|
if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
|
|
|
|
|
preinOrderService.deleteByOrderId(billNo);
|
|
|
|
|
preinDetailService.deleteByOrderId(billNo);
|
|
|
|
|
} else if (basicBussinessTypeEntity.isAdvanceType()) {
|
|
|
|
|
} else if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_ADVANCE) {
|
|
|
|
|
//是否寄售,删除寄售库存
|
|
|
|
|
List<InvPreProductDetailEntity> invProductDetailEntities = invPreProductDetailService.selectByOrderIdFk(billNo);
|
|
|
|
|
if (CollUtil.isNotEmpty(invProductDetailEntities)) {
|
|
|
|
@ -279,7 +279,7 @@ public class IoOrderServiceImpl implements IoOrderService {
|
|
|
|
|
BasicBussinessTypeEntity basicBussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
|
|
|
|
|
//预验收库存
|
|
|
|
|
if (basicBussinessTypeEntity.isPreIn()) {
|
|
|
|
|
if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
|
|
|
|
|
|
|
|
|
|
InvPreinDetailEntity invPreinDetailEntity = preinDetailService.findByCode(billNo, code);
|
|
|
|
|
int count = invPreinDetailEntity.getCount() - 1;
|
|
|
|
@ -292,7 +292,7 @@ public class IoOrderServiceImpl implements IoOrderService {
|
|
|
|
|
preinDetailService.update(invPreinDetailEntity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else if (basicBussinessTypeEntity.isAdvanceType()) { //寄售库存
|
|
|
|
|
} else if (basicBussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_ADVANCE) { //寄售库存
|
|
|
|
|
InvPreProductDetailEntity invProductDetailEntity = invPreProductDetailService.selectByCode(billNo, code);
|
|
|
|
|
int count = invProductDetailEntity.getCount() - 1;
|
|
|
|
|
if (count == 0) {
|
|
|
|
@ -378,7 +378,7 @@ public class IoOrderServiceImpl implements IoOrderService {
|
|
|
|
|
BasicBussinessTypeEntity bussinessTypeEntity = basicBussinessTypeService.findByAction(orderEntity.getAction());
|
|
|
|
|
|
|
|
|
|
//预验收撤回---直接删除预验收库存
|
|
|
|
|
if (bussinessTypeEntity.isPreIn()) {
|
|
|
|
|
if (bussinessTypeEntity.getActionType() == ConstantStatus.ACTION_TYPE_PREIN) {
|
|
|
|
|
invPreinOrderService.deleteByOrderId(billNo);
|
|
|
|
|
invPreinDetailService.deleteByOrderId(billNo);
|
|
|
|
|
} else {
|
|
|
|
|