yusm 1 месяц назад
Родитель
Сommit
0eb3dd0764

+ 9 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -521,7 +521,9 @@ public class TaskController {
                 log.info("添加工作计划,给第一审核人发送信息提醒");
                 User owner = userMapper.selectById(task.getCheckFirstId());
                 Information information = new Information();
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setType(11);
                 information.setUserId(owner.getId());
                 information.setTime(LocalDateTime.now());
@@ -533,7 +535,9 @@ public class TaskController {
             if (isUpdate==1){
                 User owner = userMapper.selectById(task.getCheckSecondId());
                 Information information = new Information();
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setType(11);
                 information.setUserId(owner.getId());
                 information.setTime(LocalDateTime.now());
@@ -560,7 +564,9 @@ public class TaskController {
                 User owner = userMapper.selectById(task.getCheckFirstId());
                 Information information = new Information();
                 information.setType(11);
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setUserId(owner.getId());
                 information.setTime(LocalDateTime.now());
                 informationService.save(information);

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Information.java

@@ -70,6 +70,9 @@ public class Information extends Model<Information> {
     @TableField("msg")
     private String msg;
 
+    @TableField(exist = false)
+    private Integer taskId;
+
 
     @Override
     protected Serializable pkVal() {

+ 9 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.aliyun.dingtalkcontact_1_0.models.SearchUserResponse;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -2136,6 +2137,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     //httpRespMsg.setError("操作失败");
                     httpRespMsg.setError(MessageUtils.message("other.operationFail"));
                 } else {
+                    if (Constant.MLD_COMPANY_ID==companyId){
+                        //项目经理换人,对应任务计划的第一审核人得换
+                        String inchargerId_old = oldProject.getInchargerId();
+                        if (!inchargerId.equals(inchargerId_old)){
+                            taskService.update(null,new UpdateWrapper<Task>().eq("project_id",oldProject.getId())
+                                    .eq("task_plan",1).set("check_first_id",inchargerId));
+                        }
+                    }
                     if (customerId == null) {
                         //去掉客户
                         projectMapper.removeProjectCustomer(id);

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskServiceImpl.java

@@ -1078,7 +1078,9 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
                 //给第二审核人发送信息提醒
                 User owner = userMapper.selectById(task.getCheckSecondId());
                 Information information = new Information();
-                information.setMsg("您有工作计划待审核");
+                Project project = projectMapper.selectById(task.getProjectId());
+                information.setMsg(project.getProjectName()+"项目有新的预计FTE计划审批任务,请您查收.");
+                information.setTaskId(task.getId());
                 information.setUserId(owner.getId());
                 information.setType(11);
                 information.setTime(LocalDateTime.now());