|
|
|
@ -452,12 +452,13 @@ public class IoAddInoutService {
|
|
|
|
|
*/
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public BaseResponse waitOrderByPda(PdaPostOrderRequest pdaPostOrderRequest) {
|
|
|
|
|
// if (CollUtil.isEmpty(pdaPostOrderRequest.getOrderDetailCodeEntities())) {
|
|
|
|
|
// return ResultVOUtils.error(500, "提交失败,单据还未扫码或和扫码校验存在异常!");
|
|
|
|
|
// }
|
|
|
|
|
IoOrderEntity orderEntity = pdaPostOrderRequest.getOrderEntity();
|
|
|
|
|
List<IoOrderDetailBizEntity> orderDetailBizEntities = pdaPostOrderRequest.getOrderDetailBizEntities();
|
|
|
|
|
IoOrderEntity temp = orderService.findByBillNo(orderEntity.getBillNo());
|
|
|
|
|
BaseResponse tempResponse = checkSubmitEnable(temp);
|
|
|
|
|
if (tempResponse != null)
|
|
|
|
|
return tempResponse;
|
|
|
|
|
|
|
|
|
|
List<IoOrderDetailBizEntity> orderDetailBizEntities = pdaPostOrderRequest.getOrderDetailBizEntities();
|
|
|
|
|
List<IoCodeTempEntity> codeTempEntities = pdaPostOrderRequest.getCodeTempEntities();
|
|
|
|
|
|
|
|
|
|
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
|
|
|
|
@ -547,7 +548,6 @@ public class IoAddInoutService {
|
|
|
|
|
return tempResponse;
|
|
|
|
|
|
|
|
|
|
List<IoOrderDetailBizEntity> orderDetailBizEntities = pdaPostOrderRequest.getOrderDetailBizEntities();
|
|
|
|
|
List<IoOrderDetailCodeEntity> orderDetailCodeEntities = pdaPostOrderRequest.getOrderDetailCodeEntities();
|
|
|
|
|
List<IoCodeTempEntity> codeTempEntities = pdaPostOrderRequest.getCodeTempEntities();
|
|
|
|
|
|
|
|
|
|
orderDetailBizService.deleteByOrderId(orderEntity.getBillNo());
|
|
|
|
@ -556,10 +556,10 @@ public class IoAddInoutService {
|
|
|
|
|
if (CollUtil.isNotEmpty(orderDetailBizEntities)) {
|
|
|
|
|
orderDetailBizEntities.forEach(orderDetailBizEntity -> {
|
|
|
|
|
orderDetailBizService.insert(orderDetailBizEntity);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
if (CollUtil.isNotEmpty(orderDetailCodeEntities)) {
|
|
|
|
|
orderDetailCodeEntities.forEach(orderDetailCodeEntity -> {
|
|
|
|
|
IoOrderDetailCodeEntity orderDetailCodeEntity = new IoOrderDetailCodeEntity();
|
|
|
|
|
BeanUtil.copyProperties(orderDetailBizEntity, orderDetailCodeEntity);
|
|
|
|
|
orderDetailCodeEntity.setReCount(orderDetailBizEntity.getScanCount());
|
|
|
|
|
orderDetailCodeEntity.setCount(orderDetailBizEntity.getCodeCount());
|
|
|
|
|
orderDetailCodeService.insert(orderDetailCodeEntity);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -571,13 +571,13 @@ public class IoAddInoutService {
|
|
|
|
|
orderEntity.setStatus(ORDER_STATUS_CHECK_PROCESS);
|
|
|
|
|
orderEntity.setDealStatus(ConstantStatus.ORDER_DEAL_POST);
|
|
|
|
|
orderService.update(orderEntity);
|
|
|
|
|
|
|
|
|
|
if (checkWebNewType == 0) {
|
|
|
|
|
ioCheckInoutService.checkCodeResult(orderEntity.getBillNo());
|
|
|
|
|
} else {
|
|
|
|
|
dealProcess(orderEntity);
|
|
|
|
|
ioCheckInoutService.checkRightResult(orderEntity.getBillNo());
|
|
|
|
|
}
|
|
|
|
|
ioCheckInoutService.checkCodeResult(orderEntity.getBillNo());
|
|
|
|
|
// if (checkWebNewType == 0) {
|
|
|
|
|
//
|
|
|
|
|
// } else {
|
|
|
|
|
// dealProcess(orderEntity);
|
|
|
|
|
// ioCheckInoutService.checkRightResult(orderEntity.getBillNo());
|
|
|
|
|
// }
|
|
|
|
|
return ResultVOUtils.success("提交成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|