From 3bd383a347982e296d1014570c0508a229afc197 Mon Sep 17 00:00:00 2001 From: yanyang Date: Wed, 20 Jul 2022 15:29:54 +0800 Subject: [PATCH] mark --- .../basic/controller/FactoryController.java | 125 ++++++++++++++++++ .../basic/controller/MachineController.java | 116 ++++++++++++++++ .../controller/MeasureToolController.java | 124 +++++++++++++++++ .../basic/controller/PlatformController.java | 116 ++++++++++++++++ .../ProductFeaturesHisController.java | 116 ++++++++++++++++ .../controller/ProductTypeController.java | 10 ++ ...uctWorkingprocedureRelationController.java | 116 ++++++++++++++++ .../basic/controller/ShiftController.java | 116 ++++++++++++++++ .../cnbm/basic/controller/TeamController.java | 116 ++++++++++++++++ .../cnbm/basic/controller/UnitController.java | 9 ++ .../WorkingProcedureController.java | 116 ++++++++++++++++ .../WorkingProcedureTypeController.java | 116 ++++++++++++++++ .../java/com/cnbm/basic/dto/FactoryDTO.java | 74 +++++++++++ .../java/com/cnbm/basic/dto/MachineDTO.java | 71 ++++++++++ .../com/cnbm/basic/dto/MeasureToolDTO.java | 68 ++++++++++ .../java/com/cnbm/basic/dto/PlatformDTO.java | 68 ++++++++++ .../cnbm/basic/dto/ProductFeaturesHisDTO.java | 119 +++++++++++++++++ .../com/cnbm/basic/dto/ProductTypeDTO.java | 2 - .../ProductWorkingprocedureRelationDTO.java | 71 ++++++++++ .../java/com/cnbm/basic/dto/ShiftDTO.java | 68 ++++++++++ .../main/java/com/cnbm/basic/dto/TeamDTO.java | 68 ++++++++++ .../cnbm/basic/dto/WorkingProcedureDTO.java | 77 +++++++++++ .../basic/dto/WorkingProcedureTypeDTO.java | 65 +++++++++ .../java/com/cnbm/basic/entity/Factory.java | 73 ++++++++++ .../java/com/cnbm/basic/entity/Machine.java | 67 ++++++++++ .../com/cnbm/basic/entity/MeasureTool.java | 69 ++++++++++ .../java/com/cnbm/basic/entity/Platform.java | 67 ++++++++++ .../cnbm/basic/entity/ProductFeaturesHis.java | 120 +++++++++++++++++ .../ProductWorkingprocedureRelation.java | 72 ++++++++++ .../java/com/cnbm/basic/entity/Shift.java | 67 ++++++++++ .../main/java/com/cnbm/basic/entity/Team.java | 67 ++++++++++ .../cnbm/basic/entity/WorkingProcedure.java | 72 ++++++++++ .../basic/entity/WorkingProcedureType.java | 66 +++++++++ .../com/cnbm/basic/excel/FactoryExcel.java | 52 ++++++++ .../com/cnbm/basic/excel/MachineExcel.java | 48 +++++++ .../cnbm/basic/excel/MeasureToolExcel.java | 48 +++++++ .../com/cnbm/basic/excel/PlatformExcel.java | 48 +++++++ .../basic/excel/ProductFeaturesHisExcel.java | 82 ++++++++++++ .../ProductWorkingprocedureRelationExcel.java | 50 +++++++ .../java/com/cnbm/basic/excel/ShiftExcel.java | 48 +++++++ .../java/com/cnbm/basic/excel/TeamExcel.java | 48 +++++++ .../basic/excel/WorkingProcedureExcel.java | 50 +++++++ .../excel/WorkingProcedureTypeExcel.java | 46 +++++++ .../com/cnbm/basic/mapper/FactoryMapper.java | 16 +++ .../com/cnbm/basic/mapper/MachineMapper.java | 16 +++ .../cnbm/basic/mapper/MeasureToolMapper.java | 16 +++ .../com/cnbm/basic/mapper/PlatformMapper.java | 16 +++ .../mapper/ProductFeaturesHisMapper.java | 16 +++ .../cnbm/basic/mapper/ProductTypeMapper.java | 2 +- ...ProductWorkingprocedureRelationMapper.java | 16 +++ .../com/cnbm/basic/mapper/ShiftMapper.java | 16 +++ .../com/cnbm/basic/mapper/TeamMapper.java | 16 +++ .../basic/mapper/WorkingProcedureMapper.java | 20 +++ .../mapper/WorkingProcedureTypeMapper.java | 16 +++ .../cnbm/basic/service/IFactoryService.java | 28 ++++ .../cnbm/basic/service/IMachineService.java | 28 ++++ .../basic/service/IMeasureToolService.java | 28 ++++ .../cnbm/basic/service/IPlatformService.java | 28 ++++ .../service/IProductFeaturesHisService.java | 26 ++++ .../basic/service/IProductTypeService.java | 10 ++ ...roductWorkingprocedureRelationService.java | 26 ++++ .../com/cnbm/basic/service/IShiftService.java | 26 ++++ .../com/cnbm/basic/service/ITeamService.java | 26 ++++ .../com/cnbm/basic/service/IUnitService.java | 11 ++ .../service/IWorkingProcedureService.java | 28 ++++ .../service/IWorkingProcedureTypeService.java | 28 ++++ .../service/impl/FactoryServiceImpl.java | 94 +++++++++++++ .../service/impl/MachineServiceImpl.java | 96 ++++++++++++++ .../service/impl/MeasureToolServiceImpl.java | 82 ++++++++++++ .../service/impl/PlatformServiceImpl.java | 87 ++++++++++++ .../impl/ProductFeaturesHisServiceImpl.java | 67 ++++++++++ .../service/impl/ProductTypeServiceImpl.java | 71 ++++++++-- ...ctWorkingprocedureRelationServiceImpl.java | 66 +++++++++ .../basic/service/impl/ShiftServiceImpl.java | 75 +++++++++++ .../basic/service/impl/TeamServiceImpl.java | 77 +++++++++++ .../basic/service/impl/UnitServiceImpl.java | 48 ++++++- .../impl/WorkingProcedureServiceImpl.java | 121 +++++++++++++++++ .../impl/WorkingProcedureTypeServiceImpl.java | 86 ++++++++++++ ym-baisc/src/main/resources/FactoryMapper.xml | 5 + ym-baisc/src/main/resources/MachineMapper.xml | 5 + .../src/main/resources/MeasureToolMapper.xml | 11 ++ .../src/main/resources/PlatformMapper.xml | 5 + .../resources/ProductFeaturesHisMapper.xml | 5 + .../src/main/resources/ProductTypeMapper.xml | 7 - .../ProductWorkingprocedureRelationMapper.xml | 5 + ym-baisc/src/main/resources/ShiftMapper.xml | 5 + ym-baisc/src/main/resources/TeamMapper.xml | 5 + 87 files changed, 4667 insertions(+), 22 deletions(-) create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesHisController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/ProductWorkingprocedureRelationController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/ShiftController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/TeamController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/FactoryDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/MachineDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/MeasureToolDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/PlatformDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesHisDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/ProductWorkingprocedureRelationDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/ShiftDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/TeamDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureTypeDTO.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/Factory.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/Machine.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/MeasureTool.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/Platform.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeaturesHis.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/ProductWorkingprocedureRelation.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/Shift.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/Team.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedure.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedureType.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/FactoryExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/MachineExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/MeasureToolExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/PlatformExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesHisExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/ProductWorkingprocedureRelationExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/ShiftExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/TeamExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureTypeExcel.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/FactoryMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/MachineMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/MeasureToolMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/PlatformMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesHisMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductWorkingprocedureRelationMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/ShiftMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/TeamMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureTypeMapper.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IFactoryService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IMachineService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IMeasureToolService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IPlatformService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesHisService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IProductWorkingprocedureRelationService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IShiftService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/ITeamService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureTypeService.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/PlatformServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesHisServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductWorkingprocedureRelationServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/ShiftServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/TeamServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java create mode 100644 ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureTypeServiceImpl.java create mode 100644 ym-baisc/src/main/resources/FactoryMapper.xml create mode 100644 ym-baisc/src/main/resources/MachineMapper.xml create mode 100644 ym-baisc/src/main/resources/MeasureToolMapper.xml create mode 100644 ym-baisc/src/main/resources/PlatformMapper.xml create mode 100644 ym-baisc/src/main/resources/ProductFeaturesHisMapper.xml create mode 100644 ym-baisc/src/main/resources/ProductWorkingprocedureRelationMapper.xml create mode 100644 ym-baisc/src/main/resources/ShiftMapper.xml create mode 100644 ym-baisc/src/main/resources/TeamMapper.xml 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 new file mode 100644 index 0000000..1e46a5c --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/FactoryController.java @@ -0,0 +1,125 @@ +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.FactoryDTO; +import com.cnbm.basic.excel.FactoryExcel; +import com.cnbm.basic.service.IFactoryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-13 + */ +@RestController +@RequestMapping("/code/factory") +@Api(tags="工厂 表") +public class FactoryController { + @Autowired + private IFactoryService factoryService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:factory:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = factoryService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:factory:info')") + public Result get(@PathVariable("id") Long id){ + FactoryDTO data = factoryService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:factory:save')") + public Result save(@RequestBody FactoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + factoryService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:factory:update')") + public Result update(@RequestBody FactoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + factoryService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:factory:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + factoryService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:factory:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = factoryService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, FactoryExcel.class); + } + + @GetMapping("{id}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + factoryService.changeStatus(id); + + 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 new file mode 100644 index 0000000..ac8a148 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/MachineController.java @@ -0,0 +1,116 @@ +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.MachineDTO; +import com.cnbm.basic.excel.MachineExcel; +import com.cnbm.basic.service.IMachineService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-15 + */ +@RestController +@RequestMapping("/code/machine") +@Api(tags="机台表") +public class MachineController { + @Autowired + private IMachineService machineService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:machine:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = machineService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:machine:info')") + public Result get(@PathVariable("id") Long id){ + MachineDTO data = machineService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:machine:save')") + public Result save(@RequestBody MachineDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + machineService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:machine:update')") + public Result update(@RequestBody MachineDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + machineService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:machine:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + machineService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:machine:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = machineService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, MachineExcel.class); + } + +} \ No newline at end of file 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 new file mode 100644 index 0000000..cad9865 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/MeasureToolController.java @@ -0,0 +1,124 @@ +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.MeasureToolDTO; +import com.cnbm.basic.excel.MeasureToolExcel; +import com.cnbm.basic.service.IMeasureToolService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-13 + */ +@RestController +@RequestMapping("/code/measureTool") +@Api(tags="量具表") +public class MeasureToolController { + @Autowired + private IMeasureToolService measureToolService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:measureTool:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = measureToolService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:measureTool:info')") + public Result get(@PathVariable("id") Long id){ + MeasureToolDTO data = measureToolService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:measureTool:save')") + public Result save(@RequestBody MeasureToolDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + measureToolService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:measureTool:update')") + public Result update(@RequestBody MeasureToolDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + measureToolService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:measureTool:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + measureToolService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:measureTool:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = measureToolService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, MeasureToolExcel.class); + } + + @GetMapping("{id}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + measureToolService.changeStatus(id); + + return new Result(); + } +} \ 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 new file mode 100644 index 0000000..964ef6c --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/PlatformController.java @@ -0,0 +1,116 @@ +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.PlatformDTO; +import com.cnbm.basic.excel.PlatformExcel; +import com.cnbm.basic.service.IPlatformService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-13 + */ +@RestController +@RequestMapping("/code/platform") +@Api(tags="站点表") +public class PlatformController { + @Autowired + private IPlatformService platformService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:platform:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = platformService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:platform:info')") + public Result get(@PathVariable("id") Long id){ + PlatformDTO data = platformService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:platform:save')") + public Result save(@RequestBody PlatformDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + platformService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:platform:update')") + public Result update(@RequestBody PlatformDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + platformService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:platform:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + platformService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:platform:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = platformService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, PlatformExcel.class); + } + +} \ 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 new file mode 100644 index 0000000..50973de --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesHisController.java @@ -0,0 +1,116 @@ +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.ProductFeaturesHisDTO; +import com.cnbm.basic.excel.ProductFeaturesHisExcel; +import com.cnbm.basic.service.IProductFeaturesHisService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-15 + */ +@RestController +@RequestMapping("/code/productFeaturesHis") +@Api(tags="产品特性 历史表") +public class ProductFeaturesHisController { + @Autowired + private IProductFeaturesHisService productFeaturesHisService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = productFeaturesHisService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:info')") + public Result get(@PathVariable("id") Long id){ + ProductFeaturesHisDTO data = productFeaturesHisService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:save')") + public Result save(@RequestBody ProductFeaturesHisDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + productFeaturesHisService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:update')") + public Result update(@RequestBody ProductFeaturesHisDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + productFeaturesHisService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + productFeaturesHisService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:productFeaturesHis:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = productFeaturesHisService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, ProductFeaturesHisExcel.class); + } + +} \ No newline at end of file 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 89a5328..3a6a706 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 @@ -40,6 +40,7 @@ public class ProductTypeController { @Autowired private IProductTypeService productTypeService; + @GetMapping("page") @ApiOperation("分页") @ApiImplicitParams({ @@ -113,4 +114,13 @@ public class ProductTypeController { ExcelUtils.exportExcelToTarget(response, null, list, ProductTypeExcel.class); } + @GetMapping("{id}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + productTypeService.changeStatus(id); + + return new Result(); + } + } \ 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 new file mode 100644 index 0000000..09ceced --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductWorkingprocedureRelationController.java @@ -0,0 +1,116 @@ +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.ProductWorkingprocedureRelationDTO; +import com.cnbm.basic.excel.ProductWorkingprocedureRelationExcel; +import com.cnbm.basic.service.IProductWorkingprocedureRelationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-15 + */ +@RestController +@RequestMapping("/code/productWorkingprocedureRelation") +@Api(tags="工序 表") +public class ProductWorkingprocedureRelationController { + @Autowired + private IProductWorkingprocedureRelationService productWorkingprocedureRelationService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = productWorkingprocedureRelationService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:info')") + public Result get(@PathVariable("id") Long id){ + ProductWorkingprocedureRelationDTO data = productWorkingprocedureRelationService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:save')") + public Result save(@RequestBody ProductWorkingprocedureRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + productWorkingprocedureRelationService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:update')") + public Result update(@RequestBody ProductWorkingprocedureRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + productWorkingprocedureRelationService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + productWorkingprocedureRelationService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:productWorkingprocedureRelation:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = productWorkingprocedureRelationService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, ProductWorkingprocedureRelationExcel.class); + } + +} \ No newline at end of file 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 new file mode 100644 index 0000000..4174eaa --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ShiftController.java @@ -0,0 +1,116 @@ +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.ShiftDTO; +import com.cnbm.basic.excel.ShiftExcel; +import com.cnbm.basic.service.IShiftService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-13 + */ +@RestController +@RequestMapping("/code/shift") +@Api(tags="班次 表") +public class ShiftController { + @Autowired + private IShiftService shiftService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:shift:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = shiftService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:shift:info')") + public Result get(@PathVariable("id") Long id){ + ShiftDTO data = shiftService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:shift:save')") + public Result save(@RequestBody ShiftDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + shiftService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:shift:update')") + public Result update(@RequestBody ShiftDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + shiftService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:shift:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + shiftService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:shift:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = shiftService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, ShiftExcel.class); + } + +} \ No newline at end of file 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 new file mode 100644 index 0000000..a2df71e --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/TeamController.java @@ -0,0 +1,116 @@ +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.TeamDTO; +import com.cnbm.basic.excel.TeamExcel; +import com.cnbm.basic.service.ITeamService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-13 + */ +@RestController +@RequestMapping("/code/team") +@Api(tags="班组 表") +public class TeamController { + @Autowired + private ITeamService teamService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:team:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = teamService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:team:info')") + public Result get(@PathVariable("id") Long id){ + TeamDTO data = teamService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:team:save')") + public Result save(@RequestBody TeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + teamService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:team:update')") + public Result update(@RequestBody TeamDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + teamService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:team:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + teamService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:team:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = teamService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, TeamExcel.class); + } + +} \ No newline at end of file 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 e38624d..21dc6bd 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 @@ -113,4 +113,13 @@ public class UnitController { ExcelUtils.exportExcelToTarget(response, null, list, UnitExcel.class); } + @GetMapping("{id}") + @ApiOperation("改变状态") + @LogOperation("改变状态") + public Result changeStatus(@PathVariable("id") Long id){ + unitService.changeStatus(id); + + return new Result(); + } + } \ 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 new file mode 100644 index 0000000..5e0f43b --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureController.java @@ -0,0 +1,116 @@ +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.WorkingProcedureDTO; +import com.cnbm.basic.excel.WorkingProcedureExcel; +import com.cnbm.basic.service.IWorkingProcedureService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-15 + */ +@RestController +@RequestMapping("/code/workingProcedure") +@Api(tags="工序 表") +public class WorkingProcedureController { + @Autowired + private IWorkingProcedureService workingProcedureService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:workingProcedure:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = workingProcedureService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:workingProcedure:info')") + public Result get(@PathVariable("id") Long id){ + WorkingProcedureDTO data = workingProcedureService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:workingProcedure:save')") + public Result save(@RequestBody WorkingProcedureDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + workingProcedureService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:workingProcedure:update')") + public Result update(@RequestBody WorkingProcedureDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + workingProcedureService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:workingProcedure:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + workingProcedureService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:workingProcedure:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = workingProcedureService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureExcel.class); + } + +} \ 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 new file mode 100644 index 0000000..b213bb0 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/WorkingProcedureTypeController.java @@ -0,0 +1,116 @@ +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.WorkingProcedureTypeDTO; +import com.cnbm.basic.excel.WorkingProcedureTypeExcel; +import com.cnbm.basic.service.IWorkingProcedureTypeService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +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-07-15 + */ +@RestController +@RequestMapping("/code/workingProcedureType") +@Api(tags="工序类型表 表") +public class WorkingProcedureTypeController { + @Autowired + private IWorkingProcedureTypeService workingProcedureTypeService; + + @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) + }) + @PreAuthorize("@ex.hasAuthority('code:workingProcedureType:page')") + public Result> page(@ApiIgnore @RequestParam Map params){ + PageData page = workingProcedureTypeService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + @ApiOperation("信息") + @PreAuthorize("@ex.hasAuthority('code:workingProcedureType:info')") + public Result get(@PathVariable("id") Long id){ + WorkingProcedureTypeDTO data = workingProcedureTypeService.get(id); + + return new Result().ok(data); + } + + @PostMapping + @ApiOperation("保存") + @LogOperation("保存") + @PreAuthorize("@ex.hasAuthority('code:workingProcedureType:save')") + public Result save(@RequestBody WorkingProcedureTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + workingProcedureTypeService.save(dto); + + return new Result(); + } + + @PutMapping + @ApiOperation("修改") + @LogOperation("修改") + @PreAuthorize("@ex.hasAuthority('code:workingProcedureType:update')") + public Result update(@RequestBody WorkingProcedureTypeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + workingProcedureTypeService.update(dto); + + return new Result(); + } + + @DeleteMapping + @ApiOperation("删除") + @LogOperation("删除") + @PreAuthorize("@ex.hasAuthority('code:workingProcedureType:delete')") + public Result delete(@RequestBody Long[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + workingProcedureTypeService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @ApiOperation("导出") + @LogOperation("导出") + @PreAuthorize("@ex.hasAuthority('code:workingProcedureType:export')") + public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { + List list = workingProcedureTypeService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, WorkingProcedureTypeExcel.class); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/FactoryDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/FactoryDTO.java new file mode 100644 index 0000000..f338765 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/FactoryDTO.java @@ -0,0 +1,74 @@ +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; + +import java.math.BigDecimal; + + +/** + * 工厂 表 + * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "工厂 表DTO对象") +public class FactoryDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "工厂 名") + private String name; + + @ApiModelProperty(value = "工厂 编码") + private String code; + + @ApiModelProperty(value = "工厂 描述") + private String descs; + + @ApiModelProperty(value = "工厂 联系地址") + private String address; + + @ApiModelProperty(value = "工厂类型,1-内部工厂;2-供应商") + private String type; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/MachineDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/MachineDTO.java new file mode 100644 index 0000000..68a58ed --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/MachineDTO.java @@ -0,0 +1,71 @@ +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; + +import java.math.BigDecimal; + + +/** + * 机台表 + * + * @author why + * @since 2022-07-15 + */ +@Data +@ApiModel(value = "机台表DTO对象") +public class MachineDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "机台名") + private String name; + + @ApiModelProperty(value = "机台编码") + private String code; + + @ApiModelProperty(value = "机台id,关联platform id") + private BigDecimal platformId; + + @ApiModelProperty(value = "机台名称,关联platform id") + private String platformName; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/MeasureToolDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/MeasureToolDTO.java new file mode 100644 index 0000000..ecbb107 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/MeasureToolDTO.java @@ -0,0 +1,68 @@ +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; + +import java.math.BigDecimal; + + +/** + * 量具表 + * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "量具表DTO对象") +public class MeasureToolDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "量具 名") + private String name; + + @ApiModelProperty(value = "量具 编码") + private String code; + + @ApiModelProperty(value = "量具类型;计量型=1 计数型=2") + private String type; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/PlatformDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/PlatformDTO.java new file mode 100644 index 0000000..9c71d58 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/PlatformDTO.java @@ -0,0 +1,68 @@ +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; + +import java.math.BigDecimal; + + +/** + * 站点表 + * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "站点表DTO对象") +public class PlatformDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "站台名") + private String name; + + @ApiModelProperty(value = "站台编码") + private String code; + + @ApiModelProperty(value = "站台分组") + private String group; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file 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 new file mode 100644 index 0000000..bced95a --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesHisDTO.java @@ -0,0 +1,119 @@ +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; + +import java.math.BigDecimal; + + +/** + * 产品特性 历史表 + * + * @author why + * @since 2022-07-15 + */ +@Data +@ApiModel(value = "产品特性 历史表DTO对象") +public class ProductFeaturesHisDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "产品特性id,关联product_features表") + private BigDecimal productFeaturesId; + + @ApiModelProperty(value = "产品id,关联product表") + private BigDecimal productId; + + @ApiModelProperty(value = "产品特性 名") + private String name; + + @ApiModelProperty(value = "产品特性 编码") + private String code; + + @ApiModelProperty(value = "产品特性类型:1 计量型;2 计数型") + private BigDecimal type; + + @ApiModelProperty(value = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") + private BigDecimal defectLevel; + + @ApiModelProperty(value = "量具id,关联measure_tool表") + private BigDecimal measureToolId; + + @ApiModelProperty(value = "单位 id,关联unit表") + private BigDecimal unitId; + + @ApiModelProperty(value = "产品特性 规格") + private String specifications; + + @ApiModelProperty(value = "检验参数 规格下线") + private Float lsl; + + @ApiModelProperty(value = "检验参数 规格中心线") + private Float sl; + + @ApiModelProperty(value = "检验参数 规格上线") + private Float usl; + + @ApiModelProperty(value = "工序id,关联 working_procedure 表id") + private BigDecimal workingProcedureId; + + @ApiModelProperty(value = "(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;;如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private BigDecimal inspectionStage; + + @ApiModelProperty(value = "是否需要spc分析,1 yes;0 no") + private BigDecimal isSpc; + + @ApiModelProperty(value = "分析图形,关联control_graph表id") + private BigDecimal controlGraphId; + + @ApiModelProperty(value = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") + private BigDecimal sampleSize; + + @ApiModelProperty(value = "采样频率,只用于展示") + private String samplingFrequency; + + @ApiModelProperty(value = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") + private BigDecimal decimalPlaces; + + @ApiModelProperty(value = "目标cpk") + private Float targetCpk; + + @ApiModelProperty(value = "目标cpk") + private Float targetPpk; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file 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 2a0edaf..cd0b176 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 @@ -20,8 +20,6 @@ import java.time.LocalDateTime; public class ProductTypeDTO implements Serializable { private static final long serialVersionUID = 1L; - - @ApiModelProperty(value = "ID") private BigDecimal id; 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 new file mode 100644 index 0000000..9e05914 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductWorkingprocedureRelationDTO.java @@ -0,0 +1,71 @@ +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; + +import java.math.BigDecimal; + + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Data +@ApiModel(value = "工序 表DTO对象") +public class ProductWorkingprocedureRelationDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "产品id,关联product表") + private BigDecimal productId; + + @ApiModelProperty(value = "工序id,关联 working_procedure 表") + private BigDecimal workingProcedureId; + + @ApiModelProperty(value = "顺序,工序是有先后顺序的。") + private BigDecimal order; + + @ApiModelProperty(value = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;;如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private BigDecimal inspectionStage; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/ShiftDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/ShiftDTO.java new file mode 100644 index 0000000..e0d80f4 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ShiftDTO.java @@ -0,0 +1,68 @@ +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; + +import java.math.BigDecimal; + + +/** + * 班次 表 + * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "班次 表DTO对象") +public class ShiftDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "班次 名") + private String name; + + @ApiModelProperty(value = "班次 编码") + private String code; + + @ApiModelProperty(value = "班次 描述") + private String descs; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/TeamDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/TeamDTO.java new file mode 100644 index 0000000..50f92cc --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/TeamDTO.java @@ -0,0 +1,68 @@ +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; + +import java.math.BigDecimal; + + +/** + * 班组 表 + * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "班组 表DTO对象") +public class TeamDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "班组 名") + private String name; + + @ApiModelProperty(value = "班组 编码") + private String code; + + @ApiModelProperty(value = "班组 描述") + private String descs; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureDTO.java new file mode 100644 index 0000000..280ff14 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureDTO.java @@ -0,0 +1,77 @@ +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; + +import java.math.BigDecimal; + + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Data +@ApiModel(value = "工序 表DTO对象") +public class WorkingProcedureDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "工序 名") + private String name; + + @ApiModelProperty(value = "工序 编码") + private String code; + + @ApiModelProperty(value = "工序类型 id,关联working_procedure_type表") + private BigDecimal workingProcedureTypeId; + + @ApiModelProperty(value = "工序类型 名,关联working_procedure_type表") + private String workingProcedureTypeName; + + @ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") + private String machineId; + + @ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") + private String machineName; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureTypeDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureTypeDTO.java new file mode 100644 index 0000000..3cc839d --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/WorkingProcedureTypeDTO.java @@ -0,0 +1,65 @@ +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; + +import java.math.BigDecimal; + + +/** + * 工序类型表 表 + * + * @author why + * @since 2022-07-15 + */ +@Data +@ApiModel(value = "工序类型表 表DTO对象") +public class WorkingProcedureTypeDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private BigDecimal id; + + @ApiModelProperty(value = "工序类型 名") + private String name; + + @ApiModelProperty(value = "工序类型 编码") + private String code; + + @ApiModelProperty(value = "1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty(value = "创建人") + private BigDecimal creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "更新人") + private BigDecimal updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/Factory.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/Factory.java new file mode 100644 index 0000000..f5cc713 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/Factory.java @@ -0,0 +1,73 @@ +package com.cnbm.basic.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 工厂 表 + *

+ * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "Factory对象", description = "工厂 表") +public class Factory implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("工厂 名") + private String name; + + @ApiModelProperty("工厂 编码") + private String code; + + @ApiModelProperty("工厂 描述") + private String descs; + + @ApiModelProperty("工厂 联系地址") + private String address; + + @ApiModelProperty("工厂类型,1-内部工厂;2-供应商") + private String type; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/Machine.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/Machine.java new file mode 100644 index 0000000..ecb81a6 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/Machine.java @@ -0,0 +1,67 @@ +package com.cnbm.basic.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 机台表 + *

+ * + * @author why + * @since 2022-07-15 + */ +@Data +@ApiModel(value = "Machine对象", description = "机台表") +public class Machine implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("机台名") + private String name; + + @ApiModelProperty("机台编码") + private String code; + + @ApiModelProperty("机台id,关联platform id") + private BigDecimal platformId; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/MeasureTool.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/MeasureTool.java new file mode 100644 index 0000000..2f1dc65 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/MeasureTool.java @@ -0,0 +1,69 @@ +package com.cnbm.basic.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 量具表 + *

+ * + * @author why + * @since 2022-07-13 + */ +@Data +@TableName("measure_tool") +@ApiModel(value = "MeasureTool对象", description = "量具表") +public class MeasureTool implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("量具 名") + private String name; + + @ApiModelProperty("量具 编码") + private String code; + + @ApiModelProperty("量具类型;计量型=1 计数型=2") + private String type; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/Platform.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/Platform.java new file mode 100644 index 0000000..e56130d --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/Platform.java @@ -0,0 +1,67 @@ +package com.cnbm.basic.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 站点表 + *

+ * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "Platform对象", description = "站点表") +public class Platform implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("站台名") + private String name; + + @ApiModelProperty("站台编码") + private String code; + + @ApiModelProperty("站台分组") + private String group; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} 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 new file mode 100644 index 0000000..3294d7c --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductFeaturesHis.java @@ -0,0 +1,120 @@ +package com.cnbm.basic.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 产品特性 历史表 + *

+ * + * @author why + * @since 2022-07-15 + */ +@Data +@TableName("product_features_his") +@ApiModel(value = "ProductFeaturesHis对象", description = "产品特性 历史表") +public class ProductFeaturesHis implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("产品特性id,关联product_features表") + private BigDecimal productFeaturesId; + + @ApiModelProperty("产品id,关联product表") + private BigDecimal productId; + + @ApiModelProperty("产品特性 名") + private String name; + + @ApiModelProperty("产品特性 编码") + private String code; + + @ApiModelProperty("产品特性类型:1 计量型;2 计数型") + private BigDecimal type; + + @ApiModelProperty("缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") + private BigDecimal defectLevel; + + @ApiModelProperty("量具id,关联measure_tool表") + private BigDecimal measureToolId; + + @ApiModelProperty("单位 id,关联unit表") + private BigDecimal unitId; + + @ApiModelProperty("产品特性 规格") + private String specifications; + + @ApiModelProperty("检验参数 规格下线") + private Float lsl; + + @ApiModelProperty("检验参数 规格中心线") + private Float sl; + + @ApiModelProperty("检验参数 规格上线") + private Float usl; + + @ApiModelProperty("工序id,关联 working_procedure 表id") + private BigDecimal workingProcedureId; + + @ApiModelProperty("(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;;如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private BigDecimal inspectionStage; + + @ApiModelProperty("是否需要spc分析,1 yes;0 no") + private BigDecimal isSpc; + + @ApiModelProperty("分析图形,关联control_graph表id") + private BigDecimal controlGraphId; + + @ApiModelProperty("样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") + private BigDecimal sampleSize; + + @ApiModelProperty("采样频率,只用于展示") + private String samplingFrequency; + + @ApiModelProperty("小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") + private BigDecimal decimalPlaces; + + @ApiModelProperty("目标cpk") + private Float targetCpk; + + @ApiModelProperty("目标cpk") + private Float targetPpk; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductWorkingprocedureRelation.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductWorkingprocedureRelation.java new file mode 100644 index 0000000..6b131f3 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/ProductWorkingprocedureRelation.java @@ -0,0 +1,72 @@ +package com.cnbm.basic.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 工序 表 + *

+ * + * @author why + * @since 2022-07-15 + */ +@Data +@TableName("product_workingprocedure_relation") +@ApiModel(value = "ProductWorkingprocedureRelation对象", description = "工序 表") +public class ProductWorkingprocedureRelation implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("产品id,关联product表") + private BigDecimal productId; + + @ApiModelProperty("工序id,关联 working_procedure 表") + private BigDecimal workingProcedureId; + + @ApiModelProperty("顺序,工序是有先后顺序的。") + private BigDecimal order; + + @ApiModelProperty("检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;;如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private BigDecimal inspectionStage; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/Shift.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/Shift.java new file mode 100644 index 0000000..23c3fbd --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/Shift.java @@ -0,0 +1,67 @@ +package com.cnbm.basic.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 班次 表 + *

+ * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "Shift对象", description = "班次 表") +public class Shift implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("班次 名") + private String name; + + @ApiModelProperty("班次 编码") + private String code; + + @ApiModelProperty("班次 描述") + private String descs; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/Team.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/Team.java new file mode 100644 index 0000000..dfa2544 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/Team.java @@ -0,0 +1,67 @@ +package com.cnbm.basic.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 班组 表 + *

+ * + * @author why + * @since 2022-07-13 + */ +@Data +@ApiModel(value = "Team对象", description = "班组 表") +public class Team implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("班组 名") + private String name; + + @ApiModelProperty("班组 编码") + private String code; + + @ApiModelProperty("班组 描述") + private String descs; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedure.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedure.java new file mode 100644 index 0000000..dfe14c5 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedure.java @@ -0,0 +1,72 @@ +package com.cnbm.basic.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 工序 表 + *

+ * + * @author why + * @since 2022-07-15 + */ +@Data +@TableName("working_procedure") +@ApiModel(value = "WorkingProcedure对象", description = "工序 表") +public class WorkingProcedure implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("工序 名") + private String name; + + @ApiModelProperty("工序 编码") + private String code; + + @ApiModelProperty("工序类型 id,关联working_procedure_type表") + private BigDecimal workingProcedureTypeId; + + @ApiModelProperty("机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") + private String machineId; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedureType.java b/ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedureType.java new file mode 100644 index 0000000..fd7ec37 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/entity/WorkingProcedureType.java @@ -0,0 +1,66 @@ +package com.cnbm.basic.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 工序类型表 表 + *

+ * + * @author why + * @since 2022-07-15 + */ +@Data +@TableName("working_procedure_type") +@ApiModel(value = "WorkingProcedureType对象", description = "工序类型表 表") +public class WorkingProcedureType implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private BigDecimal id; + + @ApiModelProperty("工序类型 名") + private String name; + + @ApiModelProperty("工序类型 编码") + private String code; + + @ApiModelProperty("1 可用,0 不可用") + private BigDecimal status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + + @ApiModelProperty("创建人") + private BigDecimal creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + @ApiModelProperty("更新人") + private BigDecimal updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private BigDecimal version; + + +} diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/FactoryExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/FactoryExcel.java new file mode 100644 index 0000000..0b2e81b --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/FactoryExcel.java @@ -0,0 +1,52 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 工厂 表 + * + * @author why + * @since 2022-07-13 + */ +@Data +public class FactoryExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "工厂 名") + private String name; + @Excel(name = "工厂 编码") + private String code; + @Excel(name = "工厂 描述") + private String descs; + @Excel(name = "工厂 联系地址") + private String address; + @Excel(name = "工厂类型,1-内部工厂;2-供应商") + private String type; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/MachineExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/MachineExcel.java new file mode 100644 index 0000000..1215129 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/MachineExcel.java @@ -0,0 +1,48 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 机台表 + * + * @author why + * @since 2022-07-15 + */ +@Data +public class MachineExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "机台名") + private String name; + @Excel(name = "机台编码") + private String code; + @Excel(name = "机台id,关联platform id") + private BigDecimal platformId; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/MeasureToolExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/MeasureToolExcel.java new file mode 100644 index 0000000..fef67a6 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/MeasureToolExcel.java @@ -0,0 +1,48 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 量具表 + * + * @author why + * @since 2022-07-13 + */ +@Data +public class MeasureToolExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "量具 名") + private String name; + @Excel(name = "量具 编码") + private String code; + @Excel(name = "量具类型;计量型=1 计数型=2") + private String type; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/PlatformExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/PlatformExcel.java new file mode 100644 index 0000000..e88019f --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/PlatformExcel.java @@ -0,0 +1,48 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 站点表 + * + * @author why + * @since 2022-07-13 + */ +@Data +public class PlatformExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "站台名") + private String name; + @Excel(name = "站台编码") + private String code; + @Excel(name = "站台分组") + private String group; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file 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 new file mode 100644 index 0000000..c34d993 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductFeaturesHisExcel.java @@ -0,0 +1,82 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 产品特性 历史表 + * + * @author why + * @since 2022-07-15 + */ +@Data +public class ProductFeaturesHisExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "产品特性id,关联product_features表") + private BigDecimal productFeaturesId; + @Excel(name = "产品id,关联product表") + private BigDecimal productId; + @Excel(name = "产品特性 名") + private String name; + @Excel(name = "产品特性 编码") + private String code; + @Excel(name = "产品特性类型:1 计量型;2 计数型") + private BigDecimal type; + @Excel(name = "缺陷等级:1 致命缺陷;2 严重缺陷;3.轻微缺陷") + private BigDecimal defectLevel; + @Excel(name = "量具id,关联measure_tool表") + private BigDecimal measureToolId; + @Excel(name = "单位 id,关联unit表") + private BigDecimal unitId; + @Excel(name = "产品特性 规格") + private String specifications; + @Excel(name = "检验参数 规格下线") + private Float lsl; + @Excel(name = "检验参数 规格中心线") + private Float sl; + @Excel(name = "检验参数 规格上线") + private Float usl; + @Excel(name = "工序id,关联 working_procedure 表id") + private BigDecimal workingProcedureId; + @Excel(name = "(如果为空就代表4个阶段都不是)检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;;如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private BigDecimal inspectionStage; + @Excel(name = "是否需要spc分析,1 yes;0 no") + private BigDecimal isSpc; + @Excel(name = "分析图形,关联control_graph表id") + private BigDecimal controlGraphId; + @Excel(name = "样本大小,一般2-25之间。 会依据这个size 把所有待分析的数据 组成一个一个样本") + private BigDecimal sampleSize; + @Excel(name = "采样频率,只用于展示") + private String samplingFrequency; + @Excel(name = "小数位数(限制 检验参数小数点后面位数),这个先放着后续再说。") + private BigDecimal decimalPlaces; + @Excel(name = "目标cpk") + private Float targetCpk; + @Excel(name = "目标cpk") + private Float targetPpk; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductWorkingprocedureRelationExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductWorkingprocedureRelationExcel.java new file mode 100644 index 0000000..83d908d --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/ProductWorkingprocedureRelationExcel.java @@ -0,0 +1,50 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Data +public class ProductWorkingprocedureRelationExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "产品id,关联product表") + private BigDecimal productId; + @Excel(name = "工序id,关联 working_procedure 表") + private BigDecimal workingProcedureId; + @Excel(name = "顺序,工序是有先后顺序的。") + private BigDecimal order; + @Excel(name = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;;如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") + private BigDecimal inspectionStage; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/ShiftExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/ShiftExcel.java new file mode 100644 index 0000000..dbdaf01 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/ShiftExcel.java @@ -0,0 +1,48 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 班次 表 + * + * @author why + * @since 2022-07-13 + */ +@Data +public class ShiftExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "班次 名") + private String name; + @Excel(name = "班次 编码") + private String code; + @Excel(name = "班次 描述") + private String descs; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/TeamExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/TeamExcel.java new file mode 100644 index 0000000..a207636 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/TeamExcel.java @@ -0,0 +1,48 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 班组 表 + * + * @author why + * @since 2022-07-13 + */ +@Data +public class TeamExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "班组 名") + private String name; + @Excel(name = "班组 编码") + private String code; + @Excel(name = "班组 描述") + private String descs; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureExcel.java new file mode 100644 index 0000000..e2a76fa --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureExcel.java @@ -0,0 +1,50 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Data +public class WorkingProcedureExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "工序 名") + private String name; + @Excel(name = "工序 编码") + private String code; + @Excel(name = "工序类型 id,关联working_procedure_type表") + private BigDecimal workingProcedureTypeId; + @Excel(name = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") + private String machineId; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureTypeExcel.java b/ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureTypeExcel.java new file mode 100644 index 0000000..4248d5a --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/excel/WorkingProcedureTypeExcel.java @@ -0,0 +1,46 @@ +package com.cnbm.basic.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.time.LocalDateTime; +import java.math.BigDecimal; + +import java.util.Date; + +/** + * 工序类型表 表 + * + * @author why + * @since 2022-07-15 + */ +@Data +public class WorkingProcedureTypeExcel { + @Excel(name = "ID") + private BigDecimal id; + @Excel(name = "工序类型 名") + private String name; + @Excel(name = "工序类型 编码") + private String code; + @Excel(name = "1 可用,0 不可用") + private BigDecimal status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private BigDecimal valid; + @Excel(name = "创建人") + private BigDecimal creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "更新人") + private BigDecimal updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private BigDecimal version; + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/FactoryMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/FactoryMapper.java new file mode 100644 index 0000000..1b08229 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/FactoryMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.Factory; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工厂 表 + * + * @author why + * @since 2022-07-13 + */ +@Mapper +public interface FactoryMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/MachineMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/MachineMapper.java new file mode 100644 index 0000000..8c96f86 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/MachineMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.Machine; +import org.apache.ibatis.annotations.Mapper; + +/** + * 机台表 + * + * @author why + * @since 2022-07-15 + */ +@Mapper +public interface MachineMapper 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 new file mode 100644 index 0000000..9348f80 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/MeasureToolMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.MeasureTool; +import org.apache.ibatis.annotations.Mapper; + +/** + * 量具表 + * + * @author why + * @since 2022-07-13 + */ +@Mapper +public interface MeasureToolMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/PlatformMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/PlatformMapper.java new file mode 100644 index 0000000..1a50443 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/PlatformMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.Platform; +import org.apache.ibatis.annotations.Mapper; + +/** + * 站点表 + * + * @author why + * @since 2022-07-13 + */ +@Mapper +public interface PlatformMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesHisMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesHisMapper.java new file mode 100644 index 0000000..0fa1492 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesHisMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.ProductFeaturesHis; +import org.apache.ibatis.annotations.Mapper; + +/** + * 产品特性 历史表 + * + * @author why + * @since 2022-07-15 + */ +@Mapper +public interface ProductFeaturesHisMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.java index 0325dd0..c21df63 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductTypeMapper.java @@ -17,5 +17,5 @@ import java.util.Map; */ @Mapper public interface ProductTypeMapper extends BaseDao { - IPage page(IPage objectPage, @Param("param") Map params); + //IPage page(IPage objectPage, @Param("param") Map params); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductWorkingprocedureRelationMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductWorkingprocedureRelationMapper.java new file mode 100644 index 0000000..2d12555 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductWorkingprocedureRelationMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.ProductWorkingprocedureRelation; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Mapper +public interface ProductWorkingprocedureRelationMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ShiftMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ShiftMapper.java new file mode 100644 index 0000000..c53c5d0 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ShiftMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.Shift; +import org.apache.ibatis.annotations.Mapper; + +/** + * 班次 表 + * + * @author why + * @since 2022-07-13 + */ +@Mapper +public interface ShiftMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/TeamMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/TeamMapper.java new file mode 100644 index 0000000..9b21802 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/TeamMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.Team; +import org.apache.ibatis.annotations.Mapper; + +/** + * 班组 表 + * + * @author why + * @since 2022-07-13 + */ +@Mapper +public interface TeamMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureMapper.java new file mode 100644 index 0000000..011cb10 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureMapper.java @@ -0,0 +1,20 @@ +package com.cnbm.basic.mapper; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.cnbm.basic.dto.WorkingProcedureDTO; +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.WorkingProcedure; +import org.apache.ibatis.annotations.Mapper; + +import java.util.Map; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Mapper +public interface WorkingProcedureMapper extends BaseDao { + IPage page(Map params); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureTypeMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureTypeMapper.java new file mode 100644 index 0000000..ccb9f63 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/WorkingProcedureTypeMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.basic.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.basic.entity.WorkingProcedureType; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工序类型表 表 + * + * @author why + * @since 2022-07-15 + */ +@Mapper +public interface WorkingProcedureTypeMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IFactoryService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IFactoryService.java new file mode 100644 index 0000000..00cc9c7 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IFactoryService.java @@ -0,0 +1,28 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.FactoryDTO; +import com.cnbm.basic.entity.Factory; + +import java.util.Map; + +/** + * 工厂 表 + * + * @author why + * @since 2022-07-13 + */ +public interface IFactoryService extends CrudService { + PageData page (Map params); + + FactoryDTO get(Long id); + + void save(FactoryDTO dto); + + void update(FactoryDTO dto); + + void delete(Long[] ids); + + void changeStatus(Long id); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IMachineService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IMachineService.java new file mode 100644 index 0000000..303bd02 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IMachineService.java @@ -0,0 +1,28 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.MachineDTO; +import com.cnbm.basic.entity.Machine; + +import java.util.Map; + +/** + * 机台表 + * + * @author why + * @since 2022-07-15 + */ +public interface IMachineService extends CrudService { + PageData page (Map params); + + MachineDTO get(Long id); + + void save(MachineDTO dto); + + void update(MachineDTO dto); + + void delete(Long[] ids); + + void changeStatus(Long id); +} \ No newline at end of file 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 new file mode 100644 index 0000000..ccbf37e --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IMeasureToolService.java @@ -0,0 +1,28 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.MeasureToolDTO; +import com.cnbm.basic.entity.MeasureTool; + +import java.util.Map; + +/** + * 量具表 + * + * @author why + * @since 2022-07-13 + */ +public interface IMeasureToolService extends CrudService { + PageData page (Map params); + + MeasureToolDTO get(Long id); + + void save(MeasureToolDTO dto); + + void update(MeasureToolDTO dto); + + void delete(Long[] ids); + + void changeStatus(Long id); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IPlatformService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IPlatformService.java new file mode 100644 index 0000000..cda33c6 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IPlatformService.java @@ -0,0 +1,28 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.PlatformDTO; +import com.cnbm.basic.entity.Platform; + +import java.util.Map; + +/** + * 站点表 + * + * @author why + * @since 2022-07-13 + */ +public interface IPlatformService extends CrudService { + PageData page (Map params); + + PlatformDTO get(Long id); + + void save(PlatformDTO dto); + + void update(PlatformDTO dto); + + void delete(Long[] ids); + + void changeStatus(Long id); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesHisService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesHisService.java new file mode 100644 index 0000000..beb0b6d --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesHisService.java @@ -0,0 +1,26 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.ProductFeaturesHisDTO; +import com.cnbm.basic.entity.ProductFeaturesHis; + +import java.util.Map; + +/** + * 产品特性 历史表 + * + * @author why + * @since 2022-07-15 + */ +public interface IProductFeaturesHisService extends CrudService { + PageData page (Map params); + + ProductFeaturesHisDTO get(Long id); + + void save(ProductFeaturesHisDTO dto); + + void update(ProductFeaturesHisDTO dto); + + void delete(Long[] ids); +} \ No newline at end of file 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 8530388..bef0aa7 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 @@ -15,4 +15,14 @@ import java.util.Map; */ public interface IProductTypeService extends CrudService { PageData page (Map params); + + ProductTypeDTO get(Long id); + + void save(ProductTypeDTO dto); + + void update(ProductTypeDTO dto); + + void delete(Long[] ids); + + void changeStatus(Long id); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductWorkingprocedureRelationService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductWorkingprocedureRelationService.java new file mode 100644 index 0000000..6cb6b47 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductWorkingprocedureRelationService.java @@ -0,0 +1,26 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO; +import com.cnbm.basic.entity.ProductWorkingprocedureRelation; + +import java.util.Map; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +public interface IProductWorkingprocedureRelationService extends CrudService { + PageData page (Map params); + + ProductWorkingprocedureRelationDTO get(Long id); + + void save(ProductWorkingprocedureRelationDTO dto); + + void update(ProductWorkingprocedureRelationDTO dto); + + void delete(Long[] ids); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IShiftService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IShiftService.java new file mode 100644 index 0000000..e236659 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IShiftService.java @@ -0,0 +1,26 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.ShiftDTO; +import com.cnbm.basic.entity.Shift; + +import java.util.Map; + +/** + * 班次 表 + * + * @author why + * @since 2022-07-13 + */ +public interface IShiftService extends CrudService { + PageData page (Map params); + + ShiftDTO get(Long id); + + void save(ShiftDTO dto); + + void update(ShiftDTO dto); + + void delete(Long[] ids); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/ITeamService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/ITeamService.java new file mode 100644 index 0000000..0e73b6e --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/ITeamService.java @@ -0,0 +1,26 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.TeamDTO; +import com.cnbm.basic.entity.Team; + +import java.util.Map; + +/** + * 班组 表 + * + * @author why + * @since 2022-07-13 + */ +public interface ITeamService extends CrudService { + PageData page (Map params); + + TeamDTO get(Long id); + + void save(TeamDTO dto); + + void update(TeamDTO dto); + + void delete(Long[] ids); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IUnitService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IUnitService.java index 47ccc7e..4ddd283 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/IUnitService.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IUnitService.java @@ -1,9 +1,12 @@ package com.cnbm.basic.service; +import com.cnbm.common.page.PageData; import com.cnbm.common.service.CrudService; import com.cnbm.basic.dto.UnitDTO; import com.cnbm.basic.entity.Unit; +import java.util.Map; + /** * 单位 表 * @@ -11,5 +14,13 @@ import com.cnbm.basic.entity.Unit; * @since 2022-06-30 */ public interface IUnitService extends CrudService { + PageData page (Map params); + UnitDTO get(Long id); + + void save(UnitDTO dto); + + void update(UnitDTO dto); + + void changeStatus(Long id); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureService.java new file mode 100644 index 0000000..3cb3517 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureService.java @@ -0,0 +1,28 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.WorkingProcedureDTO; +import com.cnbm.basic.entity.WorkingProcedure; + +import java.util.Map; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +public interface IWorkingProcedureService extends CrudService { + PageData page (Map params); + + WorkingProcedureDTO get(Long id); + + void save(WorkingProcedureDTO dto); + + void update(WorkingProcedureDTO dto); + + void delete(Long[] ids); + + void changeStatus(Long id); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureTypeService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureTypeService.java new file mode 100644 index 0000000..3c805cd --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IWorkingProcedureTypeService.java @@ -0,0 +1,28 @@ +package com.cnbm.basic.service; + +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.CrudService; +import com.cnbm.basic.dto.WorkingProcedureTypeDTO; +import com.cnbm.basic.entity.WorkingProcedureType; + +import java.util.Map; + +/** + * 工序类型表 表 + * + * @author why + * @since 2022-07-15 + */ +public interface IWorkingProcedureTypeService extends CrudService { + PageData page (Map params); + + WorkingProcedureTypeDTO get(Long id); + + void save(WorkingProcedureTypeDTO dto); + + void update(WorkingProcedureTypeDTO dto); + + void delete(Long[] ids); + + void changeStatus(Long id); +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java new file mode 100644 index 0000000..1189ed9 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/FactoryServiceImpl.java @@ -0,0 +1,94 @@ +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.ProductTypeDTO; +import com.cnbm.basic.entity.ProductType; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.FactoryDTO; +import com.cnbm.basic.mapper.FactoryMapper; +import com.cnbm.basic.entity.Factory; +import com.cnbm.basic.service.IFactoryService; +import com.cnbm.common.utils.ConvertUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Map; + +/** + * 工厂 表 + * + * @author why + * @since 2022-07-13 + */ +@Service +public class FactoryServiceImpl extends CrudServiceImpl implements IFactoryService { + + @Override + public QueryWrapper getWrapper(Map params){ + String name = (String)params.get("name"); + String code = (String)params.get("code"); + String type = (String)params.get("type"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.like(StringUtils.isNotBlank(name), "name", name); + wrapper.like(StringUtils.isNotBlank(code), "code", code); + wrapper.like(StringUtils.isNotBlank(type), "type", type); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, FactoryDTO.class); + } + + @Override + public FactoryDTO get(Long id) { + Factory entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, FactoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(FactoryDTO dto) { + Factory entity = ConvertUtils.sourceToTarget(dto, Factory.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(FactoryDTO dto) { + Factory entity = ConvertUtils.sourceToTarget(dto, Factory.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + Factory entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java new file mode 100644 index 0000000..dfc3556 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MachineServiceImpl.java @@ -0,0 +1,96 @@ +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.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.MachineDTO; +import com.cnbm.basic.mapper.MachineMapper; +import com.cnbm.basic.entity.Machine; +import com.cnbm.basic.service.IMachineService; +import com.cnbm.common.utils.ConvertUtils; +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.Map; + +/** + * 机台表 + * + * @author why + * @since 2022-07-15 + */ +@Service +public class MachineServiceImpl extends CrudServiceImpl implements IMachineService { + + @Override + public QueryWrapper getWrapper(Map params){ + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); + + return wrapper; + } + + @Autowired + private PlatformServiceImpl platformServiceImpl; + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + PageData machineDTOPageData = getPageData(page, MachineDTO.class); + if(machineDTOPageData.getTotal()!=0){ + for(MachineDTO machineDTO:machineDTOPageData.getList()){ + String platform_name = platformServiceImpl.selectById(machineDTO.getPlatformId()).getName(); + machineDTO.setPlatformName(platform_name); + } + } + return machineDTOPageData; + } + + @Override + public MachineDTO get(Long id) { + Machine entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MachineDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MachineDTO dto) { + Machine entity = ConvertUtils.sourceToTarget(dto, Machine.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MachineDTO dto) { + Machine entity = ConvertUtils.sourceToTarget(dto, Machine.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + Machine entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); + } + +} \ 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 new file mode 100644 index 0000000..f373691 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java @@ -0,0 +1,82 @@ +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.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.MeasureToolDTO; +import com.cnbm.basic.mapper.MeasureToolMapper; +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.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Map; + +/** + * 量具表 + * + * @author why + * @since 2022-07-13 + */ +@Service +public class MeasureToolServiceImpl extends CrudServiceImpl implements IMeasureToolService { + + @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); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, MeasureToolDTO.class); + } + + @Override + public MeasureToolDTO get(Long id) { + MeasureTool entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, MeasureToolDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(MeasureToolDTO dto) { + MeasureTool entity = ConvertUtils.sourceToTarget(dto, MeasureTool.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MeasureToolDTO dto) { + MeasureTool entity = ConvertUtils.sourceToTarget(dto, MeasureTool.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + MeasureTool entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/PlatformServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/PlatformServiceImpl.java new file mode 100644 index 0000000..b2f5a95 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/PlatformServiceImpl.java @@ -0,0 +1,87 @@ +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.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.PlatformDTO; +import com.cnbm.basic.mapper.PlatformMapper; +import com.cnbm.basic.entity.Platform; +import com.cnbm.basic.service.IPlatformService; +import com.cnbm.common.utils.ConvertUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Map; + +/** + * 站点表 + * + * @author why + * @since 2022-07-13 + */ +@Service +public class PlatformServiceImpl extends CrudServiceImpl implements IPlatformService { + + @Override + public QueryWrapper getWrapper(Map params){ + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, PlatformDTO.class); + } + + @Override + public PlatformDTO get(Long id) { + Platform entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PlatformDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PlatformDTO dto) { + Platform entity = ConvertUtils.sourceToTarget(dto, Platform.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PlatformDTO dto) { + Platform entity = ConvertUtils.sourceToTarget(dto, Platform.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + Platform entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); + } + + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesHisServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesHisServiceImpl.java new file mode 100644 index 0000000..b51848f --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductFeaturesHisServiceImpl.java @@ -0,0 +1,67 @@ +package com.cnbm.basic.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.basic.dto.ProductFeaturesHisDTO; +import com.cnbm.basic.mapper.ProductFeaturesHisMapper; +import com.cnbm.basic.entity.ProductFeaturesHis; +import com.cnbm.basic.service.IProductFeaturesHisService; +import com.cnbm.common.utils.ConvertUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Map; + +/** + * 产品特性 历史表 + * + * @author why + * @since 2022-07-15 + */ +@Service +public class ProductFeaturesHisServiceImpl extends CrudServiceImpl implements IProductFeaturesHisService { + + @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, ProductFeaturesHisDTO.class); + } + + @Override + public ProductFeaturesHisDTO get(Long id) { + ProductFeaturesHis entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ProductFeaturesHisDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ProductFeaturesHisDTO dto) { + ProductFeaturesHis entity = ConvertUtils.sourceToTarget(dto, ProductFeaturesHis.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ProductFeaturesHisDTO dto) { + ProductFeaturesHis entity = ConvertUtils.sourceToTarget(dto, ProductFeaturesHis.class); + updateById(entity); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductTypeServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductTypeServiceImpl.java index ce4f13c..61d74ef 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductTypeServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductTypeServiceImpl.java @@ -2,7 +2,10 @@ 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.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.cnbm.admin.dto.SysDictDataDTO; +import com.cnbm.admin.entity.SysDictDataEntity; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.service.impl.CrudServiceImpl; @@ -10,10 +13,14 @@ import com.cnbm.basic.dto.ProductTypeDTO; import com.cnbm.basic.entity.ProductType; import com.cnbm.basic.mapper.ProductTypeMapper; import com.cnbm.basic.service.IProductTypeService; +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.Map; /** @@ -26,25 +33,71 @@ import java.util.Map; public class ProductTypeServiceImpl extends CrudServiceImpl implements IProductTypeService { - @Autowired - private ProductTypeMapper productTypeMapper; + //@Autowired + //private ProductTypeMapper productTypeMapper; @Override public QueryWrapper getWrapper(Map params){ - String id = (String)params.get("id"); + String name = (String)params.get("name"); + String code = (String)params.get("code"); QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), "id", id); - + wrapper.like(StringUtils.isNotBlank(name), "name", name); + wrapper.like(StringUtils.isNotBlank(code), "code", code); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); return wrapper; } @Override public PageData page (Map params){ - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq("id",params.get("id")); - IPage page = productTypeMapper.page(getPage(params, Constant.CREATE_DATE, false), params); - return getPageData(page,ProductTypeDTO.class); + //QueryWrapper wrapper = new QueryWrapper<>(); + //wrapper.eq("id",params.get("id")); + //IPage page = productTypeMapper.page(getPage(params, Constant.CREATE_DATE, false), params); + //return getPageData(page,ProductTypeDTO.class); + + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, ProductTypeDTO.class); + } + + @Override + public ProductTypeDTO get(Long id) { + ProductType entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ProductTypeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ProductTypeDTO dto) { + ProductType entity = ConvertUtils.sourceToTarget(dto, ProductType.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ProductTypeDTO dto) { + ProductType entity = ConvertUtils.sourceToTarget(dto, ProductType.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + ProductType entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); } } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductWorkingprocedureRelationServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductWorkingprocedureRelationServiceImpl.java new file mode 100644 index 0000000..084ffb9 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductWorkingprocedureRelationServiceImpl.java @@ -0,0 +1,66 @@ +package com.cnbm.basic.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.basic.dto.ProductWorkingprocedureRelationDTO; +import com.cnbm.basic.mapper.ProductWorkingprocedureRelationMapper; +import com.cnbm.basic.entity.ProductWorkingprocedureRelation; +import com.cnbm.basic.service.IProductWorkingprocedureRelationService; +import com.cnbm.common.utils.ConvertUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Map; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Service +public class ProductWorkingprocedureRelationServiceImpl extends CrudServiceImpl implements IProductWorkingprocedureRelationService { + + @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, ProductWorkingprocedureRelationDTO.class); + } + + @Override + public ProductWorkingprocedureRelationDTO get(Long id) { + ProductWorkingprocedureRelation entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ProductWorkingprocedureRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ProductWorkingprocedureRelationDTO dto) { + ProductWorkingprocedureRelation entity = ConvertUtils.sourceToTarget(dto, ProductWorkingprocedureRelation.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ProductWorkingprocedureRelationDTO dto) { + ProductWorkingprocedureRelation entity = ConvertUtils.sourceToTarget(dto, ProductWorkingprocedureRelation.class); + updateById(entity); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ShiftServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ShiftServiceImpl.java new file mode 100644 index 0000000..1e1df35 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ShiftServiceImpl.java @@ -0,0 +1,75 @@ +package com.cnbm.basic.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.basic.dto.ShiftDTO; +import com.cnbm.basic.mapper.ShiftMapper; +import com.cnbm.basic.entity.Shift; +import com.cnbm.basic.service.IShiftService; +import com.cnbm.common.utils.ConvertUtils; +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-07-13 + */ +@Service +public class ShiftServiceImpl extends CrudServiceImpl implements IShiftService { + + @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, ShiftDTO.class); + } + + @Override + public ShiftDTO get(Long id) { + Shift entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, ShiftDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(ShiftDTO dto) { + Shift entity = ConvertUtils.sourceToTarget(dto, Shift.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(ShiftDTO dto) { + Shift entity = ConvertUtils.sourceToTarget(dto, Shift.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-baisc/src/main/java/com/cnbm/basic/service/impl/TeamServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/TeamServiceImpl.java new file mode 100644 index 0000000..1181b35 --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/TeamServiceImpl.java @@ -0,0 +1,77 @@ +package com.cnbm.basic.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.cnbm.basic.dto.ProductTypeDTO; +import com.cnbm.basic.entity.ProductType; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.TeamDTO; +import com.cnbm.basic.mapper.TeamMapper; +import com.cnbm.basic.entity.Team; +import com.cnbm.basic.service.ITeamService; +import com.cnbm.common.utils.ConvertUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Map; + +/** + * 班组 表 + * + * @author why + * @since 2022-07-13 + */ +@Service +public class TeamServiceImpl extends CrudServiceImpl implements ITeamService { + + @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, TeamDTO.class); + } + + @Override + public TeamDTO get(Long id) { + Team entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, TeamDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(TeamDTO dto) { + Team entity = ConvertUtils.sourceToTarget(dto, Team.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(TeamDTO dto) { + Team entity = ConvertUtils.sourceToTarget(dto, Team.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-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java index e5932eb..30ca1c0 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/UnitServiceImpl.java @@ -1,14 +1,19 @@ 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.common.page.PageData; import com.cnbm.common.service.impl.CrudServiceImpl; import com.cnbm.basic.dto.UnitDTO; import com.cnbm.basic.entity.Unit; import com.cnbm.basic.mapper.UnitMapper; import com.cnbm.basic.service.IUnitService; -import org.apache.commons.lang3.StringUtils; +import com.cnbm.common.utils.ConvertUtils; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import java.math.BigDecimal; import java.util.Map; /** @@ -22,13 +27,50 @@ public class UnitServiceImpl extends CrudServiceImpl @Override public QueryWrapper getWrapper(Map params){ - String id = (String)params.get("id"); QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), "id", id); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); return wrapper; } + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, UnitDTO.class); + } + @Override + public UnitDTO get(Long id) { + Unit entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UnitDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UnitDTO dto) { + Unit entity = ConvertUtils.sourceToTarget(dto, Unit.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UnitDTO dto) { + Unit entity = ConvertUtils.sourceToTarget(dto, Unit.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + Unit entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); + } } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java new file mode 100644 index 0000000..e654eea --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureServiceImpl.java @@ -0,0 +1,121 @@ +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.entity.Machine; +import com.cnbm.basic.entity.ProductType; +import com.cnbm.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.WorkingProcedureDTO; +import com.cnbm.basic.mapper.WorkingProcedureMapper; +import com.cnbm.basic.entity.WorkingProcedure; +import com.cnbm.basic.service.IWorkingProcedureService; +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.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 工序 表 + * + * @author why + * @since 2022-07-15 + */ +@Service +public class WorkingProcedureServiceImpl extends CrudServiceImpl implements IWorkingProcedureService { + + @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); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); + + return wrapper; + } + + @Autowired + private MachineServiceImpl machineServiceImpl; + + @Autowired + private WorkingProcedureTypeServiceImpl workingProcedureTypeServiceImpl; + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + PageData workingProcedureDTOPageData = getPageData(page, WorkingProcedureDTO.class); + if(workingProcedureDTOPageData.getTotal()!=0){ + for(WorkingProcedureDTO workingProcedureDTO:workingProcedureDTOPageData.getList()){ + //工序类型 id,关联working_procedure_type表 + String workingProcedureTypeName = workingProcedureTypeServiceImpl.selectById(workingProcedureDTO.getWorkingProcedureTypeId()).getName(); + workingProcedureDTO.setWorkingProcedureTypeName(workingProcedureTypeName); + if(StringUtils.isNotBlank(workingProcedureDTO.getMachineId())){ + String[] machineIdList = workingProcedureDTO.getMachineId().split(","); + List machineList = new ArrayList<>(); + for(String machineId:machineIdList){ + //QueryWrapper machineQueryWrapper = new QueryWrapper<>(); + //machineQueryWrapper.eq(StringUtils.isNotBlank(machineId), "id", machineId); + String machineName = machineServiceImpl.selectById(machineId).getName(); + machineList.add(machineName); + } + String machineNameList = String.join(",", machineList); + workingProcedureDTO.setMachineName(machineNameList); + } + } + } + return workingProcedureDTOPageData; + } + + @Override + public WorkingProcedureDTO get(Long id) { + WorkingProcedure entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WorkingProcedureDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WorkingProcedureDTO dto) { + WorkingProcedure entity = ConvertUtils.sourceToTarget(dto, WorkingProcedure.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WorkingProcedureDTO dto) { + WorkingProcedure entity = ConvertUtils.sourceToTarget(dto, WorkingProcedure.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + WorkingProcedure entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureTypeServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureTypeServiceImpl.java new file mode 100644 index 0000000..5edff7d --- /dev/null +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/WorkingProcedureTypeServiceImpl.java @@ -0,0 +1,86 @@ +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.common.page.PageData; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.basic.dto.WorkingProcedureTypeDTO; +import com.cnbm.basic.mapper.WorkingProcedureTypeMapper; +import com.cnbm.basic.entity.WorkingProcedureType; +import com.cnbm.basic.service.IWorkingProcedureTypeService; +import com.cnbm.common.utils.ConvertUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Map; + +/** + * 工序类型表 表 + * + * @author why + * @since 2022-07-15 + */ +@Service +public class WorkingProcedureTypeServiceImpl extends CrudServiceImpl implements IWorkingProcedureTypeService { + + @Override + public QueryWrapper getWrapper(Map params){ + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(ObjectUtils.isNotNull(params.get("status")), "status", params.get("status")); + + return wrapper; + } + + @Override + public PageData page (Map params){ + IPage page = baseDao.selectPage( + getPage(params, "id", true), + getWrapper(params) + ); + return getPageData(page, WorkingProcedureTypeDTO.class); + } + + @Override + public WorkingProcedureTypeDTO get(Long id) { + WorkingProcedureType entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, WorkingProcedureTypeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(WorkingProcedureTypeDTO dto) { + WorkingProcedureType entity = ConvertUtils.sourceToTarget(dto, WorkingProcedureType.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(WorkingProcedureTypeDTO dto) { + WorkingProcedureType entity = ConvertUtils.sourceToTarget(dto, WorkingProcedureType.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(Long[] ids) { + //删除 + deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void changeStatus(Long id) { + //改变状态 开启1 关闭0 + WorkingProcedureType entity = baseDao.selectById(id); + BigDecimal status = entity.getStatus(); + BigDecimal one = new BigDecimal("1"); + entity.setStatus(one.subtract(status)); + updateById(entity); + } + +} \ No newline at end of file diff --git a/ym-baisc/src/main/resources/FactoryMapper.xml b/ym-baisc/src/main/resources/FactoryMapper.xml new file mode 100644 index 0000000..d1c9b9b --- /dev/null +++ b/ym-baisc/src/main/resources/FactoryMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-baisc/src/main/resources/MachineMapper.xml b/ym-baisc/src/main/resources/MachineMapper.xml new file mode 100644 index 0000000..0d34979 --- /dev/null +++ b/ym-baisc/src/main/resources/MachineMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-baisc/src/main/resources/MeasureToolMapper.xml b/ym-baisc/src/main/resources/MeasureToolMapper.xml new file mode 100644 index 0000000..5885223 --- /dev/null +++ b/ym-baisc/src/main/resources/MeasureToolMapper.xml @@ -0,0 +1,11 @@ + + + + + + + diff --git a/ym-baisc/src/main/resources/PlatformMapper.xml b/ym-baisc/src/main/resources/PlatformMapper.xml new file mode 100644 index 0000000..9d5bb19 --- /dev/null +++ b/ym-baisc/src/main/resources/PlatformMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-baisc/src/main/resources/ProductFeaturesHisMapper.xml b/ym-baisc/src/main/resources/ProductFeaturesHisMapper.xml new file mode 100644 index 0000000..8d8c01c --- /dev/null +++ b/ym-baisc/src/main/resources/ProductFeaturesHisMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-baisc/src/main/resources/ProductTypeMapper.xml b/ym-baisc/src/main/resources/ProductTypeMapper.xml index 1d0b51b..9dfb63c 100644 --- a/ym-baisc/src/main/resources/ProductTypeMapper.xml +++ b/ym-baisc/src/main/resources/ProductTypeMapper.xml @@ -2,11 +2,4 @@ - diff --git a/ym-baisc/src/main/resources/ProductWorkingprocedureRelationMapper.xml b/ym-baisc/src/main/resources/ProductWorkingprocedureRelationMapper.xml new file mode 100644 index 0000000..4fc60af --- /dev/null +++ b/ym-baisc/src/main/resources/ProductWorkingprocedureRelationMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-baisc/src/main/resources/ShiftMapper.xml b/ym-baisc/src/main/resources/ShiftMapper.xml new file mode 100644 index 0000000..f497457 --- /dev/null +++ b/ym-baisc/src/main/resources/ShiftMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-baisc/src/main/resources/TeamMapper.xml b/ym-baisc/src/main/resources/TeamMapper.xml new file mode 100644 index 0000000..090496b --- /dev/null +++ b/ym-baisc/src/main/resources/TeamMapper.xml @@ -0,0 +1,5 @@ + + + + +