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

fengcang
anthonyywj2 3 years ago
parent da06aad66d
commit 8f4104f0b6

@ -274,7 +274,7 @@ public class OrderController {
} else {
FilterInvWarehouseRequest filterInvWarehouseRequest = new FilterInvWarehouseRequest();
filterInvWarehouseRequest.setCode(stockOrderEntity.getLocStorageCode());
filterInvWarehouseRequest.setUserId(userId );
filterInvWarehouseRequest.setUserId(userId);
invWarehouseEntities = invWarehouseService.filterAllByUser(filterInvWarehouseRequest);
}
@ -368,10 +368,10 @@ public class OrderController {
return ResultVOUtils.success("验收成功!");
} else
return updateReview(authAdmin, updateExportStatusRequest);
return updateReview(authAdmin, updateExportStatusRequest, entrustReceEntity);
}
} 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.setReceiveStatus(1);
orderEntity.setReviewUser(authAdmin.getId().intValue());
orderEntity.setUpdateTime(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);
List<String> erpIds = DataTransUtil.strToErpList(orderEntity.getErpFk());
if (erpIds != null && erpIds.size() > 0) {
@ -498,7 +503,7 @@ public class OrderController {
updateExportStatusRequest.setOrderId(temp.getOrderIdFk());
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());
} else {
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());
}
}

Loading…
Cancel
Save