whyclxw
2024-07-25 6ff23a47d7d88e420d476a8e739b83f4c2dc8da4
src/main/java/com/whyc/controller/DefectiveProductsController.java
@@ -1,5 +1,6 @@
package com.whyc.controller;
import com.whyc.dto.DefectiveDto;
import com.whyc.dto.Response;
import com.whyc.pojo.BOMFeedback;
import com.whyc.pojo.DefectiveProducts;
@@ -34,7 +35,21 @@
    @ApiOperation("处理不良品")
    @PostMapping("updateDefective")
    public Response updateDefective(@RequestBody DefectiveProductsHistory defectiveHis) throws IOException, MessagingException {
        return service.updateDefective(defectiveHis);
    public Response updateDefective(@RequestPart(required = false) List<MultipartFile> multipartFileList, @RequestParam String defectiveHisJson) {
        DefectiveProductsHistory defectiveHis= ActionUtil.getGson().fromJson(defectiveHisJson, DefectiveProductsHistory.class);
        return service.updateDefective(defectiveHis,multipartFileList);
    }
    @ApiOperation("归档不良品")
    @PostMapping("stopDefective")
    public Response stopDefective(@RequestParam int  deftId) {
        return service.stopDefective(deftId);
    }
    @ApiOperation("获取不良品")
    @GetMapping("getDefectives")
    public Response getDefectives(@RequestParam String  message) {
        DefectiveDto defectiveDto= ActionUtil.getGson().fromJson(message, DefectiveDto.class);
        return service.getDefectiveLimit(defectiveDto);
    }
}