| | |
| | | R exportElderAuthRecordsStatistic(@RequestBody PageElderAuthStatisticDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 导出高龄认证记录 exportElderAuthRecords 导出高龄认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/elders/authRecords/export") |
| | | R exportElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 分页查询养老金人员认证记录 pagePensionAuthRecords 分页查询养老金人员认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | |
| | | |
| | | /** |
| | | * 高龄认证导出 exportElderAuthRecords 高龄认证导出 |
| | | * @param ids 高龄认证记录id集合 |
| | | * @param pageElderAuthRecordsDTO |
| | | * @return R 导出结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @ApiOperation(value = "高龄认证-高龄认证导出---") |
| | | @PostMapping("/authRecords/export") |
| | | public R exportElderAuthRecords(@RequestBody List<Long> ids) { |
| | | public R exportElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | // List<ComMngPopulationMistakeExcelVO> list = JSON.parseArray(mistakes,ComMngPopulationMistakeExcelVO.class); |
| | | // 生成动态模板excel通过ftp工具上传到主节点,然后返回模板下载地址 |
| | | pageElderAuthRecordsDTO.setCommunityId(this.getCommunityId()); |
| | | String ftpUrl = "/mnt/data/web/excel/"; |
| | | String nowDate = DateUtils.getCurrentDateString(); |
| | | String name = "高龄认证导出数据" + nowDate + ".xlsx"; |
| | |
| | | ExcelWriter excelWriter = null; |
| | | InputStream inputStream = null; |
| | | try { |
| | | R r = communityService.getElderAuthRecordsByIds(ids); |
| | | R r = communityService.exportElderAuthRecords(pageElderAuthRecordsDTO); |
| | | List<ComElderAuthRecordExcleVO> list = new ArrayList<>(); |
| | | if (R.isOk(r)) { |
| | | list = JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComElderAuthRecordExcleVO.class); |
| | |
| | | @PostMapping("/pensionAuthRecord/add") |
| | | R addPensionAuthRecordVO(@RequestBody ComElderAuthRecordVO comElderAuthRecordVO){ |
| | | comElderAuthRecordVO.setSubmitUserId(this.getUserId()); |
| | | comElderAuthRecordVO.setCommunityId(this.getCommunityId()); |
| | | return communityService.addPensionAuthRecordVO(comElderAuthRecordVO); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 导出高龄认证记录 exportElderAuthRecords 导出高龄认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | @PostMapping("/authRecords/export") |
| | | public R exportElderAuthRecords(@RequestBody PageElderAuthRecordsDTO pageElderAuthRecordsDTO){ |
| | | return comElderAuthRecordsService.export(pageElderAuthRecordsDTO); |
| | | } |
| | | |
| | | /** |
| | | * 分页查询养老金人员认证记录 pagePensionAuthRecords 分页查询养老金人员认证记录 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | |
| | | IPage<ComElderAuthRecordVO> pageElderAuthRecords(Page page, |
| | | @Param("pageElderAuthRecordsDTO") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | List<ComElderAuthRecordVO> export(@Param("pageElderAuthRecordsDTO") PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | ComElderAuthRecordVO detailElderAuthRecords(@Param("authRecordId") Long authRecordId); |
| | | |
| | | List<ComElderAuthRecordExcleVO> getElderAuthRecordsByIds(@Param("ids") List<Long> ids); |
| | |
| | | R pageElderAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 导出 pageElderAuthRecords 导出 |
| | | * @param pageElderAuthRecordsDTO 查询参数 |
| | | * @return R 查询结果 |
| | | * @author txb |
| | | * @date 2021/9/02 11:03 |
| | | */ |
| | | R export(PageElderAuthRecordsDTO pageElderAuthRecordsDTO); |
| | | |
| | | /** |
| | | * 根据高龄认证记录id查询详情 detailElderAuthRecords 根据高龄认证记录id查询详情 |
| | | * @param authRecordId 高龄认证记录id |
| | | * @return R 查询结果 |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R export(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | | try { |
| | | //关键词为空时需要进行加密,通过加密去检索身份证号筛选高龄认证记录 |
| | | String idCard = AESUtil.encrypt128(pageElderAuthRecordsDTO.getSearchKey(), aesKey); |
| | | pageElderAuthRecordsDTO.setIdCard(idCard); |
| | | }catch (Exception e){ |
| | | log.error("查询高龄认证记录转换身份证号失败"); |
| | | } |
| | | return R.ok(comElderAuthRecordsDAO.export(pageElderAuthRecordsDTO)); |
| | | } |
| | | |
| | | @Override |
| | | public R detailElderAuthRecords(Long authRecordId) { |
| | | ComElderAuthRecordVO comElderAuthRecordVO = comElderAuthRecordsDAO.detailElderAuthRecords(authRecordId); |
| | | comElderAuthRecordVO.setNextIds(comElderAuthRecordsDAO.getNextIds(comElderAuthRecordVO.getCommunityId(),authRecordId)); |
| | |
| | | comElderAuthRecordsDO.setApprovalDate(new Date()); |
| | | comElderAuthRecordsDO.setAuthStatus(CERTIFIED.getStatus()); |
| | | comElderAuthRecordsDO.setAuthMethod(ComPensionAuthRecordDO.authMethod.xxrz); |
| | | comElderAuthRecordsDO.setApproverId(comElderAuthRecordVO.getSubmitUserId()); |
| | | comElderAuthRecordsDO.setSubmitUserId(comElderAuthRecordVO.getSubmitUserId()); |
| | | if (this.baseMapper.insert(comElderAuthRecordsDO) < 0) { |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | comMngPopulationDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comMngPopulationDAO.updateById(comMngPopulationDO); |
| | | comElderAuthElderliesDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comElderAuthElderliesDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comElderAuthElderliesDO.setIdCard(null); |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | ComPensionAuthPensionerDO comPensionAuthPensionerDO=comPensionAuthPensionerDAO.selectOne(new QueryWrapper<ComPensionAuthPensionerDO>().lambda().eq(ComPensionAuthPensionerDO::getPopulationId,comMngPopulationDO.getId())); |
| | | if(comPensionAuthPensionerDO!=null){ |
| | | comPensionAuthPensionerDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comPensionAuthPensionerDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comPensionAuthPensionerDO.setIdCard(null); |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail("当前期数已认证,请勿重复认证"); |
| | |
| | | populationDO.setVillageName(comMngVillageDO.getGroupAt()); |
| | | populationDO.setCardNoStr(vo.getCardNo()); |
| | | populationDO.setUpdateAt(new Date()); |
| | | populationDO.setDeath(vo.getDeath().toString()); |
| | | |
| | | String cardNoAES = populationDO.getCardNo(); |
| | | try { |
| | |
| | | public R specialInputUser(PageInputUserDTO pageInputUserDTO) { |
| | | IPage<InputUserInfoVO> iPage = populationDAO.specialInputUser( |
| | | new Page<>(pageInputUserDTO.getPageNum(), pageInputUserDTO.getPageSize()), pageInputUserDTO); |
| | | |
| | | if(iPage!=null){ |
| | | iPage.getRecords().forEach(page -> { |
| | | if(page.getAreaName() == null || StringUtils.isEmpty(page.getAreaName())){ |
| | | StringBuilder sb = new StringBuilder(); |
| | |
| | | page.setAreaName(sb.toString()); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComPensionAuthPensionerService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | private String aesKey; |
| | | @Resource |
| | | private ComPensionAuthPensionerService comPensionAuthPensionerService; |
| | | @Resource |
| | | private ComElderAuthElderliesDAO comElderAuthElderliesDAO; |
| | | |
| | | @Override |
| | | public R pagePensionAuthRecords(PageElderAuthRecordsDTO pageElderAuthRecordsDTO) { |
| | |
| | | comPensionAuthRecordDO.setAuthMethod(ComPensionAuthRecordDO.authMethod.xxrz); |
| | | comPensionAuthRecordDO.setPensionerId(comPensionAuthPensionerDO.getId()); |
| | | comPensionAuthRecordDO.setSubmitUserId(comElderAuthRecordVO.getSubmitUserId()); |
| | | comPensionAuthRecordDO.setApproverId(comElderAuthRecordVO.getSubmitUserId()); |
| | | if (this.baseMapper.insert(comPensionAuthRecordDO) < 0) { |
| | | return R.fail("认证失败,请重新尝试"); |
| | | } |
| | | comMngPopulationDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comMngPopulationDAO.updateById(comMngPopulationDO); |
| | | comPensionAuthPensionerDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comPensionAuthPensionerDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comPensionAuthPensionerDO.setIdCard(null); |
| | | comPensionAuthPensionerDAO.updateById(comPensionAuthPensionerDO); |
| | | ComElderAuthElderliesDO comElderAuthElderliesDO=comElderAuthElderliesDAO.selectOne(new QueryWrapper<ComElderAuthElderliesDO>().lambda().eq(ComElderAuthElderliesDO::getPopulationId,comMngPopulationDO.getId())); |
| | | if(comElderAuthElderliesDO!=null){ |
| | | comElderAuthElderliesDO.setAddress(comElderAuthRecordVO.getAddress()); |
| | | comElderAuthElderliesDO.setPhone(comElderAuthRecordVO.getPhone()); |
| | | comElderAuthElderliesDO.setIdCard(null); |
| | | comElderAuthElderliesDAO.updateById(comElderAuthElderliesDO); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | return R.fail("当前期数也认证,请勿重复认证"); |
| | | return R.fail("当前期数已认证,请勿重复认证"); |
| | | } |
| | | return R.fail("无养老认证数据"); |
| | | } |
| | |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.searchKey != null and pageElderAuthRecordsDTO.searchKey != ''"> |
| | | and (ceae.`name` like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or cear.mark like concat ('%', #{pageElderAuthRecordsDTO.searchKey}, '%') |
| | | or ceae.id_card = #{pageElderAuthRecordsDTO.idCard}) |
| | | </if> |
| | | order by cear.create_at desc |
| | | </select> |
| | | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.ComElderAuthRecordVO"> |
| | | SELECT |
| | | cear.id, |
| | | su.`name` submitUserName, |
| | | ceae.phone, |
| | | ceae.`name`, |
| | | ceae.id_card, |
| | | ceae.sex, |
| | | ceae.birthday, |
| | | ceae.personnel_category, |
| | | cear.address, |
| | | ceae.is_alive, |
| | | cear.auth_method, |
| | | cear.auth_period, |
| | | cear.auth_video, |
| | | cear.auth_date, |
| | | cear.mark, |
| | | cear.approval_status, |
| | | cear.approver_id, |
| | | su1.`name` as approverName, |
| | | cear.approval_date, |
| | | cear.auth_status |
| | | FROM |
| | | com_elder_auth_records cear |
| | | LEFT JOIN com_elder_auth_elderlies ceae ON cear.elderlies_id = ceae.id |
| | | LEFT JOIN sys_user su ON cear.submit_user_id = su.user_id |
| | | LEFT JOIN sys_user su1 ON cear.approver_id = su1.user_id |
| | | WHERE |
| | | ceae.community_id = #{pageElderAuthRecordsDTO.communityId} |
| | | <if test="pageElderAuthRecordsDTO.authPeriod != null and pageElderAuthRecordsDTO.authPeriod !=''"> |
| | | and cear.auth_period = #{pageElderAuthRecordsDTO.authPeriod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authMethod != null and pageElderAuthRecordsDTO.authMethod != 0"> |
| | | and cear.auth_method = #{pageElderAuthRecordsDTO.authMethod} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateBegin != null and pageElderAuthRecordsDTO.authDateBegin != ''"> |
| | | and cear.auth_date <![CDATA[ >= ]]> #{pageElderAuthRecordsDTO.authDateBegin} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authDateEnd != null and pageElderAuthRecordsDTO.authDateEnd != ''"> |
| | | and cear.auth_date <![CDATA[ <= ]]> #{pageElderAuthRecordsDTO.authDateEnd} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.approvalStatus != null and pageElderAuthRecordsDTO.approvalStatus != 0"> |
| | | and cear.approval_status = #{pageElderAuthRecordsDTO.approvalStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.authStatus != null and pageElderAuthRecordsDTO.authStatus != 0"> |
| | | and cear.auth_status = #{pageElderAuthRecordsDTO.authStatus} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.personnelCategory != null and pageElderAuthRecordsDTO.personnelCategory != 0"> |
| | | and ceae.personnel_category = #{pageElderAuthRecordsDTO.personnelCategory} |
| | | </if> |
| | | <if test="pageElderAuthRecordsDTO.isAlive != null and pageElderAuthRecordsDTO.isAlive != 0"> |
| | | and ceae.is_alive = #{pageElderAuthRecordsDTO.isAlive} |
| | | </if> |
| | |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="specialInputUserExport" resultType="com.panzhihua.common.model.vos.user.InputUserInfoVO"> |
| | | SELECT |
| | | cmp.id, |
| | | cmv.`name` AS areaName, |
| | | cmv.alley AS alley, |
| | | cmv.house_num AS houseNum, |
| | | cmp.`name`, |
| | | cmp.phone, |
| | | cmpct.label AS tags, |
| | | cmp.create_at |
| | | FROM |
| | | com_mng_population_community_tags as cmpct |
| | | LEFT JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cmp.village_id |
| | | WHERE |
| | | cmpct.community_id = #{pageInputUserDTO.communityId} |
| | | AND cmpct.label IS NOT NULL |
| | | <if test='pageInputUserDTO.name != null and pageInputUserDTO.name != ""'> |
| | | AND cmp.`name` LIKE concat(#{pageInputUserDTO.name},'%') |
| | | </if> |
| | | <if test='pageInputUserDTO.areaName != null and pageInputUserDTO.areaName != ""'> |
| | | AND cmv.`alley` LIKE concat(#{pageInputUserDTO.areaName},'%') |
| | | </if> |
| | | <if test='pageInputUserDTO.tags != null and pageInputUserDTO.tags != ""'> |
| | | AND cmpct.label like concat('%',#{pageInputUserDTO.tags},'%') |
| | | </if> |
| | | ORDER BY |
| | | cmp.create_at DESC |
| | | </select> |
| | | |
| | | <select id="query" resultType="com.panzhihua.common.model.vos.community.ComMngPopulationNoSecretVO"> |
| | | select * from com_mng_population |
| | | <where> |
| | |
| | | |
| | | @Select("<script> " + "SELECT\n" + " distinct COUNT( u.id ) readingVolume,\n" |
| | | + " d.community_id, d.content, d.cover, d.cover_mode, d.create_at, d.create_by, d.dyn_type, d.id, d.publish_at, d.status, d.title, d.type, \n" |
| | | + " act.name as createByName " + "FROM\n" |
| | | + " act.name as createByName,d.jump_type,d.jump_url " + "FROM\n" |
| | | + "com_pb_dyn d LEFT JOIN com_act act ON d.community_id = act.community_id \n" |
| | | + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id " + "where d.id = #{id} " + " group by d.id " + "</script>") |
| | | PartyBuildingComPbDynVO selectVoById(@Param("id") Long id); |
| | |
| | | if (nonNull(sysUserDO)) { |
| | | return R.fail("账户已经存在"); |
| | | } |
| | | sysUserDO = userDao.selectOne(new QueryWrapper<SysUserDO>().lambda().eq(SysUserDO::getPhone, convenientMerchantDTO.getPhone())); |
| | | if (nonNull(sysUserDO)) { |
| | | return R.fail("手机号已经存在"); |
| | | } |
| | | // sys_user 表 |
| | | sysUserDO = new SysUserDO(); |
| | | String encode = new BCryptPasswordEncoder().encode(convenientMerchantDTO.getPassword()); |
| | |
| | | sysUserDO.setType(10); |
| | | sysUserDO.setAreaId(null); |
| | | sysUserDO.setStatus(1); |
| | | sysUserDO.setPhone(convenientMerchantDTO.getPhone()); |
| | | sysUserDO.setPhone(null); |
| | | sysUserDO.setName(convenientMerchantDTO.getContacts()); |
| | | sysUserDO.setPassword(encode); |
| | | try { |