whyclxw
2 天以前 e81a9becf6e180df535ee430a958960f1546dda5
src/main/java/com/whyc/controller/DefectiveProductsController.java
@@ -1,8 +1,10 @@
package com.whyc.controller;
import com.whyc.dto.DefectiveDto;
import com.whyc.dto.Response;
import com.whyc.pojo.BOMFeedback;
import com.whyc.pojo.DefectiveProducts;
import com.whyc.pojo.DefectiveProductsHistory;
import com.whyc.service.BOMFeedbakService;
import com.whyc.service.DefectiveProductsService;
import com.whyc.util.ActionUtil;
@@ -30,4 +32,24 @@
        DefectiveProducts defective= ActionUtil.getGson().fromJson(defectiveJson, DefectiveProducts.class);
        return service.addDefective(defective,multipartFileList);
    }
    @ApiOperation("处理不良品")
    @PostMapping("updateDefective")
    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);
    }
}