|
|
|
@ -11,6 +11,7 @@ import com.glxp.api.common.enums.ResultEnum;
|
|
|
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
|
|
|
import com.glxp.api.controller.BaseController;
|
|
|
|
|
import com.glxp.api.dto.DictDto;
|
|
|
|
|
import com.glxp.api.entity.basic.ProductInfoEntity;
|
|
|
|
|
import com.glxp.api.entity.basic.TyCompanySearchEntity;
|
|
|
|
|
import com.glxp.api.entity.sup.UserCompanyEntity;
|
|
|
|
@ -42,6 +43,7 @@ import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 客户端企业信息
|
|
|
|
@ -89,6 +91,44 @@ public class UserComanyController extends BaseController {
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "查询用户企业信息(关键字搜索)", response = UserCompanyEntity.class)
|
|
|
|
|
@AuthRuleAnnotation("udi/auth/user/comapny/searchOptimize")
|
|
|
|
|
@GetMapping("udi/auth/user/comapny/searchOptimize")
|
|
|
|
|
public BaseResponse searchOptimize(FilterUserComapanyRequest filterUserComapanyRequest) {
|
|
|
|
|
//获取部门id
|
|
|
|
|
if (filterUserComapanyRequest.getSearchKey() == null) {
|
|
|
|
|
filterUserComapanyRequest.setSearchKey("");
|
|
|
|
|
}
|
|
|
|
|
QueryWrapper<UserCompanyEntity> queryWrapper = new QueryWrapper<>();
|
|
|
|
|
if (StringUtils.isNotBlank(filterUserComapanyRequest.getSearchKey()) && !"null".equals(filterUserComapanyRequest.getSearchKey())) {
|
|
|
|
|
queryWrapper.like("companyName", filterUserComapanyRequest.getSearchKey());
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotBlank(filterUserComapanyRequest.getCreditNum()) && !"null".equals(filterUserComapanyRequest.getCreditNum())) {
|
|
|
|
|
queryWrapper.eq("creditNum", filterUserComapanyRequest.getCreditNum());
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isNotBlank(filterUserComapanyRequest.getBussinessStatus()) && !"null".equals(filterUserComapanyRequest.getBussinessStatus())) {
|
|
|
|
|
queryWrapper.eq("bussinessStatus", filterUserComapanyRequest.getBussinessStatus());
|
|
|
|
|
}
|
|
|
|
|
List<UserCompanyEntity> userCompanyEntities = userCompanyService.list(
|
|
|
|
|
queryWrapper.eq("checkStatus", 1)
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
List<DictDto> reList = userCompanyEntities.stream().map(s-> {
|
|
|
|
|
DictDto dictDto = new DictDto(s.getId().toString(),s.getCompanyName());
|
|
|
|
|
return dictDto;
|
|
|
|
|
}).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
PageInfo<DictDto> pageInfo;
|
|
|
|
|
pageInfo = new PageInfo<>(reList);
|
|
|
|
|
PageSimpleResponse<DictDto> pageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
pageSimpleResponse.setTotal(pageInfo.getTotal());
|
|
|
|
|
pageSimpleResponse.setList(reList);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResultVOUtils.success(pageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "查询用户企业信息", response = UserCompanyEntity.class)
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@GetMapping("udi/auth/user/comapny/filterCompanyName")
|
|
|
|
|