CeDo
2021-05-19 0d248bc79c25c38dbdbda49dbcb5a6595cbca379
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -15,6 +15,7 @@
import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO;
import com.panzhihua.common.model.vos.user.UserPhoneVO;
import com.panzhihua.common.utlis.ClazzUtils;
import com.panzhihua.common.utlis.IdCard;
import com.panzhihua.common.utlis.IdCardUtil;
import com.panzhihua.service_community.dao.ComMngPopulationDAO;
import com.panzhihua.service_community.model.dos.*;
@@ -1559,7 +1560,8 @@
        if(theFamily==null){
            return R.fail("家庭成员信息错误");
        }
        if(theFamily.getAge()>=80){
        Integer age = IdCard.IdNOToAge(theFamily.getIdCard());
        if(age>=80){
            Long loginUserId = eldersAuthAddByFamilyDTO.getUserId();
            EldersAuthDO eldersAuthDO = new EldersAuthDO();
            eldersAuthDO.setSumitUserId(eldersAuthAddByFamilyDTO.getSumitUserId());
@@ -1568,14 +1570,17 @@
            eldersAuthDO.setIdCard(theFamily.getIdCard());
            eldersAuthDO.setAuthUserName(theFamily.getName());
            eldersAuthDO.setVideoUrl(eldersAuthAddByFamilyDTO.getVideoUrl());
            eldersAuthDO.setFamilyUserId(eldersAuthAddByFamilyDTO.getFamilyUserId());
            //根据身份证查询出籍贯 出生日期
            String domicile = "";
            Date birthDay = new Date();
            //String domicile = IdCard.domicile(eldersAuthDO.getIdCard());
            String domicile = eldersAuthService.queryDomicile(eldersAuthDO.getIdCard());
            Date birthDay = IdCard.birthDay(eldersAuthDO.getIdCard());
            eldersAuthDO.setDomicile(domicile);
            eldersAuthDO.setBirthDay(birthDay);
            int add = eldersAuthService.getBaseMapper().insert(eldersAuthDO);
            if(add==1){
                return R.ok();
                return R.ok(eldersAuthDO.getId());
            }
        }else{
            return R.fail("家庭成员年龄还未达到80");
@@ -1593,4 +1598,15 @@
        ClazzUtils.setIfStringIsEmpty(eldersAuthFeedbackAddDTO);
        return eldersAuthService.addFeedback(eldersAuthFeedbackAddDTO);
    }
    /**
     * 查询导出高龄老人
     * @param pageEldersAuthDTO
     * @return
     */
    @PostMapping("/eldersauth/eldersAuthQuery")
    R eldersAuthQuery(@RequestBody PageEldersAuthDTO pageEldersAuthDTO){
        return eldersAuthService.queryExportData(pageEldersAuthDTO);
    }
}