|
|
|
@ -272,29 +272,29 @@ public class IoOrderReviewController extends BaseController {
|
|
|
|
|
if (orderEntity.getStatus() == ConstantStatus.ORDER_STATUS_AUDITED) {
|
|
|
|
|
return ResultVOUtils.error(500, "单据已验收!");
|
|
|
|
|
}
|
|
|
|
|
if (updateExportStatusRequest.isEntrust() && updateExportStatusRequest.getEntrustId() != null) {
|
|
|
|
|
EntrustReceEntity entrustReceEntity = entrustReceService.findById(updateExportStatusRequest.getEntrustId());
|
|
|
|
|
if (entrustReceEntity == null) {
|
|
|
|
|
return ResultVOUtils.error(500, "无验收权限!");
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
if (orderEntity.getFromType().intValue() != ConstantStatus.FROM_CHANGE && orderEntity.getFromType().intValue() != ConstantStatus.FROM_PEACE_CHANGE) {
|
|
|
|
|
if (StrUtil.isNotEmpty(entrustReceEntity.getEntrustAction())) {
|
|
|
|
|
transferOrder(orderEntity, entrustReceEntity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!entrustReceEntity.getFinishRece()) {
|
|
|
|
|
redisUtil.del(ConstantStatus.REDIS_BILLNO + orderEntity.getBillNo());
|
|
|
|
|
redisUtil.del(ConstantStatus.REDIS_BILLNO_CODES + orderEntity.getBillNo());
|
|
|
|
|
return ResultVOUtils.success("验收成功!");
|
|
|
|
|
} else {
|
|
|
|
|
ReviewFinishRequest reviewFinishRequest = new ReviewFinishRequest();
|
|
|
|
|
BeanUtils.copyProperties(updateExportStatusRequest, reviewFinishRequest);
|
|
|
|
|
log.error("更新外网验收状态");
|
|
|
|
|
updateSpmsStauts(reviewFinishRequest, authAdmin.getId() + "");
|
|
|
|
|
return updateReview(authAdmin, orderEntity);
|
|
|
|
|
if (updateExportStatusRequest.isEntrust()) {
|
|
|
|
|
// EntrustReceEntity entrustReceEntity = entrustReceService.findById(updateExportStatusRequest.getEntrustId());
|
|
|
|
|
// if (entrustReceEntity == null) {
|
|
|
|
|
// return ResultVOUtils.error(500, "无验收权限!");
|
|
|
|
|
// } else {
|
|
|
|
|
EntrustReceEntity entrustReceEntity = entrustReceService.findByUnique(orderEntity.getAction(), getUserId());
|
|
|
|
|
if (orderEntity.getFromType().intValue() != ConstantStatus.FROM_CHANGE && orderEntity.getFromType().intValue() != ConstantStatus.FROM_PEACE_CHANGE) {
|
|
|
|
|
if (StrUtil.isNotEmpty(entrustReceEntity.getEntrustAction())) {
|
|
|
|
|
transferOrder(orderEntity, entrustReceEntity);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!entrustReceEntity.getFinishRece()) {
|
|
|
|
|
redisUtil.del(ConstantStatus.REDIS_BILLNO + orderEntity.getBillNo());
|
|
|
|
|
redisUtil.del(ConstantStatus.REDIS_BILLNO_CODES + orderEntity.getBillNo());
|
|
|
|
|
return ResultVOUtils.success("验收成功!");
|
|
|
|
|
} else {
|
|
|
|
|
ReviewFinishRequest reviewFinishRequest = new ReviewFinishRequest();
|
|
|
|
|
BeanUtils.copyProperties(updateExportStatusRequest, reviewFinishRequest);
|
|
|
|
|
log.error("更新外网验收状态");
|
|
|
|
|
updateSpmsStauts(reviewFinishRequest, authAdmin.getId() + "");
|
|
|
|
|
return updateReview(authAdmin, orderEntity);
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
} else {
|
|
|
|
|
ReviewFinishRequest reviewFinishRequest = new ReviewFinishRequest();
|
|
|
|
|
BeanUtils.copyProperties(updateExportStatusRequest, reviewFinishRequest);
|
|
|
|
|