|
@@ -14,15 +14,18 @@ import com.nationrel.modules.project.jar.entity.TaskPageModel;
|
|
|
import com.nationrel.modules.project.jar.mapper.PmProjectMapper;
|
|
|
import com.nationrel.modules.project.jar.mapper.PmTaskMapper;
|
|
|
import com.nationrel.modules.project.jar.mapper.PmTgMapper;
|
|
|
-import com.nationrel.modules.project.jar.rb_common.common.constant.PmMapKeySet;
|
|
|
import com.nationrel.modules.project.jar.rb_common.common.constant.ReliaFlowConstants;
|
|
|
import com.nationrel.modules.project.jar.service.PmPercentStatService;
|
|
|
import com.nationrel.modules.project.jar.service.PmProjectService;
|
|
|
import com.nationrel.modules.project.jar.service.Rb0300220InitService;
|
|
|
import com.nationrel.modules.project.jar.util.DateUtils;
|
|
|
import com.nationrel.modules.project.mapper.PmTaskInfoMapper;
|
|
|
+import com.nationrel.modules.project.req.PmProjectEditReq;
|
|
|
+import com.nationrel.modules.project.req.PmTaskEditReq;
|
|
|
+import com.nationrel.modules.project.req.PmTgEditReq;
|
|
|
import com.nationrel.modules.project.service.IPmTaskInfoService;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.shiro.SecurityUtils;
|
|
|
import org.jeecg.common.system.vo.LoginUser;
|
|
|
import org.jeecg.config.i18n.MessageUtils;
|
|
@@ -114,11 +117,19 @@ public class PmTaskInfoServiceImpl extends ServiceImpl<PmTaskInfoMapper, PmTaskI
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void updateTgInfo(PmTg pmTg) {
|
|
|
+ public void updateTgInfo(PmTgEditReq pmtgEditReq) {
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
- PmTg dbPmTg = pmTgMapper.selectByPrimaryKey(pmTg.getTgId());
|
|
|
- if (dbPmTg.getVersionNo().equals(pmTg.getVersionNo())) {
|
|
|
- dbPmTg.setTgName(pmTg.getTgName());
|
|
|
+ PmTg dbPmTg = pmTgMapper.selectByPrimaryKey(pmtgEditReq.getTgId());
|
|
|
+ if (dbPmTg.getVersionNo().equals(pmtgEditReq.getVersionNo())) {
|
|
|
+ if (StringUtils.isNotEmpty(pmtgEditReq.getTgName())) {
|
|
|
+ dbPmTg.setTgName(pmtgEditReq.getTgName());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(pmtgEditReq.getPlanStartTime())) {
|
|
|
+ dbPmTg.setPlanStartTime(DateUtils.convertDate(pmtgEditReq.getPlanStartTime()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(pmtgEditReq.getPlanEndTime())) {
|
|
|
+ dbPmTg.setPlanEndTime(DateUtils.convertDate(pmtgEditReq.getPlanEndTime()));
|
|
|
+ }
|
|
|
dbPmTg.setUpdateTime(new Date());
|
|
|
dbPmTg.setUpdateUserId(sysUser.getUsername());
|
|
|
dbPmTg.setUpdatePgmId("1");
|
|
@@ -130,11 +141,19 @@ public class PmTaskInfoServiceImpl extends ServiceImpl<PmTaskInfoMapper, PmTaskI
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void updateTaskInfo(PmTask pmTask) {
|
|
|
+ public void updateTaskInfo(PmTaskEditReq pmTask) {
|
|
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
|
PmTask dbPmTask = pmTaskMapper.selectByPrimaryKey(pmTask.getTaskId());
|
|
|
if (dbPmTask.getVersionNo().equals(pmTask.getVersionNo())) {
|
|
|
- dbPmTask.setTaskName(pmTask.getTaskName());
|
|
|
+ if (StringUtils.isNotEmpty(pmTask.getTaskName())) {
|
|
|
+ dbPmTask.setTaskName(pmTask.getTaskName());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(pmTask.getPlanStartTime())) {
|
|
|
+ dbPmTask.setPlanStartTime(DateUtils.convertDate(pmTask.getPlanStartTime()));
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(pmTask.getPlanEndTime())) {
|
|
|
+ dbPmTask.setPlanEndTime(DateUtils.convertDate(pmTask.getPlanEndTime()));
|
|
|
+ }
|
|
|
dbPmTask.setUpdateTime(new Date());
|
|
|
dbPmTask.setUpdateUserId(sysUser.getUsername());
|
|
|
dbPmTask.setUpdatePgmId("1");
|
|
@@ -146,13 +165,15 @@ public class PmTaskInfoServiceImpl extends ServiceImpl<PmTaskInfoMapper, PmTaskI
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void updateProjectInfo(PmProject project) throws Exception {
|
|
|
+ public void updateProjectInfo(PmProjectEditReq pmProjectEditReq) throws Exception {
|
|
|
|
|
|
- PmProject pmProject = pmProjectMapper.selectByPrimaryKey(project.getProjectId());
|
|
|
+ PmProject pmProject = pmProjectMapper.selectByPrimaryKey(pmProjectEditReq.getProjectId());
|
|
|
+ Date startTime = DateUtils.convertDate(pmProjectEditReq.getPlanStartTime());
|
|
|
+ Date endTime = DateUtils.convertDate(pmProjectEditReq.getPlanEndTime());
|
|
|
// 时间有变动,时间整合性检查
|
|
|
- if (DateUtils.isNotDateEquals(pmProject.getPlanStartTime(), project.getPlanStartTime()) ||
|
|
|
- DateUtils.isNotDateEquals(pmProject.getPlanEndTime(), project.getPlanEndTime())) {
|
|
|
- pmProjectService.checkContainTimeOfTG(project.getPlanStartTime(), project.getPlanEndTime(), project.getProjectId());
|
|
|
+ if (DateUtils.isNotDateEquals(pmProject.getPlanStartTime(), startTime) ||
|
|
|
+ DateUtils.isNotDateEquals(pmProject.getPlanEndTime(), endTime)) {
|
|
|
+ pmProjectService.checkContainTimeOfTG(startTime, endTime, pmProjectEditReq.getProjectId());
|
|
|
}
|
|
|
}
|
|
|
|