Browse Source

list

master
yinzuomei 3 years ago
parent
commit
c59cdc2163
  1. 2
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java
  2. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java
  3. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java
  4. 15
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml

2
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/policy/IcPolicyPageFormDTO.java

@ -33,7 +33,5 @@ public class IcPolicyPageFormDTO extends PageFormDTO implements Serializable {
*/
private String expiredFlag;
private String agencyId;
}

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPolicyDao.java

@ -3,7 +3,6 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcPolicyDTO;
import com.epmet.dto.IcPolicyItemResultDTO;
import com.epmet.dto.form.policy.IcPolicyPageFormDTO;
import com.epmet.entity.IcPolicyEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@ -27,5 +26,9 @@ public interface IcPolicyDao extends BaseDao<IcPolicyEntity> {
*/
List<IcPolicyItemResultDTO> selectItemList(@Param("customerId") String customerId, @Param("groupType") String groupType);
List<IcPolicyDTO> policyList(IcPolicyPageFormDTO formDTO);
List<IcPolicyDTO> policyList(@Param("customerId")String customerId,
@Param("agencyId")String agencyId,
@Param("title")String title,
@Param("content")String content,
@Param("expiredFlag")String expiredFlag);
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java

@ -232,9 +232,8 @@ public class IcPolicyServiceImpl extends BaseServiceImpl<IcPolicyDao, IcPolicyEn
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "工作人员缓存信息异常", "工作人员信息异常");
}
formDTO.setAgencyId(staffInfo.getAgencyId());
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
List<IcPolicyDTO> list = baseDao.policyList(formDTO);
List<IcPolicyDTO> list = baseDao.policyList(formDTO.getCustomerId(),staffInfo.getAgencyId(),formDTO.getTitle(),formDTO.getContent(),formDTO.getExpiredFlag());
if (CollectionUtils.isNotEmpty(list)) {
for (IcPolicyDTO icPolicyDTO : list) {
// 查询字典表

15
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPolicyDao.xml

@ -43,7 +43,7 @@
order by i.SORT asc
</select>
<select id="policyList" parameterType="com.epmet.dto.form.policy.IcPolicyPageFormDTO" resultType="com.epmet.dto.IcPolicyDTO">
<select id="policyList" parameterType="map" resultType="com.epmet.dto.IcPolicyDTO">
SELECT
ip.id AS POLICY_ID,
ip.ORG_ID,
@ -69,11 +69,14 @@
<if test="null != content and content != '' ">
and ip.CONTENT like concat('%',#{content},'%')
</if>
<if test="'1' == expiredFlag">
and ip.END_DATE &lt; DATE_FORMAT(now(),'%Y-%m-%d')
</if>
<if test="'0' == expiredFlag">
and ip.END_DATE &gt;= DATE_FORMAT(now(),'%Y-%m-%d')
<if test="null != expiredFlag and expiredFlag != '' ">
and 1=1
<if test="expiredFlag == 1">
and ip.END_DATE &lt; DATE_FORMAT(now(),'%Y-%m-%d')
</if>
<if test="expiredFlag == 0">
and ip.END_DATE &gt;= DATE_FORMAT(now(),'%Y-%m-%d')
</if>
</if>
order by ip.CREATED_TIME desc
</select>

Loading…
Cancel
Save