| | |
| | | QueryWrapper<HouseholdEntity> wrapper = new QueryWrapper<>(); |
| | | wrapper.eq("house_code", houseAndHoldExcel.getHouseCode()) |
| | | .eq("is_deleted", 0) |
| | | .eq("id_card", houseAndHoldExcel.getIdCard()) |
| | | .eq("name", houseAndHoldExcel.getName()); |
| | | HouseholdEntity one = householdService.getOne(wrapper); |
| | | // 不存在则插入,存在则不操作 |
| | |
| | | householdEntity.setHouseCode(houseAndHoldExcel.getHouseCode()); |
| | | householdEntity.setName(houseAndHoldExcel.getName()); |
| | | householdEntity.setPhoneNumber(houseAndHoldExcel.getPhoneNumber()); |
| | | if (!Strings.isBlank(houseAndHoldExcel.getRoleType())) { |
| | | householdEntity.setRoleType(Integer.parseInt(houseAndHoldExcel.getRoleType())); |
| | | } |
| | | // 与角色关系 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getRelationship())) { |
| | | householdEntity.setRelationship(Integer.parseInt(houseAndHoldExcel.getRelationship())); |
| | |
| | | if (!Strings.isBlank(houseAndHoldExcel.getGender())) { |
| | | householdEntity.setGender(Short.parseShort(houseAndHoldExcel.getGender())); |
| | | } |
| | | householdEntity.setIdCard(houseAndHoldExcel.getIdCard()); |
| | | // 居民身份证 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getIdCard())) { |
| | | // 身份证类型为居民身份证 |
| | | householdEntity.setCardType(111); |
| | | householdEntity.setIdCard(houseAndHoldExcel.getIdCard()); |
| | | } |
| | | // 党员 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getPartyEmber())) { |
| | | householdEntity.setPartyEmber(Integer.parseInt(houseAndHoldExcel.getPartyEmber())); |
| | |
| | | householdEntity.setEmployer(houseAndHoldExcel.getEmployer()); |
| | | householdEntity.setOccupation(houseAndHoldExcel.getOccupation()); |
| | | householdEntity.setCmpyRegAddr(houseAndHoldExcel.getCmpyRegAddr()); |
| | | // 外出 |
| | | householdEntity.setGoOutReason(houseAndHoldExcel.getGoOutReason()); |
| | | if (!Strings.isBlank(houseAndHoldExcel.getGoOutTime())) { |
| | | try { |
| | |
| | | if (!Strings.isBlank(houseAndHoldExcel.getMaritalStatus())) { |
| | | householdEntity.setMaritalStatus(Integer.parseInt(houseAndHoldExcel.getMaritalStatus())); |
| | | } |
| | | // 车牌号 |
| | | householdEntity.setCardNumber(houseAndHoldExcel.getCardNumber()); |
| | | // 其他联系方式 |
| | | householdEntity.setOtherContact(houseAndHoldExcel.getOtherContact()); |
| | | if (Strings.isBlank(householdEntity.getHouseCode())) { |
| | | if (!Strings.isBlank(householdEntity.getHomeAdcode())) { |
| | | // 暂时不处理,导入数据目前都有house_code |
| | | String adCode = shiftResidentHomeAdcode(houseAndHoldExcel.getHomeAdcode()); |
| | | // 转换行政区code |
| | |
| | | one.setHouseCode(houseAndHoldExcel.getHouseCode()); |
| | | one.setName(houseAndHoldExcel.getName()); |
| | | one.setPhoneNumber(houseAndHoldExcel.getPhoneNumber()); |
| | | if (!Strings.isBlank(houseAndHoldExcel.getRoleType())) { |
| | | one.setRoleType(Integer.parseInt(houseAndHoldExcel.getRoleType())); |
| | | } |
| | | // 与角色关系 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getRelationship())) { |
| | | one.setRelationship(Integer.parseInt(houseAndHoldExcel.getRelationship())); |
| | |
| | | if (!Strings.isBlank(houseAndHoldExcel.getGender())) { |
| | | one.setGender(Short.parseShort(houseAndHoldExcel.getGender())); |
| | | } |
| | | one.setIdCard(houseAndHoldExcel.getIdCard()); |
| | | // 居民身份证 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getIdCard())) { |
| | | // 身份证类型为居民身份证 |
| | | one.setCardType(111); |
| | | one.setIdCard(houseAndHoldExcel.getIdCard()); |
| | | } |
| | | // 党员 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getPartyEmber())) { |
| | | one.setPartyEmber(Integer.parseInt(houseAndHoldExcel.getPartyEmber())); |
| | | } |
| | | // one.setHkmtPass(houseAndHoldExcel.getHkmtPass()); |
| | | // one.setPassport(houseAndHoldExcel.getPassport()); |
| | | // 民族 |
| | | if (!Strings.isBlank(houseAndHoldExcel.getEthnicity())) { |
| | | one.setEthnicity(Integer.parseInt(houseAndHoldExcel.getEthnicity())); |
| | |
| | | } |
| | | one.setCardNumber(houseAndHoldExcel.getCardNumber()); |
| | | one.setOtherContact(houseAndHoldExcel.getOtherContact()); |
| | | if (Strings.isBlank(one.getHouseCode())) { |
| | | if (!Strings.isBlank(one.getHomeAdcode())) { |
| | | // 暂时不处理,导入数据目前都有house_code |
| | | String adCode = shiftResidentHomeAdcode(houseAndHoldExcel.getHomeAdcode()); |
| | | // 转换行政区code |