Browse Source

Merge branch 'master' into dev

dev
zhangyuan 3 years ago
parent
commit
4d2746492f
  1. 8
      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. 17
      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. 2
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisStructService.java
  7. 7
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/PowerAxisTagService.java
  8. 1
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java
  9. 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. 27
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisStructDao.xml
  11. 14
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml
  12. 6
      pom.xml

8
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;
}
}

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

17
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<PowerAxisStructEntity> {
String getRootAxisStructId(@Param("customerId") String customerId,
@Param("agencyId") String agencyId,
@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;
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<PowerAxisTagEntity> {
* @author work@yujt.net.cn
* @date 2022/4/19/0019 9:14
*/
List<PowerAxisAllTagCategoryResultDTO> listSimpleAll();
List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(@Param("customerId") String customerId);
/**
* 根据ID查询节点等级
@ -43,4 +45,6 @@ public interface PowerAxisTagDao extends BaseDao<PowerAxisTagEntity> {
List<PowerAxisTagCategoryResultDTO> selectByTagCategory(@Param("tagCategory") String tagCategory,
@Param("customerId") String customerId);
List<PowerAxisTagDTO> getPageList(Map<String, Object> params);
}

2
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<PowerAxisStructEntit
* @date 2022/5/12/0012 10:26
*/
String getRootAxisStructId(String rootStructId, String customerId, String agencyId);
}
}

7
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.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.result.PowerAxisAllTagCategoryResultDTO;
import com.epmet.plugin.power.dto.axis.result.PowerAxisTagCategoryResultDTO;
@ -27,7 +28,7 @@ public interface PowerAxisTagService extends BaseService<PowerAxisTagEntity> {
* @author generator
* @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
* @date 2022/4/19/0019 9:23
*/
List<PowerAxisAllTagCategoryResultDTO> listSimpleAll();
List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(TokenDto tokenDto);
/**
* 根据标签编码查询节点级别
@ -121,4 +122,4 @@ public interface PowerAxisTagService extends BaseService<PowerAxisTagEntity> {
* @date 2022/4/23/0023 15:51
*/
Integer selectStructLevelById(String customerId, String tagCategory, String axisStructId);
}
}

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.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
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.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<PowerAxisTagDao, Po
@Override
public PageData<PowerAxisTagDTO> page(Map<String, Object> params) {
IPage<PowerAxisTagEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, true),
getWrapper(params)
);
return getPageData(page, PowerAxisTagDTO.class);
public PageData<PowerAxisTagDTO> page(TokenDto tokenDto,Map<String, Object> params) {
// IPage<PowerAxisTagEntity> page = baseDao.selectPage(
// getPage(params, FieldConstant.CREATED_TIME, true),
// getWrapper(params)
// );
// 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
@ -116,8 +121,8 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
}
@Override
public List<PowerAxisAllTagCategoryResultDTO> listSimpleAll() {
return baseDao.listSimpleAll();
public List<PowerAxisAllTagCategoryResultDTO> listSimpleAll(TokenDto tokenDto) {
return baseDao.listSimpleAll(tokenDto.getCustomerId());
}
@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,
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'
<if test="agencyId != null and agencyId != ''">
and s.AGENCY_ID = #{agencyId}
</if>
<if test="axisName != null and axisName != ''">
and s.NAME like '%${axisName}%'
</if>
<if test="leaderName != null and leaderName != ''">
and l.NAME like '%${leaderName}%'
</if>
and s.CUSTOMER_ID = #{customerId}
<if test="agencyId != null and agencyId != ''">
and s.AGENCY_ID = #{agencyId}
</if>
<if test="axisName != null and axisName != ''">
and s.NAME like '%${axisName}%'
</if>
<if test="leaderName != null and leaderName != ''">
and l.NAME like '%${leaderName}%'
</if>
order by s.sort,s.CREATED_TIME,l.CREATED_TIME
</select>
@ -257,6 +258,4 @@
AND s.DEL_FLAG = '0'
AND t.STRUCT_LEVEL = #{structLevel}
</select>
</mapper>

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

@ -29,7 +29,12 @@
</resultMap>
<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 id="selectStructLevelById" resultType="java.lang.Integer">
SELECT
@ -53,6 +58,13 @@
AND CUSTOMER_ID = #{customerId}
order by STRUCT_LEVEL,CREATED_TIME DESC
</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>

6
pom.xml

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

Loading…
Cancel
Save