zouyu
2023-09-27 75b2904fbaf4fab6a9fb3baf065d2c927cc7a7a2
base-server/src/main/java/com/yuanchu/mom/controller/MbomModelController.java
@@ -2,7 +2,7 @@
import com.yuanchu.mom.pojo.dto.MbomModelDto;
import com.yuanchu.mom.pojo.dto.TechniqueModelDto;
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
@@ -12,6 +12,11 @@
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import com.yuanchu.mom.service.MbomModelService;
import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
@@ -46,8 +51,8 @@
    @ApiOperation(value = "新增物料清单维护")
    @PostMapping("/addMbom")
    public Result addMbom(@Validated @RequestBody MbomModelDto mbomModelDto) {
        Integer id = mbomModelService.addMbom(mbomModelDto);
        return Result.success("新增" + id + "成功!");
       mbomModelService.addMbom(mbomModelDto);
        return Result.success("新增成功!");
    }
    @ApiOperation(value = "删除")
@@ -70,5 +75,17 @@
        return Result.success("批量删除成功!");
    }
    @ApiOperation(value = "下载模板")
    @PostMapping("/downloadTemplate")
    public void downloadMBomTemplate(@RequestBody Map<String,Object> map,HttpServletResponse response){
        mbomModelService.downloadTemplate(map,response);
    }
    @ApiOperation(value = "导出物料清单")
    @PostMapping("/exportMBom")
    public void exportMBom(@RequestBody Map<String,Object> map, HttpServletResponse response){
        mbomModelService.exportMBom(map,response);
    }
}