From 89e293575d03a9407fe9efcdccd9fd5cd8882b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=89=E7=82=AE?= <15856818120@163.com> Date: Sun, 15 Jun 2025 14:53:00 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E6=9C=BA=E5=85=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/BonusMaterialApplication.java | 4 +- .../ma/controller/TypeRepairController.java | 40 ++++++++++++++ .../bonus/material/ma/domain/TypeRepair.java | 5 ++ .../material/ma/mapper/TypeRepairMapper.java | 30 +++++++--- .../ma/service/ITypeRepairService.java | 32 ++++++++--- .../service/impl/TypeRepairServiceImpl.java | 50 ++++++++++++++--- .../mapper/material/ma/TypeRepairMapper.xml | 55 +++++++++++++++++-- 7 files changed, 188 insertions(+), 28 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java index a11ab80d..91ebd506 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/BonusMaterialApplication.java @@ -10,11 +10,11 @@ import org.springframework.scheduling.annotation.EnableScheduling; /** * 系统模块 - * + * * @author bonus */ @EnableCustomConfig -@EnableCustomSwagger2 +//@EnableCustomSwagger2 @EnableRyFeignClients @SpringBootApplication(scanBasePackages = {"com.bonus.common.biz.*", "com.bonus.material.*"}, exclude = { DataSourceAutoConfiguration.class }) @EnableScheduling diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeRepairController.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeRepairController.java index 132d6578..8bc5aaf1 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeRepairController.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/controller/TypeRepairController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.bonus.common.log.enums.OperaType; import com.bonus.material.common.annotation.PreventRepeatSubmit; +import com.bonus.material.ma.domain.vo.MaTypeVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; @@ -141,4 +142,43 @@ public class TypeRepairController extends BaseController { return toAjax(typeRepairService.deleteTypeRepairByUserIdAndTypeId(typeRepairs)); } + + /** + * 新增人员配置 + */ + @ApiOperation(value = "新增人员配置") + @PreventRepeatSubmit + @RequiresPermissions("ma:manage:add") + @SysLog(title = "新增人员配置", businessType = OperaType.INSERT, module = "仓储管理->新增人员配置") + @PostMapping("/addTypeManage") + public AjaxResult addTypeManage(@RequestBody List typeRepairs) + { + return toAjax(typeRepairService.addTypeManage(typeRepairs)); + } + + /** + * 查询人员配置列表 + */ + @ApiOperation(value = "查询人员配置列表") + @RequiresPermissions("ma:manage:list") + @GetMapping("/getTypeManageList") + public TableDataInfo getTypeManageList(MaTypeVo maTypeVo) + { + startPage(); + List list = typeRepairService.getTypeManageList(maTypeVo); + return getDataTable(list); + } + + /** + * 删除维修班机具配置 + */ + @ApiOperation(value = "删除单个维修班机具配置") + @PreventRepeatSubmit + @RequiresPermissions("ma:manage:remove") + @SysLog(title = "维修班机具配置", businessType = OperaType.DELETE, module = "仓储管理->删除单个维修班机具配置") + @PostMapping("/unbindTypeManage") + public AjaxResult unbindTypeManage(@RequestBody List typeRepairs) + { + return toAjax(typeRepairService.deleteTypeManageByUserIdAndTypeId(typeRepairs)); + } } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeRepair.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeRepair.java index f592840b..3127b383 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeRepair.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/domain/TypeRepair.java @@ -25,6 +25,11 @@ public class TypeRepair extends BaseEntity { /** 类型ID */ private Long typeId; + /** + * 类型名称 + */ + private String typeName; + /** 用户 */ @Excel(name = "用户") @ApiModelProperty(value = "用户") diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeRepairMapper.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeRepairMapper.java index f078e8f5..afd3d5ed 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeRepairMapper.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/mapper/TypeRepairMapper.java @@ -4,18 +4,19 @@ import java.util.List; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.ma.domain.TypeRepair; +import com.bonus.material.ma.domain.vo.MaTypeVo; import org.apache.ibatis.annotations.Param; /** * 维修班机具配置Mapper接口 - * + * * @author xsheng * @date 2024-09-27 */ public interface TypeRepairMapper { /** * 查询维修班机具配置 - * + * * @param ID 维修班机具配置主键 * @return 维修班机具配置 */ @@ -23,7 +24,7 @@ public interface TypeRepairMapper { /** * 查询维修班机具配置列表 - * + * * @param typeRepair 维修班机具配置 * @return 维修班机具配置集合 */ @@ -36,7 +37,7 @@ public interface TypeRepairMapper { /** * 新增维修班机具配置 - * + * * @param typeRepairs 维修班机具配置 * @return 结果 */ @@ -44,7 +45,7 @@ public interface TypeRepairMapper { /** * 修改维修班机具配置 - * + * * @param typeRepair 维修班机具配置 * @return 结果 */ @@ -52,7 +53,7 @@ public interface TypeRepairMapper { /** * 删除维修班机具配置 - * + * * @param ID 维修班机具配置主键 * @return 结果 */ @@ -60,7 +61,7 @@ public interface TypeRepairMapper { /** * 批量删除维修班机具配置 - * + * * @param IDs 需要删除的数据主键集合 * @return 结果 */ @@ -79,4 +80,19 @@ public interface TypeRepairMapper { * @return */ List getRepairList(TypeRepair typeRepair); + + /** + *删除人员配置 + */ + int deleteTypeManageByUserIdAndTypeId(List typeRepairs); + + /** + * 新增人员配置 + */ + int insertTypeManage(List typeRepairs); + + /** + * 查询人员配置列表 + */ + List getTypeManageList(MaTypeVo maTypeVo); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeRepairService.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeRepairService.java index dbc5cabe..02907105 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeRepairService.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/ITypeRepairService.java @@ -4,17 +4,18 @@ import java.util.List; import com.bonus.common.core.web.domain.AjaxResult; import com.bonus.material.ma.domain.TypeRepair; +import com.bonus.material.ma.domain.vo.MaTypeVo; /** * 维修班机具配置Service接口 - * + * * @author xsheng * @date 2024-09-27 */ public interface ITypeRepairService { /** * 查询维修班机具配置 - * + * * @param ID 维修班机具配置主键 * @return 维修班机具配置 */ @@ -22,7 +23,7 @@ public interface ITypeRepairService { /** * 查询维修班机具配置列表 - * + * * @param typeRepair 维修班机具配置 * @return 维修班机具配置集合 */ @@ -35,7 +36,7 @@ public interface ITypeRepairService { /** * 新增维修班机具配置 - * + * * @param typeRepairs 维修班机具配置 * @return 结果 */ @@ -43,7 +44,7 @@ public interface ITypeRepairService { /** * 修改维修班机具配置 - * + * * @param typeRepair 维修班机具配置 * @return 结果 */ @@ -51,7 +52,7 @@ public interface ITypeRepairService { /** * 批量删除维修班机具配置 - * + * * @param IDs 需要删除的维修班机具配置主键集合 * @return 结果 */ @@ -59,7 +60,7 @@ public interface ITypeRepairService { /** * 删除维修班机具配置信息 - * + * * @param ID 维修班机具配置主键 * @return 结果 */ @@ -76,4 +77,21 @@ public interface ITypeRepairService { * @return */ AjaxResult getRepairList(TypeRepair typeRepair); + + /** + * 新增人员配置 + */ + int addTypeManage(List typeRepairs); + + /** + * 查询人员配置列表 + */ + List getTypeManageList(MaTypeVo maTypeVo); + + /** + * 删除维修班机具配置 + * @param typeRepairs + * @return + */ + int deleteTypeManageByUserIdAndTypeId(List typeRepairs); } diff --git a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeRepairServiceImpl.java b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeRepairServiceImpl.java index 495f6f0f..66809567 100644 --- a/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeRepairServiceImpl.java +++ b/bonus-modules/bonus-material/src/main/java/com/bonus/material/ma/service/impl/TypeRepairServiceImpl.java @@ -3,6 +3,7 @@ package com.bonus.material.ma.service.impl; import java.util.List; import com.bonus.common.core.utils.DateUtils; import com.bonus.common.core.web.domain.AjaxResult; +import com.bonus.material.ma.domain.vo.MaTypeVo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.bonus.material.ma.mapper.TypeRepairMapper; @@ -12,7 +13,7 @@ import org.springframework.util.CollectionUtils; /** * 维修班机具配置Service业务层处理 - * + * * @author xsheng * @date 2024-09-27 */ @@ -24,7 +25,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService { /** * 查询维修班机具配置 - * + * * @param ID 维修班机具配置主键 * @return 维修班机具配置 */ @@ -36,7 +37,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService { /** * 查询维修班机具配置列表 - * + * * @param typeRepair 维修班机具配置 * @return 维修班机具配置 */ @@ -58,7 +59,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService { /** * 新增维修班机具配置 - * + * * @param typeRepairs 维修班机具配置 * @return 结果 */ @@ -75,7 +76,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService { /** * 修改维修班机具配置 - * + * * @param typeRepair 维修班机具配置 * @return 结果 */ @@ -88,7 +89,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService { /** * 批量删除维修班机具配置 - * + * * @param IDs 需要删除的维修班机具配置主键 * @return 结果 */ @@ -100,7 +101,7 @@ public class TypeRepairServiceImpl implements ITypeRepairService { /** * 删除维修班机具配置信息 - * + * * @param ID 维修班机具配置主键 * @return 结果 */ @@ -129,4 +130,39 @@ public class TypeRepairServiceImpl implements ITypeRepairService { public AjaxResult getRepairList(TypeRepair typeRepair) { return AjaxResult.success(typeRepairMapper.getRepairList(typeRepair)); } + + /** + * 新增人员配置 + */ + @Override + public int addTypeManage(List typeRepairs) { + if (CollectionUtils.isEmpty(typeRepairs)) { + return 0; + } + typeRepairs.forEach(typeRepair -> typeRepair.setCreateTime(DateUtils.getNowDate())); + typeRepairMapper.deleteTypeManageByUserIdAndTypeId(typeRepairs); + return typeRepairMapper.insertTypeManage(typeRepairs); + } + + /** + * 查询人员配置列表 + */ + @Override + public List getTypeManageList(MaTypeVo maTypeVo) { + + return typeRepairMapper.getTypeManageList(maTypeVo); + + } + + /** + * 删除维修班机具配置 + * @param typeRepairs + * @return + */ + @Override + public int deleteTypeManageByUserIdAndTypeId(List typeRepairs) { + return typeRepairMapper.deleteTypeManageByUserIdAndTypeId(typeRepairs); + } + + } diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeRepairMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeRepairMapper.xml index 48c4fc87..f10f5582 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeRepairMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/ma/TypeRepairMapper.xml @@ -19,17 +19,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into ma_type_repair (type_id,user_id,create_time,update_time,company_id) values @@ -43,6 +43,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ) + + insert into ma_type_manage (type_id,user_id,create_time,update_time,company_id) + values + + ( + #{item.typeId}, + #{item.userId}, + #{item.createTime}, + #{item.updateTime}, + #{item.companyId} + ) + + update ma_type_repair @@ -61,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from ma_type_repair where ID in + delete from ma_type_repair where ID in #{ID} @@ -93,6 +106,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mtk.user_id, su.nick_name + delete from ma_type_repair where @@ -106,4 +139,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item.userId} - \ No newline at end of file + + delete from ma_type_manage where + type_id in + + #{item.typeId} + + and + user_id in + + #{item.userId} + + + From 52f38a5f68ce1b52dcfb30002407972a1fbb78cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=89=E7=82=AE?= <15856818120@163.com> Date: Sun, 15 Jun 2025 15:52:28 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BC=9A=E7=AD=BE=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E4=BC=9A=E7=AD=BE=E9=85=8D=E7=BD=AE=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E8=B4=B9=E7=94=A8=E8=A7=81=E9=9D=A2=E5=AE=A1=E6=89=B9=E6=B5=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=EF=BC=8C=E8=8A=82=E7=82=B9=E5=90=8D=E7=A7=B0?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E6=A1=86=E8=BE=93=E5=85=A5=E5=86=85=E5=AE=B9?= =?UTF-8?q?=E5=90=8E=E7=82=B9=E5=87=BB=E6=90=9C=E7=B4=A2=EF=BC=8C=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=B3=BB=E7=BB=9F=E6=9C=AA=E7=9F=A5=E9=94=99=E8=AF=AF?= =?UTF-8?q?=EF=BC=9B=E7=9B=B4=E8=BD=AC=E5=AE=A1=E6=89=B9=E6=B5=81=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E3=80=81=E9=A2=86=E7=94=A8=E5=AE=A1=E6=89=B9=E6=B5=81?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=B1=BB=E5=90=8C=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/material/work/SysWorkflowNodeMapper.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bonus-modules/bonus-material/src/main/resources/mapper/material/work/SysWorkflowNodeMapper.xml b/bonus-modules/bonus-material/src/main/resources/mapper/material/work/SysWorkflowNodeMapper.xml index 18d5400c..6f4fd9a9 100644 --- a/bonus-modules/bonus-material/src/main/resources/mapper/material/work/SysWorkflowNodeMapper.xml +++ b/bonus-modules/bonus-material/src/main/resources/mapper/material/work/SysWorkflowNodeMapper.xml @@ -63,8 +63,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" from sys_workflow_node swn left join sys_workflow_config sec on swn.id= sec.node_id where swn.type_id=#{typeId} - and type_name like concat('%', #{typeName}, '%') - and node_sign_type = #{nodeSignType} + and swn.node_name like concat('%', #{nodeName}, '%') + and swn.node_sign_type = #{nodeSignType} GROUP BY swn.id ORDER BY swn.node_sort