whycxzp
2023-03-01 93a16e3707b870856594e89b950174b64bb7d6cd
src/main/java/com/whyc/controller/BOMFeedbakController.java
@@ -3,13 +3,18 @@
import com.whyc.dto.Response;
import com.whyc.pojo.BOMFeedback;
import com.whyc.service.BOMFeedbakService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.mail.MessagingException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
@RestController
@Api(tags = "反馈管理")
@@ -30,15 +35,28 @@
        return service.getRecevierStatus(flag,pageCurr,pageSize);
    }
    @ApiOperation(value = "接收者确认反馈")
    @GetMapping("setconfirmFk")
    public Response setconfirmFk(@RequestParam int id){
        return service.setconfirmFk(id);
    @ApiOperation(value = "接收者确认反馈",notes = "传入id,confirmStatus,replyContent")
    @GetMapping("confirmFeedback")
    public Response confirmFeedback(@RequestBody BOMFeedback feedback){
        return service.confirmFeedback(feedback);
    }
    @ApiOperation("更新ECR流水号")
    @PostMapping("updateEcrNumber")
    public Response updateEcrNumber(int id,String ecrNumber){
        return service.updateEcrNumber(id,ecrNumber);
    }
    @ApiOperation("提交反馈")
    @GetMapping("submitFeedback")
    public Response submitFeedback(@RequestBody BOMFeedback feedback) throws IOException, MessagingException {
        return service.submitFeedback(feedback);
    @PostMapping("submitFeedback")
    public Response submitFeedback(@RequestPart(required = false) List<MultipartFile> multipartFileList, @RequestParam String feedbackJson) throws IOException, MessagingException {
        BOMFeedback feedback = ActionUtil.getGson().fromJson(feedbackJson, BOMFeedback.class);
        return service.submitFeedback(feedback,multipartFileList);
    }
    @ApiOperation(value = "根据文件路径下载")
    @GetMapping("downLoadFileByFilePath")
    public void downLoadFileByFilePath(HttpServletRequest req, HttpServletResponse resp, @RequestParam String filePath){
        service.downLoadFileByFilePath(req,resp,filePath);
    }
}