|
@@ -6,6 +6,8 @@ import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
|
|
|
+import com.jpsoft.employment.modules.sys.entity.DataDictionary;
|
|
|
|
|
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -24,6 +26,8 @@ import java.util.*;
|
|
|
public class CompanyController {
|
|
public class CompanyController {
|
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DataDictionaryService dataDictionaryService;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private CompanyService companyService;
|
|
private CompanyService companyService;
|
|
|
|
|
|
|
@@ -200,7 +204,7 @@ public class CompanyController {
|
|
|
String name,
|
|
String name,
|
|
|
String scale,
|
|
String scale,
|
|
|
String industry,
|
|
String industry,
|
|
|
- String isCertification,
|
|
|
|
|
|
|
+ Boolean isCertification,
|
|
|
@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
@RequestAttribute String subject){
|
|
@RequestAttribute String subject){
|
|
@@ -228,11 +232,15 @@ public class CompanyController {
|
|
|
searchParams.put("industry",industry);
|
|
searchParams.put("industry",industry);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(isCertification)) {
|
|
|
|
|
|
|
+ if (isCertification != null) {
|
|
|
searchParams.put("isCertification",isCertification);
|
|
searchParams.put("isCertification",isCertification);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Page<Company> page = companyService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
Page<Company> page = companyService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
+ for(Company company : page.getResult()){
|
|
|
|
|
+ company.setScaleName(dataDictionaryService.findNameByCatalogNameAndValue("企业规模", company.getScale()));
|
|
|
|
|
+ company.setIndustryName(dataDictionaryService.findNameByCatalogNameAndValue("所属行业", company.getIndustry()));
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|