Browse Source

Merge branch 'dev_power_axis'

# Conflicts:
#	epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisStructServiceImpl.java
dev_zufangUpdate
HAHA 3 years ago
parent
commit
3e53aeddba
  1. 4
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java
  2. 16
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java
  3. 8
      epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/resources/mapper/poweraxis/PowerAxisTagDao.xml

4
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/dao/PowerAxisTagDao.java

@ -2,6 +2,7 @@ package com.epmet.plugin.power.modules.axis.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
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;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -39,4 +40,7 @@ public interface PowerAxisTagDao extends BaseDao<PowerAxisTagEntity> {
Integer selectStructLevelById(@Param("customerId") String customerId,
@Param("tagCategory") String tagCategory,
@Param("axisStructId") String axisStructId);
List<PowerAxisTagCategoryResultDTO> selectByTagCategory(@Param("tagCategory") String tagCategory,
@Param("customerId") String customerId);
}

16
epmet-plugins-module/pli-power-base/pli-power-base-server/src/main/java/com/epmet/plugin/power/modules/axis/service/impl/PowerAxisTagServiceImpl.java

@ -102,13 +102,17 @@ public class PowerAxisTagServiceImpl extends BaseServiceImpl<PowerAxisTagDao, Po
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "缺少参数");
}
QueryWrapper<PowerAxisTagEntity> wrapper = new QueryWrapper<>();
wrapper.eq("TAG_CATEGORY", tagCategory)
.eq("FORBIDDEN_FLAG", EpmetDelFlagEnum.NORMAL.value())
.eq(FieldConstant.CUSTOMER_ID, customerId)
.orderByAsc("STRUCT_LEVEL", FieldConstant.CREATED_TIME);
List<PowerAxisTagCategoryResultDTO> res = baseDao.selectByTagCategory(tagCategory,customerId);
return res;
return ConvertUtils.sourceToTarget(baseDao.selectList(wrapper), PowerAxisTagCategoryResultDTO.class);
// QueryWrapper<PowerAxisTagEntity> wrapper = new QueryWrapper<>();
// wrapper.eq("TAG_CATEGORY", tagCategory)
// .eq("FORBIDDEN_FLAG", EpmetDelFlagEnum.NORMAL.value())
// .eq(FieldConstant.CUSTOMER_ID, customerId)
// .orderByAsc("STRUCT_LEVEL", FieldConstant.CREATED_TIME);
//
// return ConvertUtils.sourceToTarget(baseDao.selectList(wrapper), PowerAxisTagCategoryResultDTO.class);
}
@Override

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

@ -45,6 +45,14 @@
AND t.CUSTOMER_ID = #{customerId}
AND s.id = #{axisStructId}
</select>
<select id="selectByTagCategory"
resultType="com.epmet.plugin.power.dto.axis.result.PowerAxisTagCategoryResultDTO">
select * from pli_power_axis_tag where
TAG_CATEGORY = #{tagCategory}
AND FORBIDDEN_FLAG = '0'
AND CUSTOMER_ID = #{customerId}
order by STRUCT_LEVEL,CREATED_TIME DESC
</select>
</mapper>
Loading…
Cancel
Save