Browse Source

Merge branch 'master' into dev

dev
zhangyuan 3 years ago
parent
commit
4d2746492f
  1. 6
      epmet-plugins-module/pli-power-base/pli-power-base-client/src/main/java/com/epmet/plugin/power/dto/axis/form/PowerAxisStructLeaderFormDTO.java
  2. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisStructController.java
  3. 8
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/controller/PowerAxisTagController.java
  4. 15
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisStructDao.java
  5. 6
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java
  6. 5
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisTagService.java
  7. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java
  8. 21
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java
  9. 27
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml
  10. 14
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml
  11. 6
      pom.xml

6
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 lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
@ -32,5 +31,10 @@ public class PowerAxisStructLeaderFormDTO implements Serializable {
*/ */
private String leaderName; private String leaderName;
/**
* 客户id
*/
private String customerId;
} }

1
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.setAgencyId(staffInfo.getAgencyId());
} }
} }
formDto.setCustomerId(tokenDto.getCustomerId());
return new Result().ok(powerAxisStructService.selectAllForTree(formDto)); return new Result().ok(powerAxisStructService.selectAllForTree(formDto));
} }

8
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; private PowerAxisTagService powerAxisTagService;
@RequestMapping("page") @RequestMapping("page")
public Result<PageData<PowerAxisTagDTO>> page(@RequestParam Map<String, Object> params) { public Result<PageData<PowerAxisTagDTO>> page(@LoginUser TokenDto tokenDto,@RequestParam Map<String, Object> params) {
PageData<PowerAxisTagDTO> page = powerAxisTagService.page(params); PageData<PowerAxisTagDTO> page = powerAxisTagService.page(tokenDto,params);
return new Result<PageData<PowerAxisTagDTO>>().ok(page); return new Result<PageData<PowerAxisTagDTO>>().ok(page);
} }
@ -102,8 +102,8 @@ public class PowerAxisTagController {
* @date 2022/4/19/0019 9:24 * @date 2022/4/19/0019 9:24
*/ */
@PostMapping("listSimpleAll") @PostMapping("listSimpleAll")
public Result<List<PowerAxisAllTagCategoryResultDTO>> listSimpleAll() { public Result<List<PowerAxisAllTagCategoryResultDTO>> listSimpleAll(@LoginUser TokenDto tokenDto) {
return new Result().ok(powerAxisTagService.listSimpleAll()); return new Result().ok(powerAxisTagService.listSimpleAll(tokenDto));
} }
} }

