|
|
@ -236,23 +236,46 @@ public class IoCheckInoutService {
|
|
|
|
checkThird(orderEntity);
|
|
|
|
checkThird(orderEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 待校验提交,以比对结果提交
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param orderId
|
|
|
|
|
|
|
|
*/
|
|
|
|
public void checkRightResult(String orderId) {
|
|
|
|
public void checkRightResult(String orderId) {
|
|
|
|
IoOrderEntity orderEntity = orderService.findByBillNo(orderId);
|
|
|
|
IoOrderEntity orderEntity = orderService.findByBillNo(orderId);
|
|
|
|
orderDetailCodeService.deleteByOrderId(orderId);
|
|
|
|
orderDetailCodeService.deleteByOrderId(orderId);
|
|
|
|
List<IoCodeTempEntity> codeTempEntities = codeTempService.findByOrderId(orderEntity.getBillNo());
|
|
|
|
List<IoCodeTempEntity> codeTempEntities = codeTempService.findByOrderId(orderEntity.getBillNo());
|
|
|
|
|
|
|
|
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = null;
|
|
|
|
for (IoCodeTempEntity codeTempEntity : codeTempEntities) {
|
|
|
|
for (IoCodeTempEntity codeTempEntity : codeTempEntities) {
|
|
|
|
IoCodeEntity codeEnttity = new IoCodeEntity();
|
|
|
|
IoCodeEntity codeEnttity = new IoCodeEntity();
|
|
|
|
BeanUtils.copyProperties(codeTempEntity, codeEnttity);
|
|
|
|
BeanUtils.copyProperties(codeTempEntity, codeEnttity);
|
|
|
|
codeEnttity.setId(null);
|
|
|
|
codeEnttity.setId(null);
|
|
|
|
codeService.insert(codeEnttity);
|
|
|
|
codeService.insert(codeEnttity);
|
|
|
|
addInoutService.genOrderDetailCode(orderEntity, codeTempEntity);
|
|
|
|
orderDetailCodeEntities = addInoutService.genOrderDetailCode(orderEntity, codeTempEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
codeTempService.deleteByBillNo(orderEntity.getBillNo());
|
|
|
|
codeTempService.deleteByBillNo(orderEntity.getBillNo());
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS);
|
|
|
|
orderEntity.setStatus(ConstantStatus.ORDER_STATUS_CHECK_SUCCESS);
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//删除之前的单据结果
|
|
|
|
|
|
|
|
if (CollUtil.isNotEmpty(orderDetailCodeEntities)) {
|
|
|
|
|
|
|
|
if (null != orderDetailCodeEntities.get(0).getOrderIdFk() && !"".equals(orderDetailCodeEntities.get(0).getOrderIdFk())) {
|
|
|
|
|
|
|
|
orderDetailResultService.deleteByOrderId(orderDetailCodeEntities.get(0).getOrderIdFk());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
orderDetailCodeEntities.forEach(orderDetailCodeEntity ->
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//生成单据结果
|
|
|
|
|
|
|
|
IoOrderDetailResultEntity orderDetailResultEntity = new IoOrderDetailResultEntity();
|
|
|
|
|
|
|
|
BeanUtils.copyProperties(orderDetailCodeEntity, orderDetailResultEntity);
|
|
|
|
|
|
|
|
orderDetailResultEntity.setCount(orderDetailCodeEntity.getReCount());
|
|
|
|
|
|
|
|
orderDetailResultEntity.setReCount(orderDetailCodeEntity.getReCount());
|
|
|
|
|
|
|
|
orderDetailResultEntity.setId(null);
|
|
|
|
|
|
|
|
orderDetailResultService.insert(orderDetailResultEntity);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
genLostCode(orderEntity.getBillNo());
|
|
|
|
genLostCode(orderEntity.getBillNo());
|
|
|
|
checkThird(orderEntity);
|
|
|
|
checkThird(orderEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -347,7 +370,7 @@ public class IoCheckInoutService {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 无三期拣货校验
|
|
|
|
//无三期拣货校验
|
|
|
|
public String checkNoPiCode(IoCodeTempEntity codeTempEntity) {
|
|
|
|
public String checkNoPiCode(IoCodeTempEntity codeTempEntity) {
|
|
|
|
boolean isBillExit = orderDetailBizService.isExit(codeTempEntity.getOrderId());
|
|
|
|
boolean isBillExit = orderDetailBizService.isExit(codeTempEntity.getOrderId());
|
|
|
|
if (!isBillExit) {
|
|
|
|
if (!isBillExit) {
|
|
|
@ -427,7 +450,7 @@ public class IoCheckInoutService {
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
//生成预存的库存
|
|
|
|
//生成预存的库存
|
|
|
|
orderService.updateOrderInventory(orderEntity.getBillNo(),orderEntity.getStatus());
|
|
|
|
orderService.updateOrderInventory(orderEntity.getBillNo(), orderEntity.getStatus());
|
|
|
|
genLostCode(orderEntity.getBillNo());
|
|
|
|
genLostCode(orderEntity.getBillNo());
|
|
|
|
checkThird(orderEntity);
|
|
|
|
checkThird(orderEntity);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -542,7 +565,7 @@ public class IoCheckInoutService {
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
orderEntity.setUpdateTime(new Date());
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
orderService.updateOrderInventory(orderEntity.getBillNo(),orderEntity.getStatus());
|
|
|
|
orderService.updateOrderInventory(orderEntity.getBillNo(), orderEntity.getStatus());
|
|
|
|
|
|
|
|
|
|
|
|
//生成缺失码
|
|
|
|
//生成缺失码
|
|
|
|
genLostCode(orderEntity.getBillNo());
|
|
|
|
genLostCode(orderEntity.getBillNo());
|
|
|
@ -1053,7 +1076,7 @@ public class IoCheckInoutService {
|
|
|
|
genInvService.genPreInv(orderEntity.getBillNo());
|
|
|
|
genInvService.genPreInv(orderEntity.getBillNo());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
genInvService.genNorInv(orderEntity.getBillNo());
|
|
|
|
genInvService.genNorInv(orderEntity.getBillNo());
|
|
|
|
orderService.updateOrderInventory(orderEntity.getBillNo(),orderEntity.getStatus());
|
|
|
|
orderService.updateOrderInventory(orderEntity.getBillNo(), orderEntity.getStatus());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
//不入库存,直接进行单据流转
|
|
|
|
//不入库存,直接进行单据流转
|
|
|
|