From 121ea59bd03f7dfc049bf10ac616313930a22ec0 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 29 Jul 2022 14:10:18 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AE=A2=E6=88=B7id=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/PowerAxisStructController.java | 4 ++-- .../controller/PowerAxisTagController.java | 4 ++-- .../modules/axis/dao/PowerAxisStructDao.java | 16 +++++++++++----- .../modules/axis/dao/PowerAxisTagDao.java | 2 +- .../axis/service/PowerAxisStructService.java | 5 +++-- .../axis/service/PowerAxisTagService.java | 5 +++-- .../impl/PowerAxisStructServiceImpl.java | 18 +++++++++++------- .../service/impl/PowerAxisTagServiceImpl.java | 5 +++-- .../mapper/poweraxis/PowerAxisStructDao.xml | 7 +++++++ .../mapper/poweraxis/PowerAxisTagDao.xml | 7 ++++++- 10 files changed, 49 insertions(+), 24 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java index c65f523..4750289 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java @@ -46,8 +46,8 @@ public class PowerAxisStructController { private PowerAxisStructService powerAxisStructService; @RequestMapping("page") - public Result> page(@RequestParam Map params) { - PageData page = powerAxisStructService.page(params); + public Result> page(@LoginUser TokenDto tokenDto,@RequestParam Map params) { + PageData page = powerAxisStructService.page(tokenDto,params); return new Result>().ok(page); } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisTagController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisTagController.java index 38379a3..998bdac 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisTagController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisTagController.java @@ -102,8 +102,8 @@ public class PowerAxisTagController { * @date 2022/4/19/0019 9:24 */ @PostMapping("listSimpleAll") - public Result> listSimpleAll() { - return new Result().ok(powerAxisTagService.listSimpleAll()); + public Result> listSimpleAll(@LoginUser TokenDto tokenDto) { + return new Result().ok(powerAxisTagService.listSimpleAll(tokenDto)); } } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java index d4831d5..ebb2b86 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java @@ -3,8 +3,14 @@ package com.epmet.plugin.power.modules.axis.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; -import com.epmet.plugin.power.dto.axis.form.*; -import com.epmet.plugin.power.dto.axis.result.*; +import com.epmet.plugin.power.dto.axis.form.PowerAxisListPositionFormDTO; +import com.epmet.plugin.power.dto.axis.form.PowerAxisStructFormDTO; +import com.epmet.plugin.power.dto.axis.form.PowerAxisStructLeaderFormDTO; +import com.epmet.plugin.power.dto.axis.form.PowerAxisStructStructTreeFormDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisListPositionResultDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisStructLeaderResultDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisStructResultDTO; +import com.epmet.plugin.power.dto.axis.result.PowerAxisStructTreeResultDTO; import com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -12,8 +18,6 @@ import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; -import java.util.List; - /** * 动力主轴结构 * @@ -125,4 +129,6 @@ public interface PowerAxisStructDao extends BaseDao { String getRootAxisStructId(@Param("customerId") String customerId, @Param("agencyId") String agencyId, @Param("structLevel") int structLevel); -} \ No newline at end of file + + List getPageList(Map params); +} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java index babc8bd..b4116c7 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java @@ -25,7 +25,7 @@ public interface PowerAxisTagDao extends BaseDao { * @author work@yujt.net.cn * @date 2022/4/19/0019 9:14 */ - List listSimpleAll(); + List listSimpleAll(@Param("customerId") String customerId); /** * 根据ID查询节点等级 diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java index 557dd09..d2c71f0 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java @@ -3,6 +3,7 @@ package com.epmet.plugin.power.modules.axis.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; import com.epmet.plugin.power.dto.axis.form.*; import com.epmet.plugin.power.dto.axis.result.*; @@ -27,7 +28,7 @@ public interface PowerAxisStructService extends BaseService page(Map params); + PageData page(TokenDto tokenDto,Map params); /** * 默认查询 @@ -165,4 +166,4 @@ public interface PowerAxisStructService extends BaseService { * @author work@yujt.net.cn * @date 2022/4/19/0019 9:23 */ - List listSimpleAll(); + List listSimpleAll(TokenDto tokenDto); /** * 根据标签编码,查询节点级别 @@ -121,4 +122,4 @@ public interface PowerAxisTagService extends BaseService { * @date 2022/4/23/0023 15:51 */ Integer selectStructLevelById(String customerId, String tagCategory, String axisStructId); -} \ No newline at end of file +} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java index 124529c..6ceb724 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java @@ -2,7 +2,6 @@ package com.epmet.plugin.power.modules.axis.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; - import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; @@ -12,6 +11,7 @@ import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.TreeUtils; @@ -53,12 +53,16 @@ public class PowerAxisStructServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, PowerAxisStructDTO.class); + public PageData page(TokenDto tokenDto,Map params) { +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, false), +// getWrapper(params) +// ); +// return getPageData(page, PowerAxisStructDTO.class); + params.put("customerId", tokenDto.getCustomerId()); + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); } @Override diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java index a7d0b14..d659a2c 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java @@ -10,6 +10,7 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.plugin.power.dto.axis.PowerAxisTagDTO; @@ -116,8 +117,8 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl listSimpleAll() { - return baseDao.listSimpleAll(); + public List listSimpleAll(TokenDto tokenDto) { + return baseDao.listSimpleAll(tokenDto.getCustomerId()); } @Override diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml index 8be24a9..689ec0f 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml @@ -257,6 +257,13 @@ AND s.DEL_FLAG = '0' AND t.STRUCT_LEVEL = #{structLevel} + diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml index 27034ee..721ab2b 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml @@ -29,7 +29,12 @@ - - - diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml index 721ab2b..fa32864 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml @@ -58,6 +58,13 @@ AND CUSTOMER_ID = #{customerId} order by STRUCT_LEVEL,CREATED_TIME DESC + From 3dccab567f8b7a1245cde69cc8237fbbd6502a17 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 29 Jul 2022 14:38:10 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A2=E6=88=B7id=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/PowerAxisStructLeaderFormDTO.java | 8 ++++++-- .../controller/PowerAxisStructController.java | 1 + .../mapper/poweraxis/PowerAxisStructDao.xml | 19 ++++++++++--------- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java index b71d1db..64a51cf 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java @@ -3,7 +3,6 @@ package com.epmet.plugin.power.dto.axis.form; import lombok.Data; import java.io.Serializable; -import java.util.Date; /** @@ -32,5 +31,10 @@ public class PowerAxisStructLeaderFormDTO implements Serializable { */ private String leaderName; + /** + * 客户id + */ + private String customerId; + -} \ No newline at end of file +} diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java index c65f523..83cef7c 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java @@ -108,6 +108,7 @@ public class PowerAxisStructController { formDto.setAgencyId(staffInfo.getAgencyId()); } } + formDto.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(powerAxisStructService.selectAllForTree(formDto)); } diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml index df22c24..2948e57 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml @@ -51,15 +51,16 @@ left join pli_power_axis_leader l on l.ID = sl.LEADER_ID and l.del_flag = '0' left join pli_power_axis_tag t on s.CATEGORY_CODE = t.CATEGORY_CODE and t.DEL_FLAG = '0' where s.DEL_FLAG = '0' - - and s.AGENCY_ID = #{agencyId} - - - and s.NAME like '%${axisName}%' - - - and l.NAME like '%${leaderName}%' - + and s.CUSTOMER_ID = #{customerId} + + and s.AGENCY_ID = #{agencyId} + + + and s.NAME like '%${axisName}%' + + + and l.NAME like '%${leaderName}%' + order by s.sort,s.CREATED_TIME,l.CREATED_TIME From 4859ea4de00c238f90be6cb9dfd2baa3dc7502b5 Mon Sep 17 00:00:00 2001 From: Jackwang Date: Fri, 29 Jul 2022 14:43:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=A0=91=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=AE=A2=E6=88=B7id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/poweraxis/PowerAxisStructDao.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml index 2948e57..9094c59 100644 --- a/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml +++ b/epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml @@ -47,9 +47,9 @@ l.MOBILE as LEADER_MOBILE, t.STRUCT_LEVEL from pli_power_axis_struct s - left join pli_power_axis_struct_leader sl on s.ID = sl.STRUCT_REFERENCE_ID and sl.del_flag = '0' - left join pli_power_axis_leader l on l.ID = sl.LEADER_ID and l.del_flag = '0' - left join pli_power_axis_tag t on s.CATEGORY_CODE = t.CATEGORY_CODE and t.DEL_FLAG = '0' + left join pli_power_axis_struct_leader sl on s.ID = sl.STRUCT_REFERENCE_ID and sl.del_flag = '0' and sl.CUSTOMER_ID = #{customerId} + left join pli_power_axis_leader l on l.ID = sl.LEADER_ID and l.del_flag = '0' and l.CUSTOMER_ID = #{customerId} + left join pli_power_axis_tag t on s.CATEGORY_CODE = t.CATEGORY_CODE and t.DEL_FLAG = '0' and t.CUSTOMER_ID = #{customerId} where s.DEL_FLAG = '0' and s.CUSTOMER_ID = #{customerId} From 71b48d9cd3d28f0cd9b3f933e9a7ef6903c0d9fc Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 4 Aug 2022 14:54:12 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E9=95=9C=E5=83=8F?= =?UTF-8?q?=E5=8F=91=E5=B8=83=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pom.xml b/pom.xml index 8061615..1fd9656 100644 --- a/pom.xml +++ b/pom.xml @@ -118,5 +118,11 @@ + + + epmet + https://nexus.elinkservice.cn/repository/maven-releases/ + +