|
|
@ -164,10 +164,10 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
// 添加父级元素
|
|
|
|
// 添加父级元素
|
|
|
|
List<JobListDTO> jobListDTOS = JobBO.buildJobDTOList(allList, filterJobPOs);
|
|
|
|
List<JobListDTO> jobListDTOS = JobBO.buildJobDTOList(allList, filterJobPOs);
|
|
|
|
if ("asc".equalsIgnoreCase(orderType.toString())) {
|
|
|
|
if ("asc".equalsIgnoreCase(orderType.toString())) {
|
|
|
|
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparing(JobListDTO::getShowOrder)).collect(Collectors.toList());
|
|
|
|
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparingDouble(JobListDTO::getShowOrder)).collect(Collectors.toList());
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparing(JobListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
|
|
|
jobListDTOS = jobListDTOS.stream().sorted(Comparator.comparingDouble(JobListDTO::getShowOrder).reversed()).collect(Collectors.toList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
|
|
|
List<JobListDTO> subList = PageUtil.subList(param.getCurrent(), param.getPageSize(), jobListDTOS);
|
|
|
|
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
|
|
|
pageInfos = new PageInfo<>(user, subList, JobListDTO.class);
|
|
|
@ -367,9 +367,9 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(params.get("show_order").toString())) {
|
|
|
|
if (StringUtils.isBlank(params.get("show_order").toString())) {
|
|
|
|
Integer maxShowOrder = getJobMapper().getMaxShowOrder();
|
|
|
|
Double maxShowOrder = getJobMapper().getMaxShowOrder();
|
|
|
|
if (null == maxShowOrder) {
|
|
|
|
if (null == maxShowOrder) {
|
|
|
|
maxShowOrder = 0;
|
|
|
|
maxShowOrder = 0.00;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
params.put("show_order", maxShowOrder + 1);
|
|
|
|
params.put("show_order", maxShowOrder + 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -433,8 +433,8 @@ public class JobServiceImpl extends Service implements JobService {
|
|
|
|
OrganizationAssert.notBlank(department, SystemEnv.getHtmlLabelName(547423,user.getLanguage()));
|
|
|
|
OrganizationAssert.notBlank(department, SystemEnv.getHtmlLabelName(547423,user.getLanguage()));
|
|
|
|
int insertCount = 0;
|
|
|
|
int insertCount = 0;
|
|
|
|
List<Long> idList = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
List<Long> idList = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
Integer orderNum = getJobMapper().getMaxShowOrder();
|
|
|
|
Double orderNum = getJobMapper().getMaxShowOrder();
|
|
|
|
orderNum = null == orderNum ? 0 : orderNum;
|
|
|
|
orderNum = null == orderNum ? 0.00 : orderNum;
|
|
|
|
for (Long id : idList) {
|
|
|
|
for (Long id : idList) {
|
|
|
|
orderNum++;
|
|
|
|
orderNum++;
|
|
|
|
JobPO jobById = getJobMapper().getJobById(id);
|
|
|
|
JobPO jobById = getJobMapper().getJobById(id);
|
|
|
|