whyclxw
4 天以前 bfa320956f20988fe671b0c4d25aa82fe766a98d
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,8 +35,9 @@
    @ApiOperation("处理不良品")
    @PostMapping("updateDefective")
    public Response updateDefective(@RequestBody DefectiveProductsHistory defectiveHis) {
        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("归档不良品")
@@ -43,4 +45,11 @@
    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);
    }
}