Compare commits
7 Commits
master
...
山西国药控股有限公司
| Author | SHA1 | Date |
|---|---|---|
|
|
9cc2c9b5ac | |
|
|
2581f58cf5 | |
|
|
a159f3d8b2 | |
|
|
91d1c3a149 | |
|
|
4308cba888 | |
|
|
418a302fcb | |
|
|
df6e7a9df7 |
|
|
@ -10,6 +10,8 @@ import com.engine.organization.mapper.department.DepartmentMapper;
|
|||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.file.ImageFileManager;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.company.DepartmentComInfo;
|
||||
import weaver.hrm.company.SubCompanyComInfo;
|
||||
|
|
@ -40,6 +42,9 @@ public class DepartmentBO {
|
|||
public static void setDeptLeader(List<DepartmentListDTO> departments) {
|
||||
for (DepartmentListDTO dept : departments) {
|
||||
dept.setBmfzr(getEmployeeNameById(dept.getId()));
|
||||
Map<String, String> data = getImageFileName(dept.getId());
|
||||
dept.setImageFileName(data.get("imageFileName"));
|
||||
dept.setImageFileId(data.get("imageFileId"));
|
||||
List<DepartmentListDTO> children = dept.getChildren();
|
||||
if (CollectionUtils.isNotEmpty(children)){
|
||||
setDeptLeader(children);
|
||||
|
|
@ -227,5 +232,22 @@ public class DepartmentBO {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取部门自定义表字段(附件)显示值 跳转链接
|
||||
*/
|
||||
public static Map<String,String> getImageFileName(Integer depetId){
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
Map<String,String> data = new HashMap<>(2);
|
||||
rs.executeQuery("select a.fjsc,b.imagefilename from hrmdepartmentdefined a \n" +
|
||||
" left join imagefile b on a.fjsc = b.imagefileid\n" +
|
||||
" where a.deptid = ?",depetId);
|
||||
if (rs.next()) {
|
||||
data.put("imageFileName",Util.null2String(rs.getString("imagefilename")));
|
||||
data.put("imageFileId",Util.null2String(rs.getString("fjsc")));
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,6 +84,16 @@ public class DepartmentListDTO {
|
|||
*/
|
||||
@TableTitle(labelId = 547186, title = "启用", dataIndex = "canceled", key = "canceled")
|
||||
private int canceled;
|
||||
|
||||
/**
|
||||
* 附件上传
|
||||
*/
|
||||
@TableTitle(labelId = 17616, title = "附件上传", dataIndex = "imageFileName", key = "imageFileName")
|
||||
private String imageFileName;
|
||||
|
||||
private String imageFileId;
|
||||
|
||||
|
||||
/**
|
||||
* 操作列
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.engine.organization.mapper.job.JobMapper;
|
|||
import com.engine.organization.transmethod.JobTransMethod;
|
||||
import com.engine.organization.util.db.MapperProxyFactory;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.job.JobTitlesComInfo;
|
||||
|
||||
|
|
@ -93,6 +94,7 @@ public class JobBO {
|
|||
.build()).collect(Collectors.toList());
|
||||
List<String> usedIds = MapperProxyFactory.getProxy(JobMapper.class).listUsedId();
|
||||
Map<Long, List<JobListDTO>> collects = dtoList.stream().filter(item -> null != item.getParentJob() && 0 != item.getParentJob()).collect(Collectors.groupingBy(JobListDTO::getParentJob));
|
||||
|
||||
return dtoList.stream().peek(e -> {
|
||||
List<JobListDTO> childList = collects.get(e.getId());
|
||||
if (CollectionUtils.isNotEmpty(childList)) {
|
||||
|
|
@ -172,4 +174,7 @@ public class JobBO {
|
|||
}
|
||||
return MapperProxyFactory.getProxy(JobMapper.class).getJobById(jobId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,6 +89,14 @@ public class JobListDTO {
|
|||
//@TableTitle(title = "是否启用", dataIndex = "forbiddenTag", key = "forbiddenTag")
|
||||
//private Integer forbiddenTag;
|
||||
|
||||
/**
|
||||
* 附件上传
|
||||
*/
|
||||
@TableTitle(labelId = 17616, title = "附件上传", dataIndex = "imageFileName", key = "imageFileName")
|
||||
private String imageFileName;
|
||||
|
||||
private String imageFileId;
|
||||
|
||||
/**
|
||||
* 操作列
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ import com.engine.organization.util.page.PageUtil;
|
|||
import com.engine.organization.util.tree.SearchTreeUtil;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import weaver.conn.RecordSet;
|
||||
import weaver.general.StringUtil;
|
||||
import weaver.general.Util;
|
||||
import weaver.hrm.User;
|
||||
|
|
@ -170,12 +171,26 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparingDouble(JobListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
||||
}
|
||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
||||
//QC
|
||||
subList.forEach(jobListDTO -> {
|
||||
Map<String, String> data = getImageFileName(jobListDTO.getId());
|
||||
jobListDTO.setImageFileName(data.get("imageFileName"));
|
||||
jobListDTO.setImageFileId(data.get("imageFileId"));
|
||||
});
|
||||
|
||||
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
||||
pageInfos.setTotal(jobListDTOS.size());
|
||||
} else {
|
||||
// 组合list
|
||||
List<JobListDTO> jobListDTOS = JobBO.buildDTOList(allList);
|
||||
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
||||
//QC
|
||||
subList.forEach(jobListDTO -> {
|
||||
Map<String, String> data = getImageFileName(jobListDTO.getId());
|
||||
jobListDTO.setImageFileName(data.get("imageFileName"));
|
||||
jobListDTO.setImageFileId(data.get("imageFileId"));
|
||||
});
|
||||
|
||||
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
||||
pageInfos.setTotal(jobListDTOS.size());
|
||||
}
|
||||
|
|
@ -786,4 +801,25 @@ public class JobServiceImpl extends Service implements JobService {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取岗位表(jcl_org_job)新增字段(附件上传)显示值 跳转链接
|
||||
*/
|
||||
private Map<String,String> getImageFileName(Long id){
|
||||
|
||||
RecordSet rs = new RecordSet();
|
||||
String uploadFile = rs.getPropValue("hrmOrganization", "uploadFile");
|
||||
|
||||
Map<String,String> data = new HashMap<>(2);
|
||||
rs.executeQuery("select b.imagefileid,b.imagefilename from jcl_org_job a \n" +
|
||||
" left join imagefile b on a."+uploadFile+" = b.imagefileid\n" +
|
||||
" where a.id = ?;",id);
|
||||
if (rs.next()) {
|
||||
data.put("imageFileName",Util.null2String(rs.getString("imagefilename")));
|
||||
data.put("imageFileId",Util.null2String(rs.getString("imagefileid")));
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue