Compare commits

..

3 Commits

Author SHA1 Message Date
Chengliang 7cc38df2e9 master 4 months ago
Chengliang 9cf8a7cdf0 master 4 months ago
Chengliang b0db84f231 tree 修复 4 months ago

@ -10,8 +10,6 @@ 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;
@ -42,9 +40,6 @@ 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);
@ -232,22 +227,5 @@ 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,16 +84,6 @@ 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,7 +9,6 @@ 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;
@ -94,7 +93,6 @@ 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)) {
@ -174,7 +172,4 @@ public class JobBO {
}
return MapperProxyFactory.getProxy(JobMapper.class).getJobById(jobId);
}
}

@ -89,13 +89,7 @@ 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,7 +52,6 @@ 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;
@ -171,26 +170,12 @@ 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());
}
@ -801,25 +786,4 @@ 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…
Cancel
Save