Commit a2a108af authored by zhengyi's avatar zhengyi

补充费用申请的详情获取接口修改

parent f05c1f2f
......@@ -99,5 +99,5 @@ public interface OrderFeeApplicationService extends IService<OrderFeeApplication
void cancelFeeApplication(OrderFeeApplicationUpdateReqVO orderFeeApplicationUpdateReqVO);
OrderFeeApplicationDO getApprovalFeeApplication(Long id);
OrderFeeApplicationBackVO getApprovalFeeApplication(Long id);
}
......@@ -595,13 +595,22 @@ public class OrderFeeApplicationServiceImpl extends AbstractService<OrderFeeAppl
}
@Override
public OrderFeeApplicationDO getApprovalFeeApplication(Long id) {
public OrderFeeApplicationBackVO getApprovalFeeApplication(Long id) {
OrderApprovalDO orderApprovalDO = orderApprovalService.getApproval(id);
if (Objects.isNull(orderApprovalDO)){
throw exception(ORDER_APPROVAL_INFO_NOT_FIND);
}
// 这里已经将修改后的内容更新到原数据中去了
OrderFeeApplicationDO orderFeeApplicationDO = JSONObject.parseObject(orderApprovalDO.getDetails(), OrderFeeApplicationDO.class);
return orderFeeApplicationDO;
orderFeeApplicationDO.setBpmProcessId(orderApprovalDO.getFormId());
OrderFeeApplicationBackVO convert = OrderFeeApplicationConvert.INSTANCE.convert(orderFeeApplicationDO);
if (orderFeeApplicationDO != null) {
OrderBackVO order = orderQueryService.getOrder(orderFeeApplicationDO.getOrderId());
LogisticsInfoDto startInfoAndDestInfoByLineId = warehouseLineMapper.getStartInfoAndDestInfoByLineId(order.getLineId());
convert.setStartWarehouse(startInfoAndDestInfoByLineId.getStartTitleZh());
convert.setDestWarehouse(startInfoAndDestInfoByLineId.getDestTitleZh());
convert.setOrderBackVO(order);
}
return convert;
}
}
......@@ -159,8 +159,8 @@ public class OrderFeeApplicationController {
@ApiOperation("获得订单审批费用申请")
@ApiImplicitParam(name = "id", value = "审批id", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<OrderFeeApplicationBackVO> getApprovalFeeApplication(@RequestParam("id") Long id) {
OrderFeeApplicationDO feeApplication = feeApplicationService.getApprovalFeeApplication(id);
return success(OrderFeeApplicationConvert.INSTANCE.convert(feeApplication));
OrderFeeApplicationBackVO vo = feeApplicationService.getApprovalFeeApplication(id);
return success(vo);
}
@GetMapping("/getOrderByProcessId")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment