CeDo
2021-05-10 4fc44644c4a7bf9f0770a95ddbdad466c2743cb4
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -127,7 +127,7 @@
    public R detailPopulation(Long populationId) {
        ComMngPopulationDO comMngPopulationDO = populationDAO.selectById(populationId);
        if (ObjectUtils.isEmpty(comMngPopulationDO)) {
            return R.fail();
            return R.fail("用户信息不存在");
        }
        ComMngPopulationVO comMngPopulationVO = new ComMngPopulationVO();
        BeanUtils.copyProperties(comMngPopulationDO, comMngPopulationVO);
@@ -255,11 +255,16 @@
            index++;
        }
        //如果有错误,返回错误
        //暂时注释,等客户完成任务需要恢复
        /*if(!populationImportErrorVOList.isEmpty()){
            return R.fail(JSON.toJSONString(populationImportErrorVOList));
        }
        this.saveBatch(populationDOList);*/
        this.saveBatch(populationDOList);
        if(!populationImportErrorVOList.isEmpty()){
            return R.fail(JSON.toJSONString(populationImportErrorVOList));
        }
        this.saveBatch(populationDOList);
        return R.ok("共计导入实有人口数量:" + populationDOList.size());
    }
@@ -469,4 +474,25 @@
            return R.fail();
        }
    }
    /**
     * 查询实有人口电子档信息
     * @param populationId  实有人口id
     * @return  实有人口电子档信息
     */
    @Override
    public R electronicArchivesPopulation(Long populationId){
        ComMngPopulationDO comMngPopulationDO = populationDAO.selectById(populationId);
        if (ObjectUtils.isEmpty(comMngPopulationDO)) {
            return R.fail("用户信息不存在");
        }
        //查询当前用户电子档信息
        if(!StringUtils.isEmpty(comMngPopulationDO.getCardNo())){
            UserElectronicFileVO electronicFileVO = populationDAO.getSysUserElectronicFile(comMngPopulationDO.getCardNo());
            if(electronicFileVO != null){
                return R.ok(electronicFileVO);
            }
        }
        return R.ok();
    }
}