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/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..aaa1d95 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 @@ -38,8 +38,8 @@ public class PowerAxisTagController { private PowerAxisTagService powerAxisTagService; @RequestMapping("page") - public Result> page(@RequestParam Map params) { - PageData page = powerAxisTagService.page(params); + public Result> page(@LoginUser TokenDto tokenDto,@RequestParam Map params) { + PageData page = powerAxisTagService.page(tokenDto,params); return new Result>().ok(page); } @@ -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..391ebe2 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 @@ -2,16 +2,18 @@ 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; -import java.util.List; -import java.util.Map; - import java.util.List; /** @@ -125,4 +127,5 @@ 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 + +} 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..96c38cd 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 @@ -1,6 +1,7 @@ package com.epmet.plugin.power.modules.axis.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.plugin.power.dto.axis.PowerAxisTagDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisAllTagCategoryResultDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisTagCategoryResultDTO; import com.epmet.plugin.power.modules.axis.entity.PowerAxisTagEntity; @@ -8,6 +9,7 @@ import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; +import java.util.Map; /** * 动力主轴标签 @@ -25,7 +27,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查询节点等级 @@ -43,4 +45,6 @@ public interface PowerAxisTagDao extends BaseDao { List selectByTagCategory(@Param("tagCategory") String tagCategory, @Param("customerId") String customerId); + + 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/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..1e1c231 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 @@ -165,4 +165,4 @@ public interface PowerAxisStructService extends BaseService { * @author generator * @date 2022-04-18 */ - PageData page(Map params); + PageData page(TokenDto tokenDto,Map params); /** * 默认查询 @@ -96,7 +97,7 @@ public interface PowerAxisTagService 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..da4ee30 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; 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..ebf5d03 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; @@ -41,12 +42,16 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, true), - getWrapper(params) - ); - return getPageData(page, PowerAxisTagDTO.class); + public PageData page(TokenDto tokenDto,Map params) { +// IPage page = baseDao.selectPage( +// getPage(params, FieldConstant.CREATED_TIME, true), +// getWrapper(params) +// ); +// return getPageData(page, PowerAxisTagDTO.class); + params.put("customerId", tokenDto.getCustomerId()); + IPage page = getPage(params); + List list = baseDao.getPageList(params); + return new PageData<>(list, page.getTotal()); } @Override @@ -116,8 +121,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..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,19 +47,20 @@ 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.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 @@ -257,6 +258,4 @@ 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..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 @@ -29,7 +29,12 @@ + 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/ + +