101captain
2021-09-03 29558b92fd0267b341aab6146175b97a1abedc5d
高龄老人bug修改
3个文件已修改
66 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComEldersAuthElderlyDO.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -10,6 +10,9 @@
import javax.annotation.Resource;
import cn.hutool.core.date.DateUtil;
import com.panzhihua.service_community.model.dos.*;
import com.panzhihua.service_community.service.*;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
@@ -85,32 +88,6 @@
import com.panzhihua.service_community.dao.ComActActSignDAO;
import com.panzhihua.service_community.dao.ComEldersAuthHistoryRecordMapper;
import com.panzhihua.service_community.dao.ComMngPopulationDAO;
import com.panzhihua.service_community.model.dos.ComActActEvaluateDO;
import com.panzhihua.service_community.model.dos.ComActActPrizeDO;
import com.panzhihua.service_community.model.dos.ComActDynDO;
import com.panzhihua.service_community.model.dos.ComActEasyPhotoDO;
import com.panzhihua.service_community.model.dos.ComActMicroWishDO;
import com.panzhihua.service_community.model.dos.ComEldersAuthHistoryRecordDO;
import com.panzhihua.service_community.model.dos.ComEldersAuthUserDO;
import com.panzhihua.service_community.model.dos.ComMngStructAreaDO;
import com.panzhihua.service_community.model.dos.EldersAuthDO;
import com.panzhihua.service_community.service.ComActActEvaluateService;
import com.panzhihua.service_community.service.ComActActPrizeService;
import com.panzhihua.service_community.service.ComActActivityService;
import com.panzhihua.service_community.service.ComActDynService;
import com.panzhihua.service_community.service.ComActEasyPhotoActivityService;
import com.panzhihua.service_community.service.ComActEasyPhotoService;
import com.panzhihua.service_community.service.ComActMessageService;
import com.panzhihua.service_community.service.ComActMicroWishService;
import com.panzhihua.service_community.service.ComActQuestnaireService;
import com.panzhihua.service_community.service.ComActService;
import com.panzhihua.service_community.service.ComEldersAuthUserService;
import com.panzhihua.service_community.service.ComMngStructAreaDistrictService;
import com.panzhihua.service_community.service.ComMngStructAreaService;
import com.panzhihua.service_community.service.ComMngStructHouseService;
import com.panzhihua.service_community.service.ComMngStructOtherBuildService;
import com.panzhihua.service_community.service.ComMngVolunteerMngService;
import com.panzhihua.service_community.service.EldersAuthService;
import cn.hutool.core.util.IdcardUtil;
import lombok.extern.slf4j.Slf4j;
@@ -167,6 +144,8 @@
    private ComActEasyPhotoActivityService comActEasyPhotoActivityService;
    @Resource
    private ComActActEvaluateService comActActEvaluateService;
    @Resource
    private ComEldersAuthElderlyService comEldersAuthElderlyService;
    /**
     * 新增社区活动
@@ -2121,15 +2100,18 @@
        if (authUserDO == null) {
            return R.fail("未查询到老人信息");
        }
        //根据身份证获取出生日期并获取岁数
        String idCard = authUserDO.getIdCard();
        Date birthDay = IdCard.birthDay(idCard);
        long year=DateUtil.betweenYear(birthDay,DateUtil.date(),true);
        if(authUserDO.getBigAgeId()!=null){
            ComEldersAuthElderlyDO comEldersAuthElderlyDO=comEldersAuthElderlyService.getById(authUserDO.getBigAgeId());
            if(comEldersAuthElderlyDO!=null&&comEldersAuthElderlyDO.getIsExist()==ComEldersAuthElderlyDO.isExist.yes&&comEldersAuthElderlyDO.getIsBigAge()==ComEldersAuthElderlyDO.isBigAge.yes&&year>=80){
        Long elderId = authUserDO.getId();
        boolean canReAuthThisMonth = comEldersAuthUserService.checkReAuthAgain(elderId);
        if (!canReAuthThisMonth) {
            return R.fail("当月已认证,不能再次进行认证");
        }
        String idCard = authUserDO.getIdCard();
        Long loginUserId = eldersAuthAddByFamilyDTO.getUserId();
        EldersAuthDO eldersAuthDO = new EldersAuthDO();
        eldersAuthDO.setSumitUserId(loginUserId);
@@ -2146,8 +2128,6 @@
        if (StringUtils.isEmpty(domicile)) {
            domicile = "暂无";
        }
        Date birthDay = IdCard.birthDay(idCard);
        eldersAuthDO.setDomicile(domicile);
        eldersAuthDO.setBirthDay(birthDay);
        int add = eldersAuthService.getBaseMapper().insert(eldersAuthDO);
@@ -2181,7 +2161,10 @@
            return R.ok(eldersAuthDO.getId());
        }
        return R.fail();
            }
            return R.fail("不满足认证条件");
        }
        return R.fail("未查询到高龄老人库数据");
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComEldersAuthElderlyDO.java
@@ -81,4 +81,19 @@
     */
    private Long updateBy;
    /**
     * 是否健在(1.是 2.否) 列: is_exist
     */
    public interface isExist{
        int yes=1;
        int no=2;
    }
    /**
     * 是否办理高龄津贴(1.是 2.否) 列: is_exist
     */
    public interface isBigAge{
        int yes=1;
        int no=2;
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/EldersAuthServiceImpl.java
@@ -247,7 +247,7 @@
    public R communityAuthType(EldersAuthTypeQueryDTO eldersAuthTypeQueryDTO) {
        Long communityId = eldersAuthTypeQueryDTO.getCommunityId();
        List<SysConfDO> confDOList = sysConfDao.selectList(new LambdaQueryWrapper<SysConfDO>()
            .eq(SysConfDO::getCommunityId, communityId).orderByDesc(SysConfDO::getCreateAt));
            .eq(SysConfDO::getCommunityId, communityId).eq(SysConfDO::getCode,"ELDER_AUTH_TYPE").orderByDesc(SysConfDO::getCreateAt));
        if (confDOList == null || confDOList.size() == 0) {
            SysConfDO sysConfDO = new SysConfDO();
            sysConfDO.setCode("ELDER_AUTH_TYPE");