|
|
@ -27,6 +27,7 @@ import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.ServiceConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; |
|
|
|
import com.epmet.commons.tools.dto.result.OptionResultDTO; |
|
|
|
import com.epmet.commons.tools.enums.GenderEnum; |
|
|
|
import com.epmet.commons.tools.enums.HouseTypeEnum; |
|
|
@ -34,6 +35,7 @@ import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.feign.ResultDataResolver; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; |
|
|
|
import com.epmet.commons.tools.security.dto.TokenDto; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
@ -76,7 +78,7 @@ import java.util.stream.Collectors; |
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResiUserEntity> implements IcResiUserService, ResultDataResolver { |
|
|
|
private Logger logger = LogManager.getLogger(IcResiUserServiceImpl.class); |
|
|
|
private final Logger logger = LogManager.getLogger(IcResiUserServiceImpl.class); |
|
|
|
@Autowired |
|
|
|
private IcResiUserRedis icResiUserRedis; |
|
|
|
@Autowired |
|
|
@ -488,15 +490,15 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
* @param currUserAgencyId 当前用户的组织id |
|
|
|
* @param checkBoxOptionColumnIdxAndLabel 复选框的列号&label中文 |
|
|
|
*/ |
|
|
|
private void persist(Map<String, ColumnWrapper> headerColumnWrapper, List<Map<Integer, String>> dataRows, |
|
|
|
private void persist(Map<String, ColumnWrapper> headerColumnWrapper, List<Map<Integer, String>> dataRows, |
|
|
|
String currUserAgencyId, Map<Integer, String> checkBoxOptionColumnIdxAndLabel, String tableName) { |
|
|
|
for (Map<Integer, String> row : dataRows) { |
|
|
|
|
|
|
|
// 当前行的列们
|
|
|
|
// List<ColumnWrapper> columnsOfCurrRow = new ArrayList<>();
|
|
|
|
|
|
|
|
List<String> columnNames = new ArrayList<>(); |
|
|
|
List<String> columnValues = new ArrayList<>(); |
|
|
|
|
|
|
|
List<String> columnNames = new ArrayList<>(); |
|
|
|
List<String> columnValues = new ArrayList<>(); |
|
|
|
|
|
|
|
for (Map.Entry<String, ColumnWrapper> columnWrapperEntry : headerColumnWrapper.entrySet()) { |
|
|
|
|
|
|
@ -647,8 +649,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
List<String> optionValues = colIndexs.stream().filter(i -> { |
|
|
|
String cellContent = dataRow.get(i); |
|
|
|
if (StringUtils.isNotBlank(cellContent) && cellContent.equals("是")) return true; |
|
|
|
return false; |
|
|
|
return StringUtils.isNotBlank(cellContent) && cellContent.equals("是"); |
|
|
|
}).map(i -> { |
|
|
|
String checkboxOptionLabel = checkboxOptions.get(i); |
|
|
|
return options.get(checkboxOptionLabel); |
|
|
@ -666,7 +667,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
String pureUri = null; |
|
|
|
String cascadeItemId = null; |
|
|
|
ColumnWrapper cascadeItemColumnWrapper = null; |
|
|
|
|
|
|
|
|
|
|
|
if (fullUri.indexOf("?") != -1) { |
|
|
|
String[] uriParts = fullUri.split("\\?"); |
|
|
|
pureUri = uriParts[0]; |
|
|
@ -900,6 +901,44 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
return baseDao.dynamicQuery(customerId,resultTableName,conditions,subTables); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 查询个人数据 |
|
|
|
* @param formDTO |
|
|
|
* @author zxc |
|
|
|
* @date 2021/11/3 9:21 上午 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public PersonDataResultDTO personData(PersonDataFormDTO formDTO) { |
|
|
|
baseDao.personData(formDTO.getUserId()); |
|
|
|
// TODO
|
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 根据名字搜索 |
|
|
|
* @param formDTO |
|
|
|
* @param tokenDto |
|
|
|
* @author zxc |
|
|
|
* @date 2021/11/3 1:42 下午 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<SearchByNameResultDTO> searchByName(SearchByNameFormDTO formDTO, TokenDto tokenDto) { |
|
|
|
// 查询工作人员所属组织
|
|
|
|
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(tokenDto.getCustomerId(), tokenDto.getUserId()); |
|
|
|
if (null == staffInfo){ |
|
|
|
throw new RenException("未查询到当前工作人员所属组织"); |
|
|
|
} |
|
|
|
Integer no = (formDTO.getPageNo() - NumConstant.ONE) * formDTO.getPageSize(); |
|
|
|
PageInfo<SearchByNameResultDTO> pageInfo = PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.searchByName(formDTO.getName(), staffInfo.getAgencyId(), no)); |
|
|
|
List<SearchByNameResultDTO> result = pageInfo.getList(); |
|
|
|
// 查询小区,楼号,网格
|
|
|
|
// TODO
|
|
|
|
if (CollectionUtils.isEmpty(result)){ |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* desc:条件导出 |
|
|
|
* |
|
|
|