diff --git a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java index 2b39550..45692d4 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java +++ b/ym-admin/src/main/java/com/cnbm/admin/config/SecurityConfig.java @@ -73,8 +73,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter { "/webjars/**", "/websocket/**", "/influx/**", - "/basic/**", - "/processInspection/**", +// "/basic/**", +// "/qualityPlanning/**", +// "/processInspection/**", "/captcha").anonymous() // .antMatchers("/testCors").hasAuthority("system:dept:list222") // 除上面外的所有请求全部需要鉴权认证 diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java index b799d0c..7045782 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java @@ -53,7 +53,7 @@ public class FactoryController { @ApiImplicitParam(name = "type", value = "工厂类型", paramType = "query", dataTypeClass = String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:factory:page')") + @PreAuthorize("@ex.hasAuthority('basic:factory:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = factoryService.page(params); return new Result>().ok(page); @@ -61,7 +61,7 @@ public class FactoryController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:factory:info')") + @PreAuthorize("@ex.hasAuthority('basic:factory:info')") public Result get(@PathVariable("id") Long id){ FactoryDTO data = factoryService.get(id); @@ -70,8 +70,8 @@ public class FactoryController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:factory:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:factory:save')") public Result save(@RequestBody FactoryDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -83,8 +83,8 @@ public class FactoryController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:factory:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:factory:update')") public Result update(@RequestBody FactoryDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -94,8 +94,8 @@ public class FactoryController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:factory:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:factory:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -107,8 +107,8 @@ public class FactoryController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:factory:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:factory:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = factoryService.list(params); @@ -117,7 +117,7 @@ public class FactoryController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ factoryService.changeStatus(id.getId()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/FeaturesStageProcedureRelationController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/FeaturesStageProcedureRelationController.java new file mode 100644 index 0000000..02145ea --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/FeaturesStageProcedureRelationController.java @@ -0,0 +1,128 @@ +package com.cnbm.basic.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO; +import com.cnbm.basic.excel.FeaturesStageProcedureRelationExcel; +import com.cnbm.basic.service.IFeaturesStageProcedureRelationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 过程检验-工艺-检验参数 关系表 前端控制器 + * + * @author why + * @since 2022-09-01 + */ +@RestController +@RequestMapping("/basic/featuresStageProcedureRelation") +@Api(tags="过程检验-工艺-检验参数 关系表 ") +public class FeaturesStageProcedureRelationController { + @Autowired + private IFeaturesStageProcedureRelationService featuresStageProcedureRelationService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), + @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) + }) + @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = featuresStageProcedureRelationService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:info')") + public Result get(@PathVariable("id") Long id){ + FeaturesStageProcedureRelationDTO data = featuresStageProcedureRelationService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:save')") + public Result save(@RequestBody FeaturesStageProcedureRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + featuresStageProcedureRelationService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:update')") + public Result update(@RequestBody FeaturesStageProcedureRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + featuresStageProcedureRelationService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + featuresStageProcedureRelationService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:featuresStageProcedureRelation:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = featuresStageProcedureRelationService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, FeaturesStageProcedureRelationExcel.class); + } + + @PostMapping("batchInsert") + @ApiOperation("批量保存") + public Result batchInsert(@RequestBody FeaturesStageProcedureRelationDTO[] lists){ + //效验数据 + //ValidatorUtils.validateEntity(lists, AddGroup.class, DefaultGroup.class); + + featuresStageProcedureRelationService.batchInsert(lists); + + return new Result(); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java index 45a4c3d..07dc325 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java @@ -50,7 +50,7 @@ public class MachineController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:machine:page')") + @PreAuthorize("@ex.hasAuthority('basic:machine:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = machineService.page(params); @@ -67,7 +67,7 @@ public class MachineController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:machine:page')") + //@PreAuthorize("@ex.hasAuthority('basic:machine:page')") public Result> page2(@ApiIgnore @RequestParam Map params){ PageData page = machineService.page1(params); @@ -77,7 +77,7 @@ public class MachineController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:machine:info')") + @PreAuthorize("@ex.hasAuthority('basic:machine:info')") public Result get(@PathVariable("id") Long id){ MachineDTO data = machineService.get(id); @@ -86,8 +86,8 @@ public class MachineController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:machine:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:machine:save')") public Result save(@RequestBody MachineDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -99,8 +99,8 @@ public class MachineController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:machine:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:machine:update')") public Result update(@RequestBody MachineDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -112,8 +112,8 @@ public class MachineController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:machine:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:machine:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -125,8 +125,8 @@ public class MachineController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:machine:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:machine:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = machineService.list(params); @@ -135,7 +135,7 @@ public class MachineController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ machineService.changeStatus(id.getId()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java index ac5b455..be01362 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java @@ -52,7 +52,7 @@ public class MeasureToolController { @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:measureTool:page')") + @PreAuthorize("@ex.hasAuthority('basic:measureTool:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = measureToolService.page(params); @@ -61,7 +61,7 @@ public class MeasureToolController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:measureTool:info')") + @PreAuthorize("@ex.hasAuthority('basic:measureTool:info')") public Result get(@PathVariable("id") Long id){ MeasureToolDTO data = measureToolService.get(id); @@ -70,8 +70,8 @@ public class MeasureToolController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:measureTool:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:measureTool:save')") public Result save(@RequestBody MeasureToolDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -83,8 +83,8 @@ public class MeasureToolController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:measureTool:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:measureTool:update')") public Result update(@RequestBody MeasureToolDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -96,8 +96,8 @@ public class MeasureToolController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:measureTool:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:measureTool:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -109,8 +109,8 @@ public class MeasureToolController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:measureTool:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:measureTool:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = measureToolService.list(params); @@ -119,10 +119,17 @@ public class MeasureToolController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ measureToolService.changeStatus(id.getId()); return new Result(); } + + @PostMapping(value = "list") + @ApiOperation(value = "获取量具列表") + @LogOperation("获取控制图形列表") + public List list() { + return measureToolService.list(); + } } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java index 8d86aee..47393f8 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java @@ -50,7 +50,7 @@ public class PlatformController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:platform:page')") + @PreAuthorize("@ex.hasAuthority('basic:platform:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = platformService.page(params); @@ -59,7 +59,7 @@ public class PlatformController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:platform:info')") + @PreAuthorize("@ex.hasAuthority('basic:platform:info')") public Result get(@PathVariable("id") Long id){ PlatformDTO data = platformService.get(id); @@ -68,8 +68,8 @@ public class PlatformController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:platform:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:platform:save')") public Result save(@RequestBody PlatformDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -81,8 +81,8 @@ public class PlatformController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:platform:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:platform:update')") public Result update(@RequestBody PlatformDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -94,8 +94,8 @@ public class PlatformController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:platform:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:platform:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -107,8 +107,8 @@ public class PlatformController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:platform:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:platform:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = platformService.list(params); @@ -117,7 +117,7 @@ public class PlatformController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ platformService.changeStatus(id.getId()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java index 0e03f88..da6a1f1 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductController.java @@ -14,6 +14,7 @@ import com.cnbm.common.validator.group.UpdateGroup; import com.cnbm.basic.dto.ProductDTO; import com.cnbm.basic.excel.ProductExcel; import com.cnbm.basic.service.IProductService; +import com.cnbm.common.vo.IdVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -54,7 +55,7 @@ public class ProductController { @ApiImplicitParam(name = "product_type_id", value = "产品类型id", paramType = "query", dataTypeClass = Integer.class), @ApiImplicitParam(name = "inspection_stage", value = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验", paramType = "query", dataTypeClass = String.class) }) - //@PreAuthorize("@ex.hasAuthority('code:product:page')") + @PreAuthorize("@ex.hasAuthority('basic:product:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = productService.page(params); @@ -63,7 +64,7 @@ public class ProductController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:product:info')") + @PreAuthorize("@ex.hasAuthority('basic:product:info')") public Result get(@PathVariable("id") Long id){ ProductDTO data = productService.get(id); @@ -72,21 +73,21 @@ public class ProductController { @PostMapping("save") @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:product:save')") - public Result save(@RequestBody ProductDTO dto){ + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:product:save')") + public IdVo save(@RequestBody ProductDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - productService.save(dto); + return productService.add(dto); - return new Result(); + //return new Result(); } @PutMapping("update") @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:product:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:product:update')") public Result update(@RequestBody ProductDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -98,8 +99,8 @@ public class ProductController { @DeleteMapping("delete") @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:product:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:product:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -111,8 +112,8 @@ public class ProductController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:product:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:product:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = productService.list(params); @@ -121,7 +122,7 @@ public class ProductController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ productService.changeStatus(id.getId()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFactoryRelationController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFactoryRelationController.java index e79f869..51138ad 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFactoryRelationController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFactoryRelationController.java @@ -49,7 +49,7 @@ public class ProductFactoryRelationController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) }) - //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:page')") + @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = productFactoryRelationService.page(params); @@ -58,7 +58,7 @@ public class ProductFactoryRelationController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:info')") + @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:info')") public Result get(@PathVariable("id") Long id){ ProductFactoryRelationDTO data = productFactoryRelationService.get(id); @@ -67,8 +67,8 @@ public class ProductFactoryRelationController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:save')") public Result save(@RequestBody ProductFactoryRelationDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -80,8 +80,8 @@ public class ProductFactoryRelationController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:update')") public Result update(@RequestBody ProductFactoryRelationDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -93,8 +93,8 @@ public class ProductFactoryRelationController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -106,8 +106,8 @@ public class ProductFactoryRelationController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:productFactoryRelation:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:productFactoryRelation:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = productFactoryRelationService.list(params); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java index 1d28829..2b72f4d 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java @@ -52,7 +52,7 @@ public class ProductFeaturesController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) }) - //@PreAuthorize("@ex.hasAuthority('code:productFeatures:page')") + @PreAuthorize("@ex.hasAuthority('basic:productFeatures:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = productFeaturesService.page(params); @@ -61,7 +61,7 @@ public class ProductFeaturesController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:productFeatures:info')") + @PreAuthorize("@ex.hasAuthority('basic:productFeatures:info')") public Result get(@PathVariable("id") Long id){ ProductFeaturesDTO data = productFeaturesService.get(id); @@ -70,8 +70,8 @@ public class ProductFeaturesController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:productFeatures:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:productFeatures:save')") public Result save(@RequestBody ProductFeaturesDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -83,8 +83,8 @@ public class ProductFeaturesController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:productFeatures:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:productFeatures:update')") public Result update(@RequestBody ProductFeaturesDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -96,8 +96,8 @@ public class ProductFeaturesController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:productFeatures:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:productFeatures:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -109,8 +109,8 @@ public class ProductFeaturesController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:productFeatures:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:productFeatures:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = productFeaturesService.list(params); @@ -124,4 +124,15 @@ public class ProductFeaturesController { return new Result>().ok(list); } + @PostMapping("getFeaturesByStageProcedure") + @ApiOperation("查询产品特性 依据工序id 检验阶段") + @ApiImplicitParams({ + @ApiImplicitParam(name = "inspectionStage", value = "检测阶段", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "workingProcedureId", value = "工序", paramType = "query", dataTypeClass = Long.class) + }) + public Result> getFeaturesByStageProcedure(@ApiIgnore @RequestParam Map params){ + List list = productFeaturesService.getFeaturesByStageProcedure(params); + return new Result>().ok(list); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesHisController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesHisController.java index d955524..1da1660 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesHisController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesHisController.java @@ -49,7 +49,7 @@ public class ProductFeaturesHisController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) }) - //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:page')") + @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = productFeaturesHisService.page(params); @@ -58,7 +58,7 @@ public class ProductFeaturesHisController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:info')") + @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:info')") public Result get(@PathVariable("id") Long id){ ProductFeaturesHisDTO data = productFeaturesHisService.get(id); @@ -67,8 +67,8 @@ public class ProductFeaturesHisController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:save')") public Result save(@RequestBody ProductFeaturesHisDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -80,8 +80,8 @@ public class ProductFeaturesHisController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:update')") public Result update(@RequestBody ProductFeaturesHisDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -93,8 +93,8 @@ public class ProductFeaturesHisController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -106,8 +106,8 @@ public class ProductFeaturesHisController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:productFeaturesHis:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = productFeaturesHisService.list(params); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java index 9b3fa67..1532242 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductTypeController.java @@ -2,6 +2,7 @@ package com.cnbm.basic.controller; import com.cnbm.admin.annotation.LogOperation; import com.cnbm.admin.params.IdParam; +import com.cnbm.basic.dto.UnitDTO; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.utils.ExcelUtils; @@ -53,7 +54,7 @@ public class ProductTypeController { @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) -// @PreAuthorize("@ex.hasAuthority('code:productType:page')") + @PreAuthorize("@ex.hasAuthority('basic:productType:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = productTypeService.page(params); @@ -62,7 +63,7 @@ public class ProductTypeController { @GetMapping("{id}") @ApiOperation("信息") -// @PreAuthorize("@ex.hasAuthority('code:productType:info')") + @PreAuthorize("@ex.hasAuthority('basic:productType:info')") public Result get(@PathVariable("id") Long id){ ProductTypeDTO data = productTypeService.get(id); @@ -71,8 +72,8 @@ public class ProductTypeController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") -// @PreAuthorize("@ex.hasAuthority('code:productType:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:productType:save')") public Result save(@RequestBody ProductTypeDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -84,8 +85,8 @@ public class ProductTypeController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") -// @PreAuthorize("@ex.hasAuthority('code:productType:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:productType:update')") public Result update(@RequestBody ProductTypeDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -97,8 +98,8 @@ public class ProductTypeController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") -// @PreAuthorize("@ex.hasAuthority('code:productType:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:productType:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -110,8 +111,8 @@ public class ProductTypeController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") -// @PreAuthorize("@ex.hasAuthority('code:productType:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:productType:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = productTypeService.list(params); @@ -120,11 +121,16 @@ public class ProductTypeController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ productTypeService.changeStatus(id.getId()); return new Result(); } + @PostMapping(value = "list") + @ApiOperation(value = "获取产品类型列表") + public List list() { + return productTypeService.list(); + } } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductWorkingprocedureRelationController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductWorkingprocedureRelationController.java index 88f0c7f..4c84451 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductWorkingprocedureRelationController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductWorkingprocedureRelationController.java @@ -1,5 +1,6 @@ package com.cnbm.basic.controller; +import com.cnbm.admin.annotation.LogOperation; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.utils.ExcelUtils; @@ -48,7 +49,7 @@ public class ProductWorkingprocedureRelationController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) }) - //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:page')") + @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = productWorkingprocedureRelationService.page(params); @@ -57,7 +58,7 @@ public class ProductWorkingprocedureRelationController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:info')") + @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:info')") public Result get(@PathVariable("id") Long id){ ProductWorkingprocedureRelationDTO data = productWorkingprocedureRelationService.get(id); @@ -66,8 +67,8 @@ public class ProductWorkingprocedureRelationController { @PostMapping("save") @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:save')") public Result save(@RequestBody ProductWorkingprocedureRelationDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -79,8 +80,8 @@ public class ProductWorkingprocedureRelationController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:update')") public Result update(@RequestBody ProductWorkingprocedureRelationDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -92,8 +93,8 @@ public class ProductWorkingprocedureRelationController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -105,8 +106,8 @@ public class ProductWorkingprocedureRelationController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = productWorkingprocedureRelationService.list(params); @@ -115,7 +116,7 @@ public class ProductWorkingprocedureRelationController { @GetMapping("getWorkingprocedureByProductId/{productId}") @ApiOperation("查询所有工序 依据产品id") - //@LogOperation("查询所有工序 依据产品id") + @LogOperation("查询所有工序 依据产品id") public Result> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){ List list = productWorkingprocedureRelationService.getWorkingprocedureByProductId(productId); return new Result>().ok(list); @@ -123,8 +124,8 @@ public class ProductWorkingprocedureRelationController { @PostMapping("batchInsertWorkingprocedure") @ApiOperation("添加工序流程") - //@LogOperation("添加工序流程") - //@PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:batchInsertWorkingprocedure')") + @LogOperation("添加工序流程") + //@PreAuthorize("@ex.hasAuthority('basic:productWorkingprocedureRelation:batchInsertWorkingprocedure')") public Result batchInsertWorkingprocedure(@RequestBody ProductWorkingprocedureRelationDTO[] lists){ productWorkingprocedureRelationService.batchInsertWorkingprocedure(lists); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ShiftController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ShiftController.java index cd52506..abc6f9d 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ShiftController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ShiftController.java @@ -49,7 +49,7 @@ public class ShiftController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) }) - //@PreAuthorize("@ex.hasAuthority('code:shift:page')") + @PreAuthorize("@ex.hasAuthority('basic:shift:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = shiftService.page(params); @@ -58,7 +58,7 @@ public class ShiftController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:shift:info')") + @PreAuthorize("@ex.hasAuthority('basic:shift:info')") public Result get(@PathVariable("id") Long id){ ShiftDTO data = shiftService.get(id); @@ -67,8 +67,8 @@ public class ShiftController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:shift:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:shift:save')") public Result save(@RequestBody ShiftDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -80,8 +80,8 @@ public class ShiftController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:shift:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:shift:update')") public Result update(@RequestBody ShiftDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -93,8 +93,8 @@ public class ShiftController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:shift:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:shift:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -106,8 +106,8 @@ public class ShiftController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:shift:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:shift:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = shiftService.list(params); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/TeamController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/TeamController.java index f8edad8..ab65ce7 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/TeamController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/TeamController.java @@ -49,7 +49,7 @@ public class TeamController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "id", value = "id", paramType = "query", dataTypeClass = Long.class) }) - //@PreAuthorize("@ex.hasAuthority('code:team:page')") + @PreAuthorize("@ex.hasAuthority('basic:team:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = teamService.page(params); @@ -58,7 +58,7 @@ public class TeamController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:team:info')") + @PreAuthorize("@ex.hasAuthority('basic:team:info')") public Result get(@PathVariable("id") Long id){ TeamDTO data = teamService.get(id); @@ -67,8 +67,8 @@ public class TeamController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:team:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:team:save')") public Result save(@RequestBody TeamDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -80,8 +80,8 @@ public class TeamController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:team:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:team:update')") public Result update(@RequestBody TeamDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -93,8 +93,8 @@ public class TeamController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:team:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:team:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -106,8 +106,8 @@ public class TeamController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:team:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:team:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = teamService.list(params); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java index 28a9eba..7233a08 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/UnitController.java @@ -20,10 +20,12 @@ import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletResponse; +import javax.validation.groups.Default; import java.util.List; import java.util.Map; @@ -50,7 +52,7 @@ public class UnitController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:unit:page')") + @PreAuthorize("@ex.hasAuthority('basic:unit:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = unitService.page(params); @@ -59,7 +61,7 @@ public class UnitController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:unit:info')") + //@PreAuthorize("@ex.hasAuthority('basic:unit:info')") public Result get(@PathVariable("id") Long id){ UnitDTO data = unitService.get(id); @@ -68,8 +70,8 @@ public class UnitController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:unit:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:unit:save')") public Result save(@RequestBody UnitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -81,8 +83,8 @@ public class UnitController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:unit:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:unit:update')") public Result update(@RequestBody UnitDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -94,8 +96,8 @@ public class UnitController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:unit:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:unit:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -107,8 +109,8 @@ public class UnitController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:unit:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:unit:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = unitService.list(params); @@ -117,11 +119,17 @@ public class UnitController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ unitService.changeStatus(id.getId()); return new Result(); } + @PostMapping(value = "list") + @ApiOperation(value = "获取单位列表") + @LogOperation("获取单位列表") + public List list() { + return unitService.list(); + } } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java index 6023c75..1bc8961 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java @@ -2,6 +2,7 @@ package com.cnbm.basic.controller; import com.cnbm.admin.annotation.LogOperation; import com.cnbm.admin.params.IdParam; +import com.cnbm.basic.dto.UnitDTO; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.utils.ExcelUtils; @@ -52,7 +53,7 @@ public class WorkingProcedureController { @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:page')") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = workingProcedureService.page(params); @@ -61,7 +62,7 @@ public class WorkingProcedureController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:info')") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:info')") public Result get(@PathVariable("id") Long id){ WorkingProcedureDTO data = workingProcedureService.get(id); @@ -70,8 +71,8 @@ public class WorkingProcedureController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:save')") public Result save(@RequestBody WorkingProcedureDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -83,8 +84,8 @@ public class WorkingProcedureController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:update')") public Result update(@RequestBody WorkingProcedureDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -96,8 +97,8 @@ public class WorkingProcedureController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -109,8 +110,8 @@ public class WorkingProcedureController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedure:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedure:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = workingProcedureService.list(params); @@ -119,7 +120,7 @@ public class WorkingProcedureController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ workingProcedureService.changeStatus(id.getId()); @@ -128,10 +129,16 @@ public class WorkingProcedureController { @GetMapping("getWorkingprocedureByProductId/{productId}") @ApiOperation("查询所有工序 依据产品id") - //@LogOperation("查询所有工序 依据产品id") + @LogOperation("查询所有工序 依据产品id") public Result> getWorkingprocedureByProductId(@PathVariable("productId") Long productId){ List list = workingProcedureService.getWorkingProcedureByProductId(productId); return new Result>().ok(list); } + @PostMapping(value = "list") + @ApiOperation(value = "获取工序列表") + public List list() { + return workingProcedureService.list(); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java index b712e29..adb2ec2 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java @@ -2,6 +2,7 @@ package com.cnbm.basic.controller; import com.cnbm.admin.annotation.LogOperation; import com.cnbm.admin.params.IdParam; +import com.cnbm.basic.dto.WorkingProcedureDTO; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.utils.ExcelUtils; @@ -50,7 +51,7 @@ public class WorkingProcedureTypeController { @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), @ApiImplicitParam(name = "status", value = "状态", paramType = "query", dataTypeClass = Integer.class) }) - //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:page')") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:page')") public Result> page(@ApiIgnore @RequestParam Map params){ PageData page = workingProcedureTypeService.page(params); @@ -59,7 +60,7 @@ public class WorkingProcedureTypeController { @GetMapping("{id}") @ApiOperation("信息") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:info')") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:info')") public Result get(@PathVariable("id") Long id){ WorkingProcedureTypeDTO data = workingProcedureTypeService.get(id); @@ -68,8 +69,8 @@ public class WorkingProcedureTypeController { @PostMapping @ApiOperation("保存") - //@LogOperation("保存") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:save')") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:save')") public Result save(@RequestBody WorkingProcedureTypeDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); @@ -81,8 +82,8 @@ public class WorkingProcedureTypeController { @PutMapping @ApiOperation("修改") - //@LogOperation("修改") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:update')") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:update')") public Result update(@RequestBody WorkingProcedureTypeDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); @@ -94,8 +95,8 @@ public class WorkingProcedureTypeController { @DeleteMapping @ApiOperation("删除") - //@LogOperation("删除") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:delete')") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:delete')") public Result delete(@RequestBody Long[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); @@ -107,8 +108,8 @@ public class WorkingProcedureTypeController { @GetMapping("export") @ApiOperation("导出") - //@LogOperation("导出") - //@PreAuthorize("@ex.hasAuthority('code:workingProcedureType:export')") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('basic:workingProcedureType:export')") public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { List list = workingProcedureTypeService.list(params); @@ -117,11 +118,17 @@ public class WorkingProcedureTypeController { @PostMapping("status") @ApiOperation("改变状态") - //@LogOperation("改变状态") + @LogOperation("改变状态") public Result changeStatus(@RequestBody IdParam id){ workingProcedureTypeService.changeStatus(id.getId()); return new Result(); } + @PostMapping(value = "list") + @ApiOperation(value = "获取工序类型列表") + private List list(@ApiIgnore @RequestParam Map params) { + return workingProcedureTypeService.list(params); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/FeaturesStageProcedureRelationDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/FeaturesStageProcedureRelationDTO.java new file mode 100644 index 0000000..197e363 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/FeaturesStageProcedureRelationDTO.java @@ -0,0 +1,63 @@ +package com.cnbm.basic.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + + +/** + * 过程检验-工艺-检验参数 关系表 + * + * @author why + * @since 2022-09-01 + */ +@Data +@ApiModel(value = "过程检验-工艺-检验参数 关系表 DTO对象") +public class FeaturesStageProcedureRelationDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "检验参数id,关联product_features表") + private Long productFeaturesId; + + @ApiModelProperty(value = "工序id,关联 working_procedure 表") + private Long workingProcedureId; + + @ApiModelProperty(value = "(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验") + private Integer inspectionStage; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "创建人") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java index d72ef32..91b04a4 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java @@ -62,15 +62,6 @@ public class ProductFeaturesDTO implements Serializable { @ApiModelProperty(value = "检验参数 规格上线") private Float usl; - @ApiModelProperty(value = "工序id,关联 working_procedure 表id") - private Long workingProcedureId; - - @ApiModelProperty(value = "工序编码,关联 working_procedure 表id") - private String workingProcedureCode; - - @ApiModelProperty(value = "工序名称,关联 working_procedure 表id") - private String workingProcedureName; - @ApiModelProperty(value = "分析图形,关联control_graph表id") private Long controlGraphId; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesHisDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesHisDTO.java index 6783a99..689a536 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesHisDTO.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesHisDTO.java @@ -18,8 +18,6 @@ import java.time.LocalDateTime; public class ProductFeaturesHisDTO implements Serializable { private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "ID") private Long id; @@ -59,9 +57,6 @@ public class ProductFeaturesHisDTO implements Serializable { @ApiModelProperty(value = "检验参数 规格上线") private Float usl; - @ApiModelProperty(value = "工序id,关联 working_procedure 表id") - private Long workingProcedureId; - @ApiModelProperty(value = "是否需要spc分析,1 yes;0 no") private Integer isSpc; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductTypeDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductTypeDTO.java index 017634c..21bd3c2 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductTypeDTO.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductTypeDTO.java @@ -29,7 +29,7 @@ public class ProductTypeDTO implements Serializable { private String code; @ApiModelProperty(value = "描述") - private String desc; + private String descs; @ApiModelProperty(value = "1 可用,0 不可用") private Integer status; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductWorkingprocedureRelationDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductWorkingprocedureRelationDTO.java index 833bedf..3315aa5 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductWorkingprocedureRelationDTO.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductWorkingprocedureRelationDTO.java @@ -33,6 +33,9 @@ public class ProductWorkingprocedureRelationDTO implements Serializable { @ApiModelProperty(value = "工序名称,关联 working_procedure 表") private String workingProcedureName; + @ApiModelProperty(value = "工序编码,关联 working_procedure 表") + private String workingProcedureCode; + @ApiModelProperty(value = "顺序,工序是有先后顺序的。") private Integer sequence; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/FeaturesStageProcedureRelation.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/FeaturesStageProcedureRelation.java new file mode 100644 index 0000000..55c8447 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/FeaturesStageProcedureRelation.java @@ -0,0 +1,68 @@ +package com.cnbm.basic.entity; + +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 过程检验-工艺-检验参数 关系表 + *

+ * + * @author why + * @since 2022-09-01 + */ +@Data +@TableName("features_stage_procedure_relation") +@ApiModel(value = "FeaturesStageProcedureRelation对象", description = "过程检验-工艺-检验参数 关系表 ") +public class FeaturesStageProcedureRelation implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private Long id; + + @ApiModelProperty("检验参数id,关联product_features表") + private Long productFeaturesId; + + @ApiModelProperty("工序id,关联 working_procedure 表") + private Long workingProcedureId; + + @ApiModelProperty("(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验") + private Integer inspectionStage; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + @TableLogic + private Integer valid; + + @ApiModelProperty("创建人") + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeatures.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeatures.java index 3ad96a1..6654ba5 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeatures.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeatures.java @@ -58,9 +58,6 @@ public class ProductFeatures implements Serializable { @ApiModelProperty("检验参数 规格上线") private Float usl; - @ApiModelProperty("工序id,关联 working_procedure 表id") - private Long workingProcedureId; - @ApiModelProperty("分析图形,关联control_graph表id") private Long controlGraphId; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeaturesHis.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeaturesHis.java index b772dfc..306c697 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeaturesHis.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeaturesHis.java @@ -61,9 +61,6 @@ public class ProductFeaturesHis implements Serializable { @ApiModelProperty("检验参数 规格上线") private Float usl; - @ApiModelProperty("工序id,关联 working_procedure 表id") - private Long workingProcedureId; - @ApiModelProperty("是否需要spc分析,1 yes;0 no") private Integer isSpc; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/FeaturesStageProcedureRelationExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/FeaturesStageProcedureRelationExcel.java new file mode 100644 index 0000000..05e5546 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/FeaturesStageProcedureRelationExcel.java @@ -0,0 +1,43 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 过程检验-工艺-检验参数 关系表 + * + * @author why + * @since 2022-09-01 + */ +@Data +public class FeaturesStageProcedureRelationExcel { + @Excel(name = "ID") + private Long id; + @Excel(name = "检验参数id,关联product_features表") + private Long productFeaturesId; + @Excel(name = "工序id,关联 working_procedure 表") + private Long workingProcedureId; + @Excel(name = "(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验") + private Integer inspectionStage; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "创建人") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesExcel.java index 586f825..e570d25 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesExcel.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesExcel.java @@ -37,8 +37,6 @@ public class ProductFeaturesExcel { private Float sl; @Excel(name = "检验参数 规格上线") private Float usl; - @Excel(name = "工序id,关联 working_procedure 表id") - private Long workingProcedureId; @Excel(name = "分析图形,关联control_graph表id") private Long controlGraphId; @Excel(name = "是否需要spc分析,1 yes;0 no") diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesHisExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesHisExcel.java index eccc1e0..6c68ede 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesHisExcel.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesHisExcel.java @@ -39,8 +39,6 @@ public class ProductFeaturesHisExcel { private Float sl; @Excel(name = "检验参数 规格上线") private Float usl; - @Excel(name = "工序id,关联 working_procedure 表id") - private Long workingProcedureId; @Excel(name = "是否需要spc分析,1 yes;0 no") private Integer isSpc; @Excel(name = "分析图形,关联control_graph表id") diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductTypeExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductTypeExcel.java index 84502e5..27f2fc9 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductTypeExcel.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductTypeExcel.java @@ -20,7 +20,7 @@ public class ProductTypeExcel { @Excel(name = "产品类型 编码") private String code; @Excel(name = "描述") - private String desc; + private String descs; @Excel(name = "1 可用,0 不可用") private Integer status; @Excel(name = "备注") diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/FeaturesStageProcedureRelationMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/FeaturesStageProcedureRelationMapper.java new file mode 100644 index 0000000..6130d77 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/FeaturesStageProcedureRelationMapper.java @@ -0,0 +1,20 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.basic.dto.ProductFeaturesDTO; +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.FeaturesStageProcedureRelation; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 过程检验-工艺-检验参数 关系表 + * + * @author why + * @since 2022-09-01 + */ +@Mapper +public interface FeaturesStageProcedureRelationMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/MeasureToolMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/MeasureToolMapper.java index 9348f80..81052fb 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/mapper/MeasureToolMapper.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/MeasureToolMapper.java @@ -1,9 +1,12 @@ package com.cnbm.basic.mapper; +import com.cnbm.basic.dto.MeasureToolDTO; import com.cnbm.common.dao.BaseDao; import com.cnbm.basic.entity.MeasureTool; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 量具表 * @@ -12,5 +15,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface MeasureToolMapper extends BaseDao { - + List list(); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java index 0c9a642..f6b414e 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java @@ -6,6 +6,7 @@ import com.cnbm.basic.entity.ProductFeatures; import org.apache.ibatis.annotations.Mapper; import java.util.List; +import java.util.Map; /** * 产品特性 表 @@ -16,4 +17,6 @@ import java.util.List; @Mapper public interface ProductFeaturesMapper extends BaseDao { List getProductFeaturesByProductId(Long id); + + List getFeaturesByStageProcedure(Map params); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/Factorymysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Factorymysql.sql new file mode 100644 index 0000000..24ca7f4 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Factorymysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561977619142254594, 1067246875800000035, '工厂 表', 'basic/factory', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977619142254595, 1561977619142254594, '查看', NULL, 'basic:factory:page,basic:factory:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977619142254596, 1561977619142254594, '新增', NULL, 'basic:factory:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977619142254597, 1561977619142254594, '修改', NULL, 'basic:factory:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977619142254598, 1561977619142254594, '删除', NULL, 'basic:factory:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977619142254599, 1561977619142254594, '导出', NULL, 'basic:factory:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/FeaturesStageProcedureRelationmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/FeaturesStageProcedureRelationmysql.sql new file mode 100644 index 0000000..e096a8c --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/FeaturesStageProcedureRelationmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1565241134464434177, 1067246875800000035, '过程检验-工艺-检验参数 关系表 ', 'basic/featuresStageProcedureRelation', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1565241134464434178, 1565241134464434177, '查看', NULL, 'basic:featuresStageProcedureRelation:page,basic:featuresStageProcedureRelation:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1565241134464434179, 1565241134464434177, '新增', NULL, 'basic:featuresStageProcedureRelation:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1565241134464434180, 1565241134464434177, '修改', NULL, 'basic:featuresStageProcedureRelation:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1565241134464434181, 1565241134464434177, '删除', NULL, 'basic:featuresStageProcedureRelation:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1565241134464434182, 1565241134464434177, '导出', NULL, 'basic:featuresStageProcedureRelation:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/Machinemysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Machinemysql.sql new file mode 100644 index 0000000..771fe2b --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Machinemysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978239198765057, 1067246875800000035, '机台表', 'basic/machine', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978239198765058, 1561978239198765057, '查看', NULL, 'basic:machine:page,basic:machine:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978239198765059, 1561978239198765057, '新增', NULL, 'basic:machine:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978239198765060, 1561978239198765057, '修改', NULL, 'basic:machine:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978239198765061, 1561978239198765057, '删除', NULL, 'basic:machine:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978239198765062, 1561978239198765057, '导出', NULL, 'basic:machine:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/MeasureToolmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/MeasureToolmysql.sql new file mode 100644 index 0000000..31fcaf5 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/MeasureToolmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978986309140482, 1067246875800000035, '量具表', 'basic/measureTool', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978986309140483, 1561978986309140482, '查看', NULL, 'basic:measureTool:page,basic:measureTool:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978986309140484, 1561978986309140482, '新增', NULL, 'basic:measureTool:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978986309140485, 1561978986309140482, '修改', NULL, 'basic:measureTool:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978986309140486, 1561978986309140482, '删除', NULL, 'basic:measureTool:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978986309140487, 1561978986309140482, '导出', NULL, 'basic:measureTool:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/Platformmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Platformmysql.sql new file mode 100644 index 0000000..eda68bb --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Platformmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978141555367938, 1067246875800000035, '站点表', 'basic/platform', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978141555367939, 1561978141555367938, '查看', NULL, 'basic:platform:page,basic:platform:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978141555367940, 1561978141555367938, '新增', NULL, 'basic:platform:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978141555367941, 1561978141555367938, '修改', NULL, 'basic:platform:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978141555367942, 1561978141555367938, '删除', NULL, 'basic:platform:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978141555367943, 1561978141555367938, '导出', NULL, 'basic:platform:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFactoryRelationmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFactoryRelationmysql.sql new file mode 100644 index 0000000..845f357 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFactoryRelationmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561977729704062978, 1067246875800000035, '产品-工厂 关系表', 'basic/productFactoryRelation', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977729704062979, 1561977729704062978, '查看', NULL, 'basic:productFactoryRelation:page,basic:productFactoryRelation:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977729704062980, 1561977729704062978, '新增', NULL, 'basic:productFactoryRelation:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977729704062981, 1561977729704062978, '修改', NULL, 'basic:productFactoryRelation:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977729704062982, 1561977729704062978, '删除', NULL, 'basic:productFactoryRelation:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977729704062983, 1561977729704062978, '导出', NULL, 'basic:productFactoryRelation:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFeaturesHismysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFeaturesHismysql.sql new file mode 100644 index 0000000..232cef4 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFeaturesHismysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978894416162817, 1067246875800000035, '产品特性 历史表', 'basic/productFeaturesHis', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978894416162818, 1561978894416162817, '查看', NULL, 'basic:productFeaturesHis:page,basic:productFeaturesHis:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978894416162819, 1561978894416162817, '新增', NULL, 'basic:productFeaturesHis:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978894416162820, 1561978894416162817, '修改', NULL, 'basic:productFeaturesHis:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978894416162821, 1561978894416162817, '删除', NULL, 'basic:productFeaturesHis:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978894416162822, 1561978894416162817, '导出', NULL, 'basic:productFeaturesHis:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFeaturesmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFeaturesmysql.sql new file mode 100644 index 0000000..28d3750 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductFeaturesmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978720398680066, 1067246875800000035, '产品特性 表', 'basic/productFeatures', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978720398680067, 1561978720398680066, '查看', NULL, 'basic:productFeatures:page,basic:productFeatures:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978720398680068, 1561978720398680066, '新增', NULL, 'basic:productFeatures:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978720398680069, 1561978720398680066, '修改', NULL, 'basic:productFeatures:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978720398680070, 1561978720398680066, '删除', NULL, 'basic:productFeatures:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978720398680071, 1561978720398680066, '导出', NULL, 'basic:productFeatures:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductTypemysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductTypemysql.sql new file mode 100644 index 0000000..ec3cebf --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductTypemysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561975128501645313, 1067246875800000035, '产品类型 表', 'basic/productType', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561975128501645314, 1561975128501645313, '查看', NULL, 'basic:productType:page,basic:productType:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561975128501645315, 1561975128501645313, '新增', NULL, 'basic:productType:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561975128501645316, 1561975128501645313, '修改', NULL, 'basic:productType:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561975128501645317, 1561975128501645313, '删除', NULL, 'basic:productType:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561975128501645318, 1561975128501645313, '导出', NULL, 'basic:productType:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductWorkingprocedureRelationmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductWorkingprocedureRelationmysql.sql new file mode 100644 index 0000000..e472278 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/ProductWorkingprocedureRelationmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978609518055426, 1067246875800000035, '产品-工序 关系表', 'basic/productWorkingprocedureRelation', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978609518055427, 1561978609518055426, '查看', NULL, 'basic:productWorkingprocedureRelation:page,basic:productWorkingprocedureRelation:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978609518055428, 1561978609518055426, '新增', NULL, 'basic:productWorkingprocedureRelation:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978609518055429, 1561978609518055426, '修改', NULL, 'basic:productWorkingprocedureRelation:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978609518055430, 1561978609518055426, '删除', NULL, 'basic:productWorkingprocedureRelation:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978609518055431, 1561978609518055426, '导出', NULL, 'basic:productWorkingprocedureRelation:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/Productmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Productmysql.sql new file mode 100644 index 0000000..5c95926 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Productmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561977860146929666, 1067246875800000035, '产品 表', 'basic/product', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977860146929667, 1561977860146929666, '查看', NULL, 'basic:product:page,basic:product:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977860146929668, 1561977860146929666, '新增', NULL, 'basic:product:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977860146929669, 1561977860146929666, '修改', NULL, 'basic:product:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977860146929670, 1561977860146929666, '删除', NULL, 'basic:product:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977860146929671, 1561977860146929666, '导出', NULL, 'basic:product:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/Shiftmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Shiftmysql.sql new file mode 100644 index 0000000..2583613 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Shiftmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561977446785724417, 1067246875800000035, '班次 表', 'basic/shift', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977446785724418, 1561977446785724417, '查看', NULL, 'basic:shift:page,basic:shift:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977446785724419, 1561977446785724417, '新增', NULL, 'basic:shift:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977446785724420, 1561977446785724417, '修改', NULL, 'basic:shift:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977446785724421, 1561977446785724417, '删除', NULL, 'basic:shift:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977446785724422, 1561977446785724417, '导出', NULL, 'basic:shift:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/Teammysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Teammysql.sql new file mode 100644 index 0000000..d830928 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Teammysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561977547536990209, 1067246875800000035, '班组 表', 'basic/team', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977547536990210, 1561977547536990209, '查看', NULL, 'basic:team:page,basic:team:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977547536990211, 1561977547536990209, '新增', NULL, 'basic:team:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977547536990212, 1561977547536990209, '修改', NULL, 'basic:team:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977547536990213, 1561977547536990209, '删除', NULL, 'basic:team:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561977547536990214, 1561977547536990209, '导出', NULL, 'basic:team:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/Unitmysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Unitmysql.sql new file mode 100644 index 0000000..2398751 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/Unitmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561976675012771841, 1067246875800000035, '单位 表', 'basic/unit', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561976675012771842, 1561976675012771841, '查看', NULL, 'basic:unit:page,basic:unit:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561976675012771843, 1561976675012771841, '新增', NULL, 'basic:unit:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561976675012771844, 1561976675012771841, '修改', NULL, 'basic:unit:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561976675012771845, 1561976675012771841, '删除', NULL, 'basic:unit:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561976675012771846, 1561976675012771841, '导出', NULL, 'basic:unit:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/WorkingProcedureTypemysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/WorkingProcedureTypemysql.sql new file mode 100644 index 0000000..806cd3b --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/WorkingProcedureTypemysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978394501234689, 1067246875800000035, '工序类型表 表', 'basic/workingProcedureType', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978394501234690, 1561978394501234689, '查看', NULL, 'basic:workingProcedureType:page,basic:workingProcedureType:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978394501234691, 1561978394501234689, '新增', NULL, 'basic:workingProcedureType:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978394501234692, 1561978394501234689, '修改', NULL, 'basic:workingProcedureType:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978394501234693, 1561978394501234689, '删除', NULL, 'basic:workingProcedureType:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978394501234694, 1561978394501234689, '导出', NULL, 'basic:workingProcedureType:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mysql/WorkingProceduremysql.sql b/ym-baisc/src/main/java/com/cnbm/basic/mysql/WorkingProceduremysql.sql new file mode 100644 index 0000000..689c106 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mysql/WorkingProceduremysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1561978465661812738, 1067246875800000035, '工序 表', 'basic/workingProcedure', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978465661812739, 1561978465661812738, '查看', NULL, 'basic:workingProcedure:page,basic:workingProcedure:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978465661812740, 1561978465661812738, '新增', NULL, 'basic:workingProcedure:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978465661812741, 1561978465661812738, '修改', NULL, 'basic:workingProcedure:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978465661812742, 1561978465661812738, '删除', NULL, 'basic:workingProcedure:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1561978465661812743, 1561978465661812738, '导出', NULL, 'basic:workingProcedure:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IFeaturesStageProcedureRelationService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IFeaturesStageProcedureRelationService.java new file mode 100644 index 0000000..dc143f4 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IFeaturesStageProcedureRelationService.java @@ -0,0 +1,29 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO; +import com.cnbm.basic.entity.FeaturesStageProcedureRelation; + +import java.util.List; +import java.util.Map; + +/** + * 过程检验-工艺-检验参数 关系表 + * + * @author why + * @since 2022-09-01 + */ +public interface IFeaturesStageProcedureRelationService extends CrudService { + PageData page (Map params); + + FeaturesStageProcedureRelationDTO get(Long id); + + void save(FeaturesStageProcedureRelationDTO dto); + + void update(FeaturesStageProcedureRelationDTO dto); + + void delete(Long[] ids); + + void batchInsert(FeaturesStageProcedureRelationDTO[] lists); +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IMeasureToolService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IMeasureToolService.java index dc580ac..c4d214a 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/IMeasureToolService.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IMeasureToolService.java @@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService; import com.cnbm.basic.dto.MeasureToolDTO; import com.cnbm.basic.entity.MeasureTool; +import java.util.List; import java.util.Map; /** @@ -25,4 +26,6 @@ public interface IMeasureToolService extends CrudService list(); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java index b1a94f6..be7b49b 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java @@ -1,5 +1,6 @@ package com.cnbm.basic.service; +import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO; import com.cnbm.common.page.PageData; import com.cnbm.common.service.CrudService; import com.cnbm.basic.dto.ProductFeaturesDTO; @@ -26,4 +27,6 @@ public interface IProductFeaturesService extends CrudService getProductFeaturesByProductId(Long id); + + List getFeaturesByStageProcedure(Map params); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java index 771f4db..48c68c5 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java @@ -4,6 +4,7 @@ import com.cnbm.common.page.PageData; import com.cnbm.common.service.CrudService; import com.cnbm.basic.dto.ProductDTO; import com.cnbm.basic.entity.Product; +import com.cnbm.common.vo.IdVo; import java.util.Map; @@ -18,7 +19,7 @@ public interface IProductService extends CrudService { ProductDTO get(Long id); - void save(ProductDTO dto); + IdVo add(ProductDTO dto); void update(ProductDTO dto); diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductTypeService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductTypeService.java index 61d6335..83a3095 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductTypeService.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductTypeService.java @@ -1,6 +1,5 @@ package com.cnbm.basic.service; -import com.cnbm.basic.dto.FactoryDTO; import com.cnbm.common.page.PageData; import com.cnbm.common.service.CrudService; import com.cnbm.basic.dto.ProductTypeDTO; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FeaturesStageProcedureRelationServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FeaturesStageProcedureRelationServiceImpl.java new file mode 100644 index 0000000..78fe2bd --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FeaturesStageProcedureRelationServiceImpl.java @@ -0,0 +1,93 @@ +package com.cnbm.basic.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.cnbm.basic.dto.ProductFeaturesDTO; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO; +import com.cnbm.basic.mapper.FeaturesStageProcedureRelationMapper; +import com.cnbm.basic.entity.FeaturesStageProcedureRelation; +import com.cnbm.basic.service.IFeaturesStageProcedureRelationService; +import com.cnbm.common.utils.ConvertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 过程检验-工艺-检验参数 关系表 + * + * @author why + * @since 2022-09-01 + */ +@Service +public class FeaturesStageProcedureRelationServiceImpl extends CrudServiceImpl implements IFeaturesStageProcedureRelationService { + + @Autowired + private FeaturesStageProcedureRelationMapper mapper; + + @Override + public QueryWrapper getWrapper(Map params){ + String id = (String)params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, FeaturesStageProcedureRelationDTO.class); + } + + @Override + public FeaturesStageProcedureRelationDTO get(Long id) { + FeaturesStageProcedureRelation entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FeaturesStageProcedureRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FeaturesStageProcedureRelationDTO dto) { + FeaturesStageProcedureRelation entity = ConvertUtils.sourceToTarget(dto, FeaturesStageProcedureRelation.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FeaturesStageProcedureRelationDTO dto) { + FeaturesStageProcedureRelation entity = ConvertUtils.sourceToTarget(dto, FeaturesStageProcedureRelation.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void batchInsert(FeaturesStageProcedureRelationDTO[] lists) { + for(FeaturesStageProcedureRelationDTO dto:lists){ + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + save(dto); + } + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java index 7ab6096..9a242b8 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java @@ -11,11 +11,13 @@ import com.cnbm.basic.entity.MeasureTool; import com.cnbm.basic.service.IMeasureToolService; import com.cnbm.common.utils.ConvertUtils; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.util.Arrays; +import java.util.List; import java.util.Map; /** @@ -86,4 +88,14 @@ public class MeasureToolServiceImpl extends CrudServiceImpl list() { + List list = mapper.list(); + return list; + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesServiceImpl.java index ba375b5..b56d544 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesServiceImpl.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.cnbm.admin.params.IdParam; +import com.cnbm.basic.dto.FeaturesStageProcedureRelationDTO; import com.cnbm.basic.dto.ProductFeaturesHisDTO; import com.cnbm.basic.dto.WorkingProcedureDTO; import com.cnbm.basic.entity.ProductFeaturesHis; @@ -122,4 +123,9 @@ public class ProductFeaturesServiceImpl extends CrudServiceImpl getFeaturesByStageProcedure(Map params){ + List list = mapper.getFeaturesByStageProcedure(params); + return list; + } } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductServiceImpl.java index 4e1275c..7f27f24 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductServiceImpl.java @@ -12,6 +12,7 @@ import com.cnbm.basic.mapper.ProductMapper; import com.cnbm.basic.entity.Product; import com.cnbm.basic.service.IProductService; import com.cnbm.common.utils.ConvertUtils; +import com.cnbm.common.vo.IdVo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -83,9 +84,11 @@ public class ProductServiceImpl extends CrudServiceImpl dtoList = ConvertUtils.sourceToTarget(relationList, ProductWorkingprocedureRelationDTO.class); //设置工序名称 for (ProductWorkingprocedureRelationDTO dto:dtoList){ - String workingProcedureName = workingProcedureServiceImpl.selectById(dto.getWorkingProcedureId()).getName(); + WorkingProcedure workingProcedure = workingProcedureServiceImpl.selectById(dto.getWorkingProcedureId()); + String workingProcedureName = null; + String workingProcedureCode = null; + if(workingProcedure!=null){ + workingProcedureName = workingProcedure.getName(); + workingProcedureCode = workingProcedure.getCode(); + } dto.setWorkingProcedureName(workingProcedureName); + dto.setWorkingProcedureCode(workingProcedureCode); } return dtoList; } diff --git a/ym-baisc/src/main/resources/mapper/FeaturesStageProcedureRelationMapper.xml b/ym-baisc/src/main/resources/mapper/FeaturesStageProcedureRelationMapper.xml new file mode 100644 index 0000000..26ccbce --- /dev/null +++ b/ym-baisc/src/main/resources/mapper/FeaturesStageProcedureRelationMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/ym-baisc/src/main/resources/mapper/MeasureToolMapper.xml b/ym-baisc/src/main/resources/mapper/MeasureToolMapper.xml index 5885223..c682ab6 100644 --- a/ym-baisc/src/main/resources/mapper/MeasureToolMapper.xml +++ b/ym-baisc/src/main/resources/mapper/MeasureToolMapper.xml @@ -2,10 +2,9 @@ - + select * from measure_tool + order by id asc diff --git a/ym-baisc/src/main/resources/mapper/ProductFeaturesMapper.xml b/ym-baisc/src/main/resources/mapper/ProductFeaturesMapper.xml index 9a99d8d..e667d73 100644 --- a/ym-baisc/src/main/resources/mapper/ProductFeaturesMapper.xml +++ b/ym-baisc/src/main/resources/mapper/ProductFeaturesMapper.xml @@ -3,9 +3,8 @@ + diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/InspectionSheetController.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/InspectionSheetController.java new file mode 100644 index 0000000..c371460 --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/controller/InspectionSheetController.java @@ -0,0 +1,143 @@ +package com.cnbm.processInspection.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.processInspection.dto.InspectionSheetDTO; +import com.cnbm.processInspection.excel.InspectionSheetExcel; +import com.cnbm.processInspection.service.IInspectionSheetService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.time.LocalDateTime; +import java.util.List; +import java.util.Map; + + +/** + * 检验单 表 前端控制器 + * + * @author why + * @since 2022-08-17 + */ +@RestController +@RequestMapping("/processInspection/inspectionSheet") +@Api(tags="检验单 表") +public class InspectionSheetController { + @Autowired + private IInspectionSheetService inspectionSheetService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "inspectionSite", value = "检验站点", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "productId", value = "产品id", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "workingProcedureId", value = "工序id", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "machineId", value = "机台id", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "orderNumber", value = "订单号", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "batchNumber", value = "批次号", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "id", value = "检验单号", paramType = "query", dataTypeClass = Integer.class) + }) + @PreAuthorize("@ex.hasAuthority('processInspection:inspectionSheet:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = inspectionSheetService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('processInspection:inspectionSheet:info')") + public Result get(@PathVariable("id") Long id){ + InspectionSheetDTO data = inspectionSheetService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('processInspection:inspectionSheet:save')") + public Result save(@RequestBody InspectionSheetDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + inspectionSheetService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('processInspection:inspectionSheet:update')") + public Result update(@RequestBody InspectionSheetDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + inspectionSheetService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('processInspection:inspectionSheet:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + inspectionSheetService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('processInspection:inspectionSheet:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = inspectionSheetService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, InspectionSheetExcel.class); + } + + @PostMapping(value = "list") + @ApiOperation(value = "获取检验单列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataTypeClass = LocalDateTime.class), + @ApiImplicitParam(name = "inspectionSite", value = "检验站点", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "productId", value = "产品id", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "workingProcedureId", value = "工序id", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "machineId", value = "机台id", paramType = "query", dataTypeClass = Integer.class), + @ApiImplicitParam(name = "orderNumber", value = "订单号", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "batchNumber", value = "批次号", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "id", value = "检验单号", paramType = "query", dataTypeClass = Integer.class) + }) + private List list(@ApiIgnore @RequestParam Map params) { + return inspectionSheetService.list(params); + } + +} \ No newline at end of file diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/dto/InspectionSheetDTO.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/dto/InspectionSheetDTO.java new file mode 100644 index 0000000..6bd2830 --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/dto/InspectionSheetDTO.java @@ -0,0 +1,114 @@ +package com.cnbm.processInspection.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + + +/** + * 检验单 表 + * + * @author why + * @since 2022-08-17 + */ +@Data +@ApiModel(value = "检验单 表DTO对象") +public class InspectionSheetDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "订单号,手动输入") + private String orderNumber; + + @ApiModelProperty(value = "批次号,手填") + private String batchNumber; + + @ApiModelProperty(value = "检验站点,手填") + private String inspectionSite; + + @ApiModelProperty(value = "产品id,关联product表") + private Long productId; + + @ApiModelProperty(value = "产品名称,关联product表") + private String productName; + + @ApiModelProperty(value = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private String inspectionStage; + + @ApiModelProperty(value = "工序id,关联working_procedure表") + private Long workingProcedureId; + + @ApiModelProperty(value = "工序名称,关联working_procedure表") + private String workingProcedureName; + + @ApiModelProperty(value = "机台id,关联machine表") + private Long machineId; + + @ApiModelProperty(value = "机台名称,关联machine表") + private String machineName; + + @ApiModelProperty(value = "班次id,关联shift表") + private Long shiftId; + + @ApiModelProperty(value = "班次名称,关联shift表") + private String shiftName; + + @ApiModelProperty(value = "分组样本数(就是这个产品下所有检测参数 的 最大样本数),只给用户查看,值是后台自动计算的") + private Integer numberOfGroupedSamples; + + @ApiModelProperty(value = "样本大小(就是检验单(母体)下的子样个数),只给用户查看,值是后台自动计算的") + private Integer numberOfSamples; + + @ApiModelProperty(value = "缺陷数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )") + private Integer numberOfDefects; + + @ApiModelProperty(value = "不良数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )") + private Integer defectiveQuantity; + + @ApiModelProperty(value = "生产人") + private String producer; + + @ApiModelProperty(value = "检验人") + private String inspector; + + @ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型") + private Integer type; + + @ApiModelProperty(value = "1 可用,0 不可用") + private Integer status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "创建人") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/entity/InspectionSheet.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/entity/InspectionSheet.java new file mode 100644 index 0000000..8e55714 --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/entity/InspectionSheet.java @@ -0,0 +1,105 @@ +package com.cnbm.processInspection.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 检验单 表 + *

+ * + * @author why + * @since 2022-08-17 + */ +@Data +@TableName("inspection_sheet") +@ApiModel(value = "InspectionSheet对象", description = "检验单 表") +public class InspectionSheet implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private Long id; + + @ApiModelProperty("订单号,手动输入") + private String orderNumber; + + @ApiModelProperty("批次号,手填") + private String batchNumber; + + @ApiModelProperty("检验站点,手填") + private String inspectionSite; + + @ApiModelProperty("产品id,关联product表") + private Long productId; + + @ApiModelProperty("检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private String inspectionStage; + + @ApiModelProperty("工序id,关联working_procedure表") + private Long workingProcedureId; + + @ApiModelProperty("机台id,关联machine表") + private Long machineId; + + @ApiModelProperty("班次id,关联shift表") + private Long shiftId; + + @ApiModelProperty("分组样本数(就是这个产品下所有检测参数 的 最大样本数),只给用户查看,值是后台自动计算的") + private Integer numberOfGroupedSamples; + + @ApiModelProperty("样本大小(就是检验单(母体)下的子样个数),只给用户查看,值是后台自动计算的") + private Integer numberOfSamples; + + @ApiModelProperty("缺陷数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )") + private Integer numberOfDefects; + + @ApiModelProperty("不良数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )") + private Integer defectiveQuantity; + + @ApiModelProperty("生产人") + private String producer; + + @ApiModelProperty("检验人") + private String inspector; + + @ApiModelProperty("产品特性类型:1 计量型;2 计数型") + private Integer type; + + @ApiModelProperty("1 可用,0 不可用") + private Integer status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty("创建人") + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/excel/InspectionSheetExcel.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/excel/InspectionSheetExcel.java new file mode 100644 index 0000000..c05895f --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/excel/InspectionSheetExcel.java @@ -0,0 +1,69 @@ +package com.cnbm.processInspection.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 检验单 表 + * + * @author why + * @since 2022-08-17 + */ +@Data +public class InspectionSheetExcel { + @Excel(name = "ID") + private Long id; + @Excel(name = "订单号,手动输入") + private String orderNumber; + @Excel(name = "批次号,手填") + private String batchNumber; + @Excel(name = "检验站点,手填") + private String inspectionSite; + @Excel(name = "产品id,关联product表") + private Long productId; + @Excel(name = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private String inspectionStage; + @Excel(name = "工序id,关联working_procedure表") + private Long workingProcedureId; + @Excel(name = "机台id,关联machine表") + private Long machineId; + @Excel(name = "班次id,关联shift表") + private Long shiftId; + @Excel(name = "分组样本数(就是这个产品下所有检测参数 的 最大样本数),只给用户查看,值是后台自动计算的") + private Integer numberOfGroupedSamples; + @Excel(name = "样本大小(就是检验单(母体)下的子样个数),只给用户查看,值是后台自动计算的") + private Integer numberOfSamples; + @Excel(name = "缺陷数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )") + private Integer numberOfDefects; + @Excel(name = "不良数量,只给用户查看,值是后台自动计算的(是以 这个检验单下 样本子样 为单位的 )") + private Integer defectiveQuantity; + @Excel(name = "生产人") + private String producer; + @Excel(name = "检验人") + private String inspector; + @Excel(name = "产品特性类型:1 计量型;2 计数型") + private Integer type; + @Excel(name = "1 可用,0 不可用") + private Integer status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "创建人") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/mapper/InspectionSheetMapper.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/mapper/InspectionSheetMapper.java new file mode 100644 index 0000000..e6334e1 --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/mapper/InspectionSheetMapper.java @@ -0,0 +1,20 @@ +package com.cnbm.processInspection.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.processInspection.dto.InspectionSheetDTO; +import com.cnbm.processInspection.entity.InspectionSheet; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 检验单 表 + * + * @author why + * @since 2022-08-17 + */ +@Mapper +public interface InspectionSheetMapper extends BaseDao { + List list(Map params); +} \ No newline at end of file diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/mysql/InspectionSheetmysql.sql b/ym-process-inspection/src/main/java/com/cnbm/processInspection/mysql/InspectionSheetmysql.sql new file mode 100644 index 0000000..5f552b5 --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/mysql/InspectionSheetmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1564803881757933569, 1067246875800000035, '检验单 表', 'processInspection/inspectionSheet', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1564803881757933570, 1564803881757933569, '查看', NULL, 'processInspection:inspectionSheet:page,processInspection:inspectionSheet:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1564803881757933571, 1564803881757933569, '新增', NULL, 'processInspection:inspectionSheet:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1564803881757933572, 1564803881757933569, '修改', NULL, 'processInspection:inspectionSheet:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1564803881757933573, 1564803881757933569, '删除', NULL, 'processInspection:inspectionSheet:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1564803881757933574, 1564803881757933569, '导出', NULL, 'processInspection:inspectionSheet:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/IInspectionSheetService.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/IInspectionSheetService.java new file mode 100644 index 0000000..54f9c11 --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/IInspectionSheetService.java @@ -0,0 +1,31 @@ +package com.cnbm.processInspection.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.processInspection.dto.InspectionSheetDTO; +import com.cnbm.processInspection.entity.InspectionSheet; + +import java.util.List; +import java.util.Map; + +/** + * 检验单 表 + * + * @author why + * @since 2022-08-17 + */ +public interface IInspectionSheetService extends CrudService { + + PageData page (Map params); + + InspectionSheetDTO get(Long id); + + void save(InspectionSheetDTO dto); + + void update(InspectionSheetDTO dto); + + void delete(Long[] ids); + + List list(Map params); + +} \ No newline at end of file diff --git a/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/impl/InspectionSheetServiceImpl.java b/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/impl/InspectionSheetServiceImpl.java new file mode 100644 index 0000000..ea1167b --- /dev/null +++ b/ym-process-inspection/src/main/java/com/cnbm/processInspection/service/impl/InspectionSheetServiceImpl.java @@ -0,0 +1,147 @@ +package com.cnbm.processInspection.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.cnbm.basic.entity.Machine; +import com.cnbm.basic.entity.Product; +import com.cnbm.basic.entity.Shift; +import com.cnbm.basic.entity.WorkingProcedure; +import com.cnbm.basic.service.impl.MachineServiceImpl; +import com.cnbm.basic.service.impl.ProductServiceImpl; +import com.cnbm.basic.service.impl.ShiftServiceImpl; +import com.cnbm.basic.service.impl.WorkingProcedureServiceImpl; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.common.utils.ConvertUtils; +import com.cnbm.processInspection.dto.InspectionSheetDTO; +import com.cnbm.processInspection.entity.InspectionSheet; +import com.cnbm.processInspection.mapper.InspectionSheetMapper; +import com.cnbm.processInspection.service.IInspectionSheetService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 检验单 表 + * + * @author why + * @since 2022-08-17 + */ +@Service +public class InspectionSheetServiceImpl extends CrudServiceImpl implements IInspectionSheetService { + + @Autowired + private ProductServiceImpl productService; + + @Autowired + private WorkingProcedureServiceImpl workingProcedureService; + + @Autowired + private MachineServiceImpl machineService; + + @Autowired + private ShiftServiceImpl shiftService; + + @Override + public QueryWrapper getWrapper(Map params){ + Long id = (Long)params.get("id"); + String inspectionSite = (String)params.get("inspectionSite"); + String orderNumber = (String)params.get("orderNumber"); + String batchNumber = (String)params.get("batchNumber"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.like(ObjectUtils.isNotNull(id), "id", id); + wrapper.like(StringUtils.isNotBlank(inspectionSite), "inspection_stage", inspectionSite); + wrapper.like(StringUtils.isNotBlank(orderNumber), "order_number", orderNumber); + wrapper.like(StringUtils.isNotBlank(batchNumber), "batch_number", batchNumber); + wrapper.eq(ObjectUtils.isNotNull(params.get("productId")), "product_id", params.get("productId")); + wrapper.eq(ObjectUtils.isNotNull(params.get("workingProcedureId")), "working_procedure_id", params.get("workingProcedureId")); + wrapper.eq(ObjectUtils.isNotNull(params.get("machineId")), "machine_id", params.get("machineId")); + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + PageData inspectionSheetDTOPageData = getPageData(page, InspectionSheetDTO.class); + + if(!inspectionSheetDTOPageData.getList().isEmpty()){ + for(InspectionSheetDTO dto:inspectionSheetDTOPageData.getList()){ + Product product = productService.selectById(dto.getProductId()); + WorkingProcedure workingProcedure = workingProcedureService.selectById(dto.getWorkingProcedureId()); + Machine machine = machineService.selectById(dto.getMachineId()); + Shift shift = shiftService.selectById(dto.getShiftId()); + + String productName = null; + String workingProcedureName = null; + String machineName = null; + String shiftName = null; + + if (product!=null){ + productName = product.getName(); + } + if (workingProcedure!=null){ + workingProcedureName = workingProcedure.getName(); + } + if (machine!=null){ + machineName = machine.getName(); + } + if (shift!=null){ + shiftName = shift.getName(); + } + + dto.setProductName(productName); + dto.setWorkingProcedureName(workingProcedureName); + dto.setMachineName(machineName); + dto.setShiftName(shiftName); + } + } + return inspectionSheetDTOPageData; + } + + @Override + public InspectionSheetDTO get(Long id) { + InspectionSheet entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, InspectionSheetDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(InspectionSheetDTO dto) { + InspectionSheet entity = ConvertUtils.sourceToTarget(dto, InspectionSheet.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(InspectionSheetDTO dto) { + InspectionSheet entity = ConvertUtils.sourceToTarget(dto, InspectionSheet.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Autowired + private InspectionSheetMapper mapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public List list(Map params) { + List list = mapper.list(params); + return list; + } +} \ No newline at end of file diff --git a/ym-process-inspection/src/main/resources/mapper/InspectionSheetMapper.xml b/ym-process-inspection/src/main/resources/mapper/InspectionSheetMapper.xml new file mode 100644 index 0000000..4475f45 --- /dev/null +++ b/ym-process-inspection/src/main/resources/mapper/InspectionSheetMapper.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ym-quality-planning/pom.xml b/ym-quality-planning/pom.xml index 5e838e8..2c4537b 100644 --- a/ym-quality-planning/pom.xml +++ b/ym-quality-planning/pom.xml @@ -21,5 +21,11 @@ ym-common 1.0-SNAPSHOT + + com.cnbm + ym-admin + 1.0-SNAPSHOT + compile + \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/ControlGraphController.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/ControlGraphController.java new file mode 100644 index 0000000..818b39d --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/ControlGraphController.java @@ -0,0 +1,123 @@ +package com.cnbm.qualityPlanning.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.qualityPlanning.dto.ControlGraphDTO; +import com.cnbm.qualityPlanning.excel.ControlGraphExcel; +import com.cnbm.qualityPlanning.service.IControlGraphService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 控制图形 表 前端控制器 + * + * @author why + * @since 2022-08-15 + */ +@RestController +@RequestMapping("/qualityPlanning/controlGraph") +@Api(tags="控制图形 表") +public class ControlGraphController { + @Autowired + private IControlGraphService controlGraphService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), + @ApiImplicitParam(name = "type", value = "产品特征类型", paramType = "query", dataTypeClass = Integer.class) + }) + @PreAuthorize("@ex.hasAuthority('code:controlGraph:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = controlGraphService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:controlGraph:info')") + public Result get(@PathVariable("id") Long id){ + ControlGraphDTO data = controlGraphService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:controlGraph:save')") + public Result save(@RequestBody ControlGraphDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + controlGraphService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:controlGraph:update')") + public Result update(@RequestBody ControlGraphDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + controlGraphService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:controlGraph:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + controlGraphService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:controlGraph:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = controlGraphService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, ControlGraphExcel.class); + } + + @PostMapping(value = "list") + @ApiOperation(value = "获取控制图形列表") + @LogOperation("获取控制图形列表") + public List list() { + return controlGraphService.list(); + } +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/InterpretationSchemeController.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/InterpretationSchemeController.java new file mode 100644 index 0000000..c044955 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/InterpretationSchemeController.java @@ -0,0 +1,124 @@ +package com.cnbm.qualityPlanning.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.qualityPlanning.dto.InterpretationSchemeDTO; +import com.cnbm.qualityPlanning.excel.InterpretationSchemeExcel; +import com.cnbm.qualityPlanning.service.IInterpretationSchemeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 判读方案 表 前端控制器 + * + * @author why + * @since 2022-08-15 + */ +@RestController +@RequestMapping("/qualityPlanning/interpretationScheme") +@Api(tags="判读方案 表") +public class InterpretationSchemeController { + @Autowired + private IInterpretationSchemeService interpretationSchemeService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), + @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class) + }) + @PreAuthorize("@ex.hasAuthority('qualityPlanning:interpretationScheme:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = interpretationSchemeService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:interpretationScheme:info')") + public Result get(@PathVariable("id") Long id){ + InterpretationSchemeDTO data = interpretationSchemeService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:interpretationScheme:save')") + public Result save(@RequestBody InterpretationSchemeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + interpretationSchemeService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:interpretationScheme:update')") + public Result update(@RequestBody InterpretationSchemeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + interpretationSchemeService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:interpretationScheme:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + interpretationSchemeService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:interpretationScheme:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = interpretationSchemeService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, InterpretationSchemeExcel.class); + } + + @PostMapping(value = "list") + @ApiOperation(value = "获取判读方案列表") + public List list() { + return interpretationSchemeService.list(); + } + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/MyInterpretationSchemeController.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/MyInterpretationSchemeController.java new file mode 100644 index 0000000..71c7f00 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/controller/MyInterpretationSchemeController.java @@ -0,0 +1,118 @@ +package com.cnbm.qualityPlanning.controller; + +import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.common.constant.Constant; +import com.cnbm.common.page.PageData; +import com.cnbm.common.utils.ExcelUtils; +import com.cnbm.common.utils.Result; +import com.cnbm.common.validator.AssertUtils; +import com.cnbm.common.validator.ValidatorUtils; +import com.cnbm.common.validator.group.AddGroup; +import com.cnbm.common.validator.group.DefaultGroup; +import com.cnbm.common.validator.group.UpdateGroup; +import com.cnbm.qualityPlanning.dto.MyInterpretationSchemeDTO; +import com.cnbm.qualityPlanning.excel.MyInterpretationSchemeExcel; +import com.cnbm.qualityPlanning.service.IMyInterpretationSchemeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; +import springfox.documentation.annotations.ApiIgnore; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 判读方案 表 前端控制器 + * + * @author why + * @since 2022-08-15 + */ +@RestController +@RequestMapping("/qualityPlanning/myInterpretationScheme") +@Api(tags="自定义判读方案 表") +public class MyInterpretationSchemeController { + @Autowired + private IMyInterpretationSchemeService myInterpretationSchemeService; + + @GetMapping("page") + @ApiOperation("分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = Constant.PAGE, value = "当前页码,从1开始", paramType = "query", required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataTypeClass=Integer.class) , + @ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataTypeClass=String.class) , + @ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataTypeClass=String.class), + @ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataTypeClass = String.class), + @ApiImplicitParam(name = "code", value = "编码", paramType = "query", dataTypeClass = String.class) + }) + @PreAuthorize("@ex.hasAuthority('qualityPlanning:myInterpretationScheme:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = myInterpretationSchemeService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:myInterpretationScheme:info')") + public Result get(@PathVariable("id") Long id){ + MyInterpretationSchemeDTO data = myInterpretationSchemeService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:myInterpretationScheme:save')") + public Result save(@RequestBody MyInterpretationSchemeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + myInterpretationSchemeService.save(dto); + + return new Result().ok(dto.getId()); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:myInterpretationScheme:update')") + public Result update(@RequestBody MyInterpretationSchemeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + myInterpretationSchemeService.update(dto); + + return new Result().ok(dto.getId()); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:myInterpretationScheme:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + myInterpretationSchemeService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('qualityPlanning:myInterpretationScheme:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = myInterpretationSchemeService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, MyInterpretationSchemeExcel.class); + } + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/ControlGraphDTO.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/ControlGraphDTO.java new file mode 100644 index 0000000..4b86d2a --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/ControlGraphDTO.java @@ -0,0 +1,66 @@ +package com.cnbm.qualityPlanning.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + + +/** + * 控制图形 表 + * + * @author why + * @since 2022-08-15 + */ +@Data +@ApiModel(value = "控制图形 表DTO对象") +public class ControlGraphDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "控制图形 名") + private String name; + + @ApiModelProperty(value = "控制图形 编码") + private String code; + + @ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型") + private Integer type; + + @ApiModelProperty(value = "1 可用,0 不可用") + private Integer status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "创建人") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/InterpretationSchemeDTO.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/InterpretationSchemeDTO.java new file mode 100644 index 0000000..4f9fcbc --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/InterpretationSchemeDTO.java @@ -0,0 +1,69 @@ +package com.cnbm.qualityPlanning.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Data +@ApiModel(value = "判读方案 表DTO对象") +public class InterpretationSchemeDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "判读方案编号(手动输入),一旦add了,就不允许update这个字段") + private Integer code; + + @ApiModelProperty(value = "判读方案规则号(1-10)") + private Integer ruleNum; + + @ApiModelProperty(value = "判读方案规则,(eg: 规则五:连续x点中有x点落在中心线同侧两倍标准差以外)") + private String ruleKey; + + @ApiModelProperty(value = "判读方案vaule1,(3)") + private Integer ruleValue1; + + @ApiModelProperty(value = "判读方案vaule2,(2)") + private Integer ruleValue2; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "创建人") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/MyInterpretationSchemeDTO.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/MyInterpretationSchemeDTO.java new file mode 100644 index 0000000..23587bb --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/dto/MyInterpretationSchemeDTO.java @@ -0,0 +1,63 @@ +package com.cnbm.qualityPlanning.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Data +@ApiModel(value = "自定义判读方案 表DTO对象") +public class MyInterpretationSchemeDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "判读方案编号") + private Integer code; + + @ApiModelProperty(value = "自定义判读方案名") + private String name; + + @ApiModelProperty(value = "判读方案id数组用逗号隔开,关联 interpretation_scheme id;; eg: id1,id2,id3") + private String interpretationSchemeIds; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "创建人") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/ControlGraph.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/ControlGraph.java new file mode 100644 index 0000000..8e04f53 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/ControlGraph.java @@ -0,0 +1,69 @@ +package com.cnbm.qualityPlanning.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 控制图形 表 + *

+ * + * @author why + * @since 2022-08-16 + */ +@Data +@TableName("control_graph") +@ApiModel(value = "ControlGraph对象", description = "控制图形 表") +public class ControlGraph implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private Long id; + + @ApiModelProperty("控制图形 名") + private String name; + + @ApiModelProperty("控制图形 编码") + private String code; + + @ApiModelProperty("产品特性类型:1 计量型;2 计数型") + private Integer type; + + @ApiModelProperty("1 可用,0 不可用") + private Integer status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty("创建人") + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/InterpretationScheme.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/InterpretationScheme.java new file mode 100644 index 0000000..fff0a33 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/InterpretationScheme.java @@ -0,0 +1,72 @@ +package com.cnbm.qualityPlanning.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 判读方案 表 + *

+ * + * @author why + * @since 2022-08-16 + */ +@Data +@TableName("interpretation_scheme") +@ApiModel(value = "InterpretationScheme对象", description = "判读方案 表") +public class InterpretationScheme implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private Long id; + + @ApiModelProperty("判读方案编号(手动输入),一旦add了,就不允许update这个字段") + private Integer code; + + @ApiModelProperty("判读方案规则号(1-10)") + private Integer ruleNum; + + @ApiModelProperty("判读方案规则,(eg: 规则五:连续x点中有x点落在中心线同侧两倍标准差以外)") + private String ruleKey; + + @ApiModelProperty("判读方案vaule1,(3)") + private Integer ruleValue1; + + @ApiModelProperty("判读方案vaule2,(2)") + private Integer ruleValue2; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty("创建人") + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/MyInterpretationScheme.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/MyInterpretationScheme.java new file mode 100644 index 0000000..28c6c96 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/entity/MyInterpretationScheme.java @@ -0,0 +1,66 @@ +package com.cnbm.qualityPlanning.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + *

+ * 判读方案 表 + *

+ * + * @author why + * @since 2022-08-16 + */ +@Data +@TableName("my_interpretation_scheme") +@ApiModel(value = "MyInterpretationScheme对象", description = "自定义判读方案 表") +public class MyInterpretationScheme implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private Long id; + + @ApiModelProperty("判读方案编号") + private Integer code; + + @ApiModelProperty("自定义判读方案名") + private String name; + + @ApiModelProperty("判读方案id数组用逗号隔开,关联 interpretation_scheme id;; eg: id1,id2,id3") + private String interpretationSchemeIds; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty("创建人") + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/ControlGraphExcel.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/ControlGraphExcel.java new file mode 100644 index 0000000..c1d98e8 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/ControlGraphExcel.java @@ -0,0 +1,45 @@ +package com.cnbm.qualityPlanning.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 控制图形 表 + * + * @author why + * @since 2022-08-15 + */ +@Data +public class ControlGraphExcel { + @Excel(name = "ID") + private Long id; + @Excel(name = "控制图形 名") + private String name; + @Excel(name = "控制图形 编码") + private String code; + @Excel(name = "产品特性类型:1 计量型;2 计数型") + private Integer type; + @Excel(name = "1 可用,0 不可用") + private Integer status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "创建人") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/InterpretationSchemeExcel.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/InterpretationSchemeExcel.java new file mode 100644 index 0000000..4477788 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/InterpretationSchemeExcel.java @@ -0,0 +1,47 @@ +package com.cnbm.qualityPlanning.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Data +public class InterpretationSchemeExcel { + @Excel(name = "ID") + private Long id; + @Excel(name = "判读方案编号(手动输入),一旦add了,就不允许update这个字段") + private Integer code; + @Excel(name = "判读方案规则号(1-10)") + private Integer ruleNum; + @Excel(name = "判读方案规则,(eg: 规则五:连续x点中有x点落在中心线同侧两倍标准差以外)") + private String ruleKey; + @Excel(name = "判读方案vaule1,(3)") + private Integer ruleValue1; + @Excel(name = "判读方案vaule2,(2)") + private Integer ruleValue2; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "创建人") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/MyInterpretationSchemeExcel.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/MyInterpretationSchemeExcel.java new file mode 100644 index 0000000..709ec84 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/excel/MyInterpretationSchemeExcel.java @@ -0,0 +1,43 @@ +package com.cnbm.qualityPlanning.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Data +public class MyInterpretationSchemeExcel { + @Excel(name = "ID") + private Long id; + @Excel(name = "判读方案编号") + private Integer code; + @Excel(name = "自定义判读方案名") + private String name; + @Excel(name = "判读方案id数组用逗号隔开,关联 interpretation_scheme id;; eg: id1,id2,id3") + private String interpretationSchemeIds; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "创建人") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/ControlGraphMapper.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/ControlGraphMapper.java new file mode 100644 index 0000000..3b0da38 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/ControlGraphMapper.java @@ -0,0 +1,19 @@ +package com.cnbm.qualityPlanning.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.qualityPlanning.dto.ControlGraphDTO; +import com.cnbm.qualityPlanning.entity.ControlGraph; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 控制图形 表 + * + * @author why + * @since 2022-08-15 + */ +@Mapper +public interface ControlGraphMapper extends BaseDao { + List list(); +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/InterpretationSchemeMapper.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/InterpretationSchemeMapper.java new file mode 100644 index 0000000..265abf0 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/InterpretationSchemeMapper.java @@ -0,0 +1,21 @@ +package com.cnbm.qualityPlanning.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.qualityPlanning.dto.InterpretationSchemeDTO; +import com.cnbm.qualityPlanning.entity.InterpretationScheme; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Mapper +public interface InterpretationSchemeMapper extends BaseDao { + + List list(); + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/MyInterpretationSchemeMapper.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/MyInterpretationSchemeMapper.java new file mode 100644 index 0000000..ac2c16a --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mapper/MyInterpretationSchemeMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.qualityPlanning.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.qualityPlanning.entity.MyInterpretationScheme; +import org.apache.ibatis.annotations.Mapper; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Mapper +public interface MyInterpretationSchemeMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/ControlGraphmysql.sql b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/ControlGraphmysql.sql new file mode 100644 index 0000000..6837aa5 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/ControlGraphmysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1562340593497346049, 1067246875800000035, '控制图形 表', 'qualityPlanning/controlGraph', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340593497346050, 1562340593497346049, '查看', NULL, 'qualityPlanning:controlGraph:page,qualityPlanning:controlGraph:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340593497346051, 1562340593497346049, '新增', NULL, 'qualityPlanning:controlGraph:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340593497346052, 1562340593497346049, '修改', NULL, 'qualityPlanning:controlGraph:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340593497346053, 1562340593497346049, '删除', NULL, 'qualityPlanning:controlGraph:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340593497346054, 1562340593497346049, '导出', NULL, 'qualityPlanning:controlGraph:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/InterpretationSchememysql.sql b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/InterpretationSchememysql.sql new file mode 100644 index 0000000..7929baf --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/InterpretationSchememysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1562340725907296257, 1067246875800000035, '判读方案 表', 'qualityPlanning/interpretationScheme', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340725907296258, 1562340725907296257, '查看', NULL, 'qualityPlanning:interpretationScheme:page,qualityPlanning:interpretationScheme:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340725907296259, 1562340725907296257, '新增', NULL, 'qualityPlanning:interpretationScheme:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340725907296260, 1562340725907296257, '修改', NULL, 'qualityPlanning:interpretationScheme:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340725907296261, 1562340725907296257, '删除', NULL, 'qualityPlanning:interpretationScheme:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340725907296262, 1562340725907296257, '导出', NULL, 'qualityPlanning:interpretationScheme:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/MyInterpretationSchememysql.sql b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/MyInterpretationSchememysql.sql new file mode 100644 index 0000000..f8715d6 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/mysql/MyInterpretationSchememysql.sql @@ -0,0 +1,7 @@ +-- 菜单初始SQL +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1562340887257968641, 1067246875800000035, '判读方案 表', 'qualityPlanning/myInterpretationScheme', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340887257968642, 1562340887257968641, '查看', NULL, 'qualityPlanning:myInterpretationScheme:page,qualityPlanning:myInterpretationScheme:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340887257968643, 1562340887257968641, '新增', NULL, 'qualityPlanning:myInterpretationScheme:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340887257968644, 1562340887257968641, '修改', NULL, 'qualityPlanning:myInterpretationScheme:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340887257968645, 1562340887257968641, '删除', NULL, 'qualityPlanning:myInterpretationScheme:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now()); +INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1562340887257968646, 1562340887257968641, '导出', NULL, 'qualityPlanning:myInterpretationScheme:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now()); diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IControlGraphService.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IControlGraphService.java new file mode 100644 index 0000000..790cf5f --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IControlGraphService.java @@ -0,0 +1,30 @@ +package com.cnbm.qualityPlanning.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.qualityPlanning.dto.ControlGraphDTO; +import com.cnbm.qualityPlanning.entity.ControlGraph; + +import java.util.List; +import java.util.Map; + +/** + * 控制图形 表 + * + * @author why + * @since 2022-08-15 + */ +public interface IControlGraphService extends CrudService { + PageData page (Map params); + + ControlGraphDTO get(Long id); + + void save(ControlGraphDTO dto); + + void update(ControlGraphDTO dto); + + void delete(Long[] ids); + + List list(); + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IInterpretationSchemeService.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IInterpretationSchemeService.java new file mode 100644 index 0000000..92b9d72 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IInterpretationSchemeService.java @@ -0,0 +1,30 @@ +package com.cnbm.qualityPlanning.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.qualityPlanning.dto.InterpretationSchemeDTO; +import com.cnbm.qualityPlanning.entity.InterpretationScheme; + +import java.util.List; +import java.util.Map; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +public interface IInterpretationSchemeService extends CrudService { + + PageData page (Map params); + + InterpretationSchemeDTO get(Long id); + + void save(InterpretationSchemeDTO dto); + + void update(InterpretationSchemeDTO dto); + + void delete(Long[] ids); + + List list(); +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IMyInterpretationSchemeService.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IMyInterpretationSchemeService.java new file mode 100644 index 0000000..f7d4b62 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/IMyInterpretationSchemeService.java @@ -0,0 +1,28 @@ +package com.cnbm.qualityPlanning.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.qualityPlanning.dto.MyInterpretationSchemeDTO; +import com.cnbm.qualityPlanning.entity.MyInterpretationScheme; + +import java.util.Map; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +public interface IMyInterpretationSchemeService extends CrudService { + + PageData page (Map params); + + MyInterpretationSchemeDTO get(Long id); + + void save(MyInterpretationSchemeDTO dto); + + void update(MyInterpretationSchemeDTO dto); + + void delete(Long[] ids); + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/ControlGraphServiceImpl.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/ControlGraphServiceImpl.java new file mode 100644 index 0000000..512ff98 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/ControlGraphServiceImpl.java @@ -0,0 +1,86 @@ +package com.cnbm.qualityPlanning.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.common.utils.ConvertUtils; +import com.cnbm.qualityPlanning.dto.ControlGraphDTO; +import com.cnbm.qualityPlanning.entity.ControlGraph; +import com.cnbm.qualityPlanning.mapper.ControlGraphMapper; +import com.cnbm.qualityPlanning.service.IControlGraphService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 控制图形 表 + * + * @author why + * @since 2022-08-15 + */ +@Service +public class ControlGraphServiceImpl extends CrudServiceImpl implements IControlGraphService { + + @Override + public QueryWrapper getWrapper(Map params){ + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(ObjectUtils.isNotNull(params.get("type")), "type", params.get("type")); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, ControlGraphDTO.class); + } + + @Override + public ControlGraphDTO get(Long id) { + ControlGraph entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ControlGraphDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ControlGraphDTO dto) { + ControlGraph entity = ConvertUtils.sourceToTarget(dto, ControlGraph.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ControlGraphDTO dto) { + ControlGraph entity = ConvertUtils.sourceToTarget(dto, ControlGraph.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + + @Autowired + private ControlGraphMapper mapper; + + @Override + @Transactional(rollbackFor = Exception.class) + public List list() { + List list = mapper.list(); + return list; + } +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/InterpretationSchemeServiceImpl.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/InterpretationSchemeServiceImpl.java new file mode 100644 index 0000000..ad80b65 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/InterpretationSchemeServiceImpl.java @@ -0,0 +1,88 @@ +package com.cnbm.qualityPlanning.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.common.utils.ConvertUtils; +import com.cnbm.qualityPlanning.dto.InterpretationSchemeDTO; +import com.cnbm.qualityPlanning.entity.InterpretationScheme; +import com.cnbm.qualityPlanning.mapper.InterpretationSchemeMapper; +import com.cnbm.qualityPlanning.service.IInterpretationSchemeService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Service +public class InterpretationSchemeServiceImpl extends CrudServiceImpl implements IInterpretationSchemeService { + + @Autowired + private InterpretationSchemeMapper mapper; + + @Override + public QueryWrapper getWrapper(Map params){ + String name = (String)params.get("name"); + String code = (String)params.get("code"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.like(StringUtils.isNotBlank(name), "name", name); + wrapper.like(StringUtils.isNotBlank(code), "code", code); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, InterpretationSchemeDTO.class); + } + + @Override + public InterpretationSchemeDTO get(Long id) { + InterpretationScheme entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, InterpretationSchemeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(InterpretationSchemeDTO dto) { + InterpretationScheme entity = ConvertUtils.sourceToTarget(dto, InterpretationScheme.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(InterpretationSchemeDTO dto) { + InterpretationScheme entity = ConvertUtils.sourceToTarget(dto, InterpretationScheme.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public List list() { + List list = mapper.list(); + return list; + } + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/MyInterpretationSchemeServiceImpl.java b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/MyInterpretationSchemeServiceImpl.java new file mode 100644 index 0000000..c98e468 --- /dev/null +++ b/ym-quality-planning/src/main/java/com/cnbm/qualityPlanning/service/impl/MyInterpretationSchemeServiceImpl.java @@ -0,0 +1,76 @@ +package com.cnbm.qualityPlanning.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.common.utils.ConvertUtils; +import com.cnbm.qualityPlanning.dto.MyInterpretationSchemeDTO; +import com.cnbm.qualityPlanning.entity.MyInterpretationScheme; +import com.cnbm.qualityPlanning.mapper.MyInterpretationSchemeMapper; +import com.cnbm.qualityPlanning.service.IMyInterpretationSchemeService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Map; + +/** + * 判读方案 表 + * + * @author why + * @since 2022-08-15 + */ +@Service +public class MyInterpretationSchemeServiceImpl extends CrudServiceImpl implements IMyInterpretationSchemeService { + + @Override + public QueryWrapper getWrapper(Map params){ + String name = (String)params.get("name"); + String code = (String)params.get("code"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.like(StringUtils.isNotBlank(name), "name", name); + wrapper.like(StringUtils.isNotBlank(code), "code", code); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, MyInterpretationSchemeDTO.class); + } + + @Override + public MyInterpretationSchemeDTO get(Long id) { + MyInterpretationScheme entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MyInterpretationSchemeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MyInterpretationSchemeDTO dto) { + MyInterpretationScheme entity = ConvertUtils.sourceToTarget(dto, MyInterpretationScheme.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MyInterpretationSchemeDTO dto) { + MyInterpretationScheme entity = ConvertUtils.sourceToTarget(dto, MyInterpretationScheme.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + +} \ No newline at end of file diff --git a/ym-quality-planning/src/main/resources/mapper/ControlGraphMapper.xml b/ym-quality-planning/src/main/resources/mapper/ControlGraphMapper.xml new file mode 100644 index 0000000..2b6be54 --- /dev/null +++ b/ym-quality-planning/src/main/resources/mapper/ControlGraphMapper.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ym-quality-planning/src/main/resources/mapper/InterpretationSchemeMapper.xml b/ym-quality-planning/src/main/resources/mapper/InterpretationSchemeMapper.xml new file mode 100644 index 0000000..8dec593 --- /dev/null +++ b/ym-quality-planning/src/main/resources/mapper/InterpretationSchemeMapper.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ym-quality-planning/src/main/resources/mapper/MyInterpretationSchemeMapper.xml b/ym-quality-planning/src/main/resources/mapper/MyInterpretationSchemeMapper.xml new file mode 100644 index 0000000..cd91349 --- /dev/null +++ b/ym-quality-planning/src/main/resources/mapper/MyInterpretationSchemeMapper.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +