| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.ExcelElderAuthDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageComEldersRecordsDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageEldersAuthDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthElderlyDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.ComEldersAuthRecordVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthDetailsVO; |
| | | import com.panzhihua.common.model.vos.community.EldersAuthVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.service_community.model.dos.EldersAuthDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | " WHERE substring(ad.district_adcode, 1, 6) = substring(#{idCard}, 1, 6) "+ |
| | | "</script>") |
| | | String selectDomicile(@Param("idCard")String idCard); |
| | | |
| | | |
| | | @Select("<script> " + |
| | | " SELECT t.id, t.yearMonth, au.`type`, DATE_FORMAT(au.CREATE_AT,'%Y-%m-%d') AS create_at,\n" + |
| | | " case " + |
| | | " when fed.id IS NOT NULL then true\n" + |
| | | " ELSE false " + |
| | | " END hasFeed " + |
| | | " FROM ( SELECT MAX(id) AS id , DATE_FORMAT(create_at, '%Y-%m') AS yearMonth\n" + |
| | | " FROM com_elders_auth \n" + |
| | | " GROUP BY id_card, yearMonth\n" + |
| | | " ) t LEFT JOIN com_elders_auth au ON t.id = au.id\n" + |
| | | " LEFT JOIN com_elders_auth_feedback fed ON t.id = fed.AUTH_ID\n" + |
| | | " <where>" + |
| | | " au.FAMILY_USER_ID = #{pageComEldersRecordsDTO.bigAgeid} " + |
| | | "</where>" + |
| | | "<if test='pageComEldersRecordsDTO.sortColumns!=null'>\n" + |
| | | "ORDER BY ${pageComEldersRecordsDTO.sortColumns} ${pageComEldersRecordsDTO.sortType}\n" + |
| | | "</if> " + |
| | | "</script>") |
| | | List<ComEldersAuthRecordVO> selectEldersRecordByPage(Page page, @Param("pageComEldersRecordsDTO") PageComEldersRecordsDTO pageComEldersRecordsDTO); |
| | | |
| | | @Select("<script> " + |
| | | " SELECT DISTINCT a.name" + |
| | | " FROM com_elders_auth ea LEFT JOIN com_elders_auth_user au ON ea.FAMILY_USER_ID = au.id \n" + |
| | | "LEFT JOIN com_act a ON au.community_id = a.community_id\n" + |
| | | " WHERE ea.ID = #{id} " + |
| | | "</script>") |
| | | String selectCommunityNameByAuth(@Param("id") Long id); |
| | | |
| | | @Select("select user_id,id_card,name from sys_user where user_id = #{userId}") |
| | | SysUserVO getSysUserByUserId(@Param("userId")Long userId); |
| | | } |