| | |
| | | * @author zss |
| | | * @since 2023-08-18 16:59:14 |
| | | */ |
| | | @Api(tags = "基础数据-->工艺路线维护表接口") |
| | | @Api(tags = "基础数据-->工艺路线维护") |
| | | @RestController |
| | | @RequestMapping("/technologyTemplate") |
| | | public class TechnologyTemplateController { |
| | |
| | | return Result.success(technologyTemplateService.chooseDevGroup()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增工艺路线维护-->选择工序") |
| | | @GetMapping("/chooseTech") |
| | | public Result chooseTech() { |
| | | return Result.success(technologyTemplateService.chooseTech()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增工艺路线维护-->选择元件") |
| | | @GetMapping("/chooseElement") |
| | | public Result chooseElement() { |
| | | return Result.success(technologyTemplateService.chooseElement()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增工艺路线维护") |
| | | @PostMapping("/addTechTemp") |
| | | public Result addSale(@Validated @RequestBody TechnologyTemplateDto technologyTemplateDto) { |
| | | technologyTemplateService.addSale(technologyTemplateDto); |
| | | public Result addTechTemp(@Validated @RequestBody TechnologyTemplateDto technologyTemplateDto) { |
| | | technologyTemplateService.addTechTemp(technologyTemplateDto); |
| | | return Result.success("新增成功!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询工艺路线列表") |
| | | @ApiOperation(value = "查询工艺路线列表-->左边二级展示") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "countSize", value = "条数/页", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "type", value = "类型", dataTypeClass = Integer.class), |
| | | @ApiImplicitParam(name = "name", value = "工艺", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "father", value = "工序", dataTypeClass = String.class) |
| | | @ApiImplicitParam(name = "type", value = "类型(为空=0橡胶连接器)", dataTypeClass = Integer.class,required = true), |
| | | @ApiImplicitParam(name = "message", value = "搜索内容", dataTypeClass = String.class) |
| | | }) |
| | | @GetMapping("/selectAllTechTem") |
| | | public Result selectAllTechTem(int pageSize, int countSize, Integer type, String name, String father) { |
| | | IPage<Map<String, Object>> technologyTemplatePage = technologyTemplateService.selectAllTechTem(new Page<Object>(pageSize, countSize), type, name, father); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("total", technologyTemplatePage.getTotal()); |
| | | map.put("row", technologyTemplatePage.getRecords()); |
| | | return Result.success(map); |
| | | public Result selectAllTechTem(Integer type,String message) { |
| | | return Result.success(technologyTemplateService.selectAllTechTem(type,message)); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询工艺路线列表-->右边展示工艺和设备") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "father", value = "工序(父类)", dataTypeClass = String.class,required = true) |
| | | }) |
| | | @GetMapping("/selectAllTechNam") |
| | | public Result selectAllTechNam(String father) { |
| | | return Result.success(technologyTemplateService.selectAllTechNam(father)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据id查询详情") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "工艺id", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @GetMapping("/selecTechById") |
| | | public Result selecTechById(Integer id) { |
| | | return Result.success(technologyTemplateService.getById(id)); |
| | | return Result.success(technologyTemplateService.selecTechById(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "工艺id", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @PostMapping("/writeTechById") |
| | | public Result writeTechById(Integer id,@RequestBody TechnologyTemplateDto technologyTemplateDto) { |
| | | public Result writeTechById(Integer id,@Validated @RequestBody TechnologyTemplateDto technologyTemplateDto) { |
| | | technologyTemplateService.writeTechById(id,technologyTemplateDto); |
| | | return Result.success("修改成功!"); |
| | | return Result.success("修改"+id+"成功!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "工艺id", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class,required = true) |
| | | }) |
| | | @PostMapping("/delTechById") |
| | | public Result delTechById(Integer id) { |
| | | technologyTemplateService.delTechById(id); |
| | | return Result.success("删除成功!"); |
| | | return Result.success("删除"+id+"成功!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "工艺id", dataTypeClass = String.class,required = true) |
| | | @ApiImplicitParam(name = "ids", value = "工艺路线id", dataTypeClass = String.class,required = true) |
| | | }) |
| | | @PostMapping("/delAllTech") |
| | | public Result delAllTech(String ids) { |