From c1e48a47b39dbd6919bfd9cf2e7023e9f3d6fee8 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期五, 05 十一月 2021 10:24:21 +0800 Subject: [PATCH] 1105测试代码修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java index 2df2d0a..8010f0f 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java @@ -593,4 +593,34 @@ public R retrieveElderAuthDetail(Long identityAuthId) { return R.ok(comElderAuthRecordsDAO.findById(identityAuthId)); } + + @Override + public R add(ComElderAuthRecordVO comElderAuthRecordVO) { + if(!comElderAuthRecordVO.getIdCard().isEmpty()){ + List<ComMngPopulationDO> comMngPopulationDOS=comMngPopulationDAO.selectList(new QueryWrapper<ComMngPopulationDO>().lambda().eq(ComMngPopulationDO::getCardNoStr,comElderAuthRecordVO.getIdCard()).orderByDesc(ComMngPopulationDO::getCreateAt)); + if(!comMngPopulationDOS.isEmpty()){ + ComMngPopulationDO comMngPopulationDO=comMngPopulationDOS.get(0); + ComElderAuthElderliesDO comElderAuthElderliesDO=comElderAuthElderliesDAO.selectOne(new QueryWrapper<ComElderAuthElderliesDO>().lambda().eq(ComElderAuthElderliesDO::getPopulationId,comMngPopulationDO.getId())); + if(comElderAuthElderliesDO!=null){ + Integer count=comElderAuthRecordsDAO.selectCount(new QueryWrapper<ComElderAuthRecordsDO>().lambda().eq(ComElderAuthRecordsDO::getElderliesId,comElderAuthElderliesDO.getId()).eq(ComElderAuthRecordsDO::getAuthPeriod,comElderAuthRecordVO.getAuthPeriod())); + if(count==0){ + ComElderAuthRecordsDO comElderAuthRecordsDO=new ComElderAuthRecordsDO(); + BeanUtils.copyProperties(comElderAuthRecordVO,comElderAuthRecordsDO); + comElderAuthRecordsDO.setApprovalStatus(PASS_THROUGH.getStatus()); + comElderAuthRecordsDO.setApprovalDate(new Date()); + comElderAuthRecordsDO.setAuthStatus(CERTIFIED.getStatus()); + comElderAuthRecordsDO.setAuthMethod(ComPensionAuthRecordDO.authMethod.xxrz); + if (this.baseMapper.insert(comElderAuthRecordsDO) < 0) { + return R.fail("认证失败,请重新尝试"); + } + return R.ok(); + } + return R.fail("当前期数已认证,请勿重复认证"); + } + return R.fail("无养老认证数据"); + } + return R.fail("该身份证无实有人口信息"); + } + return R.fail("身份证不能为空"); + } } -- Gitblit v1.7.1