Commit 02fe0ea0 authored by fangxinjiang's avatar fangxinjiang

项目订单 附件上传

parent 3aa82255
......@@ -2,6 +2,7 @@ package com.yifu.cloud.plus.v1.yifu.order.controller;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderService;
import com.yifu.cloud.plus.v1.yifu.order.util.EkpOrderFileTask;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderAddVO;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderReplyAddVO;
......@@ -9,6 +10,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -32,6 +34,9 @@ public class EkpOrderController {
@Resource
private TOrderService tOrderService;
@Autowired
private EkpOrderFileTask ekpOrderFileTask;
/**
* 接收处理ekp订单
*
......@@ -43,9 +48,6 @@ public class EkpOrderController {
@Schema(description = "接收处理ekp订单")
@PostMapping(value = "/receiveOrder")
public R receiveOrder(OrderAddVO vo) throws IOException {
log.error("vo.getCreateTime()111="+vo.getCreateTime());
log.error("vo.getCreateTime()222="+vo.getDeptNo());
log.error("vo.getCreateTime()333="+vo.getOrderNo());
return tOrderService.receiveOrder(vo);
}
......@@ -60,8 +62,9 @@ public class EkpOrderController {
*/
@Schema(description = "接收处理ekp附件")
@PostMapping(value = "/receiveOrderNew")
public R receiveOrder(OrderAttVo vo) throws IOException {
return tOrderService.receiveOrderNew(vo);
public R receiveOrder(OrderAttVo vo) {
ekpOrderFileTask.receiveOrderNew(vo);
return R.ok();
}
/**
......
package com.yifu.cloud.plus.v1.yifu.order.util;
import com.yifu.cloud.plus.v1.yifu.order.service.TOrderService;
import com.yifu.cloud.plus.v1.yifu.order.vo.OrderAttVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import java.io.IOException;
/**
* @Author fxj
* @Date 2023/6/25
* @Description
* @Version 1.0
*/
@Slf4j
@Component
public class EkpOrderFileTask {
@Autowired
TOrderService orderService;
/**
* @Author fxj
* @Description 订单附件上传
* @Date 15:58 2023/6/25
* @Param
* @return
**/
@Async
public void receiveOrderNew(OrderAttVo vo){
try {
orderService.receiveOrderNew(vo);
} catch (IOException e) {
log.error("订单附件删除异常:",e);
}
}
}
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