Browse Source

Merge remote-tracking branch 'origin/dev_move_out_of' into dev_move_out_of

dev
jianjun 3 years ago
parent
commit
f73b791cc2
  1. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeDeathDao.java
  2. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeRelocationDao.java
  3. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java
  4. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java
  5. 49
      epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml
  6. 49
      epmet-user/epmet-user-server/src/main/resources/mapper/ChangeRelocationDao.xml
  7. 7
      epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

13
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeDeathDao.java

@ -1,9 +1,13 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ChangeDeathDTO;
import com.epmet.entity.ChangeDeathEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 死亡名单表
*
@ -13,4 +17,13 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ChangeDeathDao extends BaseDao<ChangeDeathEntity> {
/**
* 死亡名单列表
*
* @param params
* @return java.util.List<com.epmet.dto.ChangeDeathDTO>
* @author zhy
* @date 2022/5/12 17:44
*/
List<ChangeDeathDTO> getDeathList(Map<String, Object> params);
}

13
epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeRelocationDao.java

@ -1,9 +1,13 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ChangeRelocationDTO;
import com.epmet.entity.ChangeRelocationEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 人员迁出表
*
@ -13,4 +17,13 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ChangeRelocationDao extends BaseDao<ChangeRelocationEntity> {
/**
* 人员迁出列表
*
* @param params
* @return java.util.List<com.epmet.dto.ChangeRelocationDTO>
* @author zhy
* @date 2022/5/12 17:45
*/
List<ChangeRelocationDTO> getRelocationList(Map<String, Object> params);
}

14
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeDeathServiceImpl.java

