里程碑修改
This commit is contained in:
parent
fd6aa6d9a4
commit
463d5af55e
@ -67,6 +67,7 @@ public class MilestoneController {
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "pageNo", 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")
|
||||
public Result<IPage<Milestone>> queryPageList(@ApiIgnore @RequestParam HashMap<String, Object> param) {
|
||||
|
||||
@ -140,6 +140,7 @@ public class WorkerAdmissionController {
|
||||
}
|
||||
}
|
||||
if (CollUtil.isNotEmpty(existNums)) {
|
||||
existNums = existNums.stream().distinct().collect(Collectors.toList());
|
||||
throw new OpenAlertException("【" + StrUtil.join(",", existNums) + "】编号已存在");
|
||||
}
|
||||
}
|
||||
@ -150,7 +151,7 @@ public class WorkerAdmissionController {
|
||||
List<String> existWorkerIdCards = workerInfoService.list(new LambdaQueryWrapper<WorkerInfo>()
|
||||
.in(WorkerInfo::getIdCard, ids).eq(WorkerInfo::getProjectSn, projectSn)).stream().map(WorkerInfo::getIdCard).collect(Collectors.toList());
|
||||
existDetailIdCards.addAll(existWorkerIdCards);
|
||||
existDetailIdCards.stream().distinct();
|
||||
existDetailIdCards = existDetailIdCards.stream().distinct().collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(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.mapper.MilestoneMapper;
|
||||
import com.zhgd.xmgl.modules.baotou.service.IMilestoneService;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
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 java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
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) {
|
||||
QueryWrapper<Milestone> queryWrapper = QueryGenerator.initPageQueryWrapper(Milestone.class, param, true);
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(Milestone::getId));
|
||||
Integer timeAsc = MapUtils.getInteger(param, "timeAsc");
|
||||
if (Objects.equals(timeAsc, 1)) {
|
||||
queryWrapper.orderByAsc(RefUtil.fieldNameUlc(Milestone::getMilestoneTime));
|
||||
} else {
|
||||
queryWrapper.orderByDesc(RefUtil.fieldNameUlc(Milestone::getId));
|
||||
}
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
|
||||
@ -405,7 +405,6 @@ public class SystemUserServiceImpl extends ServiceImpl<SystemUserMapper, SystemU
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
} else {
|
||||
CompanyConfig companyConfig = null;
|
||||
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("personMail", systemUser.getPersonMail());
|
||||
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