From 16a52e69c8aaa969ebb64e7b7fa268ee8454d465 Mon Sep 17 00:00:00 2001 From: yanyang Date: Tue, 9 Aug 2022 15:16:12 +0800 Subject: [PATCH 1/3] mark --- .../controller/ProductFeaturesController.java | 10 +++++ .../cnbm/basic/dto/ProductFeaturesDTO.java | 15 +++++++ .../basic/mapper/ProductFeaturesMapper.java | 5 ++- .../service/IProductFeaturesService.java | 3 ++ .../cnbm/basic/service/IProductService.java | 2 + .../com/cnbm/basic/service/IUnitService.java | 2 + .../service/impl/MeasureToolServiceImpl.java | 8 ++++ .../impl/ProductFeaturesHisServiceImpl.java | 8 ++++ .../impl/ProductFeaturesServiceImpl.java | 45 +++++++++++++++++++ .../service/impl/ProductServiceImpl.java | 8 ++++ .../basic/service/impl/UnitServiceImpl.java | 8 ++++ .../mapper/ProductFeaturesMapper.xml | 13 ++++++ 12 files changed, 126 insertions(+), 1 deletion(-) diff --git a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java index 0015a34..1d28829 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/controller/ProductFeaturesController.java @@ -1,6 +1,9 @@ package com.cnbm.basic.controller; import com.cnbm.admin.annotation.LogOperation; +import com.cnbm.admin.params.IdParam; +import com.cnbm.basic.dto.WorkingProcedureDTO; +import com.cnbm.basic.entity.ProductFeatures; import com.cnbm.common.constant.Constant; import com.cnbm.common.page.PageData; import com.cnbm.common.utils.ExcelUtils; @@ -114,4 +117,11 @@ public class ProductFeaturesController { ExcelUtils.exportExcelToTarget(response, null, list, ProductFeaturesExcel.class); } + @PostMapping("getProductFeaturesByProductId") + @ApiOperation("查询产品特性 依据产品id") + public Result> getProductFeaturesByProductId(@RequestBody IdParam id){ + List list = productFeaturesService.getProductFeaturesByProductId(id.getId()); + return new Result>().ok(list); + } + } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java index a85e456..d72ef32 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/dto/ProductFeaturesDTO.java @@ -29,9 +29,15 @@ public class ProductFeaturesDTO implements Serializable { @ApiModelProperty(value = "量具id,关联measure_tool表") private Long measureToolId; + @ApiModelProperty(value = "量具名称,关联measure_tool表") + private String measureToolName; + @ApiModelProperty(value = "单位 id,关联unit表") private Long unitId; + @ApiModelProperty(value = "单位名称,关联unit表") + private String unitName; + @ApiModelProperty(value = "产品特性 名") private String name; @@ -59,9 +65,18 @@ public class ProductFeaturesDTO implements Serializable { @ApiModelProperty(value = "工序id,关联 working_procedure 表id") private Long workingProcedureId; + @ApiModelProperty(value = "工序编码,关联 working_procedure 表id") + private String workingProcedureCode; + + @ApiModelProperty(value = "工序名称,关联 working_procedure 表id") + private String workingProcedureName; + @ApiModelProperty(value = "分析图形,关联control_graph表id") private Long controlGraphId; + @ApiModelProperty(value = "分析图形名,关联control_graph表id") + private String controlGraphName; + @ApiModelProperty(value = "是否需要spc分析,1 yes;0 no") private Integer isSpc; diff --git a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java index 294627c..0c9a642 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/mapper/ProductFeaturesMapper.java @@ -1,9 +1,12 @@ package com.cnbm.basic.mapper; +import com.cnbm.basic.dto.ProductFeaturesDTO; import com.cnbm.common.dao.BaseDao; import com.cnbm.basic.entity.ProductFeatures; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 产品特性 表 * @@ -12,5 +15,5 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface ProductFeaturesMapper extends BaseDao { - + List getProductFeaturesByProductId(Long id); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java index c2b8f50..b1a94f6 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductFeaturesService.java @@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService; import com.cnbm.basic.dto.ProductFeaturesDTO; import com.cnbm.basic.entity.ProductFeatures; +import java.util.List; import java.util.Map; /** @@ -23,4 +24,6 @@ public interface IProductFeaturesService extends CrudService getProductFeaturesByProductId(Long id); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java index 9713513..771f4db 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/IProductService.java @@ -22,6 +22,8 @@ public interface IProductService extends CrudService { void update(ProductDTO dto); + void delete(Long[] ids); + boolean changeStatus(Long id); } \ 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 f761eee..7393605 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 @@ -26,5 +26,7 @@ public interface IUnitService extends CrudService { List list(); + void delete(Long[] ids); + boolean changeStatus(Long id); } \ No newline at end of file diff --git a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java index 733168d..7ab6096 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/MeasureToolServiceImpl.java @@ -15,6 +15,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; +import java.util.Arrays; import java.util.Map; /** @@ -78,4 +79,11 @@ public class MeasureToolServiceImpl extends CrudServiceImpl getProductFeaturesByProductId(Long id){ + List list = mapper.getProductFeaturesByProductId(id); + return list; + /* + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(ObjectUtils.isNotNull(productId), "product_id", productId); + List productFeaturesList = mapper.selectList(wrapper); + + List productFeaturesDTOList = ConvertUtils.sourceToTarget(productFeaturesList,ProductFeaturesDTO.class); + for(ProductFeaturesDTO dto:productFeaturesDTOList) { + WorkingProcedure workingProcedure = workingProcedureServiceImpl.selectById(dto.getWorkingProcedureId()); + if (workingProcedure != null) { + String workingProcedureCode = workingProcedure.getCode(); + String workingProcedureName = workingProcedure.getName(); + dto.setWorkingProcedureCode(workingProcedureCode); + dto.setWorkingProcedureName(workingProcedureName); + } + + } + return productFeaturesDTOList; + */ + } + + @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/ProductServiceImpl.java b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductServiceImpl.java index b574734..4e1275c 100644 --- a/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductServiceImpl.java +++ b/ym-baisc/src/main/java/com/cnbm/basic/service/impl/ProductServiceImpl.java @@ -18,6 +18,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; +import java.util.Arrays; import java.util.Map; /** @@ -104,4 +105,11 @@ public class ProductServiceImpl extends CrudServiceImpl return list; } + @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/resources/mapper/ProductFeaturesMapper.xml b/ym-baisc/src/main/resources/mapper/ProductFeaturesMapper.xml index ed55706..9a99d8d 100644 --- a/ym-baisc/src/main/resources/mapper/ProductFeaturesMapper.xml +++ b/ym-baisc/src/main/resources/mapper/ProductFeaturesMapper.xml @@ -2,4 +2,17 @@ + + -- 2.45.2 From 63f3f98ca818e3bf585bb1590c431848c4dee3a2 Mon Sep 17 00:00:00 2001 From: yanyang Date: Tue, 9 Aug 2022 15:19:26 +0800 Subject: [PATCH 2/3] mark --- .../cnbm/generator/build/CodeGenerator.java | 2 +- .../WorkingProcedureController.java | 116 ++++++++++++++++++ .../code/dto/WorkingProcedureDTO.java | 71 +++++++++++ .../code/entity/WorkingProcedure.java | 69 +++++++++++ .../code/excel/WorkingProcedureExcel.java | 50 ++++++++ .../code/mapper/WorkingProcedureMapper.java | 16 +++ .../code/mapper/WorkingProcedureMapper.xml | 5 + .../service/IWorkingProcedureService.java | 15 +++ .../impl/WorkingProcedureServiceImpl.java | 34 +++++ 9 files changed, 377 insertions(+), 1 deletion(-) create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java diff --git a/ym-generator/src/main/java/com/cnbm/generator/build/CodeGenerator.java b/ym-generator/src/main/java/com/cnbm/generator/build/CodeGenerator.java index 8f5f41f..675b63a 100644 --- a/ym-generator/src/main/java/com/cnbm/generator/build/CodeGenerator.java +++ b/ym-generator/src/main/java/com/cnbm/generator/build/CodeGenerator.java @@ -27,7 +27,7 @@ public class CodeGenerator { @Test public void test(){ - mybatisPlusGenerator(new String[]{"product_features"}); + mybatisPlusGenerator(new String[]{"working_procedure"}); } public static void mybatisPlusGenerator(String[] include){ diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java new file mode 100644 index 0000000..d893e18 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java @@ -0,0 +1,116 @@ +package com.cnbm.generator.code.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.generator.code.dto.WorkingProcedureDTO; +import com.cnbm.generator.code.excel.WorkingProcedureExcel; +import com.cnbm.generator.code.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-08-03 + */ +@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-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java new file mode 100644 index 0000000..58171a9 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java @@ -0,0 +1,71 @@ +package com.cnbm.generator.code.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-08-03 + */ +@Data +@ApiModel(value = "工序 表DTO对象") +public class WorkingProcedureDTO implements Serializable { + private static final long serialVersionUID = 1L; + + + + @ApiModelProperty(value = "ID") + private Long id; + + @ApiModelProperty(value = "工序 名") + private String name; + + @ApiModelProperty(value = "工序 编码") + private String code; + + @ApiModelProperty(value = "工序类型 id,关联working_procedure_type表") + private Long workingProcedureTypeId; + + @ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") + private String machineId; + + @ApiModelProperty(value = "1 可用,0 不可用") + private Integer status; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + @ApiModelProperty(value = "") + private Long creatorId; + + @ApiModelProperty(value = "创建人姓名") + private String creatorName; + + @ApiModelProperty(value = "创建时间") + private LocalDateTime createTime; + + @ApiModelProperty(value = "") + private Long updaterId; + + @ApiModelProperty(value = "更新人姓名") + private String updaterName; + + @ApiModelProperty(value = "更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty(value = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java new file mode 100644 index 0000000..5aa67a7 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java @@ -0,0 +1,69 @@ +package com.cnbm.generator.code.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import java.io.Serializable; +import java.time.LocalDateTime; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + *

+ * 工序 表 + *

+ * + * @author why + * @since 2022-08-03 + */ +@Data +@TableName("working_procedure") +@ApiModel(value = "WorkingProcedure对象", description = "工序 表") +public class WorkingProcedure implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty("ID") + private Long id; + + @ApiModelProperty("工序 名") + private String name; + + @ApiModelProperty("工序 编码") + private String code; + + @ApiModelProperty("工序类型 id,关联working_procedure_type表") + private Long workingProcedureTypeId; + + @ApiModelProperty("机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") + private String machineId; + + @ApiModelProperty("1 可用,0 不可用") + private Integer status; + + @ApiModelProperty("备注") + private String remark; + + @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") + private Integer valid; + + private Long creatorId; + + @ApiModelProperty("创建人姓名") + private String creatorName; + + @ApiModelProperty("创建时间") + private LocalDateTime createTime; + + private Long updaterId; + + @ApiModelProperty("更新人姓名") + private String updaterName; + + @ApiModelProperty("更新时间") + private LocalDateTime updateTime; + + @ApiModelProperty("版本号") + private Integer version; + + +} diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java new file mode 100644 index 0000000..3f07f7f --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java @@ -0,0 +1,50 @@ +package com.cnbm.generator.code.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-08-03 + */ +@Data +public class WorkingProcedureExcel { + @Excel(name = "ID") + private Long id; + @Excel(name = "工序 名") + private String name; + @Excel(name = "工序 编码") + private String code; + @Excel(name = "工序类型 id,关联working_procedure_type表") + private Long workingProcedureTypeId; + @Excel(name = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") + private String machineId; + @Excel(name = "1 可用,0 不可用") + private Integer status; + @Excel(name = "备注") + private String remark; + @Excel(name = "删除标志,是否有效:1 可用 0不可用") + private Integer valid; + @Excel(name = "") + private Long creatorId; + @Excel(name = "创建人姓名") + private String creatorName; + @Excel(name = "创建时间") + private LocalDateTime createTime; + @Excel(name = "") + private Long updaterId; + @Excel(name = "更新人姓名") + private String updaterName; + @Excel(name = "更新时间") + private LocalDateTime updateTime; + @Excel(name = "版本号") + private Integer version; + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java new file mode 100644 index 0000000..75c4d60 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java @@ -0,0 +1,16 @@ +package com.cnbm.generator.code.mapper; + +import com.cnbm.common.dao.BaseDao; +import com.cnbm.generator.code.entity.WorkingProcedure; +import org.apache.ibatis.annotations.Mapper; + +/** + * 工序 表 + * + * @author why + * @since 2022-08-03 + */ +@Mapper +public interface WorkingProcedureMapper extends BaseDao { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml new file mode 100644 index 0000000..2402113 --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java new file mode 100644 index 0000000..61de38a --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java @@ -0,0 +1,15 @@ +package com.cnbm.generator.code.service; + +import com.cnbm.common.service.CrudService; +import com.cnbm.generator.code.dto.WorkingProcedureDTO; +import com.cnbm.generator.code.entity.WorkingProcedure; + +/** + * 工序 表 + * + * @author why + * @since 2022-08-03 + */ +public interface IWorkingProcedureService extends CrudService { + +} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java new file mode 100644 index 0000000..53c34ff --- /dev/null +++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java @@ -0,0 +1,34 @@ +package com.cnbm.generator.code.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.cnbm.common.service.impl.CrudServiceImpl; +import com.cnbm.generator.code.dto.WorkingProcedureDTO; +import com.cnbm.generator.code.mapper.WorkingProcedureMapper; +import com.cnbm.generator.code.entity.WorkingProcedure; +import com.cnbm.generator.code.service.IWorkingProcedureService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import java.util.Map; + +/** + * 工序 表 + * + * @author why + * @since 2022-08-03 + */ +@Service +public class WorkingProcedureServiceImpl extends CrudServiceImpl implements IWorkingProcedureService { + + @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; + } + + +} \ No newline at end of file -- 2.45.2 From d9c13516cbe20b154aaa951825bbb548eb22da0f Mon Sep 17 00:00:00 2001 From: yanyang Date: Tue, 9 Aug 2022 15:22:21 +0800 Subject: [PATCH 3/3] mark --- .../code/controller/ProductController.java | 116 ------------------ .../WorkingProcedureController.java | 116 ------------------ .../cnbm/generator/code/dto/ProductDTO.java | 86 ------------- .../code/dto/WorkingProcedureDTO.java | 71 ----------- .../cnbm/generator/code/entity/Product.java | 79 ------------ .../code/entity/WorkingProcedure.java | 69 ----------- .../generator/code/excel/ProductExcel.java | 60 --------- .../code/excel/WorkingProcedureExcel.java | 50 -------- .../generator/code/mapper/ProductMapper.java | 16 --- .../generator/code/mapper/ProductMapper.xml | 5 - .../code/mapper/WorkingProcedureMapper.java | 16 --- .../code/mapper/WorkingProcedureMapper.xml | 5 - .../code/service/IProductService.java | 15 --- .../service/IWorkingProcedureService.java | 15 --- .../code/service/impl/ProductServiceImpl.java | 34 ----- .../impl/WorkingProcedureServiceImpl.java | 34 ----- 16 files changed, 787 deletions(-) delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductController.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductDTO.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/Product.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductExcel.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.xml delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/IProductService.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductServiceImpl.java delete mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductController.java deleted file mode 100644 index 7e74a28..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductController.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.cnbm.generator.code.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.generator.code.dto.ProductDTO; -import com.cnbm.generator.code.excel.ProductExcel; -import com.cnbm.generator.code.service.IProductService; -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-08-01 - */ -@RestController -@RequestMapping("/code/product") -@Api(tags="产品 表") -public class ProductController { - @Autowired - private IProductService productService; - - @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:product:page')") - public Result> page(@ApiIgnore @RequestParam Map params){ - PageData page = productService.page(params); - - return new Result>().ok(page); - } - - @GetMapping("{id}") - @ApiOperation("信息") - @PreAuthorize("@ex.hasAuthority('code:product:info')") - public Result get(@PathVariable("id") Long id){ - ProductDTO data = productService.get(id); - - return new Result().ok(data); - } - - @PostMapping - @ApiOperation("保存") - @LogOperation("保存") - @PreAuthorize("@ex.hasAuthority('code:product:save')") - public Result save(@RequestBody ProductDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - - productService.save(dto); - - return new Result(); - } - - @PutMapping - @ApiOperation("修改") - @LogOperation("修改") - @PreAuthorize("@ex.hasAuthority('code:product:update')") - public Result update(@RequestBody ProductDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - - productService.update(dto); - - return new Result(); - } - - @DeleteMapping - @ApiOperation("删除") - @LogOperation("删除") - @PreAuthorize("@ex.hasAuthority('code:product:delete')") - public Result delete(@RequestBody Long[] ids){ - //效验数据 - AssertUtils.isArrayEmpty(ids, "id"); - - productService.delete(ids); - - return new Result(); - } - - @GetMapping("export") - @ApiOperation("导出") - @LogOperation("导出") - @PreAuthorize("@ex.hasAuthority('code:product:export')") - public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception { - List list = productService.list(params); - - ExcelUtils.exportExcelToTarget(response, null, list, ProductExcel.class); - } - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java deleted file mode 100644 index d893e18..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/controller/WorkingProcedureController.java +++ /dev/null @@ -1,116 +0,0 @@ -package com.cnbm.generator.code.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.generator.code.dto.WorkingProcedureDTO; -import com.cnbm.generator.code.excel.WorkingProcedureExcel; -import com.cnbm.generator.code.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-08-03 - */ -@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-generator/src/main/java/com/cnbm/generator/code/dto/ProductDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductDTO.java deleted file mode 100644 index 7dd4c4b..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductDTO.java +++ /dev/null @@ -1,86 +0,0 @@ -package com.cnbm.generator.code.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-08-01 - */ -@Data -@ApiModel(value = "产品 表DTO对象") -public class ProductDTO implements Serializable { - private static final long serialVersionUID = 1L; - - - - @ApiModelProperty(value = "") - private Long id; - - @ApiModelProperty(value = "产品 名") - private String name; - - @ApiModelProperty(value = "产品 编码") - private String code; - - @ApiModelProperty(value = "产品 规格") - private String specifications; - - @ApiModelProperty(value = "产品 图纸") - private String drawing; - - @ApiModelProperty(value = "描述") - private String descs; - - @ApiModelProperty(value = "") - private Long productTypeId; - - @ApiModelProperty(value = "") - private Long unitId; - - @ApiModelProperty(value = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") - private String inspectionStage; - - @ApiModelProperty(value = "检验标准") - private String inspectionStandard; - - @ApiModelProperty(value = "1 可用,0 不可用") - private Integer status; - - @ApiModelProperty(value = "备注") - private String remark; - - @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") - private Integer valid; - - @ApiModelProperty(value = "") - private Long creatorId; - - @ApiModelProperty(value = "创建人姓名") - private String creatorName; - - @ApiModelProperty(value = "创建时间") - private LocalDateTime createTime; - - @ApiModelProperty(value = "") - private Long updaterId; - - @ApiModelProperty(value = "更新人姓名") - private String updaterName; - - @ApiModelProperty(value = "更新时间") - private LocalDateTime updateTime; - - @ApiModelProperty(value = "版本号") - private Integer version; - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java deleted file mode 100644 index 58171a9..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/dto/WorkingProcedureDTO.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.cnbm.generator.code.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-08-03 - */ -@Data -@ApiModel(value = "工序 表DTO对象") -public class WorkingProcedureDTO implements Serializable { - private static final long serialVersionUID = 1L; - - - - @ApiModelProperty(value = "ID") - private Long id; - - @ApiModelProperty(value = "工序 名") - private String name; - - @ApiModelProperty(value = "工序 编码") - private String code; - - @ApiModelProperty(value = "工序类型 id,关联working_procedure_type表") - private Long workingProcedureTypeId; - - @ApiModelProperty(value = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") - private String machineId; - - @ApiModelProperty(value = "1 可用,0 不可用") - private Integer status; - - @ApiModelProperty(value = "备注") - private String remark; - - @ApiModelProperty(value = "删除标志,是否有效:1 可用 0不可用") - private Integer valid; - - @ApiModelProperty(value = "") - private Long creatorId; - - @ApiModelProperty(value = "创建人姓名") - private String creatorName; - - @ApiModelProperty(value = "创建时间") - private LocalDateTime createTime; - - @ApiModelProperty(value = "") - private Long updaterId; - - @ApiModelProperty(value = "更新人姓名") - private String updaterName; - - @ApiModelProperty(value = "更新时间") - private LocalDateTime updateTime; - - @ApiModelProperty(value = "版本号") - private Integer version; - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/Product.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/Product.java deleted file mode 100644 index b3b028a..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/entity/Product.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.cnbm.generator.code.entity; - -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - *

- * 产品 表 - *

- * - * @author why - * @since 2022-08-01 - */ -@Data -@ApiModel(value = "Product对象", description = "产品 表") -public class Product implements Serializable { - - private static final long serialVersionUID = 1L; - - private Long id; - - @ApiModelProperty("产品 名") - private String name; - - @ApiModelProperty("产品 编码") - private String code; - - @ApiModelProperty("产品 规格") - private String specifications; - - @ApiModelProperty("产品 图纸") - private String drawing; - - @ApiModelProperty("描述") - private String descs; - - private Long productTypeId; - - private Long unitId; - - @ApiModelProperty("检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") - private String inspectionStage; - - @ApiModelProperty("检验标准") - private String inspectionStandard; - - @ApiModelProperty("1 可用,0 不可用") - private Integer status; - - @ApiModelProperty("备注") - private String remark; - - @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") - private Integer valid; - - private Long creatorId; - - @ApiModelProperty("创建人姓名") - private String creatorName; - - @ApiModelProperty("创建时间") - private LocalDateTime createTime; - - private Long updaterId; - - @ApiModelProperty("更新人姓名") - private String updaterName; - - @ApiModelProperty("更新时间") - private LocalDateTime updateTime; - - @ApiModelProperty("版本号") - private Integer version; - - -} diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java deleted file mode 100644 index 5aa67a7..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/entity/WorkingProcedure.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.cnbm.generator.code.entity; - -import com.baomidou.mybatisplus.annotation.TableName; -import java.io.Serializable; -import java.time.LocalDateTime; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - *

- * 工序 表 - *

- * - * @author why - * @since 2022-08-03 - */ -@Data -@TableName("working_procedure") -@ApiModel(value = "WorkingProcedure对象", description = "工序 表") -public class WorkingProcedure implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty("ID") - private Long id; - - @ApiModelProperty("工序 名") - private String name; - - @ApiModelProperty("工序 编码") - private String code; - - @ApiModelProperty("工序类型 id,关联working_procedure_type表") - private Long workingProcedureTypeId; - - @ApiModelProperty("机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") - private String machineId; - - @ApiModelProperty("1 可用,0 不可用") - private Integer status; - - @ApiModelProperty("备注") - private String remark; - - @ApiModelProperty("删除标志,是否有效:1 可用 0不可用") - private Integer valid; - - private Long creatorId; - - @ApiModelProperty("创建人姓名") - private String creatorName; - - @ApiModelProperty("创建时间") - private LocalDateTime createTime; - - private Long updaterId; - - @ApiModelProperty("更新人姓名") - private String updaterName; - - @ApiModelProperty("更新时间") - private LocalDateTime updateTime; - - @ApiModelProperty("版本号") - private Integer version; - - -} diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductExcel.java deleted file mode 100644 index 11abc40..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductExcel.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.cnbm.generator.code.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-08-01 - */ -@Data -public class ProductExcel { - @Excel(name = "") - private Long id; - @Excel(name = "产品 名") - private String name; - @Excel(name = "产品 编码") - private String code; - @Excel(name = "产品 规格") - private String specifications; - @Excel(name = "产品 图纸") - private String drawing; - @Excel(name = "描述") - private String descs; - @Excel(name = "") - private Long productTypeId; - @Excel(name = "") - private Long unitId; - @Excel(name = "检验阶段;1 进货检验、 2 过程检验、 3 成品检验、 4 出货检验;; 如果有多个用逗号隔开,比如 1,4 就代表选中了进货检验和出货检验") - private String inspectionStage; - @Excel(name = "检验标准") - private String inspectionStandard; - @Excel(name = "1 可用,0 不可用") - private Integer status; - @Excel(name = "备注") - private String remark; - @Excel(name = "删除标志,是否有效:1 可用 0不可用") - private Integer valid; - @Excel(name = "") - private Long creatorId; - @Excel(name = "创建人姓名") - private String creatorName; - @Excel(name = "创建时间") - private LocalDateTime createTime; - @Excel(name = "") - private Long updaterId; - @Excel(name = "更新人姓名") - private String updaterName; - @Excel(name = "更新时间") - private LocalDateTime updateTime; - @Excel(name = "版本号") - private Integer version; - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java deleted file mode 100644 index 3f07f7f..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/excel/WorkingProcedureExcel.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.cnbm.generator.code.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-08-03 - */ -@Data -public class WorkingProcedureExcel { - @Excel(name = "ID") - private Long id; - @Excel(name = "工序 名") - private String name; - @Excel(name = "工序 编码") - private String code; - @Excel(name = "工序类型 id,关联working_procedure_type表") - private Long workingProcedureTypeId; - @Excel(name = "机台(也就是设备),这个工序对应的设备,可能有一个或者多个,如果多个用逗号隔开,\"id1,id2,......\"") - private String machineId; - @Excel(name = "1 可用,0 不可用") - private Integer status; - @Excel(name = "备注") - private String remark; - @Excel(name = "删除标志,是否有效:1 可用 0不可用") - private Integer valid; - @Excel(name = "") - private Long creatorId; - @Excel(name = "创建人姓名") - private String creatorName; - @Excel(name = "创建时间") - private LocalDateTime createTime; - @Excel(name = "") - private Long updaterId; - @Excel(name = "更新人姓名") - private String updaterName; - @Excel(name = "更新时间") - private LocalDateTime updateTime; - @Excel(name = "版本号") - private Integer version; - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.java deleted file mode 100644 index de28f2f..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.cnbm.generator.code.mapper; - -import com.cnbm.common.dao.BaseDao; -import com.cnbm.generator.code.entity.Product; -import org.apache.ibatis.annotations.Mapper; - -/** - * 产品 表 - * - * @author why - * @since 2022-08-01 - */ -@Mapper -public interface ProductMapper extends BaseDao { - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.xml deleted file mode 100644 index e6b190c..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java deleted file mode 100644 index 75c4d60..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.cnbm.generator.code.mapper; - -import com.cnbm.common.dao.BaseDao; -import com.cnbm.generator.code.entity.WorkingProcedure; -import org.apache.ibatis.annotations.Mapper; - -/** - * 工序 表 - * - * @author why - * @since 2022-08-03 - */ -@Mapper -public interface WorkingProcedureMapper extends BaseDao { - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml deleted file mode 100644 index 2402113..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/WorkingProcedureMapper.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductService.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductService.java deleted file mode 100644 index 81e68b5..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/service/IProductService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.cnbm.generator.code.service; - -import com.cnbm.common.service.CrudService; -import com.cnbm.generator.code.dto.ProductDTO; -import com.cnbm.generator.code.entity.Product; - -/** - * 产品 表 - * - * @author why - * @since 2022-08-01 - */ -public interface IProductService extends CrudService { - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java deleted file mode 100644 index 61de38a..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/service/IWorkingProcedureService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.cnbm.generator.code.service; - -import com.cnbm.common.service.CrudService; -import com.cnbm.generator.code.dto.WorkingProcedureDTO; -import com.cnbm.generator.code.entity.WorkingProcedure; - -/** - * 工序 表 - * - * @author why - * @since 2022-08-03 - */ -public interface IWorkingProcedureService extends CrudService { - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductServiceImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductServiceImpl.java deleted file mode 100644 index c288a5c..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.cnbm.generator.code.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.cnbm.common.service.impl.CrudServiceImpl; -import com.cnbm.generator.code.dto.ProductDTO; -import com.cnbm.generator.code.mapper.ProductMapper; -import com.cnbm.generator.code.entity.Product; -import com.cnbm.generator.code.service.IProductService; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; - -import java.util.Map; - -/** - * 产品 表 - * - * @author why - * @since 2022-08-01 - */ -@Service -public class ProductServiceImpl extends CrudServiceImpl implements IProductService { - - @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; - } - - -} \ No newline at end of file diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java deleted file mode 100644 index 53c34ff..0000000 --- a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/WorkingProcedureServiceImpl.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.cnbm.generator.code.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.cnbm.common.service.impl.CrudServiceImpl; -import com.cnbm.generator.code.dto.WorkingProcedureDTO; -import com.cnbm.generator.code.mapper.WorkingProcedureMapper; -import com.cnbm.generator.code.entity.WorkingProcedure; -import com.cnbm.generator.code.service.IWorkingProcedureService; -import org.apache.commons.lang3.StringUtils; -import org.springframework.stereotype.Service; - -import java.util.Map; - -/** - * 工序 表 - * - * @author why - * @since 2022-08-03 - */ -@Service -public class WorkingProcedureServiceImpl extends CrudServiceImpl implements IWorkingProcedureService { - - @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; - } - - -} \ No newline at end of file -- 2.45.2