From 2b0c9ecbe2837007654044a2042b3fd2f1e1b947 Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Mon, 19 Aug 2024 13:19:20 +0800 Subject: [PATCH] move select to material --- .../system/controller/SelectController.java | 126 -------- .../bonus/sgzb/system/domain/SelectDto.java | 34 --- .../bonus/sgzb/system/domain/SelectVo.java | 16 - .../sgzb/system/mapper/SelectMapper.java | 193 ------------ .../sgzb/system/service/SelectService.java | 178 ----------- .../service/impl/SelectServiceImpl.java | 276 ------------------ .../resources/mapper/system/SelectMapper.xml | 218 -------------- 7 files changed, 1041 deletions(-) delete mode 100644 sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SelectController.java delete mode 100644 sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectDto.java delete mode 100644 sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectVo.java delete mode 100644 sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/mapper/SelectMapper.java delete mode 100644 sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/SelectService.java delete mode 100644 sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SelectServiceImpl.java delete mode 100644 sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SelectController.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SelectController.java deleted file mode 100644 index 736c8f6..0000000 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/controller/SelectController.java +++ /dev/null @@ -1,126 +0,0 @@ -//package com.bonus.sgzb.system.controller; -// -//import com.bonus.sgzb.common.core.web.domain.AjaxResult; -//import com.bonus.sgzb.system.domain.SelectDto; -//import com.bonus.sgzb.system.service.SelectService; -//import io.swagger.annotations.ApiOperation; -//import org.springframework.web.bind.annotation.PostMapping; -//import org.springframework.web.bind.annotation.RequestBody; -//import org.springframework.web.bind.annotation.RequestMapping; -//import org.springframework.web.bind.annotation.RestController; -// -//import javax.annotation.Resource; -// -///** -// * @author 10488 -// * 统一下拉选 -// */ -//@RestController -//@RequestMapping("/select/") -//public class SelectController { -// -// @Resource(name = "SelectService") -// private SelectService service; -// -// @ApiOperation(value = "往来单位下拉选") -// @PostMapping("getUnitCbx") -// public AjaxResult getUnitData(@RequestBody SelectDto dto) { -// return service.getUnitData(dto); -// } -// -// @ApiOperation(value = "工程下拉选") -// @PostMapping("getSectionEngineeringCbx") -// public AjaxResult getProData(@RequestBody SelectDto dto) { -// return service.getProData(dto); -// } -// -// @ApiOperation(value = "机具类型下拉选") -// @PostMapping("getMaTypeData") -// public AjaxResult getMaTypeData(@RequestBody SelectDto dto){ -// return service.getMaTypeData(dto); -// } -// -// @ApiOperation(value = "数据字典下拉选") -// @PostMapping("getDictByPidCbx") -// public AjaxResult getDictByPidCbx(@RequestBody SelectDto dto){ -// return service.getDictByPidCbx(dto); -// } -// -// @ApiOperation(value = "单位树/归属部门/所属上级") -// @PostMapping("getDeptTree") -// public AjaxResult getDeptTree(@RequestBody SelectDto dto){ -// return service.getDeptTree(dto); -// } -// -// @ApiOperation(value = "岗位下拉选") -// @PostMapping("getPostCbx") -// public AjaxResult getPostCbx(@RequestBody SelectDto dto){ -// return service.getPostCbx(dto); -// } -// -// @ApiOperation(value = "角色下拉选") -// @PostMapping("getRoleCbx") -// public AjaxResult getRoleCbx(@RequestBody SelectDto dto){ -// return service.getRoleCbx(dto); -// } -// -// @ApiOperation(value = "单位类型下拉选") -// @PostMapping("getUnitTypeCbx") -// public AjaxResult getUnitTypeCbx(@RequestBody SelectDto dto){ -// return service.getUnitTypeCbx(dto); -// } -// -// @ApiOperation(value = "设备类型树") -// @PostMapping("getDeviceTypeTree") -// public AjaxResult getDeviceTypeTree(@RequestBody SelectDto dto){ -// return service.getDeviceTypeTree(dto); -// } -// -// @ApiOperation(value = "资产属性") -// @PostMapping("getAssetAttributesCbx") -// public AjaxResult getAssetAttributesCbx(@RequestBody SelectDto dto){ -// return service.getAssetAttributesCbx(dto); -// } -// -// @ApiOperation(value = "机具厂家") -// @PostMapping("getDeviceFactoryCbx") -// public AjaxResult getDeviceFactoryCbx(@RequestBody SelectDto dto){ -// return service.getDeviceFactoryCbx(dto); -// } -// -// @ApiOperation(value = "工程项目") -// @PostMapping("getProCbx") -// public AjaxResult getProCbx(@RequestBody SelectDto dto){ -// return service.getProCbx(dto); -// } -// -// @ApiOperation(value = "配件所属上级树") -// @PostMapping("getAccessoryTree") -// public AjaxResult getAccessoryTree(){ -// return service.getAccessoryTree(); -// } -// -// @ApiOperation(value = "配件所属上级树") -// @PostMapping("getPartTree") -// public AjaxResult getPartTree(@RequestBody SelectDto dto){ -// return service.getPartTree(dto); -// } -// -// @ApiOperation(value = "货架") -// @PostMapping("getGoodsShelvesCbx") -// public AjaxResult getGoodsShelvesCbx(@RequestBody SelectDto dto){ -// return service.getGoodsShelvesCbx(dto); -// } -// -// @ApiOperation(value = "用户/维修员/库管员/采购员") -// @PostMapping("getUserByRoleIdCbx") -// public AjaxResult getUserByRoleIdCbx(@RequestBody SelectDto dto){ -// return service.getUserByRoleIdCbx(dto); -// } -// -// @ApiOperation(value = "往来单位id和标段工程id获取协议信息") -// @PostMapping("getAgreementInfoById") -// public AjaxResult getAgreementInfoById(@RequestBody SelectDto dto){ -// return service.getAgreementInfoById(dto); -// } -//} diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectDto.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectDto.java deleted file mode 100644 index 400c100..0000000 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectDto.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.bonus.sgzb.system.domain; - -import lombok.Data; - -import java.util.List; - -/** - * @author 10488 - */ -@Data -public class SelectDto { - - /** 参数id*/ - private String id; - - /** 2.物品种类 3.设备类型 4.规格型号*/ - private String type; - - /** 字典表 父类值*/ - private String parentValue; - - /** 层级*/ - private String level; - - /** 角色权限字符串*/ - private String roleKey; - - /** 往来单位id*/ - private int unitId; - - /** 标段工程id*/ - private int projectId; - -} diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectVo.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectVo.java deleted file mode 100644 index 82c7450..0000000 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/domain/SelectVo.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.bonus.sgzb.system.domain; - -import lombok.Data; - -/** - * @author 10488 - */ -@Data -public class SelectVo { - - /** id*/ - private long id; - - /** 名称*/ - private String name; -} diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/mapper/SelectMapper.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/mapper/SelectMapper.java deleted file mode 100644 index 35ffb85..0000000 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/mapper/SelectMapper.java +++ /dev/null @@ -1,193 +0,0 @@ -package com.bonus.sgzb.system.mapper; - -import com.bonus.sgzb.system.domain.AgreementVo; -import com.bonus.sgzb.system.domain.SelectDto; -import com.bonus.sgzb.system.domain.SelectVo; -import com.bonus.sgzb.system.domain.TreeNode; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @author 10488 - * 统一下拉选 - */ -@Repository("SelectMapper") -public interface SelectMapper { - /** - * 往来单位下拉选 - * @param dto - * @return List - * @description 往来单位 - * @author cwchen - * @date 2023/12/20 14:23 - */ - List getUnitData(SelectDto dto); - - /** - * 工程下拉选 - * @param dto - * @return List - * @description 工程 - * @author cwchen - * @date 2023/12/20 15:05 - */ - List getProData(SelectDto dto); - - /** - * 机具类型下拉选 - * @param dto - * @return List - * @description 机具类型 - * @author cwchen - * @date 2023/12/20 16:02 - */ - List getMaTypeData(SelectDto dto); - - /** - * 数据字典下拉选 - * @param dto - * @return List - * @description 数据字典下拉选 - * @author cwchen - * @date 2023/12/20 16:23 - */ - List getDictByPidCbx(SelectDto dto); - - /** - * 单位树/归属部门/所属上级 - * @param dto - * @return List - * @description 单位树/归属部门/所属上级 - * @author cwchen - * @date 2023/12/20 17:10 - */ - List getDeptTree(SelectDto dto); - - /** - * 岗位下拉选 - * @param dto - * @return List - * @description 岗位下拉选 - * @author cwchen - * @date 2023/12/20 17:50 - */ - List getPostCbx(SelectDto dto); - - /** - * 角色下拉选 - * @param dto - * @return List - * @description 角色下拉选 - * @author cwchen - * @date 2023/12/20 17:56 - */ - List getRoleCbx(SelectDto dto); - - /** - * 单位类型下拉选 - * @param dto - * @return List - * @description 单位类型下拉选 - * @author cwchen - * @date 2023/12/20 18:01 - */ - List getUnitTypeCbx(SelectDto dto); - - /** - * 设备类型树 - * @param dto - * @return List - * @description 设备类型树 - * @author cwchen - * @date 2023/12/20 18:15 - */ - List getDeviceTypeTree(SelectDto dto); - - /** - * 资产属性 - * @param dto - * @return List - * @description 资产属性 - * @author cwchen - * @date 2023/12/20 19:48 - */ - List getAssetAttributesCbx(SelectDto dto); - - /** - * 机具厂家 - * @param dto - * @return List - * @description 机具厂家 - * @author cwchen - * @date 2023/12/20 19:57 - */ - List getDeviceFactoryCbx(SelectDto dto); - - /** - * 工程项目 - * @param dto - * @return List - * @description 工程项目 - * @author cwchen - * @date 2023/12/20 20:01 - */ - List getProCbx(SelectDto dto); - - /** - * 配件所属上级树 - * @param - * @return List - * @description 配件所属上级树 - * @author cwchen - * @date 2023/12/20 20:26 - */ - List getAccessoryTree(); - - /** - * 货架 - * @param dto - * @return List - * @description 货架 - * @author cwchen - * @date 2023/12/20 20:36 - */ - List getGoodsShelvesCbx(SelectDto dto); - - /** - * 用户/维修员/库管员/采购员-下拉选 - * @param dto - * @return List - * @description 用户/维修员/库管员/采购员-下拉选 - * @author cwchen - * @date 2023/12/20 20:54 - */ - List getUserByRoleIdCbxSelect(SelectDto dto); - - /** - * 用户/维修员/库管员/采购员-树 - * @param dto - * @return List - * @description 用户/维修员/库管员/采购员-树 - * @author cwchen - * @date 2023/12/20 21:02 - */ - List getUserByRoleIdCbxTree(SelectDto dto); - - /** - * 往来单位id和标段工程id获取协议信息 - * @param dto - * @return AgreementVo - * @description 往来单位id和标段工程id获取协议信息 - * @author cwchen - * @date 2023/12/21 10:53 - */ - List getAgreementInfoById(SelectDto dto); - - /** - * 配件所属上级树 - * @param dto - * @return List - */ - List getPartTree(SelectDto dto); -} diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/SelectService.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/SelectService.java deleted file mode 100644 index 1ad1ec7..0000000 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/SelectService.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.bonus.sgzb.system.service; - -import com.bonus.sgzb.common.core.web.domain.AjaxResult; -import com.bonus.sgzb.system.domain.SelectDto; - -/** - * @author 10488 - * 统一下拉选 - */ -public interface SelectService { - - /** - * 往来单位 - * @param dto - * @return AjaxResult - * @description 往来单位 - * @author cwchen - * @date 2023/12/20 14:20 - */ - AjaxResult getUnitData(SelectDto dto); - - /** - * 工程 - * @param dto - * @return AjaxResult - * @description 工程 - * @author cwchen - * @date 2023/12/20 15:04 - */ - AjaxResult getProData(SelectDto dto); - - /** - * 机具类型 - * @param dto - * @return AjaxResult - * @description 机具类型 - * @author cwchen - * @date 2023/12/20 16:02 - */ - AjaxResult getMaTypeData(SelectDto dto); - - /** - * 数据字典下拉选 - * @param dto - * @return AjaxResult - * @description 数据字典下拉选 - * @author cwchen - * @date 2023/12/20 16:22 - */ - AjaxResult getDictByPidCbx(SelectDto dto); - - /** - * 单位树/归属部门/所属上级 - * @param dto - * @return AjaxResult - * @description 单位树/归属部门/所属上级 - * @author cwchen - * @date 2023/12/20 16:36 - */ - AjaxResult getDeptTree(SelectDto dto); - - /** - * 岗位下拉树 - * @param dto - * @return AjaxResult - * @description 岗位下拉树 - * @author cwchen - * @date 2023/12/20 17:45 - */ - AjaxResult getPostCbx(SelectDto dto); - - /** - * 角色下拉选 - * @param dto - * @return AjaxResult - * @description 角色下拉选 - * @author cwchen - * @date 2023/12/20 17:56 - */ - AjaxResult getRoleCbx(SelectDto dto); - - /** - * 单位类型下拉选 - * @param dto - * @return AjaxResult - * @description 单位类型下拉选 - * @author cwchen - * @date 2023/12/20 18:00 - */ - AjaxResult getUnitTypeCbx(SelectDto dto); - - /** - * 设备类型树 - * @param dto - * @return AjaxResult - * @description 设备类型树 - * @author cwchen - * @date 2023/12/20 18:14 - */ - AjaxResult getDeviceTypeTree(SelectDto dto); - - /** - * 资产属性 - * @param dto - * @return AjaxResult - * @description 资产属性 - * @author cwchen - * @date 2023/12/20 19:47 - */ - AjaxResult getAssetAttributesCbx(SelectDto dto); - - /** - * 机具厂家 - * @param dto - * @return AjaxResult - * @description 机具厂家 - * @author cwchen - * @date 2023/12/20 19:56 - */ - AjaxResult getDeviceFactoryCbx(SelectDto dto); - - /** - * 工程项目 - * @param dto - * @return AjaxResult - * @description 工程项目 - * @author cwchen - * @date 2023/12/20 20:01 - */ - AjaxResult getProCbx(SelectDto dto); - - /** - * 配件所属上级树 - * @param - * @return AjaxResult - * @description 配件所属上级树 - * @author cwchen - * @date 2023/12/20 20:25 - */ - AjaxResult getAccessoryTree(); - - /** - * 货架 - * @param dto - * @return AjaxResult - * @description 货架 - * @author cwchen - * @date 2023/12/20 20:36 - */ - AjaxResult getGoodsShelvesCbx(SelectDto dto); - - /** - * 用户/维修员/库管员/采购员 - * @param dto - * @return AjaxResult - * @description 用户/维修员/库管员/采购员 - * @author cwchen - * @date 2023/12/20 20:48 - */ - AjaxResult getUserByRoleIdCbx(SelectDto dto); - - /** - * 往来单位id和标段工程id获取协议信息 - * @param dto - * @return AjaxResult - * @description 往来单位id和标段工程id获取协议信息 - * @author cwchen - * @date 2023/12/21 10:47 - */ - AjaxResult getAgreementInfoById(SelectDto dto); - - /** - * 配件所属上级树 - * @param dto - * @return AjaxResult - */ - AjaxResult getPartTree(SelectDto dto); -} diff --git a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SelectServiceImpl.java b/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SelectServiceImpl.java deleted file mode 100644 index 48f4174..0000000 --- a/sgzb-modules/sgzb-system/src/main/java/com/bonus/sgzb/system/service/impl/SelectServiceImpl.java +++ /dev/null @@ -1,276 +0,0 @@ -package com.bonus.sgzb.system.service.impl; - -import cn.hutool.core.collection.CollUtil; -import com.bonus.sgzb.common.core.utils.GlobalConstants; -import com.bonus.sgzb.common.core.web.domain.AjaxResult; -import com.bonus.sgzb.system.domain.AgreementVo; -import com.bonus.sgzb.system.domain.SelectDto; -import com.bonus.sgzb.system.domain.SelectVo; -import com.bonus.sgzb.system.domain.TreeNode; -import com.bonus.sgzb.system.mapper.SelectMapper; -import com.bonus.sgzb.system.service.SelectService; -import com.bonus.sgzb.system.util.TreeBuild; -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.collections4.CollectionUtils; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; -import java.util.Objects; - -/** - * @author 10488 - * 统一下拉选 - */ -@Service("SelectService") -@Slf4j -public class SelectServiceImpl implements SelectService { - - @Resource(name = "SelectMapper") - private SelectMapper mapper; - - @Override - public AjaxResult getUnitData(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getUnitData(dto); - } catch (Exception e) { - log.error("往来单位-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getProData(SelectDto dto) { - try { - List list = mapper.getProData(dto); - list.removeIf(item -> item == null); - return AjaxResult.success(list); - } catch (Exception e) { - log.error("工程-查询失败", e); - } - return AjaxResult.success(); - } - - @Override - public AjaxResult getMaTypeData(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getMaTypeData(dto); - } catch (Exception e) { - log.error("机具类型-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getDictByPidCbx(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getDictByPidCbx(dto); - } catch (Exception e) { - log.error("数据字典-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getDeptTree(SelectDto dto) { - List groupList = new ArrayList<>(); - List list = new ArrayList<>(); - try { - list = mapper.getDeptTree(dto); - if (CollectionUtils.isNotEmpty(list)) { - // 创建树形结构(数据集合作为参数) - TreeBuild treeBuild = new TreeBuild(list); - // 原查询结果转换树形结构 - groupList = treeBuild.buildTree(); - } - } catch (Exception e) { - log.error("单位树/归属部门/所属上级-查询失败", e); - } - return AjaxResult.success(groupList); - } - - @Override - public AjaxResult getPostCbx(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getPostCbx(dto); - } catch (Exception e) { - log.error("岗位下拉选-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getRoleCbx(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getRoleCbx(dto); - } catch (Exception e) { - log.error("角色下拉选-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getUnitTypeCbx(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getUnitTypeCbx(dto); - } catch (Exception e) { - log.error("单位类型下拉选-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getDeviceTypeTree(SelectDto dto) { - List groupList = new ArrayList<>(); - List list = new ArrayList<>(); - try { - list = mapper.getDeviceTypeTree(dto); - if (CollectionUtils.isNotEmpty(list)) { - // 创建树形结构(数据集合作为参数) - TreeBuild treeBuild = new TreeBuild(list); - // 原查询结果转换树形结构 - groupList = treeBuild.buildTree(); - } - } catch (Exception e) { - log.error("单位树/归属部门/所属上级-查询失败", e); - } - return AjaxResult.success(groupList); - } - - @Override - public AjaxResult getAssetAttributesCbx(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getAssetAttributesCbx(dto); - } catch (Exception e) { - log.error("资产属性-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getDeviceFactoryCbx(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getDeviceFactoryCbx(dto); - } catch (Exception e) { - log.error("机具厂家-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getProCbx(SelectDto dto) { - List list = new ArrayList<>(); - try { - list = mapper.getProCbx(dto); - } catch (Exception e) { - log.error("工程项目-查询失败", e); - } - return AjaxResult.success(list); - } - - @Override - public AjaxResult getAccessoryTree() { - List groupList = new ArrayList<>(); - List list = new ArrayList<>(); - try { - list = mapper.getAccessoryTree(); - if (CollectionUtils.isNotEmpty(list)) { - // 创建树形结构(数据集合作为参数) - TreeBuild treeBuild = new TreeBuild(list); - // 原查询结果转换树形结构 - groupList = treeBuild.buildTree(); - } - } catch (Exception e) { - log.error("配件所属上级树-查询失败", e); - } - return AjaxResult.success(groupList); - } - - @Override - public AjaxResult getPartTree(SelectDto dto) { - List groupList = new ArrayList<>(); - List list = new ArrayList<>(); - try { - list = mapper.getPartTree(dto); - if (CollectionUtils.isNotEmpty(list)) { - // 创建树形结构(数据集合作为参数) - TreeBuild treeBuild = new TreeBuild(list); - // 原查询结果转换树形结构 - groupList = treeBuild.buildTree(); - } - } catch (Exception e) { - log.error("配件所属上级树-查询失败", e); - } - return AjaxResult.success(groupList); - } - - @Override - public AjaxResult getGoodsShelvesCbx(SelectDto dto) { - List groupList = new ArrayList<>(); - List list = new ArrayList<>(); - try { - list = mapper.getGoodsShelvesCbx(dto); - if (CollectionUtils.isNotEmpty(list)) { - // 创建树形结构(数据集合作为参数) - TreeBuild treeBuild = new TreeBuild(list); - // 原查询结果转换树形结构 - groupList = treeBuild.buildTree(); - } - } catch (Exception e) { - log.error("货架-查询失败", e); - } - return AjaxResult.success(groupList); - } - - @Override - public AjaxResult getUserByRoleIdCbx(SelectDto dto) { - try { - if (Objects.equals(GlobalConstants.STRING_1, dto.getType())) { - // 用户/维修员/库管员/采购员-下拉选 - List list = new ArrayList<>(); - list = mapper.getUserByRoleIdCbxSelect(dto); - return AjaxResult.success(list); - } else if (Objects.equals(GlobalConstants.STRING_2, dto.getType())) { - List groupList = new ArrayList<>(); - List list = new ArrayList<>(); - // 用户/维修员/库管员/采购员-树 - list = mapper.getUserByRoleIdCbxTree(dto); - if (CollectionUtils.isNotEmpty(list)) { - // 创建树形结构(数据集合作为参数) - TreeBuild treeBuild = new TreeBuild(list); - // 原查询结果转换树形结构 - groupList = treeBuild.buildTree(); - } - return AjaxResult.success(groupList); - } - } catch (Exception e) { - log.error("用户/维修员/库管员/采购员-查询失败", e); - } - return AjaxResult.success(null); - } - - @Override - public AjaxResult getAgreementInfoById(SelectDto dto) { - AgreementVo vo = new AgreementVo(); - try { - List list = mapper.getAgreementInfoById(dto); - if (CollectionUtils.isNotEmpty(list)) { - vo = list.get(0); - } - } catch (Exception e) { - log.error("往来单位id和标段工程id获取协议信息", e); - } - return AjaxResult.success(vo); - } - - -} diff --git a/sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml b/sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml deleted file mode 100644 index a7fb866..0000000 --- a/sgzb-modules/sgzb-system/src/main/resources/mapper/system/SelectMapper.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file