15
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.commons.mybatis.dao.BaseDao;
import com.epmet.plugin.power.dto.axis.PowerAxisStructDTO; import com.epmet.plugin.power.dto.axis.form.PowerAxisListPositionFormDTO;
import com.epmet.plugin.power.dto.axis.form.*; import com.epmet.plugin.power.dto.axis.form.PowerAxisStructFormDTO;
import com.epmet.plugin.power.dto.axis.result.*; 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 com.epmet.plugin.power.modules.axis.entity.PowerAxisStructEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.List; import java.util.List;
/** /**
@ -125,4 +127,5 @@ public interface PowerAxisStructDao extends BaseDao<PowerAxisStructEntity> {
String getRootAxisStructId(@Param("customerId") String customerId, String getRootAxisStructId(@Param("customerId") String customerId,
@Param("agencyId") String agencyId, @Param("agencyId") String agencyId,
@Param("structLevel") int structLevel); @Param("structLevel") int structLevel);
} }

6
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; package com.epmet.plugin.power.modules.axis.dao;
import com.epmet.commons.mybatis.dao.BaseDao; 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.PowerAxisAllTagCategoryResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisTagCategoryResultDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisTagCategoryResultDTO;
import com.epmet.plugin.power.modules.axis.entity.PowerAxisTagEntity; 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 org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 动力主轴标签 * 动力主轴标签
@ -25,7 +27,7 @@ public interface PowerAxisTagDao extends BaseDao<PowerAxisTagEntity> {
* @author work@yujt.net.cn * @author work@yujt.net.cn
* @date 2022/4/19/0019 9:14 * @date 2022/4/19/0019 9:14
*/ */
List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(); List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(@Param("customerId") String customerId);
/** /**
* 根据ID查询节点等级 * 根据ID查询节点等级
@ -43,4 +45,6 @@ public interface PowerAxisTagDao extends BaseDao<PowerAxisTagEntity> {
List<PowerAxisTagCategoryResultDTO> selectByTagCategory(@Param("tagCategory") String tagCategory, List<PowerAxisTagCategoryResultDTO> selectByTagCategory(@Param("tagCategory") String tagCategory,
@Param("customerId") String customerId); @Param("customerId") String customerId);
List<PowerAxisTagDTO> getPageList(Map<String, Object> params);
} }

5
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisTagService.java

@ -3,6 +3,7 @@ package com.epmet.plugin.power.modules.axis.service;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.plugin.power.dto.axis.PowerAxisTagDTO; 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.PowerAxisAllTagCategoryResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisTagCategoryResultDTO; import com.epmet.plugin.power.dto.axis.result.PowerAxisTagCategoryResultDTO;
@ -27,7 +28,7 @@ public interface PowerAxisTagService extends BaseService<PowerAxisTagEntity> {
* @author generator * @author generator
* @date 2022-04-18 * @date 2022-04-18
*/ */
PageData<PowerAxisTagDTO> page(Map<String, Object> params); PageData<PowerAxisTagDTO> page(TokenDto tokenDto,Map<String, Object> params);
/** /**
* 默认查询 * 默认查询
@ -96,7 +97,7 @@ public interface PowerAxisTagService extends BaseService<PowerAxisTagEntity> {
* @author work@yujt.net.cn * @author work@yujt.net.cn
* @date 2022/4/19/0019 9:23 * @date 2022/4/19/0019 9:23
*/ */
List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(); List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(TokenDto tokenDto);
/** /**
* 根据标签编码查询节点级别 * 根据标签编码查询节点级别

1
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.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;

21
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.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData; 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.security.user.LoginUserUtil;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.plugin.power.dto.axis.PowerAxisTagDTO; import com.epmet.plugin.power.dto.axis.PowerAxisTagDTO;
@ -41,12 +42,16 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
@Override @Override
public PageData<PowerAxisTagDTO> page(Map<String, Object> params) { public PageData<PowerAxisTagDTO> page(TokenDto tokenDto,Map<String, Object> params) {
IPage<PowerAxisTagEntity> page = baseDao.selectPage( // IPage<PowerAxisTagEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, true), // getPage(params, FieldConstant.CREATED_TIME, true),
getWrapper(params) // getWrapper(params)
); // );
return getPageData(page, PowerAxisTagDTO.class); // return getPageData(page, PowerAxisTagDTO.class);
params.put("customerId", tokenDto.getCustomerId());
IPage<PowerAxisTagDTO> page = getPage(params);
List<PowerAxisTagDTO> list = baseDao.getPageList(params);
return new PageData<>(list, page.getTotal());
} }
@Override @Override
@ -116,8 +121,8 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
} }
@Override @Override
public List<PowerAxisAllTagCategoryResultDTO> listSimpleAll() { public List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(TokenDto tokenDto) {
return baseDao.listSimpleAll(); return baseDao.listSimpleAll(tokenDto.getCustomerId());
} }
@Override @Override

27
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, l.MOBILE as LEADER_MOBILE,
t.STRUCT_LEVEL t.STRUCT_LEVEL
from pli_power_axis_struct s 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_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' 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' 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' where s.DEL_FLAG = '0'
<if test="agencyId != null and agencyId != ''"> and s.CUSTOMER_ID = #{customerId}
and s.AGENCY_ID = #{agencyId} <if test="agencyId != null and agencyId != ''">
</if> and s.AGENCY_ID = #{agencyId}
<if test="axisName != null and axisName != ''"> </if>
and s.NAME like '%${axisName}%' <if test="axisName != null and axisName != ''">
</if> and s.NAME like '%${axisName}%'
<if test="leaderName != null and leaderName != ''"> </if>
and l.NAME like '%${leaderName}%' <if test="leaderName != null and leaderName != ''">
</if> and l.NAME like '%${leaderName}%'
</if>
order by s.sort,s.CREATED_TIME,l.CREATED_TIME order by s.sort,s.CREATED_TIME,l.CREATED_TIME
</select> </select>
@ -257,6 +258,4 @@
AND s.DEL_FLAG = '0' AND s.DEL_FLAG = '0'
AND t.STRUCT_LEVEL = #{structLevel} AND t.STRUCT_LEVEL = #{structLevel}
</select> </select>
</mapper> </mapper>

14
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml

@ -29,7 +29,12 @@
</resultMap> </resultMap>
<select id="listSimpleAll" resultMap="listSimpleAllResultMap"> <select id="listSimpleAll" resultMap="listSimpleAllResultMap">
select t.TAG_CATEGORY,t.CATEGORY_NAME,t.CATEGORY_CODE,t.STRUCT_LEVEL from pli_power_axis_tag t where t.DEL_FLAG = '0' and t.FORBIDDEN_FLAG = '0' order by t.STRUCT_LEVEL select t.TAG_CATEGORY,t.CATEGORY_NAME,t.CATEGORY_CODE,t.STRUCT_LEVEL
from pli_power_axis_tag t
where t.DEL_FLAG = '0'
and t.FORBIDDEN_FLAG = '0'
and CUSTOMER_ID = #{customerId}
order by t.STRUCT_LEVEL
</select> </select>
<select id="selectStructLevelById" resultType="java.lang.Integer"> <select id="selectStructLevelById" resultType="java.lang.Integer">
SELECT SELECT
@ -53,6 +58,13 @@
AND CUSTOMER_ID = #{customerId} AND CUSTOMER_ID = #{customerId}
order by STRUCT_LEVEL,CREATED_TIME DESC order by STRUCT_LEVEL,CREATED_TIME DESC
</select> </select>
<select id="getPageList" resultType="com.epmet.plugin.power.dto.axis.PowerAxisTagDTO">
select *
from pli_power_axis_tag
where DEL_FLAG = '0'
and CUSTOMER_ID = #{customerId}
order by CREATED_TIME asc
</select>
</mapper> </mapper>

6
pom.xml

@ -118,5 +118,11 @@
</snapshots> </snapshots>
</pluginRepository> </pluginRepository>
</pluginRepositories> </pluginRepositories>
<distributionManagement>
<repository>
<id>epmet</id>
<url>https://nexus.elinkservice.cn/repository/maven-releases/</url>
</repository>
</distributionManagement>
</project> </project>

Loading…
Cancel
Save