| | |
| | | import com.panzhihua.common.model.vos.user.InputUserInfoVO; |
| | | import com.panzhihua.common.model.vos.user.UserElectronicFileVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.*; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | " </script>") |
| | | IPage<ComMngVillagePopulationListVO> getVillagePopulationAdmin(Page page, @Param("villagePopulationDTO") PageComMngVillagePopulationDTO villagePopulationDTO); |
| | | |
| | | @Insert("<script> " + |
| | | "insert into com_mng_population(`id`,`street_id`,`act_id`,`village_id`,`name`,`sex`,`certificate_type`,`card_no`" + |
| | | ",`card_no_expiration_date`,`card_no_str`,`road`,`door_no`,`floor`,`unit_no`,`house_no`,`political_outlook`" + |
| | | ",`work_company`,`special_situation`,`phone`,`out_or_local`,`census_register`,`person_type`,`country`" + |
| | | ",`date_of_departure`,`native_place`,`nation_code`,`nation`,`is_rent`,`culture_level`,`marriage`,`healthy`" + |
| | | ",`blood_type`,`religion`,`profession`,`person_status`,`death`,`head_portrait`,`monthly_income`,`family_status`" + |
| | | ",`birthday`,`goal_in_china`,`date_of_arrival`,`label`,`card_photo_front`,`card_photo_back`,`family_book`" + |
| | | ",`delete_flag`,`remark`,`create_at`,`update_at`,`residence`,`address`,`house_id`) values " + |
| | | "<foreach collection=\"populationList\" item=\"item\" index=\"index\" separator=\",\">\n" + |
| | | " (#{item.id},#{item.streetId},#{item.actId},#{item.villageId}" + |
| | | ",#{item.name},#{item.sex},#{item.certificateType},#{item.cardNo}" + |
| | | ",#{item.cardNoExpirationDate},#{item.cardNoStr},#{item.road},#{item.doorNo}" + |
| | | ",#{item.floor},#{item.unitNo},#{item.houseNo},#{item.politicalOutlook}" + |
| | | ",#{item.workCompany},#{item.specialSituation},#{item.phone},#{item.outOrLocal}" + |
| | | ",#{item.censusRegister},#{item.personType},#{item.country},#{item.dateOfDeparture}" + |
| | | ",#{item.nativePlace},#{item.nationCode},#{item.nation},#{item.isRent},#{item.cultureLevel}" + |
| | | ",#{item.marriage},#{item.healthy},#{item.bloodType},#{item.religion},#{item.profession}" + |
| | | ",#{item.personStatus},#{item.death},#{item.headPortrait},#{item.monthlyIncome},#{item.familyStatus}" + |
| | | ",#{item.birthday},#{item.goalInChina},#{item.dateOfArrival},#{item.label},#{item.cardPhotoFront}" + |
| | | ",#{item.cardPhotoBack},#{item.familyBook},#{item.deleteFlag},#{item.remark},now(),#{item.updateAt}" + |
| | | ",#{item.residence},#{item.address},#{item.houseId})" + |
| | | " </foreach>" + |
| | | " </script>") |
| | | void insertAll(@Param("populationList") List<ComMngPopulationDO> populationList); |
| | | |
| | | void updateAll(@Param("populationList") List<ComMngPopulationDO> populationList); |
| | | |
| | | } |
| | | |
| | |
| | | import com.panzhihua.common.model.vos.grid.PopulationListVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngSubordinateVO; |
| | | import com.panzhihua.common.model.vos.user.ComMngHouseVo; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationDO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseDO; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | |
| | | @Select("select id as houseId,house_no from com_mng_population_house where village_id = #{villageId} and floor = #{floor} and unit_no = #{unitNo} order by create_at asc") |
| | | List<ComMngSubordinateVO> getHouseLevelByHouseNos(@Param("villageId") Long villageId,@Param("floor") String floor,@Param("unitNo") String unitNo); |
| | | |
| | | @Insert("<script> " + |
| | | "insert into com_mng_population_house(`id`,`street_id`,`community_id`,`village_id`" + |
| | | ",`alley`,`house_num`,`unit_no`,`floor`,`house_no`,`code`,`address`,`status`" + |
| | | ",`purpose`,`control_status`,`is_empty`,`construct_purpose`,`construct_area`" + |
| | | ",`path`,`create_at`) values " + |
| | | "<foreach collection=\"houseList\" item=\"item\" index=\"index\" separator=\",\">\n" + |
| | | " (#{item.id},#{item.streetId},#{item.communityId},#{item.villageId}" + |
| | | ",#{item.alley},#{item.houseNum},#{item.unitNo},#{item.floor}" + |
| | | ",#{item.houseNo},#{item.code},#{item.address},#{item.status}" + |
| | | ",#{item.purpose},#{item.controlStatus},#{item.isEmpty},#{item.constructPurpose}" + |
| | | ",#{item.constructArea},#{item.path},now())" + |
| | | " </foreach>" + |
| | | " </script>") |
| | | void insertAll(@Param("houseList") List<ComMngPopulationHouseDO> houseList); |
| | | } |
| | |
| | | import com.panzhihua.common.model.vos.community.ComMngPopulationHouseUserAdminVO; |
| | | import com.panzhihua.common.model.vos.grid.admin.ComMngVillagePopulationHouseListVO; |
| | | import com.panzhihua.service_community.model.dos.ComMngPopulationHouseUserDO; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | " cmphu.popul_id = #{villagePopulationDTO.populationId}") |
| | | IPage<ComMngVillagePopulationHouseListVO> getVillagePopulationHouseAdmin(Page page, @Param("villagePopulationDTO") PageComMngVillagePopulationHouseDTO villagePopulationDTO); |
| | | |
| | | @Insert("<script> " + |
| | | "insert into com_mng_population_house_user(`id`,`popul_id`,`house_id`,`relation_id`,`relation`" + |
| | | ",`residence`,`start_at`,`end_at`,`create_at`) values " + |
| | | "<foreach collection=\"houseUserList\" item=\"item\" index=\"index\" separator=\",\">\n" + |
| | | " (#{item.id},#{item.populId},#{item.houseId},#{item.relationId}" + |
| | | ",#{item.relation},#{item.residence},#{item.startAt},#{item.endAt}" + |
| | | ",now())" + |
| | | " </foreach>" + |
| | | " </script>") |
| | | void insertAll(@Param("houseUserList") List<ComMngPopulationHouseUserDO> houseUserList); |
| | | } |
| | |
| | | areaPath.append(populationActVO.getProvinceName()).append(">").append(populationActVO.getCityName()).append(">").append(populationActVO.getDistrictName()).append(">"); |
| | | //处理实有人口信息 |
| | | Integer nub = 1; |
| | | |
| | | //查询所有人口数据放入HashMap中 |
| | | List<ComMngPopulationDO> populationList = this.baseMapper.selectList(null); |
| | | HashMap<String,Object> populationMap = new HashMap<>(); |
| | | populationList.forEach(population -> { |
| | | String key = population.getCardNo(); |
| | | populationMap.put(key,population); |
| | | }); |
| | | //查询所有房屋信息放入到HashMap中 |
| | | List<ComMngPopulationHouseDO> houseLists = comMngPopulationHouseDAO.selectList(null); |
| | | HashMap<String,Object> houseMap = new HashMap<>(); |
| | | houseLists.forEach(house -> { |
| | | String key = house.getCommunityId() + house.getVillageId() + house.getFloor() + house.getUnitNo() + house.getHouseNo(); |
| | | houseMap.put(key,house); |
| | | }); |
| | | |
| | | List<ComMngVillageDO> villageList = comActVillageDAO.selectList(null); |
| | | HashMap<String,Object> villageMap = new HashMap<>(); |
| | | villageList.forEach(village -> { |
| | | String key = village.getCommunityId() + village.getAlley() + village.getHouseNum(); |
| | | villageMap.put(key,village); |
| | | }); |
| | | |
| | | List<ComMngPopulationHouseUserDO> houseUserLists = comMngPopulationHouseUserDAO.selectList(null); |
| | | HashMap<String,Object> houseUserMap = new HashMap<>(); |
| | | houseUserLists.forEach(houseUser -> { |
| | | String key = houseUser.getPopulId() + houseUser.getHouseId() + ""; |
| | | houseUserMap.put(key,houseUser); |
| | | }); |
| | | |
| | | |
| | | for (ComMngPopulationServeExcelVO vo : list) { |
| | | if (vo.getDoorNo().contains("号")) { |
| | | vo.setDoorNo(vo.getDoorNo().replace("号","")); |
| | |
| | | } |
| | | log.info("开始查询小区街路巷是否存在"); |
| | | //查询小区街路巷是否存在 |
| | | ComMngVillageDO comMngVillageDO = comActVillageDAO.selectOne(new QueryWrapper<ComMngVillageDO>().eq("alley", vo.getRoad()).eq("house_num", vo.getDoorNo()).eq("community_id", communityId)); |
| | | log.info("开始导入数据,行数:" + nub + "对象数据:" + vo.toString()); |
| | | nub++; |
| | | log.info("街路巷对象:" + comMngVillageDO); |
| | | log.info("街路巷对象是否为空:" + ObjectUtils.isEmpty(comMngVillageDO)); |
| | | log.info("街路巷对象是否为空2:" + (comMngVillageDO == null)); |
| | | if (comMngVillageDO == null) { |
| | | ComMngVillageDO comMngVillageDO = null; |
| | | String villageKey = communityId + vo.getRoad() + vo.getDoorNo(); |
| | | if(!isOnly(villageKey,villageMap)){ |
| | | comMngVillageDO = (ComMngVillageDO)villageMap.get(villageKey); |
| | | }else{ |
| | | ComMngPopulationMistakeExcelVO mistake = new ComMngPopulationMistakeExcelVO(); |
| | | BeanUtils.copyProperties(vo,mistake); |
| | | setMistake(mistake, vo); |
| | |
| | | |
| | | log.info("开始查询房屋是否存在"); |
| | | //先判断房屋是否存在 |
| | | ComMngPopulationHouseDO populationHouseDO = comMngPopulationHouseDAO.selectOne(new QueryWrapper<ComMngPopulationHouseDO>().lambda() |
| | | .eq(ComMngPopulationHouseDO::getCommunityId, communityId).eq(ComMngPopulationHouseDO::getVillageId, comMngVillageDO.getVillageId()) |
| | | .eq(ComMngPopulationHouseDO::getFloor, vo.getFloor()).eq(ComMngPopulationHouseDO::getUnitNo, vo.getUnitNo()) |
| | | .eq(ComMngPopulationHouseDO::getHouseNo, vo.getHouseNo())); |
| | | if (populationHouseDO == null) { |
| | | ComMngPopulationHouseDO populationHouseDO = null; |
| | | String houseKey = communityId + comMngVillageDO.getVillageId() + vo.getFloor() + vo.getUnitNo() + vo.getHouseNo(); |
| | | if(isOnly(houseKey,houseMap)){ |
| | | if(!houseList.isEmpty()){ |
| | | for (ComMngPopulationHouseDO house:houseList) { |
| | | if(house.getVillageId().equals(comMngVillageDO.getVillageId()) && house.getCommunityId().equals(communityId) |
| | |
| | | populationHouseDO = savePopulationHouse(vo, comMngVillageDO, communityId, areaPath, populationActVO.getName()); |
| | | houseList.add(populationHouseDO); |
| | | } |
| | | vo.setHouseId(populationHouseDO.getId()); |
| | | }else{ |
| | | populationHouseDO = (ComMngPopulationHouseDO)houseMap.get(houseKey); |
| | | } |
| | | vo.setHouseId(populationHouseDO.getId()); |
| | | log.info("开始查询房屋是否存在完成"); |
| | | |
| | | if (StringUtils.isEmpty(vo.getName()) && StringUtils.isEmpty(vo.getCardNo())) { |
| | |
| | | //判断实有人口是否已存在 |
| | | log.info("开始查询实有人口是否已存在"); |
| | | ComMngPopulationDO populationDO = null; |
| | | List<ComMngPopulationDO> populationDOList = this.baseMapper.selectList(new QueryWrapper<ComMngPopulationDO>().lambda() |
| | | .eq(ComMngPopulationDO::getCardNo, cardNoAES)); |
| | | if (populationDOList.isEmpty()) { |
| | | String populationKey = vo.getCardNo(); |
| | | if(!isOnly(populationKey,populationMap)){ |
| | | //存在实有人口信息,则更新 |
| | | populationDO = (ComMngPopulationDO)populationMap.get(populationKey); |
| | | ComMngPopulationDO updatePopulationDO = updatePopulationDO(vo,populationDO,labelList); |
| | | updateList.add(updatePopulationDO); |
| | | }else{ |
| | | //不存在实有人口,则新增 |
| | | populationDO = savePopulationDO(vo, populationActVO, comMngVillageDO,labelList); |
| | | saveList.add(populationDO); |
| | | } else { |
| | | //存在则更新 |
| | | if(populationDOList.size() > 1){ |
| | | for (ComMngPopulationDO population:populationDOList) { |
| | | if(population.getActId().equals(communityId)){ |
| | | populationDO = population; |
| | | break; |
| | | } |
| | | } |
| | | if(populationDO == null){ |
| | | populationDO = populationDOList.get(0); |
| | | } |
| | | }else{ |
| | | populationDO = populationDOList.get(0); |
| | | } |
| | | ComMngPopulationDO updatePopulationDO = updatePopulationDO(vo,populationDO,labelList); |
| | | updateList.add(updatePopulationDO); |
| | | } |
| | | log.info("开始查询实有人口是否已存在完成"); |
| | | |
| | | log.info("开始查询实有人口房屋居住信息"); |
| | | //处理实有人口房屋居住信息 |
| | | if (populationDO != null) { |
| | | ComMngPopulationHouseUserDO populationHouseUserDO = comMngPopulationHouseUserDAO.selectOne(new QueryWrapper<ComMngPopulationHouseUserDO>() |
| | | .lambda().eq(ComMngPopulationHouseUserDO::getHouseId, populationHouseDO.getId()) |
| | | .eq(ComMngPopulationHouseUserDO::getPopulId, populationDO.getId())); |
| | | if (populationHouseUserDO == null) { |
| | | ComMngPopulationHouseUserDO populationHouseUserDO = null; |
| | | String houseUserKey = populationDO.getId() + populationHouseDO.getId() + ""; |
| | | if(isOnly(houseUserKey,houseUserMap)){ |
| | | populationHouseUserDO = new ComMngPopulationHouseUserDO(); |
| | | populationHouseUserDO.setId(Snowflake.getId()); |
| | | populationHouseUserDO.setHouseId(populationHouseDO.getId()); |
| | |
| | | log.info("开始执行数据库导入"); |
| | | if(!houseList.isEmpty()){ |
| | | log.info("执行数据库导入房屋"); |
| | | comMngPopulationHouseService.saveBatch(houseList); |
| | | comMngPopulationHouseDAO.insertAll(houseList); |
| | | log.info("执行数据库导入房屋完成"); |
| | | } |
| | | if(!saveList.isEmpty()){ |
| | | log.info("执行数据库导入人口"); |
| | | this.saveBatch(saveList); |
| | | this.baseMapper.insertAll(saveList); |
| | | log.info("执行数据库导入人口完成"); |
| | | } |
| | | if(!updateList.isEmpty()){ |
| | | log.info("执行数据库更新人口"); |
| | | this.updateBatchById(updateList); |
| | | this.baseMapper.updateAll(updateList); |
| | | // this.updateBatchById(updateList); |
| | | log.info("执行数据库更新人口完成"); |
| | | } |
| | | if(!houseUserList.isEmpty()){ |
| | |
| | | mvo.setDeath(PopulOutOrLocalEnum.getCnDescByName(vo.getDeath())); |
| | | } |
| | | |
| | | /** |
| | | * 判重方法 |
| | | * @param key 主键 |
| | | * @param hashMap 数据集 |
| | | * @return 存在即为false 不存在则为true |
| | | */ |
| | | private boolean isOnly(String key,HashMap<String,Object> hashMap){ |
| | | return ObjectUtils.isEmpty(hashMap.get(key)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComMngPopulationDAO"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComMngPopulationDO"> |
| | | <id column="id" property="id" /> |
| | | <result column="street_id" property="streetId" /> |
| | | <result column="act_id" property="actId" /> |
| | | <result column="village_id" property="villageId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="sex" property="sex" /> |
| | | <result column="certificate_type" property="certificateType" /> |
| | | <result column="card_no" property="cardNo" /> |
| | | <result column="card_no_expiration_date" property="cardNoExpirationDate" /> |
| | | <result column="card_no_str" property="cardNoStr" /> |
| | | <result column="road" property="road" /> |
| | | <result column="door_no" property="doorNo" /> |
| | | <result column="floor" property="floor" /> |
| | | <result column="unit_no" property="unitNo" /> |
| | | <result column="house_no" property="houseNo" /> |
| | | <result column="political_outlook" property="politicalOutlook" /> |
| | | <result column="work_company" property="workCompany" /> |
| | | <result column="special_situation" property="specialSituation" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="out_or_local" property="outOrLocal" /> |
| | | <result column="census_register" property="censusRegister" /> |
| | | <result column="person_type" property="personType" /> |
| | | <result column="country" property="country" /> |
| | | <result column="date_of_departure" property="dateOfDeparture" /> |
| | | <result column="native_place" property="nativePlace" /> |
| | | <result column="nation_code" property="nationCode" /> |
| | | <result column="nation" property="nation" /> |
| | | <result column="is_rent" property="isRent" /> |
| | | <result column="culture_level" property="cultureLevel" /> |
| | | <result column="marriage" property="marriage" /> |
| | | <result column="healthy" property="healthy" /> |
| | | <result column="blood_type" property="bloodType" /> |
| | | <result column="religion" property="religion" /> |
| | | <result column="profession" property="profession" /> |
| | | <result column="person_status" property="personStatus" /> |
| | | <result column="death" property="death" /> |
| | | <result column="head_portrait" property="headPortrait" /> |
| | | <result column="monthly_income" property="monthlyIncome" /> |
| | | <result column="family_status" property="familyStatus" /> |
| | | <result column="birthday" property="birthday" /> |
| | | <result column="goal_in_china" property="goalInChina" /> |
| | | <result column="date_of_arrival" property="dateOfArrival" /> |
| | | <result column="label" property="label" /> |
| | | <result column="card_photo_front" property="cardPhotoFront" /> |
| | | <result column="card_photo_back" property="cardPhotoBack" /> |
| | | <result column="family_book" property="familyBook" /> |
| | | <result column="delete_flag" property="deleteFlag" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_at" property="createAt" /> |
| | | <result column="update_at" property="updateAt" /> |
| | | <result column="residence" property="residence" /> |
| | | <result column="address" property="address" /> |
| | | <result column="house_id" property="houseId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, street_id, act_id, village_id, name, sex, certificate_type, card_no, card_no_expiration_date, card_no_str, road, door_no, floor, unit_no, house_no, political_outlook, work_company, special_situation, phone, out_or_local, census_register, person_type, country, date_of_departure, native_place, nation_code, nation, is_rent, culture_level, marriage, healthy, blood_type, religion, profession, person_status, death, head_portrait, monthly_income, family_status, birthday, goal_in_china, date_of_arrival, label, card_photo_front, card_photo_back, family_book, delete_flag, remark, create_at, update_at, residence, address, house_id |
| | | </sql> |
| | | |
| | | <update id="updateAll" parameterType="java.util.List"> |
| | | <foreach collection="populationList" item="item" index="index" separator=";"> |
| | | update com_mng_population |
| | | <set> |
| | | <if test="item.streetId != null"> |
| | | `street_id` = #{item.streetId}, |
| | | </if> |
| | | <if test="item.actId != null"> |
| | | `act_id` = #{item.actId}, |
| | | </if> |
| | | <if test="item.villageId != null"> |
| | | `village_id` = #{item.villageId}, |
| | | </if> |
| | | <if test="item.name != null and item.name !="""> |
| | | `name` = #{item.name}, |
| | | </if> |
| | | <if test="item.sex != null"> |
| | | `sex` = #{item.sex}, |
| | | </if> |
| | | <if test="item.certificateType != null and item.certificateType !="""> |
| | | `certificate_type` = #{item.certificateType}, |
| | | </if> |
| | | <if test="item.cardNo != null and item.cardNo !="""> |
| | | `card_no` = #{item.cardNo}, |
| | | </if> |
| | | <if test="item.cardNoExpirationDate != null"> |
| | | `card_no_expiration_date` = #{item.cardNoExpirationDate}, |
| | | </if> |
| | | <if test="item.cardNoStr != null and item.cardNoStr !="""> |
| | | `card_no_str` = #{item.cardNoStr}, |
| | | </if> |
| | | <if test="item.road != null and item.road !="""> |
| | | `road` = #{item.road}, |
| | | </if> |
| | | <if test="item.doorNo != null and item.doorNo !="""> |
| | | `door_no` = #{item.doorNo}, |
| | | </if> |
| | | <if test="item.floor != null and item.floor !="""> |
| | | `floor` = #{item.floor}, |
| | | </if> |
| | | <if test="item.unitNo != null and item.unitNo !="""> |
| | | `unit_no` = #{item.unitNo}, |
| | | </if> |
| | | <if test="item.houseNo != null and item.houseNo !="""> |
| | | `house_no` = #{item.houseNo}, |
| | | </if> |
| | | <if test="item.politicalOutlook != null"> |
| | | `political_outlook` = #{item.politicalOutlook}, |
| | | </if> |
| | | <if test="item.workCompany != null and item.workCompany !="""> |
| | | `work_company` = #{item.workCompany}, |
| | | </if> |
| | | <if test="item.specialSituation != null and item.specialSituation !="""> |
| | | `special_situation` = #{item.specialSituation}, |
| | | </if> |
| | | <if test="item.phone != null and item.phone !="""> |
| | | `phone` = #{item.phone}, |
| | | </if> |
| | | <if test="item.outOrLocal != null"> |
| | | `out_or_local` = #{item.outOrLocal}, |
| | | </if> |
| | | <if test="item.censusRegister != null and item.censusRegister !="""> |
| | | `census_register` = #{item.censusRegister}, |
| | | </if> |
| | | <if test="item.personType != null and item.personType !="""> |
| | | `person_type` = #{item.personType}, |
| | | </if> |
| | | <if test="item.country != null and item.country !="""> |
| | | `country` = #{item.country}, |
| | | </if> |
| | | <if test="item.dateOfDeparture != null"> |
| | | `date_of_departure` = #{item.dateOfDeparture}, |
| | | </if> |
| | | <if test="item.nativePlace != null and item.nativePlace !="""> |
| | | `native_place` = #{item.nativePlace}, |
| | | </if> |
| | | <if test="item.nationCode != null and item.nationCode !="""> |
| | | `nation_code` = #{item.nationCode}, |
| | | </if> |
| | | <if test="item.nation != null and item.nation !="""> |
| | | `nation` = #{item.nation}, |
| | | </if> |
| | | <if test="item.isRent != null"> |
| | | `is_rent` = #{item.isRent}, |
| | | </if> |
| | | <if test="item.cultureLevel != null"> |
| | | `culture_level` = #{item.cultureLevel}, |
| | | </if> |
| | | <if test="item.marriage != null"> |
| | | `marriage` = #{item.marriage}, |
| | | </if> |
| | | <if test="item.healthy != null and item.healthy !="""> |
| | | `healthy` = #{item.healthy}, |
| | | </if> |
| | | <if test="item.bloodType != null and item.bloodType !="""> |
| | | `blood_type` = #{item.bloodType}, |
| | | </if> |
| | | <if test="item.religion != null and item.religion !="""> |
| | | `religion` = #{item.religion}, |
| | | </if> |
| | | <if test="item.profession != null and item.profession !="""> |
| | | `profession` = #{item.profession}, |
| | | </if> |
| | | <if test="item.personStatus != null and item.personStatus !="""> |
| | | `person_status` = #{item.personStatus}, |
| | | </if> |
| | | <if test="item.death != null and item.death !="""> |
| | | `death` = #{item.death}, |
| | | </if> |
| | | <if test="item.headPortrait != null and item.headPortrait !="""> |
| | | `head_portrait` = #{item.headPortrait}, |
| | | </if> |
| | | <if test="item.monthlyIncome != null and item.monthlyIncome !="""> |
| | | `monthly_income` = #{item.monthlyIncome}, |
| | | </if> |
| | | <if test="item.familyStatus != null and item.familyStatus !="""> |
| | | `family_status` = #{item.familyStatus}, |
| | | </if> |
| | | <if test="item.birthday != null and item.birthday !="""> |
| | | `birthday` = #{item.birthday}, |
| | | </if> |
| | | <if test="item.goalInChina != null and item.goalInChina !="""> |
| | | `goal_in_china` = #{item.goalInChina}, |
| | | </if> |
| | | <if test="item.label != null and item.label !="""> |
| | | `label` = #{item.label}, |
| | | </if> |
| | | <if test="item.dateOfArrival != null"> |
| | | `date_of_arrival` = #{item.dateOfArrival}, |
| | | </if> |
| | | <if test="item.cardPhotoFront != null and item.cardPhotoFront !="""> |
| | | `card_photo_front` = #{item.cardPhotoFront}, |
| | | </if> |
| | | <if test="item.cardPhotoBack != null and item.cardPhotoBack !="""> |
| | | `card_photo_back` = #{item.cardPhotoBack}, |
| | | </if> |
| | | <if test="item.familyBook != null and item.familyBook !="""> |
| | | `family_book` = #{item.familyBook}, |
| | | </if> |
| | | <if test="item.deleteFlag != null"> |
| | | `delete_flag` = #{item.deleteFlag}, |
| | | </if> |
| | | <if test="item.remark != null and item.remark !="""> |
| | | `remark` = #{item.remark}, |
| | | </if> |
| | | <if test="item.residence != null and item.residence !="""> |
| | | `residence` = #{item.residence}, |
| | | </if> |
| | | <if test="item.address != null and item.address !="""> |
| | | `address` = #{item.address}, |
| | | </if> |
| | | <if test="item.houseId != null"> |
| | | `house_id` = #{item.houseId}, |
| | | </if> |
| | | `update_at` = NOW() |
| | | </set> |
| | | WHERE `id` = #{item.id} |
| | | </foreach> |
| | | ; |
| | | </update> |
| | | |
| | | </mapper> |