里程碑修改
This commit is contained in:
parent
fd6aa6d9a4
commit
463d5af55e
@ -67,6 +67,7 @@ public class MilestoneController {
|
|||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
@ApiImplicitParam(name = "pageNo", value = "第几页", paramType = "query", required = true, dataType = "Integer"),
|
||||||
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
@ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", required = true, dataType = "Integer"),
|
||||||
|
@ApiImplicitParam(name = "timeAsc", value = "1时间正序排序", paramType = "query", required = false, dataType = "Integer"),
|
||||||
})
|
})
|
||||||
@GetMapping(value = "/page")
|
@GetMapping(value = "/page")
|
||||||
public Result<IPage<Milestone>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
public Result<IPage<Milestone>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||||
|
|||||||
@ -140,6 +140,7 @@ public class WorkerAdmissionController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (CollUtil.isNotEmpty(existNums)) {
|
if (CollUtil.isNotEmpty(existNums)) {
|
||||||
|
existNums = existNums.stream().distinct().collect(Collectors.toList());
|
||||||
throw new OpenAlertException("【" + StrUtil.join(",", existNums) + "】编号已存在");
|
throw new OpenAlertException("【" + StrUtil.join(",", existNums) + "】编号已存在");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -150,7 +151,7 @@ public class WorkerAdmissionController {
|
|||||||
List<String> existWorkerIdCards = workerInfoService.list(new LambdaQueryWrapper<WorkerInfo>()
|
List<String> existWorkerIdCards = workerInfoService.list(new LambdaQueryWrapper<WorkerInfo>()
|
||||||
.in(WorkerInfo::getIdCard, ids).eq(WorkerInfo::getProjectSn, projectSn)).stream().map(WorkerInfo::getIdCard).collect(Collectors.toList());
|
.in(WorkerInfo::getIdCard, ids).eq(WorkerInfo::getProjectSn, projectSn)).stream().map(WorkerInfo::getIdCard).collect(Collectors.toList());
|
||||||
existDetailIdCards.addAll(existWorkerIdCards);
|
existDetailIdCards.addAll(existWorkerIdCards);
|
||||||
existDetailIdCards.stream().distinct();
|
existDetailIdCards = existDetailIdCards.stream().distinct().collect(Collectors.toList());
|
||||||
if (CollUtil.isNotEmpty(existDetailIdCards)) {
|
if (CollUtil.isNotEmpty(existDetailIdCards)) {
|
||||||
throw new OpenAlertException("【" + StrUtil.join(",", existDetailIdCards) + "】身份证号已存在");
|
throw new OpenAlertException("【" + StrUtil.join(",", existDetailIdCards) + "】身份证号已存在");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.zhgd.jeecg.common.execption.OpenAlertException;
|
|||||||
import com.zhgd.xmgl.modules.baotou.entity.Milestone;
|
import com.zhgd.xmgl.modules.baotou.entity.Milestone;
|
||||||
import com.zhgd.xmgl.modules.baotou.mapper.MilestoneMapper;
|
import com.zhgd.xmgl.modules.baotou.mapper.MilestoneMapper;
|
||||||
import com.zhgd.xmgl.modules.baotou.service.IMilestoneService;
|
import com.zhgd.xmgl.modules.baotou.service.IMilestoneService;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
@ -13,6 +14,8 @@ import com.zhgd.xmgl.util.PageUtil;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
import com.zhgd.xmgl.util.RefUtil;
|
import com.zhgd.xmgl.util.RefUtil;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -44,7 +47,12 @@ public class MilestoneServiceImpl extends ServiceImpl<MilestoneMapper, Milestone
|
|||||||
|
|
||||||
private QueryWrapper<Milestone> getQueryWrapper(HashMap<String, Object> param) {
|
private QueryWrapper<Milestone> getQueryWrapper(HashMap<String, Object> param) {
|
||||||
QueryWrapper<Milestone> queryWrapper = QueryGenerator.initPageQueryWrapper(Milestone.class, param, true);
|
QueryWrapper<Milestone> queryWrapper = QueryGenerator.initPageQueryWrapper(Milestone.class, param, true);
|
||||||
|
Integer timeAsc = MapUtils.getInteger(param, "timeAsc");
|
||||||
|
if (Objects.equals(timeAsc, 1)) {
|
||||||
|
queryWrapper.orderByAsc(RefUtil.fieldNameUlc(Milestone::getMilestoneTime));
|
||||||
|
} else {
|
||||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(Milestone::getId));
|
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(Milestone::getId));
|
||||||
|
}
|
||||||
return queryWrapper;
|
return queryWrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -405,7 +405,6 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
} else {
|
} else {
|
||||||
CompanyConfig companyConfig = null;
|
CompanyConfig companyConfig = null;
|
||||||
if (Objects.equals(systemUser.getAccountType(), SystemUserAccountTypeEnum.SYSTEM_ADMINISTRATOR.getValue())) {
|
if (Objects.equals(systemUser.getAccountType(), SystemUserAccountTypeEnum.SYSTEM_ADMINISTRATOR.getValue())) {
|
||||||
@ -527,8 +526,14 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
|||||||
result.put("systemLogoConfig", slc);
|
result.put("systemLogoConfig", slc);
|
||||||
result.put("personMail", systemUser.getPersonMail());
|
result.put("personMail", systemUser.getPersonMail());
|
||||||
result.put("avatar", systemUser.getAvatar());
|
result.put("avatar", systemUser.getAvatar());
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
IPage<WorkerInfo> workerInfoList = workerInfoService.selectWorkerInfoList(new MapBuilder<String, Object>().put("id", result.get("workerId")).build());
|
||||||
|
String postWorkTypeName = "";
|
||||||
|
if (CollUtil.isNotEmpty(workerInfoList.getRecords())) {
|
||||||
|
postWorkTypeName = workerInfoList.getRecords().get(0).getPostWorkTypeName();
|
||||||
|
}
|
||||||
|
result.put("postWorkTypeName", postWorkTypeName);
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user