|
|
|
@ -304,33 +304,40 @@ public class IoCheckInoutService {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (orderEntity.getFromType() != ConstantStatus.FROM_COPY
|
|
|
|
|
&& orderEntity.getFromType() != ConstantStatus.FROM_CHANGE) {
|
|
|
|
|
&& orderEntity.getFromType() != ConstantStatus.FROM_CHANGE && orderEntity.getFromType() != ConstantStatus.FROM_UDIMS) {
|
|
|
|
|
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
orderDetailResultService.deleteByOrderId(orderEntity.getBillNo());
|
|
|
|
|
if (!orderDetailBizService.isExit(orderEntity.getBillNo())) {
|
|
|
|
|
|
|
|
|
|
if (orderEntity.getFromType() != ConstantStatus.FROM_UDISP && orderEntity.getFromType() != ConstantStatus.FROM_UDIMS) {
|
|
|
|
|
if (orderEntity.getFromType() != ConstantStatus.FROM_COPY
|
|
|
|
|
&& orderEntity.getFromType() != ConstantStatus.FROM_CHANGE) {
|
|
|
|
|
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
orderDetailResultService.deleteByOrderId(orderEntity.getBillNo());
|
|
|
|
|
if (!orderDetailBizService.isExit(orderEntity.getBillNo())) {
|
|
|
|
|
orderDetailCodeEntities.forEach(orderDetailCodeEntity ->
|
|
|
|
|
{
|
|
|
|
|
//生成业务单据
|
|
|
|
|
IoOrderDetailBizEntity orderDetailBizEntity = new IoOrderDetailBizEntity();
|
|
|
|
|
BeanUtils.copyProperties(orderDetailCodeEntity, orderDetailBizEntity);
|
|
|
|
|
orderDetailBizEntity.setCount(orderDetailCodeEntity.getReCount());
|
|
|
|
|
orderDetailBizEntity.setId(null);
|
|
|
|
|
orderDetailBizService.insert(orderDetailBizEntity);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
orderDetailCodeEntities.forEach(orderDetailCodeEntity ->
|
|
|
|
|
{
|
|
|
|
|
//生成业务单据
|
|
|
|
|
IoOrderDetailBizEntity orderDetailBizEntity = new IoOrderDetailBizEntity();
|
|
|
|
|
BeanUtils.copyProperties(orderDetailCodeEntity, orderDetailBizEntity);
|
|
|
|
|
orderDetailBizEntity.setCount(orderDetailCodeEntity.getReCount());
|
|
|
|
|
orderDetailBizEntity.setId(null);
|
|
|
|
|
orderDetailBizService.insert(orderDetailBizEntity);
|
|
|
|
|
});
|
|
|
|
|
//生成单据结果
|
|
|
|
|
IoOrderDetailResultEntity orderDetailResultEntity = new IoOrderDetailResultEntity();
|
|
|
|
|
BeanUtils.copyProperties(orderDetailCodeEntity, orderDetailResultEntity);
|
|
|
|
|
orderDetailResultEntity.setCount(orderDetailCodeEntity.getReCount());
|
|
|
|
|
orderDetailResultEntity.setReCount(orderDetailCodeEntity.getReCount());
|
|
|
|
|
orderDetailResultEntity.setId(null);
|
|
|
|
|
orderDetailResultService.insert(orderDetailResultEntity);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//临时表转正式表
|
|
|
|
|
List<IoCodeTempEntity> codeTempEntities = codeTempService.findByOrderId(orderEntity.getBillNo());
|
|
|
|
|