Commit 88a21fea authored by tangwei's avatar tangwei

修改bug

parent 325493de
...@@ -8,7 +8,7 @@ import lombok.Getter; ...@@ -8,7 +8,7 @@ import lombok.Getter;
@AllArgsConstructor @AllArgsConstructor
public enum ExcelEnums { public enum ExcelEnums {
CZXX ("场站信息", "场站信息", "com.yeejoin.amos.boot.module.jxiop.api.dto.ExStationBasicDto","CZXX"), CZXX ("场站信息", "场站信息", "com.yeejoin.amos.boot.module.jxiop.api.dto.ExStationBasicDto","CZXX"),
RYXX("人员信息", "人员信息", "com.yeejoin.amos.boot.module.jcs.api.dto.EXPersonUser","RYXX"); RYXX("人员信息", "人员信息", "com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser","RYXX");
private String fileName; private String fileName;
private String sheetName; private String sheetName;
private String classUrl; private String classUrl;
......
package com.yeejoin.amos.boot.module.jxiop.api.dto; package com.yeejoin.amos.boot.module.jxiop.api.dto;
import com.yeejoin.amos.boot.biz.common.excel.CommonExplicitConstraint;
import com.yeejoin.amos.boot.biz.common.excel.ExplicitConstraint; import com.yeejoin.amos.boot.biz.common.excel.ExplicitConstraint;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -106,7 +107,7 @@ public class EXPersonUser { ...@@ -106,7 +107,7 @@ public class EXPersonUser {
private String workPlaceKey; private String workPlaceKey;
@ExcelProperty(value = "岗位", index = 22) @ExcelProperty(value = "岗位", index = 22)
@ExplicitConstraint(indexNum = 22, type="YGZYJNJDZS") //固定下拉内容 @ExplicitConstraint(indexNum = 22,sourceClass = CommonExplicitConstraint.class, type="YGZYJNJDZS") //固定下拉内容
@ApiModelProperty(value = "岗位") @ApiModelProperty(value = "岗位")
private String postName; private String postName;
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
person_account.`name` name, person_account.`name` name,
person_account.job_number jobNumber, person_account.job_number jobNumber,
person_account.project_name projectName, person_account.project_name projectName,
person_account.department_name departmentName, person_account.project_department_name departmentName,
person_account.ID_type idType, person_account.ID_type idType,
person_account.ID_number idNumber, person_account.ID_number idNumber,
person_account.account_name accountName person_account.account_name accountName
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
AND person_account.project_name like concat('%',#{projectName},'%') AND person_account.project_name like concat('%',#{projectName},'%')
</if> </if>
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
AND person_basic.org_code like concat('%',#{orgCode},'%') AND person_basic.project_org_code like concat('%',#{orgCode},'%')
</if> </if>
</where> </where>
...@@ -119,10 +119,10 @@ ...@@ -119,10 +119,10 @@
person_account.`name` name, person_account.`name` name,
person_account.job_number jobNumber, person_account.job_number jobNumber,
person_account.project_name projectName, person_account.project_name projectName,
person_account.department_name departmentName, person_account.project_department_name departmentName,
person_account.ID_type idType, person_account.ID_type idType,
person_account.ID_number idNumber, person_account.ID_number idNumber,
person_account.account_name accountName person_account.account_name accountName,
person_basic.sex sex, person_basic.sex sex,
person_basic.birthday birthday, person_basic.birthday birthday,
person_basic.age age, person_basic.age age,
...@@ -178,7 +178,7 @@ ...@@ -178,7 +178,7 @@
AND person_account.project_name like concat('%',#{projectName},'%') AND person_account.project_name like concat('%',#{projectName},'%')
</if> </if>
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
AND person_basic.org_code like concat('%',#{orgCode},'%') AND person_basic.project_org_code like concat('%',#{orgCode},'%')
</if> </if>
</where> </where>
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.yeejoin.amos.boot.biz.common.excel.DataSources; import com.yeejoin.amos.boot.biz.common.excel.DataSources;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.Privilege; import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.CompanyModel; import com.yeejoin.amos.feign.privilege.model.CompanyModel;
import com.yeejoin.amos.feign.systemctl.Systemctl;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
...@@ -22,19 +26,21 @@ public class ExDataSourcesImpl implements DataSources { ...@@ -22,19 +26,21 @@ public class ExDataSourcesImpl implements DataSources {
@Override @Override
public String[] selectList(String type, String method) throws Exception { public String[] selectList(String type, String method) throws Exception {
String[] str = {}; String[] str = {};
if (StringUtils.isNotEmpty(type)) {
str = getDataDictionary(type);
} else {
switch (method) { switch (method) {
case "getArea": case "getArea":
str = getArea(); str = getArea();
break; break;
} }
}
return str; return str;
} }
private String[] getArea() { private String[] getArea() {
FeignClientResult<Collection<CompanyModel>> de = Privilege.companyClient.queryAgencyTree(null); FeignClientResult<Collection<CompanyModel>> de = Privilege.companyClient.queryAgencyTree(null);
// FeignClientResult<List<DictionarieValueModel>> lidt=Systemctl.dictionarieClient.dictValues(dictCode)
Collection<CompanyModel> listco = new ArrayList<>(); Collection<CompanyModel> listco = new ArrayList<>();
String[] str = null; String[] str = null;
if (!ObjectUtils.isEmpty(de)) { if (!ObjectUtils.isEmpty(de)) {
...@@ -82,5 +88,26 @@ public class ExDataSourcesImpl implements DataSources { ...@@ -82,5 +88,26 @@ public class ExDataSourcesImpl implements DataSources {
} }
private String[] getDataDictionary(String type) {
List<String> collect =new ArrayList<>();
String[] str = null;
FeignClientResult<List<DictionarieValueModel>> de= Systemctl.dictionarieClient.dictValues(type);
List<DictionarieValueModel> listco=new ArrayList<>();
if (!ObjectUtils.isEmpty(de)) {
if (de.getStatus() == 200) {
listco = de.getResult();
for (DictionarieValueModel dictionarieValueModel : listco) {
collect.add(dictionarieValueModel.getDictDataValue());
}
str = collect.toArray(new String[collect.size()]);
} else {
throw new RuntimeException(de.getMessage());
}
}
return str;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment