From db6a0a77397fe354dfaf5065a887884660c34a85 Mon Sep 17 00:00:00 2001
From: yanyang
Date: Mon, 25 Dec 2023 16:56:55 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9C=BA=E6=99=AF=E4=BA=A7?=
=?UTF-8?q?=E5=93=81=E7=AD=89=E7=BA=A7=20=E6=96=99=E5=8F=B7=E9=A2=9C?=
=?UTF-8?q?=E8=89=B2=E8=A7=A3=E6=9E=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../code/controller/PrintModelController.java | 2 +-
.../controller/ProductLevelController.java | 116 +++++++++++++
.../code/controller/ScenesController.java | 116 +++++++++++++
.../generator/code/dto/PrintModelDTO.java | 10 +-
.../generator/code/dto/ProductLevelDTO.java | 62 +++++++
.../cnbm/generator/code/dto/ScenesDTO.java | 59 +++++++
.../generator/code/entity/PrintModel.java | 14 +-
.../generator/code/entity/ProductLevel.java | 88 ++++++++++
.../cnbm/generator/code/entity/Scenes.java | 83 ++++++++++
.../generator/code/excel/PrintModelExcel.java | 8 +-
.../code/excel/ProductLevelExcel.java | 44 +++++
.../generator/code/excel/ScenesExcel.java | 42 +++++
.../code/mapper/PrintModelMapper.java | 2 +-
.../code/mapper/PrintModelMapper.xml | 2 +
.../code/mapper/ProductLevelMapper.java | 16 ++
.../code/mapper/ProductLevelMapper.xml | 19 +++
.../generator/code/mapper/ScenesMapper.java | 16 ++
.../generator/code/mapper/ScenesMapper.xml | 18 ++
.../generator/code/mysql/PrintModelmysql.sql | 12 +-
.../code/mysql/ProductLevelmysql.sql | 7 +
.../cnbm/generator/code/mysql/Scenesmysql.sql | 7 +
.../code/service/PrintModelServiceBiz.java | 2 +-
.../code/service/ProductLevelServiceBiz.java | 15 ++
.../code/service/ScenesServiceBiz.java | 15 ++
.../impl/PrintModelServiceBizImpl.java | 2 +-
.../impl/ProductLevelServiceBizImpl.java | 34 ++++
.../service/impl/ScenesServiceBizImpl.java | 34 ++++
.../controller/ProductLevelController.java | 116 +++++++++++++
.../packing/controller/ScenesController.java | 116 +++++++++++++
.../controller/WoPackagingBoxController.java | 2 +-
.../WoPackagingBoxSubstrateController.java | 1 +
.../com/cnbm/packing/dto/PrintModelDTO.java | 4 +-
.../com/cnbm/packing/dto/ProductLevelDTO.java | 60 +++++++
.../java/com/cnbm/packing/dto/ScenesDTO.java | 57 +++++++
.../cnbm/packing/dto/WoPackagingBoxDTO.java | 5 +-
.../dto/WoPackagingBoxSubstrateDTO.java | 3 +
.../com/cnbm/packing/entity/PrintModel.java | 4 +-
.../com/cnbm/packing/entity/ProductLevel.java | 89 ++++++++++
.../java/com/cnbm/packing/entity/Scenes.java | 84 ++++++++++
.../cnbm/packing/excel/PrintModelExcel.java | 4 +
.../cnbm/packing/excel/ProductLevelExcel.java | 41 +++++
.../com/cnbm/packing/excel/ScenesExcel.java | 39 +++++
.../packing/mapper/ProductLevelMapper.java | 21 +++
.../com/cnbm/packing/mapper/ScenesMapper.java | 21 +++
.../service/ProductLevelServiceBiz.java | 31 ++++
.../packing/service/ScenesServiceBiz.java | 31 ++++
.../service/WoPackagingBoxServiceBiz.java | 2 +
.../WoPackagingBoxSubstrateServiceBiz.java | 2 +
.../impl/ProductLevelServiceBizImpl.java | 90 ++++++++++
.../service/impl/ScenesServiceBizImpl.java | 90 ++++++++++
.../impl/WoPackagingBoxServiceBizImpl.java | 156 ++++++++++++++++++
...WoPackagingBoxSubstrateServiceBizImpl.java | 151 +++++++++++++++++
.../resources/mapper/ProductLevelMapper.xml | 24 +++
.../main/resources/mapper/ScenesMapper.xml | 23 +++
.../mapper/WoCompensationPowerMapper.xml | 2 +-
55 files changed, 2091 insertions(+), 23 deletions(-)
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductLevelController.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/controller/ScenesController.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductLevelDTO.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/dto/ScenesDTO.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductLevel.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/entity/Scenes.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductLevelExcel.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/excel/ScenesExcel.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.xml
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.xml
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductLevelmysql.sql
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/mysql/Scenesmysql.sql
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/ProductLevelServiceBiz.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/ScenesServiceBiz.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductLevelServiceBizImpl.java
create mode 100644 ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ScenesServiceBizImpl.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/controller/ProductLevelController.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/controller/ScenesController.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/dto/ProductLevelDTO.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/dto/ScenesDTO.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/entity/ProductLevel.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/entity/Scenes.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/excel/ProductLevelExcel.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/excel/ScenesExcel.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/mapper/ProductLevelMapper.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/mapper/ScenesMapper.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/service/ProductLevelServiceBiz.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/service/ScenesServiceBiz.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/service/impl/ProductLevelServiceBizImpl.java
create mode 100644 ym-packing/src/main/java/com/cnbm/packing/service/impl/ScenesServiceBizImpl.java
create mode 100644 ym-packing/src/main/resources/mapper/ProductLevelMapper.xml
create mode 100644 ym-packing/src/main/resources/mapper/ScenesMapper.xml
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/PrintModelController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/PrintModelController.java
index e4c75f6..1b65c65 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/controller/PrintModelController.java
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/PrintModelController.java
@@ -31,7 +31,7 @@ import java.util.Map;
* 打印标签模板表 前端控制器
*
* @author codeGenerator
- * @since 2023-03-08
+ * @since 2023-12-22
*/
@RestController
@RequestMapping("/code/printModel")
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductLevelController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductLevelController.java
new file mode 100644
index 0000000..c240faf
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ProductLevelController.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.ProductLevelDTO;
+import com.cnbm.generator.code.excel.ProductLevelExcel;
+import com.cnbm.generator.code.service.ProductLevelServiceBiz;
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@RestController
+@RequestMapping("/code/productLevel")
+@Api(tags="产品等级 表")
+public class ProductLevelController {
+ @Autowired
+ private ProductLevelServiceBiz productLevelService;
+
+ @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:productLevel:page')")
+ public Result> page(@ApiIgnore @RequestParam Map params){
+ PageData page = productLevelService.page(params);
+
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("信息")
+ @PreAuthorize("@ex.hasAuthority('code:productLevel:info')")
+ public Result get(@PathVariable("id") Long id){
+ ProductLevelDTO data = productLevelService.get(id);
+
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ @ApiOperation("保存")
+ @LogOperation("保存")
+ @PreAuthorize("@ex.hasAuthority('code:productLevel:save')")
+ public Result save(@RequestBody ProductLevelDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+
+ productLevelService.save(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @PutMapping
+ @ApiOperation("修改")
+ @LogOperation("修改")
+ @PreAuthorize("@ex.hasAuthority('code:productLevel:update')")
+ public Result update(@RequestBody ProductLevelDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+
+ productLevelService.update(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @DeleteMapping
+ @ApiOperation("删除")
+ @LogOperation("删除")
+ @PreAuthorize("@ex.hasAuthority('code:productLevel:delete')")
+ public Result delete(@RequestBody Long[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+
+ productLevelService.delete(ids);
+
+ return new Result();
+ }
+
+ @GetMapping("export")
+ @ApiOperation("导出")
+ @LogOperation("导出")
+ @PreAuthorize("@ex.hasAuthority('code:productLevel:export')")
+ public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = productLevelService.list(params);
+
+ ExcelUtils.exportExcelToTarget(response, null, list, ProductLevelExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/controller/ScenesController.java b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ScenesController.java
new file mode 100644
index 0000000..2123fba
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/controller/ScenesController.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.ScenesDTO;
+import com.cnbm.generator.code.excel.ScenesExcel;
+import com.cnbm.generator.code.service.ScenesServiceBiz;
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@RestController
+@RequestMapping("/code/scenes")
+@Api(tags="场景 表")
+public class ScenesController {
+ @Autowired
+ private ScenesServiceBiz scenesService;
+
+ @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:scenes:page')")
+ public Result> page(@ApiIgnore @RequestParam Map params){
+ PageData page = scenesService.page(params);
+
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("信息")
+ @PreAuthorize("@ex.hasAuthority('code:scenes:info')")
+ public Result get(@PathVariable("id") Long id){
+ ScenesDTO data = scenesService.get(id);
+
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ @ApiOperation("保存")
+ @LogOperation("保存")
+ @PreAuthorize("@ex.hasAuthority('code:scenes:save')")
+ public Result save(@RequestBody ScenesDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+
+ scenesService.save(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @PutMapping
+ @ApiOperation("修改")
+ @LogOperation("修改")
+ @PreAuthorize("@ex.hasAuthority('code:scenes:update')")
+ public Result update(@RequestBody ScenesDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+
+ scenesService.update(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @DeleteMapping
+ @ApiOperation("删除")
+ @LogOperation("删除")
+ @PreAuthorize("@ex.hasAuthority('code:scenes:delete')")
+ public Result delete(@RequestBody Long[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+
+ scenesService.delete(ids);
+
+ return new Result();
+ }
+
+ @GetMapping("export")
+ @ApiOperation("导出")
+ @LogOperation("导出")
+ @PreAuthorize("@ex.hasAuthority('code:scenes:export')")
+ public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = scenesService.list(params);
+
+ ExcelUtils.exportExcelToTarget(response, null, list, ScenesExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/dto/PrintModelDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/PrintModelDTO.java
index c851574..a6f71af 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/dto/PrintModelDTO.java
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/PrintModelDTO.java
@@ -14,7 +14,7 @@ import java.math.BigDecimal;
* 打印标签模板表
*
* @author codeGenerator
- * @since 2023-03-08
+ * @since 2023-12-22
*/
@Data
@ApiModel(value = "打印标签模板表DTO对象")
@@ -62,7 +62,7 @@ public class PrintModelDTO implements Serializable {
@ApiModelProperty(value = "备注")
private String remark;
- @ApiModelProperty(value = "类型,0:模组标签,1:等级标签")
+ @ApiModelProperty(value = "类型,1:手动,2:自动")
private Integer type;
@ApiModelProperty(value = "是否默认模板,0:否,1:是")
@@ -80,4 +80,10 @@ public class PrintModelDTO implements Serializable {
@ApiModelProperty(value = "是否启用,0 停用;1 启用")
private Integer isEnable;
+ @ApiModelProperty(value = "场景,前端传字符串过来,t_scenes 把value传过来放进去,不要放id")
+ private String scenes;
+
+ @ApiModelProperty(value = "产品等级,t_product_level 把value传过来放进去,不要放id")
+ private String productGrade;
+
}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductLevelDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductLevelDTO.java
new file mode 100644
index 0000000..3d12c3d
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ProductLevelDTO.java
@@ -0,0 +1,62 @@
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@ApiModel(value = "产品等级 表DTO对象")
+public class ProductLevelDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+
+ @ApiModelProperty(value = "ID")
+ private Long id;
+
+ @ApiModelProperty(value = "产品名")
+ private String productName;
+
+ @ApiModelProperty(value = "产品等级,A1/A2/A3/A4/NK")
+ private LocalDateTime productLevel;
+
+ @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/ScenesDTO.java b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ScenesDTO.java
new file mode 100644
index 0000000..556ce06
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/dto/ScenesDTO.java
@@ -0,0 +1,59 @@
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@ApiModel(value = "场景 表DTO对象")
+public class ScenesDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+
+ @ApiModelProperty(value = "ID")
+ private Long id;
+
+ @ApiModelProperty(value = "场景名")
+ private String scenesName;
+
+ @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/PrintModel.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/PrintModel.java
index 08ee5a0..561e376 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/entity/PrintModel.java
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/PrintModel.java
@@ -14,7 +14,7 @@ import lombok.Data;
*
*
* @author codeGenerator
- * @since 2023-03-08
+ * @since 2023-12-22
*/
@Data
@TableName("t_print_model")
@@ -63,7 +63,7 @@ public class PrintModel implements Serializable {
@ApiModelProperty("备注")
private String remark;
- @ApiModelProperty("类型,0:模组标签,1:等级标签")
+ @ApiModelProperty("类型,1:手动,2:自动")
private Integer type;
@ApiModelProperty("是否默认模板,0:否,1:是")
@@ -81,6 +81,12 @@ public class PrintModel implements Serializable {
@ApiModelProperty("是否启用,0 停用;1 启用")
private Integer isEnable;
+ @ApiModelProperty("场景,前端传字符串过来,t_scenes 把value传过来放进去,不要放id")
+ private String scenes;
+
+ @ApiModelProperty("产品等级,t_product_level 把value传过来放进去,不要放id")
+ private String productGrade;
+
public static final String ID = "ID";
@@ -120,4 +126,8 @@ public class PrintModel implements Serializable {
public static final String IS_ENABLE = "is_enable";
+ public static final String SCENES = "scenes";
+
+ public static final String PRODUCT_GRADE = "product_grade";
+
}
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductLevel.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductLevel.java
new file mode 100644
index 0000000..67da65f
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/ProductLevel.java
@@ -0,0 +1,88 @@
+package com.cnbm.generator.code.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@TableName("t_product_level")
+@ApiModel(value = "ProductLevel对象", description = "产品等级 表")
+public class ProductLevel implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("ID")
+ private Long id;
+
+ @ApiModelProperty("产品名")
+ private String productName;
+
+ @ApiModelProperty("产品等级,A1/A2/A3/A4/NK")
+ private LocalDateTime productLevel;
+
+ @ApiModelProperty("备注")
+ private String remark;
+
+ @ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
+ @TableLogic
+ private Integer valid;
+
+ @ApiModelProperty("创建人")
+ private Long creatorId;
+
+ @ApiModelProperty("创建人姓名")
+ private String creatorName;
+
+ @ApiModelProperty("创建时间")
+ private LocalDateTime createTime;
+
+ @ApiModelProperty("更新人")
+ private Long updaterId;
+
+ @ApiModelProperty("更新人姓名")
+ private String updaterName;
+
+ @ApiModelProperty("更新时间")
+ private LocalDateTime updateTime;
+
+ @ApiModelProperty("版本号")
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String PRODUCT_NAME = "product_name";
+
+ public static final String PRODUCT_LEVEL = "product_level";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR_ID = "creator_id";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER_ID = "updater_id";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+}
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/entity/Scenes.java b/ym-generator/src/main/java/com/cnbm/generator/code/entity/Scenes.java
new file mode 100644
index 0000000..d96f038
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/entity/Scenes.java
@@ -0,0 +1,83 @@
+package com.cnbm.generator.code.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@TableName("t_scenes")
+@ApiModel(value = "Scenes对象", description = "场景 表")
+public class Scenes implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("ID")
+ private Long id;
+
+ @ApiModelProperty("场景名")
+ private String scenesName;
+
+ @ApiModelProperty("备注")
+ private String remark;
+
+ @ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
+ @TableLogic
+ private Integer valid;
+
+ @ApiModelProperty("创建人")
+ private Long creatorId;
+
+ @ApiModelProperty("创建人姓名")
+ private String creatorName;
+
+ @ApiModelProperty("创建时间")
+ private LocalDateTime createTime;
+
+ @ApiModelProperty("更新人")
+ private Long updaterId;
+
+ @ApiModelProperty("更新人姓名")
+ private String updaterName;
+
+ @ApiModelProperty("更新时间")
+ private LocalDateTime updateTime;
+
+ @ApiModelProperty("版本号")
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String SCENES_NAME = "scenes_name";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR_ID = "creator_id";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER_ID = "updater_id";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+}
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/PrintModelExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/PrintModelExcel.java
index 08e14fa..5ca05af 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/excel/PrintModelExcel.java
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/PrintModelExcel.java
@@ -12,7 +12,7 @@ import java.util.Date;
* 打印标签模板表
*
* @author codeGenerator
- * @since 2023-03-08
+ * @since 2023-12-22
*/
@Data
public class PrintModelExcel {
@@ -42,7 +42,7 @@ public class PrintModelExcel {
private Integer valid;
@Excel(name = "备注")
private String remark;
- @Excel(name = "类型,0:模组标签,1:等级标签")
+ @Excel(name = "类型,1:手动,2:自动")
private Integer type;
@Excel(name = "是否默认模板,0:否,1:是")
private Integer isDefault;
@@ -54,5 +54,9 @@ public class PrintModelExcel {
private Integer lineBody;
@Excel(name = "是否启用,0 停用;1 启用")
private Integer isEnable;
+ @Excel(name = "场景,前端传字符串过来,t_scenes 把value传过来放进去,不要放id")
+ private String scenes;
+ @Excel(name = "产品等级,t_product_level 把value传过来放进去,不要放id")
+ private String productGrade;
}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductLevelExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductLevelExcel.java
new file mode 100644
index 0000000..8ad3cdb
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ProductLevelExcel.java
@@ -0,0 +1,44 @@
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+public class ProductLevelExcel {
+ @Excel(name = "ID")
+ private Long id;
+ @Excel(name = "产品名")
+ private String productName;
+ @Excel(name = "产品等级,A1/A2/A3/A4/NK")
+ private LocalDateTime productLevel;
+ @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/ScenesExcel.java b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ScenesExcel.java
new file mode 100644
index 0000000..94d77e6
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/excel/ScenesExcel.java
@@ -0,0 +1,42 @@
+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 codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+public class ScenesExcel {
+ @Excel(name = "ID")
+ private Long id;
+ @Excel(name = "场景名")
+ private String scenesName;
+ @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/PrintModelMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/PrintModelMapper.java
index 08acd83..cb86675 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/PrintModelMapper.java
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/PrintModelMapper.java
@@ -8,7 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
* 打印标签模板表
*
* @author codeGenerator
- * @since 2023-03-08
+ * @since 2023-12-22
*/
@Mapper
public interface PrintModelMapper extends BaseDao {
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/PrintModelMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/PrintModelMapper.xml
index ef46269..f2456bb 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/PrintModelMapper.xml
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/PrintModelMapper.xml
@@ -21,6 +21,8 @@
+
+
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.java
new file mode 100644
index 0000000..c84eb4a
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.java
@@ -0,0 +1,16 @@
+package com.cnbm.generator.code.mapper;
+
+import com.cnbm.common.dao.BaseDao;
+import com.cnbm.generator.code.entity.ProductLevel;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Mapper
+public interface ProductLevelMapper extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.xml
new file mode 100644
index 0000000..439294d
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ProductLevelMapper.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.java b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.java
new file mode 100644
index 0000000..cc3eb84
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.java
@@ -0,0 +1,16 @@
+package com.cnbm.generator.code.mapper;
+
+import com.cnbm.common.dao.BaseDao;
+import com.cnbm.generator.code.entity.Scenes;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Mapper
+public interface ScenesMapper extends BaseDao {
+
+}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.xml b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.xml
new file mode 100644
index 0000000..83c76ec
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mapper/ScenesMapper.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mysql/PrintModelmysql.sql b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/PrintModelmysql.sql
index f3c5ea2..24d4bce 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/mysql/PrintModelmysql.sql
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/PrintModelmysql.sql
@@ -1,7 +1,7 @@
-- 菜单初始SQL
-INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1633305189284167681, 1067246875800000035, '打印标签模板表', 'code/printModel', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
-INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167682, 1633305189284167681, '查看', NULL, 'code:printModel:page,code:printModel:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
-INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167683, 1633305189284167681, '新增', NULL, 'code:printModel:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
-INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167684, 1633305189284167681, '修改', NULL, 'code:printModel:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
-INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167685, 1633305189284167681, '删除', NULL, 'code:printModel:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
-INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1633305189284167686, 1633305189284167681, '导出', NULL, 'code:printModel:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1738098359422767105, 1067246875800000035, '打印标签模板表', 'code/printModel', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1738098359422767106, 1738098359422767105, '查看', NULL, 'code:printModel:page,code:printModel:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1738098359422767107, 1738098359422767105, '新增', NULL, 'code:printModel:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1738098359422767108, 1738098359422767105, '修改', NULL, 'code:printModel:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1738098359422767109, 1738098359422767105, '删除', NULL, 'code:printModel:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1738098359422767110, 1738098359422767105, '导出', NULL, 'code:printModel:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductLevelmysql.sql b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductLevelmysql.sql
new file mode 100644
index 0000000..e1582c7
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/ProductLevelmysql.sql
@@ -0,0 +1,7 @@
+-- 菜单初始SQL
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1737669381515964417, 1067246875800000035, '产品等级 表', 'basic/productLevel', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669381515964418, 1737669381515964417, '查看', NULL, 'basic:productLevel:page,basic:productLevel:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669381515964419, 1737669381515964417, '新增', NULL, 'basic:productLevel:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669381515964420, 1737669381515964417, '修改', NULL, 'basic:productLevel:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669381515964421, 1737669381515964417, '删除', NULL, 'basic:productLevel:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669381515964422, 1737669381515964417, '导出', NULL, 'basic:productLevel:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/mysql/Scenesmysql.sql b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/Scenesmysql.sql
new file mode 100644
index 0000000..67050e6
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/mysql/Scenesmysql.sql
@@ -0,0 +1,7 @@
+-- 菜单初始SQL
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date)VALUES (1737669220261810177, 1067246875800000035, '场景 表', 'code/scenes', NULL, 0, 'icon-desktop', 0, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669220261810178, 1737669220261810177, '查看', NULL, 'code:scenes:page,code:scenes:info', 1, NULL, 0, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669220261810179, 1737669220261810177, '新增', NULL, 'code:scenes:save', 1, NULL, 1, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669220261810180, 1737669220261810177, '修改', NULL, 'code:scenes:update', 1, NULL, 2, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669220261810181, 1737669220261810177, '删除', NULL, 'code:scenes:delete', 1, NULL, 3, 1067246875800000001, now(), 1067246875800000001, now());
+INSERT INTO sys_menu(id, pid, name, url, permissions, type, icon, sort, creator, create_date, updater, update_date) VALUES (1737669220261810182, 1737669220261810177, '导出', NULL, 'code:scenes:export', 1, NULL, 4, 1067246875800000001, now(), 1067246875800000001, now());
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/PrintModelServiceBiz.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/PrintModelServiceBiz.java
index 22c27f5..937c43c 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/service/PrintModelServiceBiz.java
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/PrintModelServiceBiz.java
@@ -8,7 +8,7 @@ import com.cnbm.generator.code.entity.PrintModel;
* 打印标签模板表
*
* @author codeGenerator
- * @since 2023-03-08
+ * @since 2023-12-22
*/
public interface PrintModelServiceBiz extends CrudService {
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/ProductLevelServiceBiz.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/ProductLevelServiceBiz.java
new file mode 100644
index 0000000..224e2e3
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/ProductLevelServiceBiz.java
@@ -0,0 +1,15 @@
+package com.cnbm.generator.code.service;
+
+import com.cnbm.common.service.CrudService;
+import com.cnbm.generator.code.dto.ProductLevelDTO;
+import com.cnbm.generator.code.entity.ProductLevel;
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+public interface ProductLevelServiceBiz extends CrudService {
+
+}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/ScenesServiceBiz.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/ScenesServiceBiz.java
new file mode 100644
index 0000000..df71773
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/ScenesServiceBiz.java
@@ -0,0 +1,15 @@
+package com.cnbm.generator.code.service;
+
+import com.cnbm.common.service.CrudService;
+import com.cnbm.generator.code.dto.ScenesDTO;
+import com.cnbm.generator.code.entity.Scenes;
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+public interface ScenesServiceBiz extends CrudService {
+
+}
\ No newline at end of file
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/PrintModelServiceBizImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/PrintModelServiceBizImpl.java
index df5fb7b..329b9c2 100644
--- a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/PrintModelServiceBizImpl.java
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/PrintModelServiceBizImpl.java
@@ -15,7 +15,7 @@ import java.util.Map;
* 打印标签模板表
*
* @author codeGenerator
- * @since 2023-03-08
+ * @since 2023-12-22
*/
@Service
public class PrintModelServiceBizImpl extends CrudServiceImpl implements PrintModelServiceBiz {
diff --git a/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductLevelServiceBizImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductLevelServiceBizImpl.java
new file mode 100644
index 0000000..b28a466
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ProductLevelServiceBizImpl.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.ProductLevelDTO;
+import com.cnbm.generator.code.mapper.ProductLevelMapper;
+import com.cnbm.generator.code.entity.ProductLevel;
+import com.cnbm.generator.code.service.ProductLevelServiceBiz;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Service
+public class ProductLevelServiceBizImpl extends CrudServiceImpl implements ProductLevelServiceBiz {
+
+ @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/ScenesServiceBizImpl.java b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ScenesServiceBizImpl.java
new file mode 100644
index 0000000..af1dcb4
--- /dev/null
+++ b/ym-generator/src/main/java/com/cnbm/generator/code/service/impl/ScenesServiceBizImpl.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.ScenesDTO;
+import com.cnbm.generator.code.mapper.ScenesMapper;
+import com.cnbm.generator.code.entity.Scenes;
+import com.cnbm.generator.code.service.ScenesServiceBiz;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.stereotype.Service;
+
+import java.util.Map;
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Service
+public class ScenesServiceBizImpl extends CrudServiceImpl implements ScenesServiceBiz {
+
+ @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-packing/src/main/java/com/cnbm/packing/controller/ProductLevelController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/ProductLevelController.java
new file mode 100644
index 0000000..d868750
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/controller/ProductLevelController.java
@@ -0,0 +1,116 @@
+package com.cnbm.packing.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.packing.dto.ProductLevelDTO;
+import com.cnbm.packing.excel.ProductLevelExcel;
+import com.cnbm.packing.service.ProductLevelServiceBiz;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 产品等级 表 前端控制器
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@RestController
+@RequestMapping("/basic/productLevel")
+@Api(tags="产品等级 表")
+public class ProductLevelController {
+ @Autowired
+ private ProductLevelServiceBiz productLevelService;
+
+ @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('basic:productLevel:page')")
+ public Result> page(@ApiIgnore @RequestParam Map params){
+ PageData page = productLevelService.page(params);
+
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("信息")
+ @PreAuthorize("@ex.hasAuthority('basic:productLevel:info')")
+ public Result get(@PathVariable("id") Long id){
+ ProductLevelDTO data = productLevelService.get(id);
+
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ @ApiOperation("保存")
+ @LogOperation("保存")
+ @PreAuthorize("@ex.hasAuthority('basic:productLevel:save')")
+ public Result save(@RequestBody ProductLevelDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+
+ productLevelService.save(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @PutMapping
+ @ApiOperation("修改")
+ @LogOperation("修改")
+ @PreAuthorize("@ex.hasAuthority('basic:productLevel:update')")
+ public Result update(@RequestBody ProductLevelDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+
+ productLevelService.update(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @DeleteMapping
+ @ApiOperation("删除")
+ @LogOperation("删除")
+ @PreAuthorize("@ex.hasAuthority('basic:productLevel:delete')")
+ public Result delete(@RequestBody Long[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+
+ productLevelService.delete(ids);
+
+ return new Result();
+ }
+
+ @GetMapping("export")
+ @ApiOperation("导出")
+ @LogOperation("导出")
+ @PreAuthorize("@ex.hasAuthority('basic:productLevel:export')")
+ public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = productLevelService.list(params);
+
+ ExcelUtils.exportExcelToTarget(response, null, list, ProductLevelExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/ScenesController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/ScenesController.java
new file mode 100644
index 0000000..9885282
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/controller/ScenesController.java
@@ -0,0 +1,116 @@
+package com.cnbm.packing.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.packing.dto.ScenesDTO;
+import com.cnbm.packing.excel.ScenesExcel;
+import com.cnbm.packing.service.ScenesServiceBiz;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 场景 表 前端控制器
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@RestController
+@RequestMapping("/basic/scenes")
+@Api(tags="场景 表")
+public class ScenesController {
+ @Autowired
+ private ScenesServiceBiz scenesService;
+
+ @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('basic:scenes:page')")
+ public Result> page(@ApiIgnore @RequestParam Map params){
+ PageData page = scenesService.page(params);
+
+ return new Result>().ok(page);
+ }
+
+ @GetMapping("{id}")
+ @ApiOperation("信息")
+ @PreAuthorize("@ex.hasAuthority('basic:scenes:info')")
+ public Result get(@PathVariable("id") Long id){
+ ScenesDTO data = scenesService.get(id);
+
+ return new Result().ok(data);
+ }
+
+ @PostMapping
+ @ApiOperation("保存")
+ @LogOperation("保存")
+ @PreAuthorize("@ex.hasAuthority('basic:scenes:save')")
+ public Result save(@RequestBody ScenesDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+
+ scenesService.save(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @PutMapping
+ @ApiOperation("修改")
+ @LogOperation("修改")
+ @PreAuthorize("@ex.hasAuthority('basic:scenes:update')")
+ public Result update(@RequestBody ScenesDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+
+ scenesService.update(dto);
+
+ return new Result().ok(dto.getId());
+ }
+
+ @DeleteMapping
+ @ApiOperation("删除")
+ @LogOperation("删除")
+ @PreAuthorize("@ex.hasAuthority('basic:scenes:delete')")
+ public Result delete(@RequestBody Long[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+
+ scenesService.delete(ids);
+
+ return new Result();
+ }
+
+ @GetMapping("export")
+ @ApiOperation("导出")
+ @LogOperation("导出")
+ @PreAuthorize("@ex.hasAuthority('basic:scenes:export')")
+ public void export(@ApiIgnore @RequestParam Map params, HttpServletResponse response) throws Exception {
+ List list = scenesService.list(params);
+
+ ExcelUtils.exportExcelToTarget(response, null, list, ScenesExcel.class);
+ }
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java
index ce0b3d7..f5eb3da 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxController.java
@@ -65,7 +65,7 @@ public class WoPackagingBoxController {
})
public Result> page(@ApiIgnore @RequestParam Map params){
PageData page = woPackagingBoxService.page(params);
-
+ woPackagingBoxService.setColor(page.getList());
return new Result>().ok(page);
}
diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java
index f91a449..b251005 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/controller/WoPackagingBoxSubstrateController.java
@@ -343,6 +343,7 @@ public class WoPackagingBoxSubstrateController {
@ApiOperation("装箱单信息查询")
public Result> substrateList(@RequestBody PackingInfoQueryParam param){
PageData page = woPackagingBoxSubstrateService.substratePage(param);
+ woPackagingBoxSubstrateService.setColor(page.getList());
return new Result>().ok(page);
}
diff --git a/ym-packing/src/main/java/com/cnbm/packing/dto/PrintModelDTO.java b/ym-packing/src/main/java/com/cnbm/packing/dto/PrintModelDTO.java
index 1197b11..6486a54 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/dto/PrintModelDTO.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/dto/PrintModelDTO.java
@@ -80,10 +80,10 @@ public class PrintModelDTO implements Serializable {
@ApiModelProperty(value = "是否启用,0 停用;1 启用")
private Integer isEnable;
- @ApiModelProperty(value = "场景,前端传字符串过来,目前固定这几个:DZ BIPV")
+ @ApiModelProperty(value = "场景,前端传字符串过来,t_scenes 把value传过来放进去,不要放id")
private String scenes;
- @ApiModelProperty(value = "产品等级,目前固定这几个 : A1 A2 A3 A4 NK")
+ @ApiModelProperty(value = "产品等级,t_product_level 把value传过来放进去,不要放id")
private String productGrade;
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/dto/ProductLevelDTO.java b/ym-packing/src/main/java/com/cnbm/packing/dto/ProductLevelDTO.java
new file mode 100644
index 0000000..07fd7d8
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/dto/ProductLevelDTO.java
@@ -0,0 +1,60 @@
+package com.cnbm.packing.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@ApiModel(value = "产品等级 表DTO对象")
+public class ProductLevelDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+
+ @ApiModelProperty(value = "ID")
+ private Long id;
+
+ @ApiModelProperty(value = "产品名")
+ private String productName;
+
+ @ApiModelProperty(value = "产品等级,A1/A2/A3/A4/NK")
+ private LocalDateTime productLevel;
+
+ @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-packing/src/main/java/com/cnbm/packing/dto/ScenesDTO.java b/ym-packing/src/main/java/com/cnbm/packing/dto/ScenesDTO.java
new file mode 100644
index 0000000..0bf0f7d
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/dto/ScenesDTO.java
@@ -0,0 +1,57 @@
+package com.cnbm.packing.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@ApiModel(value = "场景 表DTO对象")
+public class ScenesDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+
+
+ @ApiModelProperty(value = "ID")
+ private Long id;
+
+ @ApiModelProperty(value = "场景名")
+ private String scenesName;
+
+ @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-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxDTO.java b/ym-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxDTO.java
index 3f7939f..84eb4c9 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxDTO.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxDTO.java
@@ -116,6 +116,9 @@ public class WoPackagingBoxDTO implements Serializable {
private String orderNum;
@ApiModelProperty(value = "基板列表")
- private List substrateList;;
+ private List substrateList;
+
+ @ApiModelProperty(value = "颜色(物料号匹配)")
+ private String color;
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxSubstrateDTO.java b/ym-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxSubstrateDTO.java
index 12abb01..dd5c3f0 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxSubstrateDTO.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/dto/WoPackagingBoxSubstrateDTO.java
@@ -185,4 +185,7 @@ public class WoPackagingBoxSubstrateDTO implements Serializable {
@ApiModelProperty(value = "最近打印时间(转)")
private String printTime1;
+ @ApiModelProperty(value = "颜色(物料号匹配)")
+ private String color;
+
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/entity/PrintModel.java b/ym-packing/src/main/java/com/cnbm/packing/entity/PrintModel.java
index 223f022..56cc9ab 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/entity/PrintModel.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/entity/PrintModel.java
@@ -81,10 +81,10 @@ public class PrintModel implements Serializable {
@ApiModelProperty("是否启用,0 停用;1 启用")
private Integer isEnable;
- @ApiModelProperty("场景,前端传字符串过来,目前固定这几个:DZ BIPV")
+ @ApiModelProperty("场景,前端传字符串过来,t_scenes 把value传过来放进去,不要放id")
private String scenes;
- @ApiModelProperty("产品等级,目前固定这几个 : A1 A2 A3 A4 NK")
+ @ApiModelProperty("产品等级,t_product_level 把value传过来放进去,不要放id")
private String productGrade;
diff --git a/ym-packing/src/main/java/com/cnbm/packing/entity/ProductLevel.java b/ym-packing/src/main/java/com/cnbm/packing/entity/ProductLevel.java
new file mode 100644
index 0000000..a9d5ddb
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/entity/ProductLevel.java
@@ -0,0 +1,89 @@
+package com.cnbm.packing.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ *
+ * 产品等级 表
+ *
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@TableName("t_product_level")
+@ApiModel(value = "ProductLevel对象", description = "产品等级 表")
+public class ProductLevel implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("ID")
+ private Long id;
+
+ @ApiModelProperty("产品名")
+ private String productName;
+
+ @ApiModelProperty("产品等级,A1/A2/A3/A4/NK")
+ private LocalDateTime productLevel;
+
+ @ApiModelProperty("备注")
+ private String remark;
+
+ @ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
+ @TableLogic
+ private Integer valid;
+
+ @ApiModelProperty("创建人")
+ private Long creatorId;
+
+ @ApiModelProperty("创建人姓名")
+ private String creatorName;
+
+ @ApiModelProperty("创建时间")
+ private LocalDateTime createTime;
+
+ @ApiModelProperty("更新人")
+ private Long updaterId;
+
+ @ApiModelProperty("更新人姓名")
+ private String updaterName;
+
+ @ApiModelProperty("更新时间")
+ private LocalDateTime updateTime;
+
+ @ApiModelProperty("版本号")
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String PRODUCT_NAME = "product_name";
+
+ public static final String PRODUCT_LEVEL = "product_level";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR_ID = "creator_id";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER_ID = "updater_id";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+}
diff --git a/ym-packing/src/main/java/com/cnbm/packing/entity/Scenes.java b/ym-packing/src/main/java/com/cnbm/packing/entity/Scenes.java
new file mode 100644
index 0000000..5c1041a
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/entity/Scenes.java
@@ -0,0 +1,84 @@
+package com.cnbm.packing.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ *
+ * 场景 表
+ *
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+@TableName("t_scenes")
+@ApiModel(value = "Scenes对象", description = "场景 表")
+public class Scenes implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty("ID")
+ private Long id;
+
+ @ApiModelProperty("场景名")
+ private String scenesName;
+
+ @ApiModelProperty("备注")
+ private String remark;
+
+ @ApiModelProperty("删除标志,是否有效:1 可用 0不可用")
+ @TableLogic
+ private Integer valid;
+
+ @ApiModelProperty("创建人")
+ private Long creatorId;
+
+ @ApiModelProperty("创建人姓名")
+ private String creatorName;
+
+ @ApiModelProperty("创建时间")
+ private LocalDateTime createTime;
+
+ @ApiModelProperty("更新人")
+ private Long updaterId;
+
+ @ApiModelProperty("更新人姓名")
+ private String updaterName;
+
+ @ApiModelProperty("更新时间")
+ private LocalDateTime updateTime;
+
+ @ApiModelProperty("版本号")
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String SCENES_NAME = "scenes_name";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR_ID = "creator_id";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER_ID = "updater_id";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+}
diff --git a/ym-packing/src/main/java/com/cnbm/packing/excel/PrintModelExcel.java b/ym-packing/src/main/java/com/cnbm/packing/excel/PrintModelExcel.java
index 97bd3cc..4c770b2 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/excel/PrintModelExcel.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/excel/PrintModelExcel.java
@@ -54,5 +54,9 @@ public class PrintModelExcel {
private Integer lineBody;
@Excel(name = "是否启用,0 停用;1 启用")
private Integer isEnable;
+ @Excel(name = "场景,前端传字符串过来,t_scenes 把value传过来放进去,不要放id")
+ private String scenes;
+ @Excel(name = "产品等级,t_product_level 把value传过来放进去,不要放id")
+ private String productGrade;
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/excel/ProductLevelExcel.java b/ym-packing/src/main/java/com/cnbm/packing/excel/ProductLevelExcel.java
new file mode 100644
index 0000000..75feecf
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/excel/ProductLevelExcel.java
@@ -0,0 +1,41 @@
+package com.cnbm.packing.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+public class ProductLevelExcel {
+ @Excel(name = "ID")
+ private Long id;
+ @Excel(name = "产品名")
+ private String productName;
+ @Excel(name = "产品等级,A1/A2/A3/A4/NK")
+ private LocalDateTime productLevel;
+ @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-packing/src/main/java/com/cnbm/packing/excel/ScenesExcel.java b/ym-packing/src/main/java/com/cnbm/packing/excel/ScenesExcel.java
new file mode 100644
index 0000000..978c5c8
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/excel/ScenesExcel.java
@@ -0,0 +1,39 @@
+package com.cnbm.packing.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Data
+public class ScenesExcel {
+ @Excel(name = "ID")
+ private Long id;
+ @Excel(name = "场景名")
+ private String scenesName;
+ @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-packing/src/main/java/com/cnbm/packing/mapper/ProductLevelMapper.java b/ym-packing/src/main/java/com/cnbm/packing/mapper/ProductLevelMapper.java
new file mode 100644
index 0000000..bf69626
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/mapper/ProductLevelMapper.java
@@ -0,0 +1,21 @@
+package com.cnbm.packing.mapper;
+
+import com.cnbm.common.dao.BaseDao;
+import com.cnbm.packing.dto.ProductLevelDTO;
+import com.cnbm.packing.entity.ProductLevel;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Mapper
+public interface ProductLevelMapper extends BaseDao {
+
+ List list();
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/mapper/ScenesMapper.java b/ym-packing/src/main/java/com/cnbm/packing/mapper/ScenesMapper.java
new file mode 100644
index 0000000..9df2727
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/mapper/ScenesMapper.java
@@ -0,0 +1,21 @@
+package com.cnbm.packing.mapper;
+
+import com.cnbm.common.dao.BaseDao;
+import com.cnbm.packing.dto.ScenesDTO;
+import com.cnbm.packing.entity.Scenes;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Mapper
+public interface ScenesMapper extends BaseDao {
+
+ List list();
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/ProductLevelServiceBiz.java b/ym-packing/src/main/java/com/cnbm/packing/service/ProductLevelServiceBiz.java
new file mode 100644
index 0000000..85f2934
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/ProductLevelServiceBiz.java
@@ -0,0 +1,31 @@
+package com.cnbm.packing.service;
+
+import com.cnbm.common.page.PageData;
+import com.cnbm.common.service.CrudService;
+import com.cnbm.packing.dto.ProductLevelDTO;
+import com.cnbm.packing.entity.ProductLevel;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+public interface ProductLevelServiceBiz extends CrudService {
+
+ PageData page (Map params);
+
+ ProductLevelDTO get(Long id);
+
+ void save(ProductLevelDTO dto);
+
+ void update(ProductLevelDTO dto);
+
+ void delete(Long[] ids);
+
+ List list();
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/ScenesServiceBiz.java b/ym-packing/src/main/java/com/cnbm/packing/service/ScenesServiceBiz.java
new file mode 100644
index 0000000..4fff1e4
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/ScenesServiceBiz.java
@@ -0,0 +1,31 @@
+package com.cnbm.packing.service;
+
+import com.cnbm.common.page.PageData;
+import com.cnbm.common.service.CrudService;
+import com.cnbm.packing.dto.ScenesDTO;
+import com.cnbm.packing.entity.Scenes;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+public interface ScenesServiceBiz extends CrudService {
+
+ PageData page (Map params);
+
+ ScenesDTO get(Long id);
+
+ void save(ScenesDTO dto);
+
+ void update(ScenesDTO dto);
+
+ void delete(Long[] ids);
+
+ List list();
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java
index ff76740..526d4b5 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxServiceBiz.java
@@ -56,4 +56,6 @@ public interface WoPackagingBoxServiceBiz extends CrudService orderNameList();
R> subIdPage(SubIdQueryParam param);
+
+ void setColor(List list);
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java
index 12d291d..0acf97e 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/WoPackagingBoxSubstrateServiceBiz.java
@@ -46,4 +46,6 @@ public interface WoPackagingBoxSubstrateServiceBiz extends CrudService list);
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/ProductLevelServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/ProductLevelServiceBizImpl.java
new file mode 100644
index 0000000..2c15270
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/ProductLevelServiceBizImpl.java
@@ -0,0 +1,90 @@
+package com.cnbm.packing.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.cnbm.admin.utils.BaseSupportUtils;
+import com.cnbm.common.page.PageData;
+import com.cnbm.common.service.impl.CrudServiceImpl;
+import com.cnbm.common.utils.ConvertUtils;
+import com.cnbm.packing.dto.ProductLevelDTO;
+import com.cnbm.packing.entity.ProductLevel;
+import com.cnbm.packing.mapper.ProductLevelMapper;
+import com.cnbm.packing.service.ProductLevelServiceBiz;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 产品等级 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Service
+public class ProductLevelServiceBizImpl extends CrudServiceImpl implements ProductLevelServiceBiz {
+
+ @Autowired
+ private ProductLevelMapper mapper;
+
+ @Override
+ public QueryWrapper getWrapper(Map params){
+ String id = (String)params.get("id");
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), "id", id);
+
+ return wrapper;
+ }
+
+ @Override
+ public PageData page (Map params){
+ IPage page = baseDao.selectPage(
+ getPage(params, ProductLevel.CREATE_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, ProductLevelDTO.class);
+ }
+
+ @Override
+ public ProductLevelDTO get(Long id) {
+ ProductLevel entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ProductLevelDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(ProductLevelDTO dto) {
+ ProductLevel entity = ConvertUtils.sourceToTarget(dto, ProductLevel.class);
+ BaseSupportUtils.setCommonField(entity);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(ProductLevelDTO dto) {
+ ProductLevel entity = ConvertUtils.sourceToTarget(dto, ProductLevel.class);
+ BaseSupportUtils.setUpdateCommonField(entity);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(Long[] ids) {
+ //删除
+ deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public List list() {
+ List list = mapper.list();
+ return list;
+ }
+
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/ScenesServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/ScenesServiceBizImpl.java
new file mode 100644
index 0000000..b420778
--- /dev/null
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/ScenesServiceBizImpl.java
@@ -0,0 +1,90 @@
+package com.cnbm.packing.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.cnbm.admin.utils.BaseSupportUtils;
+import com.cnbm.common.page.PageData;
+import com.cnbm.common.service.impl.CrudServiceImpl;
+import com.cnbm.common.utils.ConvertUtils;
+import com.cnbm.packing.dto.ScenesDTO;
+import com.cnbm.packing.entity.Scenes;
+import com.cnbm.packing.mapper.ScenesMapper;
+import com.cnbm.packing.service.ScenesServiceBiz;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 场景 表
+ *
+ * @author codeGenerator
+ * @since 2023-12-21
+ */
+@Service
+public class ScenesServiceBizImpl extends CrudServiceImpl implements ScenesServiceBiz {
+
+ @Autowired
+ private ScenesMapper mapper;
+
+ @Override
+ public QueryWrapper getWrapper(Map params){
+ String id = (String)params.get("id");
+
+ QueryWrapper wrapper = new QueryWrapper<>();
+ wrapper.eq(StringUtils.isNotBlank(id), "id", id);
+
+ return wrapper;
+ }
+
+ @Override
+ public PageData page (Map params){
+ IPage page = baseDao.selectPage(
+ getPage(params, Scenes.CREATE_TIME, false),
+ getWrapper(params)
+ );
+ return getPageData(page, ScenesDTO.class);
+ }
+
+ @Override
+ public ScenesDTO get(Long id) {
+ Scenes entity = baseDao.selectById(id);
+ return ConvertUtils.sourceToTarget(entity, ScenesDTO.class);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void save(ScenesDTO dto) {
+ Scenes entity = ConvertUtils.sourceToTarget(dto, Scenes.class);
+ BaseSupportUtils.setCommonField(entity);
+ insert(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void update(ScenesDTO dto) {
+ Scenes entity = ConvertUtils.sourceToTarget(dto, Scenes.class);
+ BaseSupportUtils.setUpdateCommonField(entity);
+ updateById(entity);
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void delete(Long[] ids) {
+ //删除
+ deleteBatchIds(Arrays.asList(ids));
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public List list() {
+ List list = mapper.list();
+ return list;
+ }
+
+
+}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java
index e4f19f7..c9970f5 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxServiceBizImpl.java
@@ -140,6 +140,7 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(entity.getBoxNo()), WoPackagingBoxSubstrate.PACKAGING_BOX_ID, entity.getBoxNo());
wrapper.orderByAsc(WoPackagingBoxSubstrate.SLOT);
@@ -249,4 +250,159 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl list) {
+ list.forEach(e -> {
+ matchColor(e);
+ });
+ }
+
+ public void matchColor(WoPackagingBoxDTO dto) {
+ if (dto.getSapMaterial() != null) {
+ String[] sublist = dto.getSapMaterial().split("\\.");
+ if (sublist.length > 2) {
+ switch (sublist[2]) {
+ case "C0001":
+ dto.setColor("暗灰");
+ break;
+ case "C0002":
+ dto.setColor("暗蓝");
+ break;
+ case "C0003":
+ dto.setColor("暗绿");
+ break;
+ case "C0004":
+ dto.setColor("暗黄");
+ break;
+ case "C0005":
+ dto.setColor("暗橘黄");
+ break;
+ case "C0006":
+ dto.setColor("暗红");
+ break;
+ case "C0007":
+ dto.setColor("亮灰");
+ break;
+ case "C0008":
+ dto.setColor("亮蓝");
+ break;
+ case "C0009":
+ dto.setColor("亮绿");
+ break;
+ case "C0010":
+ dto.setColor("亮黄");
+ break;
+ case "C0011":
+ dto.setColor("亮橘黄");
+ break;
+ case "C0012":
+ dto.setColor("亮红");
+ break;
+ case "C0013":
+ dto.setColor("大红");
+ break;
+ case "C0014":
+ dto.setColor("中国红1185");
+ break;
+ case "C0015":
+ dto.setColor("新蓝825");
+ break;
+ case "C0016":
+ dto.setColor("橄榄绿1186");
+ break;
+ case "C0017":
+ dto.setColor("落日黄3726");
+ break;
+ case "C0018":
+ dto.setColor("玛瑙灰4023");
+ break;
+ case "C0019":
+ dto.setColor("中国红PV-748-R115");
+ break;
+ case "C0020":
+ dto.setColor("阳光橙PV-748-0M2");
+ break;
+ case "C0021":
+ dto.setColor("雪花银PV-748-W815");
+ break;
+ case "C0022":
+ dto.setColor("苍穹灰PV-748-GR960");
+ break;
+ case "C0023":
+ dto.setColor("阳光金PV-748-GL6020");
+ break;
+ case "C0024":
+ dto.setColor("锦缎金PV-748-GL920");
+ break;
+ case "C0025":
+ dto.setColor("森林绿PV-748-G830");
+ break;
+ case "C0026":
+ dto.setColor("恒星绿PV-748-G602");
+ break;
+ case "C0027":
+ dto.setColor("天空蓝PV-748-BL60");
+ break;
+ case "C0028":
+ dto.setColor("香芋紫PV-748-BL40");
+ break;
+ case "C0029":
+ dto.setColor("木槿紫PV-748-RZ92");
+ break;
+ case "C0030":
+ dto.setColor("日光红PV-748-R602");
+ break;
+ case "C0031":
+ dto.setColor("天空蓝BM0020");
+ break;
+ case "C0032":
+ dto.setColor("天蓝色BM0101");
+ break;
+ case "C0033":
+ dto.setColor("亮紫");
+ break;
+ case "C0034":
+ dto.setColor("荒漠迷彩");
+ break;
+ case "C0035":
+ dto.setColor("阳光金");
+ break;
+ case "C0036":
+ dto.setColor("天空蓝");
+ break;
+ case "C0037":
+ dto.setColor("翠绿色");
+ break;
+ case "C0038":
+ dto.setColor("苍穹灰");
+ break;
+ case "C0039":
+ dto.setColor("中国红-3");
+ break;
+ case "C0040":
+ dto.setColor("301中国红亮彩");
+ break;
+ case "C0041":
+ dto.setColor("淡金色");
+ break;
+ case "C0042":
+ dto.setColor("土耳其条纹黄玉大理石");
+ break;
+ case "C0043":
+ dto.setColor("意大利伯林顿灰大理石");
+ break;
+ case "C0044":
+ dto.setColor("黑色");
+ break;
+ case "C0045":
+ dto.setColor("50%透光黑色");
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java
index 5a59c21..132a948 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/WoPackagingBoxSubstrateServiceBizImpl.java
@@ -28,6 +28,7 @@ import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
/**
* 包装箱基板关联表
@@ -230,4 +231,154 @@ public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl list) {
+ list.forEach(e -> {
+ if(e.getSapMaterial()!=null){
+ String[] sublist = e.getSapMaterial().split("\\.");
+ if(sublist.length>2) {
+ switch (sublist[2]) {
+ case "C0001":
+ e.setColor("暗灰");
+ break;
+ case "C0002":
+ e.setColor("暗蓝");
+ break;
+ case "C0003":
+ e.setColor("暗绿");
+ break;
+ case "C0004":
+ e.setColor("暗黄");
+ break;
+ case "C0005":
+ e.setColor("暗橘黄");
+ break;
+ case "C0006":
+ e.setColor("暗红");
+ break;
+ case "C0007":
+ e.setColor("亮灰");
+ break;
+ case "C0008":
+ e.setColor("亮蓝");
+ break;
+ case "C0009":
+ e.setColor("亮绿");
+ break;
+ case "C0010":
+ e.setColor("亮黄");
+ break;
+ case "C0011":
+ e.setColor("亮橘黄");
+ break;
+ case "C0012":
+ e.setColor("亮红");
+ break;
+ case "C0013":
+ e.setColor("大红");
+ break;
+ case "C0014":
+ e.setColor("中国红1185");
+ break;
+ case "C0015":
+ e.setColor("新蓝825");
+ break;
+ case "C0016":
+ e.setColor("橄榄绿1186");
+ break;
+ case "C0017":
+ e.setColor("落日黄3726");
+ break;
+ case "C0018":
+ e.setColor("玛瑙灰4023");
+ break;
+ case "C0019":
+ e.setColor("中国红PV-748-R115");
+ break;
+ case "C0020":
+ e.setColor("阳光橙PV-748-0M2");
+ break;
+ case "C0021":
+ e.setColor("雪花银PV-748-W815");
+ break;
+ case "C0022":
+ e.setColor("苍穹灰PV-748-GR960");
+ break;
+ case "C0023":
+ e.setColor("阳光金PV-748-GL6020");
+ break;
+ case "C0024":
+ e.setColor("锦缎金PV-748-GL920");
+ break;
+ case "C0025":
+ e.setColor("森林绿PV-748-G830");
+ break;
+ case "C0026":
+ e.setColor("恒星绿PV-748-G602");
+ break;
+ case "C0027":
+ e.setColor("天空蓝PV-748-BL60");
+ break;
+ case "C0028":
+ e.setColor("香芋紫PV-748-BL40");
+ break;
+ case "C0029":
+ e.setColor("木槿紫PV-748-RZ92");
+ break;
+ case "C0030":
+ e.setColor("日光红PV-748-R602");
+ break;
+ case "C0031":
+ e.setColor("天空蓝BM0020");
+ break;
+ case "C0032":
+ e.setColor("天蓝色BM0101");
+ break;
+ case "C0033":
+ e.setColor("亮紫");
+ break;
+ case "C0034":
+ e.setColor("荒漠迷彩");
+ break;
+ case "C0035":
+ e.setColor("阳光金");
+ break;
+ case "C0036":
+ e.setColor("天空蓝");
+ break;
+ case "C0037":
+ e.setColor("翠绿色");
+ break;
+ case "C0038":
+ e.setColor("苍穹灰");
+ break;
+ case "C0039":
+ e.setColor("中国红-3");
+ break;
+ case "C0040":
+ e.setColor("301中国红亮彩");
+ break;
+ case "C0041":
+ e.setColor("淡金色");
+ break;
+ case "C0042":
+ e.setColor("土耳其条纹黄玉大理石");
+ break;
+ case "C0043":
+ e.setColor("意大利伯林顿灰大理石");
+ break;
+ case "C0044":
+ e.setColor("黑色");
+ break;
+ case "C0045":
+ e.setColor("50%透光黑色");
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ });
+ }
}
\ No newline at end of file
diff --git a/ym-packing/src/main/resources/mapper/ProductLevelMapper.xml b/ym-packing/src/main/resources/mapper/ProductLevelMapper.xml
new file mode 100644
index 0000000..a112e2d
--- /dev/null
+++ b/ym-packing/src/main/resources/mapper/ProductLevelMapper.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ym-packing/src/main/resources/mapper/ScenesMapper.xml b/ym-packing/src/main/resources/mapper/ScenesMapper.xml
new file mode 100644
index 0000000..375fa9f
--- /dev/null
+++ b/ym-packing/src/main/resources/mapper/ScenesMapper.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ym-packing/src/main/resources/mapper/WoCompensationPowerMapper.xml b/ym-packing/src/main/resources/mapper/WoCompensationPowerMapper.xml
index 13641d8..82a08ab 100644
--- a/ym-packing/src/main/resources/mapper/WoCompensationPowerMapper.xml
+++ b/ym-packing/src/main/resources/mapper/WoCompensationPowerMapper.xml
@@ -6,7 +6,7 @@
-
+