|
@@ -1682,6 +1682,38 @@ public class KwsEnterpriseService {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ public List<EntInfo> queryEnterpriseByPageType(EnterprisePageQueryReqVo req) {
|
|
|
|
|
+ log.info("查询企业信息请求参数:{}", JSON.toJSONString(req));
|
|
|
|
|
+
|
|
|
|
|
+ List<KwsEntType> entTypes = kwsEntTypeRepository.queryByType(req.getEnterpriseType());
|
|
|
|
|
+ if (CollectionUtils.isEmpty(entTypes)) {
|
|
|
|
|
+ return Collections.emptyList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ Set<Long> entIds = entTypes.stream().map(KwsEntType::getEntId).collect(Collectors.toSet());
|
|
|
|
|
+ if (CollectionUtils.isEmpty(entIds)) {
|
|
|
|
|
+ return Collections.emptyList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ List<KwsEnterprise> enterprises = kwsEnterpriseRepository.list(Wrappers.<KwsEnterprise>lambdaQuery()
|
|
|
|
|
+ .eq(BaseModel::getDelFlag, Global.UN_DELETED)
|
|
|
|
|
+ .eq(BaseModel::getStatus, Global.NO)
|
|
|
|
|
+ .eq(KwsEnterprise::getApproval, ApprovalEnum.OK.getCode())
|
|
|
|
|
+ .in(KwsEnterprise::getId, entIds)
|
|
|
|
|
+ .like(StringUtils.isNotBlank(req.getEntName()), KwsEnterprise::getFirmName, req.getEntName())
|
|
|
|
|
+ .orderByAsc(KwsEnterprise::getFirmName));
|
|
|
|
|
+ if (CollectionUtils.isEmpty(enterprises)) {
|
|
|
|
|
+ return Collections.emptyList();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return enterprises.stream().map(item -> {
|
|
|
|
|
+ EntInfo info = new EntInfo();
|
|
|
|
|
+ info.setEntId(String.valueOf(item.getId()));
|
|
|
|
|
+ info.setEntName(item.getFirmName());
|
|
|
|
|
+ return info;
|
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
public EntInfo queryEnt(String entName) {
|
|
public EntInfo queryEnt(String entName) {
|
|
|
return kwsEnterpriseDao.query(entName);
|
|
return kwsEnterpriseDao.query(entName);
|
|
|
}
|
|
}
|