| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO; |
| | | import com.panzhihua.common.model.vos.elders.ComEldersAuthHistoryVO; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | public R communityAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) { |
| | | Long communityId = eldersAuthTypeQueryDTO.getCommunityId(); |
| | | List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>() |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt)); |
| | | .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE_" + communityId).orderByDesc(SysConfDO::getCreateAt)); |
| | | if (confDOList == null || confDOList.size() == 0) { |
| | | SysConfDO sysConfDO = new SysConfDO(); |
| | | sysConfDO.setCode("ELDER_AUTH_TYPE"); |
| | | sysConfDO.setCode("ELDER_AUTH_TYPE_" + communityId); |
| | | sysConfDO.setName("高龄认证类型"); |
| | | sysConfDO.setValue(2 + "");// 核验类型(1.视频认证 2.人脸核验) |
| | | sysConfDO.setDescription("高龄认证默认添加的核验类型"); |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-分页查询 |
| | | * @param pageElderAuthStatisticDTO 请求参数 |
| | | * @return 高龄认证统计列表 |
| | | */ |
| | | @Override |
| | | public R pageAuthStatisticAdmin(PageElderAuthStatisticDTO pageElderAuthStatisticDTO){ |
| | | return R.ok(comEldersAuthHistoryRecordMapper.pageAuthStatisticAdmin(new Page(pageElderAuthStatisticDTO.getPageNum(),pageElderAuthStatisticDTO.getPageSize()),pageElderAuthStatisticDTO)); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-标记 |
| | | * @param signElderAuthStatisticDTO 请求参数 |
| | | * @return 标记结果 |
| | | */ |
| | | @Override |
| | | public R signAuthStatisticAdmin(SignElderAuthStatisticDTO signElderAuthStatisticDTO){ |
| | | ComEldersAuthHistoryRecordDO authHistoryRecordDO = comEldersAuthHistoryRecordMapper.selectById(signElderAuthStatisticDTO.getId()); |
| | | if(authHistoryRecordDO == null){ |
| | | return R.fail("未查询到该记录"); |
| | | } |
| | | authHistoryRecordDO.setMark(signElderAuthStatisticDTO.getMark()); |
| | | if(comEldersAuthHistoryRecordMapper.updateById(authHistoryRecordDO) > 0){ |
| | | return R.ok(); |
| | | } |
| | | return R.fail(); |
| | | } |
| | | |
| | | /** |
| | | * 高龄认证统计-统计表头数据 |
| | | * @param statisticHeaderDTO 请求参数 |
| | | * @return 统计表头数据 |
| | | */ |
| | | @Override |
| | | public R getAuthHeaderStatisticAdmin(ElderAuthStatisticHeaderDTO statisticHeaderDTO){ |
| | | return R.ok(comEldersAuthHistoryRecordMapper.getAuthHeaderStatisticAdmin(statisticHeaderDTO)); |
| | | } |
| | | } |