springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -181,7 +181,7 @@ "<if test='comMngPopulationVO.outOrLocal != null'>" + " and cmp.out_or_local = #{comMngPopulationVO.outOrLocal} " + " </if> " + "<if test='comMngPopulationVO.villageId != null'>" + "<if test='comMngPopulationVO.villageId != null and comMngPopulationVO.villageId != ""'>" + " and cmp.village_id = #{comMngPopulationVO.villageId} " + " </if> " + "<if test='comMngPopulationVO.road != null and comMngPopulationVO.road != ""'>" + @@ -212,7 +212,7 @@ "AND date_format(cmp.birthday,'%Y-%m-%d') <![CDATA[ >= ]]> #{comMngPopulationVO.ageEndTime} " + " </if> " + "<if test='comMngPopulationVO.ageStartTime != null and comMngPopulationVO.ageEndTime != null and comMngPopulationVO.ageStartTime == comMngPopulationVO.ageEndTime'>" + "AND date_format(cmp.birthday,'%Y-%m-%d') = #{comMngPopulationVO.ageStartTime} " + "AND cmp.birthday = #{comMngPopulationVO.ageStartTime} " + " </if> " + "<if test='comMngPopulationVO.nativePlace != null and comMngPopulationVO.nativePlace != ""'>" + "AND cmp.native_place LIKE concat(#{comMngPopulationVO.nativePlace},'%') " + springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngVillageDAO.java
New file @@ -0,0 +1,27 @@ package com.panzhihua.service_community.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.ExportComMngCarExcelDTO; import com.panzhihua.common.model.dtos.community.PageComMngCarDTO; import com.panzhihua.common.model.vos.community.ComMngCarExcelVO; import com.panzhihua.common.model.vos.community.ComMngCarVO; import com.panzhihua.common.model.vos.community.ComMngPopulationCarVO; import com.panzhihua.service_community.model.dos.ComMngCarDO; import com.panzhihua.service_community.model.dos.ComMngVillageDO; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; /** * @description: 小区管理 * @author: Null * @date: 2021/3/16 14:28 */ @Mapper public interface ComMngVillageDAO extends BaseMapper<ComMngVillageDO> { } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngCarServiceImpl.java
@@ -19,9 +19,11 @@ import com.panzhihua.common.utlis.ParamRegularUtil; import com.panzhihua.service_community.dao.ComMngCarDAO; import com.panzhihua.service_community.dao.ComMngStructAreaDAO; import com.panzhihua.service_community.dao.ComMngVillageDAO; import com.panzhihua.service_community.model.dos.ComCvtServeDO; import com.panzhihua.service_community.model.dos.ComMngCarDO; import com.panzhihua.service_community.model.dos.ComMngStructAreaDO; import com.panzhihua.service_community.model.dos.ComMngVillageDO; import com.panzhihua.service_community.service.ComMngCarService; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Value; @@ -43,6 +45,8 @@ private ComMngCarDAO comMngCarDAO; @Resource private ComMngStructAreaDAO comMngStructAreaDAO; @Resource private ComMngVillageDAO comMngVillageDAO; @Resource private UserService userService; @Value("${domain.aesKey:}") @@ -109,8 +113,8 @@ return R.ok("车辆已存在"); } } ComMngStructAreaDO comMngStructAreaDO = comMngStructAreaDAO.selectById(comMngCarSaveDTO.getAreaId()); if (ObjectUtils.isEmpty(comMngStructAreaDO)) { ComMngVillageDO comMngVillageDO = comMngVillageDAO.selectById(comMngCarSaveDTO.getAreaId()); if (ObjectUtils.isEmpty(comMngVillageDO)) { return R.fail("小区不存在"); } if (ObjectUtils.isEmpty(comMngCarSaveDTO.getMobile())) { @@ -121,8 +125,8 @@ } ComMngCarDO comMngCarDO = new ComMngCarDO(); BeanUtils.copyProperties(comMngCarSaveDTO, comMngCarDO); comMngCarDO.setAreaName(comMngStructAreaDO.getAreaName()); comMngCarDO.setCommunityId(comMngStructAreaDO.getCommunityId()); comMngCarDO.setAreaName(comMngVillageDO.getGroupAt()); comMngCarDO.setCommunityId(comMngVillageDO.getCommunityId()); try { comMngCarDO.setCardNo(AESUtil.encrypt128(comMngCarSaveDTO.getCardNo(),aesKey)); }catch (Exception e){ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -285,14 +285,14 @@ } if (StringUtils.isNotEmpty(comMngPopulationVO.getAgeStart())) { String ageStartTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeStart()) + 1)), "yyyy-MM-dd"); String ageStartTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeStart()))), "yyyy-MM-dd"); if (StringUtils.isNotEmpty(ageStartTime)) { comMngPopulationVO.setAgeStartTime(ageStartTime); } } if (StringUtils.isNotEmpty(comMngPopulationVO.getAgeEnd())) { String ageEndTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeEnd()) + 1)), "yyyy-MM-dd"); String ageEndTime = DateUtils.getDateFormatString(DateUtils.yearAddNum(new Date(), -(Integer.parseInt(comMngPopulationVO.getAgeEnd()))), "yyyy-MM-dd"); if (StringUtils.isNotEmpty(ageEndTime)) { comMngPopulationVO.setAgeEndTime(ageEndTime); }