@ -65,11 +65,9 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, Chan
@Override
public PageData<ChangeDeathDTO> page(Map<String, Object> params) {
IPage<ChangeDeathEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ChangeDeathDTO.class);
IPage<ChangeDeathDTO> page = getPage(params);
List<ChangeDeathDTO> list = baseDao.getDeathList(params);
return new PageData<>(list, page.getTotal());
}
@Override
@ -79,7 +77,7 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, Chan
return ConvertUtils.sourceToTarget(entityList, ChangeDeathDTO.class);
}
private QueryWrapper<ChangeDeathEntity> getWrapper(Map<String, Object> params){
private QueryWrapper<ChangeDeathEntity> getWrapper(Map<String, Object> params) {
String id = (String) params.get(FieldConstant.ID_HUMP);
String name = (String) params.get("name");
String idCard = (String) params.get("idCard");
@ -127,7 +125,7 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, Chan
entity.setCustomerId(loginUserUtil.getLoginUserCustomerId());
insert(entity);
if(dto.getWelfareFlag() != null && dto.getWelfareFlag()){
if (dto.getWelfareFlag() != null && dto.getWelfareFlag()) {
ChangeWelfareDTO formDto = new ChangeWelfareDTO();
formDto.setUserId(dto.getUserId());
formDto.setName(dto.getName());
@ -149,7 +147,7 @@ public class ChangeDeathServiceImpl extends BaseServiceImpl<ChangeDeathDao, Chan
icResiUserService.updateById(userEntity);
//变更主表、变更明细表
IcResiUserTransferFormDTO icResiUserTransferFormDTO=new IcResiUserTransferFormDTO();
IcResiUserTransferFormDTO icResiUserTransferFormDTO = new IcResiUserTransferFormDTO();
icResiUserTransferFormDTO.setIcUserId(dto.getUserId());
//死亡相当于迁出至客户外,赋值out
icResiUserTransferFormDTO.setType("out");

9
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeRelocationServiceImpl.java

@ -71,14 +71,11 @@ public class ChangeRelocationServiceImpl extends BaseServiceImpl<ChangeRelocatio
@Autowired
private IcResiUserService icResiUserService;
@Override
public PageData<ChangeRelocationDTO> page(Map<String, Object> params) {
IPage<ChangeRelocationEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ChangeRelocationDTO.class);
IPage<ChangeRelocationDTO> page = getPage(params);
List<ChangeRelocationDTO> list = baseDao.getRelocationList(params);
return new PageData<>(list, page.getTotal());
}
@Override

49
epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml

@ -24,5 +24,52 @@
<result property="customerId" column="CUSTOMER_ID"/>
</resultMap>
<select id="getDeathList" resultType="com.epmet.dto.ChangeDeathDTO">
SELECT
d.*
FROM
pli_change_death d
LEFT JOIN pli_change_welfare w ON d.ID_CARD = w.ID_CARD
AND w.DEL_FLAG = '0'
WHERE
d.DEL_FLAG = '0'
<if test="gridId != null and gridId != ''">
AND d.GRID_ID = #{gridId}
</if>
<if test="villageId != null and villageId != ''">
AND d.VILLAGE_ID = #{villageId}
</if>
<if test="buildId != null and buildId != ''">
AND d.BUILD_ID = #{buildId}
</if>
<if test="unitId != null and unitId != ''">
AND d.UNIT_ID = #{unitId}
</if>
<if test="homeId != null and homeId != ''">
AND d.HOME_ID = #{homeId}
</if>
<if test="name != null and name != ''">
AND d.NAME = #{name}
</if>
<if test="idCard != null and idCard != ''">
AND d.ID_CARD = #{idCard}
</if>
<if test="mobile != null and mobile != ''">
AND d.MOBILE = #{mobile}
</if>
<if test="startTime != null and startTime != ''">
AND d.DEATH_DATE >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND d.DEATH_DATE &lt;= #{endTime}
</if>
<if test="isWelfare != null and isWelfare != ''">
<if test="isWelfare == '0' or isWelfare == 0">
AND w.DEL_FLAG = '0'
</if>
<if test="isWelfare == '1' or isWelfare == 1">
AND w.DEL_FLAG IS NULL
</if>
</if>
</select>
</mapper>

49
epmet-user/epmet-user-server/src/main/resources/mapper/ChangeRelocationDao.xml

@ -35,5 +35,52 @@
<result property="customerId" column="CUSTOMER_ID"/>
</resultMap>
<select id="getRelocationList" resultType="com.epmet.dto.ChangeRelocationDTO">
SELECT
r.*
FROM
pli_change_relocation r
LEFT JOIN pli_change_welfare w ON r.ID_CARD = w.ID_CARD
AND w.DEL_FLAG = '0'
WHERE
r.DEL_FLAG = '0'
<if test="gridId != null and gridId != ''">
AND r.GRID_ID = #{gridId}
</if>
<if test="villageId != null and villageId != ''">
AND r.VILLAGE_ID = #{villageId}
</if>
<if test="buildId != null and buildId != ''">
AND r.BUILD_ID = #{buildId}
</if>
<if test="unitId != null and unitId != ''">
AND r.UNIT_ID = #{unitId}
</if>
<if test="homeId != null and homeId != ''">
AND r.HOME_ID = #{homeId}
</if>
<if test="name != null and name != ''">
AND r.NAME = #{name}
</if>
<if test="idCard != null and idCard != ''">
AND r.ID_CARD = #{idCard}
</if>
<if test="mobile != null and mobile != ''">
AND r.MOBILE = #{mobile}
</if>
<if test="startTime != null and startTime != ''">
AND r.OUT_OF_TIME >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND r.OUT_OF_TIME &lt;= #{endTime}
</if>
<if test="isWelfare != null and isWelfare != ''">
<if test="isWelfare == '0' or isWelfare == 0">
AND w.DEL_FLAG = '0'
</if>
<if test="isWelfare == '1' or isWelfare == 1">
AND w.DEL_FLAG IS NULL
</if>
</if>
</select>
</mapper>

7
epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml

@ -412,7 +412,12 @@
ir.id as demandUserId,
IFNULL(ir.`NAME`,'') AS demandUserName,
IFNULL(ir.MOBILE,'') AS demandUserMobile,
concat(ir.`NAME`,'(',ir.MOBILE,')')as label,
(
case when ir.MOBILE is not null and ir.MOBILE!=''
then concat(ir.`NAME`,'(',ir.MOBILE,')')
else ir.`NAME`
end
) as label,
ir.grid_id as gridId,
ir.ID_CARD as idCard,
ir.AGENCY_ID as agencyId,

Loading…
Cancel
Save