| | |
| | | wrapper.eq("house_code", householdEntity.getHouseCode()) |
| | | .eq("is_deleted", 0) |
| | | .eq("name", householdEntity.getName()); |
| | | HouseholdEntity one = this.getOne(wrapper); |
| | | List<HouseholdEntity> list = this.list(wrapper); |
| | | // 与角色关系 |
| | | if (!Strings.isBlank(houseHoldExcel.getRelationship())) { |
| | | householdEntity.setRelationship(Integer.parseInt(houseHoldExcel.getRelationship())); |
| | |
| | | householdEntity.setMaritalStatus(Integer.parseInt(houseHoldExcel.getMaritalStatus())); |
| | | } |
| | | |
| | | if (one==null){ |
| | | if (list.size()==0){ |
| | | // 新增 |
| | | this.save(householdEntity); |
| | | importNum++; |
| | |
| | | }else { |
| | | updateNum++; |
| | | if (isCovered){ |
| | | // 覆盖更新 |
| | | householdEntity.setId(one.getId()); |
| | | // 更新 |
| | | updateById(householdEntity); |
| | | for (HouseholdEntity one : list) { |
| | | // 覆盖更新 |
| | | householdEntity.setId(one.getId()); |
| | | // 更新 |
| | | updateById(householdEntity); |
| | | // 处理标签 |
| | | handleLabel(householdEntity,houseHoldExcel); |
| | | } |
| | | importNum++; |
| | | // 处理标签 |
| | | handleLabel(householdEntity,houseHoldExcel); |
| | | } |
| | | } |
| | | } |