委托验收补单问题,单独分库默认第一个

fengcang
anthonyywj2 3 years ago
parent da06aad66d
commit 8f4104f0b6

@ -274,7 +274,7 @@ public class OrderController {
} else { } else {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest(); FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setCode(stockOrderEntity.getLocStorageCode()); filterInvWarehouseRequest.setCode(stockOrderEntity.getLocStorageCode());
filterInvWarehouseRequest.setUserId(userId ); filterInvWarehouseRequest.setUserId(userId);
invWarehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest); invWarehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest);
} }
@ -368,10 +368,10 @@ public class OrderController {
return ResultVOUtils.success("验收成功!"); return ResultVOUtils.success("验收成功!");
} else } else
return updateReview(authAdmin, updateExportStatusRequest); return updateReview(authAdmin, updateExportStatusRequest, entrustReceEntity);
} }
} else } else
return updateReview(authAdmin, updateExportStatusRequest); return updateReview(authAdmin, updateExportStatusRequest, null);
} }
@ -439,12 +439,17 @@ public class OrderController {
} }
public BaseResponse updateReview(AuthAdmin authAdmin, UpdateExportStatusRequest updateExportStatusRequest) { public BaseResponse updateReview(AuthAdmin authAdmin, UpdateExportStatusRequest updateExportStatusRequest, EntrustReceEntity entrustReceEntity) {
OrderEntity orderEntity = orderService.findById(updateExportStatusRequest.getOrderId()); OrderEntity orderEntity = orderService.findById(updateExportStatusRequest.getOrderId());
orderEntity.setReceiveStatus(1); orderEntity.setReceiveStatus(1);
orderEntity.setReviewUser(authAdmin.getId().intValue()); orderEntity.setReviewUser(authAdmin.getId().intValue());
orderEntity.setUpdateTime(new Date()); orderEntity.setUpdateTime(new Date());
orderEntity.setAuditTime(new Date()); orderEntity.setAuditTime(new Date());
if (entrustReceEntity != null && StrUtil.isEmpty(orderEntity.getInvWarehouseCode())) {
orderEntity.setInvWarehouseCode(entrustReceEntity.getInvWarehouseCode());
} else if (StrUtil.isEmpty(orderEntity.getInvWarehouseCode())) {
orderEntity.setInvWarehouseCode(authAdmin.getLocSubInvCode());
}
orderService.updateOrder(orderEntity); orderService.updateOrder(orderEntity);
List<String> erpIds = DataTransUtil.strToErpList(orderEntity.getErpFk()); List<String> erpIds = DataTransUtil.strToErpList(orderEntity.getErpFk());
if (erpIds != null && erpIds.size() > 0) { if (erpIds != null && erpIds.size() > 0) {
@ -498,7 +503,7 @@ public class OrderController {
updateExportStatusRequest.setOrderId(temp.getOrderIdFk()); updateExportStatusRequest.setOrderId(temp.getOrderIdFk());
AuthAdmin authAdmin = customerService.getUserBean(); AuthAdmin authAdmin = customerService.getUserBean();
return updateReview(authAdmin, updateExportStatusRequest); return updateReview(authAdmin, updateExportStatusRequest, null);
} }

@ -272,7 +272,7 @@ public class OrderServiceImpl implements OrderService {
supplementOrder.setInvWarehouseCode(order.getFromSubInvCode()); supplementOrder.setInvWarehouseCode(order.getFromSubInvCode());
} else { } else {
List<InvSubWarehouseEntity> invSubWarehouseEntities = invSubWarehouseService.findByParentId(supplementOrder.getLocStorageCode()); List<InvSubWarehouseEntity> invSubWarehouseEntities = invSubWarehouseService.findByParentId(supplementOrder.getLocStorageCode());
if (CollUtil.isNotEmpty(invSubWarehouseEntities) && invSubWarehouseEntities.size() == 1) { if (CollUtil.isNotEmpty(invSubWarehouseEntities) && invSubWarehouseEntities.size() > 0) {
supplementOrder.setInvWarehouseCode(invSubWarehouseEntities.get(0).getCode()); supplementOrder.setInvWarehouseCode(invSubWarehouseEntities.get(0).getCode());
} }
} }

Loading…
Cancel
Save