From 4e932a09fd32c6178a1c5d218f79e5beca9a9118 Mon Sep 17 00:00:00 2001
From: yanyang
Date: Wed, 8 Mar 2023 10:42:33 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=8B=E5=8A=A8=E8=A3=85=E7=AE=B1?=
=?UTF-8?q?=E7=BC=96=E8=BE=91=E5=88=A4=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../controller/WoPackagingBoxController.java | 11 ++++++++
.../service/WoPackagingBoxServiceBiz.java | 2 ++
.../impl/WoPackagingBoxServiceBizImpl.java | 27 +++++++++++++++++++
3 files changed, 40 insertions(+)
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 5b3cbd0..0e1327f 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
@@ -168,4 +168,15 @@ public class WoPackagingBoxController {
}
+ @PostMapping("editSubstrateManual")
+ @ApiOperation("手动编辑包装箱")
+ @LogOperation("手动编辑包装箱")
+ public Result editSubstrateManual(@RequestBody WoPackagingBoxDTO dto){
+
+ woPackagingBoxService.editSubstrateManual(dto);
+
+ return new Result();
+
+ }
+
}
\ 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 3d43e33..10f0106 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
@@ -42,6 +42,8 @@ public interface WoPackagingBoxServiceBiz extends CrudService substrateList = dto.getSubstrateList();
+ for(WoPackagingBoxSubstrate substrate : substrateList){
+ //新增:id为空 模组非空
+ if(ObjectUtils.isEmpty(substrate.getId()) && StringUtils.isNotBlank(substrate.getWoSubstrateId())) {
+ substrate.setPackagingBoxId(dto.getBoxNo());
+ substrate.setPowerLevel(dto.getPowerLevel());
+ substrate.setSapMaterial(dto.getSapMaterial());
+ substrate.setLineBody(dto.getLineBody());
+ BaseSupportUtils.setCommonField(substrate);
+ woPackagingBoxSubstrateServiceBiz.insert(substrate);
+ }
+ //编辑:id非空 模组非空
+ if(ObjectUtils.isNotEmpty(substrate.getId()) && StringUtils.isNotBlank(substrate.getWoSubstrateId())) {
+ BaseSupportUtils.setUpdateCommonField(substrate);
+ woPackagingBoxSubstrateServiceBiz.updateById(substrate);
+ }
+ //删除:id非空 模组为空
+ if(ObjectUtils.isNotEmpty(substrate.getId()) && StringUtils.isBlank(substrate.getWoSubstrateId())) {
+ woPackagingBoxSubstrateServiceBiz.deleteById(substrate.getId());
+ }
+ }
+ }
+
@Override
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
From 5f5a60eb298135e7ed534d1408b47d63a4361167 Mon Sep 17 00:00:00 2001
From: yanyang
Date: Wed, 8 Mar 2023 11:30:02 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=89=93=E5=8D=B0=E6=A8=A1=E6=9D=BFisEnabl?=
=?UTF-8?q?e?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../code/controller/PrintModelController.java | 2 +-
.../com/cnbm/generator/code/dto/PrintModelDTO.java | 5 ++++-
.../com/cnbm/generator/code/entity/PrintModel.java | 7 ++++++-
.../cnbm/generator/code/excel/PrintModelExcel.java | 4 +++-
.../cnbm/generator/code/mapper/PrintModelMapper.java | 2 +-
.../cnbm/generator/code/mapper/PrintModelMapper.xml | 1 +
.../cnbm/generator/code/mysql/PrintModelmysql.sql | 12 ++++++------
.../generator/code/service/PrintModelServiceBiz.java | 2 +-
.../code/service/impl/PrintModelServiceBizImpl.java | 2 +-
.../packing/controller/PrintModelController.java | 2 +-
.../java/com/cnbm/packing/dto/PrintModelDTO.java | 3 +++
.../java/com/cnbm/packing/entity/PrintModel.java | 5 +++++
.../java/com/cnbm/packing/excel/PrintModelExcel.java | 2 ++
.../service/impl/PrintModelServiceBizImpl.java | 6 +++---
.../src/main/resources/mapper/PrintModleMapper.xml | 1 +
15 files changed, 39 insertions(+), 17 deletions(-)
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 804f2a2..e4c75f6 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-02-20
+ * @since 2023-03-08
*/
@RestController
@RequestMapping("/code/printModel")
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 7f77aa0..c851574 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-02-20
+ * @since 2023-03-08
*/
@Data
@ApiModel(value = "打印标签模板表DTO对象")
@@ -77,4 +77,7 @@ public class PrintModelDTO implements Serializable {
@ApiModelProperty(value = "线体,1=F ; 2=S (用于过程1比对,和包装打印)(设备传给我们的)")
private Integer lineBody;
+ @ApiModelProperty(value = "是否启用,0 停用;1 启用")
+ private Integer isEnable;
+
}
\ 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 58df496..08ee5a0 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-02-20
+ * @since 2023-03-08
*/
@Data
@TableName("t_print_model")
@@ -78,6 +78,9 @@ public class PrintModel implements Serializable {
@ApiModelProperty("线体,1=F ; 2=S (用于过程1比对,和包装打印)(设备传给我们的)")
private Integer lineBody;
+ @ApiModelProperty("是否启用,0 停用;1 启用")
+ private Integer isEnable;
+
public static final String ID = "ID";
@@ -115,4 +118,6 @@ public class PrintModel implements Serializable {
public static final String LINE_BODY = "line_body";
+ public static final String IS_ENABLE = "is_enable";
+
}
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 77d623d..08e14fa 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-02-20
+ * @since 2023-03-08
*/
@Data
public class PrintModelExcel {
@@ -52,5 +52,7 @@ public class PrintModelExcel {
private String content;
@Excel(name = "线体,1=F ; 2=S (用于过程1比对,和包装打印)(设备传给我们的)")
private Integer lineBody;
+ @Excel(name = "是否启用,0 停用;1 启用")
+ private Integer isEnable;
}
\ 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 92a6750..08acd83 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-02-20
+ * @since 2023-03-08
*/
@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 8092e8a..ef46269 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
@@ -20,6 +20,7 @@
+
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 ca99f9c..f3c5ea2 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 (1627506543435272194, 1067246875800000035, '打印标签模板表', 'packing/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 (1627506543435272195, 1627506543435272194, '查看', NULL, 'packing:printModel:page,packing: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 (1627506543435272196, 1627506543435272194, '新增', NULL, 'packing: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 (1627506543435272197, 1627506543435272194, '修改', NULL, 'packing: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 (1627506543435272198, 1627506543435272194, '删除', NULL, 'packing: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 (1627506543435272199, 1627506543435272194, '导出', NULL, 'packing: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 (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());
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 94f931e..22c27f5 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-02-20
+ * @since 2023-03-08
*/
public interface PrintModelServiceBiz extends CrudService {
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 68291b6..df5fb7b 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-02-20
+ * @since 2023-03-08
*/
@Service
public class PrintModelServiceBizImpl extends CrudServiceImpl implements PrintModelServiceBiz {
diff --git a/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java b/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java
index 97782ea..a190fb9 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/controller/PrintModelController.java
@@ -50,7 +50,7 @@ public class PrintModelController {
@ApiImplicitParam(name = "name", value = "标签名称", paramType = "query", dataTypeClass = String.class),
@ApiImplicitParam(name = "type", value = "类型,0:模组标签,1:等级标签", paramType = "query", dataTypeClass = Integer.class),
@ApiImplicitParam(name = "lineBody", value = "线体,1=F ; 2=S", paramType = "query", dataTypeClass = Integer.class),
- @ApiImplicitParam(name = "enabled", value = "启用状态:0 、停用,1、启用", paramType = "query", dataTypeClass = Integer.class)
+ @ApiImplicitParam(name = "isEnable", value = "启用状态:0 、停用,1、启用", paramType = "query", dataTypeClass = Integer.class)
})
@PreAuthorize("@ex.hasAuthority('packing:printModel:page')")
public Result> page(@ApiIgnore @RequestParam Map params){
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 03ee07d..f1ff254 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
@@ -77,4 +77,7 @@ public class PrintModelDTO implements Serializable {
@ApiModelProperty(value = "线体,1=F ; 2=S (用于过程1比对,和包装打印)(设备传给我们的)")
private Integer lineBody;
+ @ApiModelProperty(value = "是否启用,0 停用;1 启用")
+ private Integer isEnable;
+
}
\ 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 d061943..94fdec2 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
@@ -78,6 +78,9 @@ public class PrintModel implements Serializable {
@ApiModelProperty("线体,1=F ; 2=S (用于过程1比对,和包装打印)(设备传给我们的)")
private Integer lineBody;
+ @ApiModelProperty("是否启用,0 停用;1 启用")
+ private Integer isEnable;
+
public static final String ID = "ID";
@@ -115,4 +118,6 @@ public class PrintModel implements Serializable {
public static final String LINE_BODY = "line_body";
+ public static final String IS_ENABLE = "is_enable";
+
}
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 23bf461..97bd3cc 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
@@ -52,5 +52,7 @@ public class PrintModelExcel {
private String content;
@Excel(name = "线体,1=F ; 2=S (用于过程1比对,和包装打印)(设备传给我们的)")
private Integer lineBody;
+ @Excel(name = "是否启用,0 停用;1 启用")
+ private Integer isEnable;
}
\ No newline at end of file
diff --git a/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java b/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java
index b431b97..1d02586 100644
--- a/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java
+++ b/ym-packing/src/main/java/com/cnbm/packing/service/impl/PrintModelServiceBizImpl.java
@@ -47,9 +47,9 @@ public class PrintModelServiceBizImpl extends CrudServiceImpl
+