Browse Source

数据关联居民表

feature/evaluate
zhangyuan 3 years ago
parent
commit
13402c0500
  1. 13
      epmet-user/epmet-user-server/src/main/java/com/epmet/dao/ChangeWelfareDao.java
  2. 8
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java
  3. 37
      epmet-user/epmet-user-server/src/main/resources/mapper/ChangeDeathDao.xml
  4. 38
      epmet-user/epmet-user-server/src/main/resources/mapper/ChangeRelocationDao.xml
  5. 47
      epmet-user/epmet-user-server/src/main/resources/mapper/ChangeWelfareDao.xml

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

@ -6,6 +6,9 @@ import com.epmet.entity.ChangeWelfareEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 福利表
*
@ -15,6 +18,16 @@ import org.apache.ibatis.annotations.Param;
@Mapper
public interface ChangeWelfareDao extends BaseDao<ChangeWelfareEntity> {
/**
* 福利名单列表
*
* @param params
* @return java.util.List<com.epmet.dto.ChangeWelfareDTO>
* @author zhy
* @date 2022/5/12 17:44
*/
List<ChangeWelfareDTO> getWelfareList(Map<String, Object> params);
/**
* @describe: 通过身份证号查询福利人员
* @author wangtong

8
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/ChangeWelfareServiceImpl.java

@ -49,11 +49,9 @@ public class ChangeWelfareServiceImpl extends BaseServiceImpl<ChangeWelfareDao,
@Override
public PageData<ChangeWelfareDTO> page(Map<String, Object> params) {
params.put("customerId", loginUserUtil.getLoginUserCustomerId());
IPage<ChangeWelfareEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, ChangeWelfareDTO.class);
IPage<ChangeWelfareDTO> page = getPage(params);
List<ChangeWelfareDTO> list = baseDao.getWelfareList(params);
return new PageData<>(list, page.getTotal());
}
@Override

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

@ -26,31 +26,34 @@
<select id="getDeathList" resultType="com.epmet.dto.ChangeDeathDTO">
SELECT
d.*
d.id,
u.id AS userId,
d.GRID_ID,
u.`NAME`,
d.ID_CARD,
u.MOBILE,
u.GENDER,
d.TYPE,
d.DEATH_DATE,
d.JOIN_DATE,
d.JOIN_REASON,
d.REMOVE_DATE,
d.REMOVE_REASON,
d.CREATED_TIME,
d.UPDATED_TIME
FROM
pli_change_death d
LEFT JOIN pli_change_welfare w ON d.ID_CARD = w.ID_CARD
AND w.DEL_FLAG = '0'
pli_change_death d
LEFT JOIN ic_resi_user u ON u.ID_CARD = d.ID_CARD
LEFT JOIN pli_change_welfare w ON d.ID_CARD = w.ID_CARD
AND w.DEL_FLAG = '0'
WHERE
d.DEL_FLAG = '0'
d.DEL_FLAG = '0'
<if test="customerId != null and customerId != ''">
AND d.CUSTOMER_ID = #{customerId}
</if>
<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>

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

@ -37,13 +37,41 @@
<select id="getRelocationList" resultType="com.epmet.dto.ChangeRelocationDTO">
SELECT
r.*
r.id,
u.`NAME`,
r.ID_CARD,
u.GENDER,
r.age,
u.MOBILE,
r.PID,
r.AGENCY_ID,
r.AGENCY_NAME,
r.VILLAGE_ID,
r.VILLAGE_NAME,
r.BUILD_ID,
r.BUILD_NAME,
r.UNIT_ID,
r.UNIT_NAME,
r.HOME_ID,
r.HOME_NAME,
r.ADDRESS,
r.TYPE,
r.OWNER_NAME,
r.OLD_DEPT,
r.OLD_ADDRESS,
r.OLD_HOME,
r.REASON,
r.CREATED_TIME,
r.UPDATED_TIME,
r.OUT_OF_TIME,
r.IC_USER_ID
FROM
pli_change_relocation r
LEFT JOIN pli_change_welfare w ON r.ID_CARD = w.ID_CARD
AND w.DEL_FLAG = '0'
pli_change_relocation r
LEFT JOIN ic_resi_user u ON u.ID_CARD = r.ID_CARD
LEFT JOIN pli_change_welfare w ON r.ID_CARD = w.ID_CARD
AND w.DEL_FLAG = '0'
WHERE
r.DEL_FLAG = '0'
r.DEL_FLAG = '0'
<if test="customerId != null and customerId != ''">
AND r.CUSTOMER_ID = #{customerId}
</if>

47
epmet-user/epmet-user-server/src/main/resources/mapper/ChangeWelfareDao.xml

@ -24,11 +24,58 @@
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="customerId" column="CUSTOMER_ID"/>
</resultMap>
<select id="getWelfareList" resultType="com.epmet.dto.ChangeWelfareDTO">
SELECT
w.id,
u.id AS userId,
w.GRID_ID,
u.`NAME`,
w.ID_CARD,
u.MOBILE,
u.GENDER,
w.TYPE,
w.JOIN_DATE,
w.JOIN_REASON,
w.REMOVE_DATE,
w.REMOVE_REASON,
w.CREATED_TIME,
w.UPDATED_TIME
FROM
pli_change_welfare w
LEFT JOIN ic_resi_user u ON u.ID_CARD = w.ID_CARD
WHERE
w.DEL_FLAG = '0'
<if test="customerId != null and customerId != ''">
AND w.CUSTOMER_ID = #{customerId}
</if>
<if test="gridId != null and gridId != ''">
AND w.GRID_ID = #{gridId}
</if>
<if test="name != null and name != ''">
AND w.NAME = #{name}
</if>
<if test="idCard != null and idCard != ''">
AND w.ID_CARD = #{idCard}
</if>
<if test="mobile != null and mobile != ''">
AND w.MOBILE = #{mobile}
</if>
<if test="startTime != null and startTime != ''">
AND w.JOIN_DATE >= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND w.JOIN_DATE &lt;= #{endTime}
</if>
order by w.CREATED_TIME desc
</select>
<select id="selectByIdCard" resultType="com.epmet.entity.ChangeWelfareEntity">
select * from pli_change_welfare
where ID_CARD=#{idCard}
and del_flag='0'
</select>
<update id="removeWelfare">
update pli_change_welfare
set REMOVE_DATE=#{removeDate},

Loading…
Cancel
Save