Browse Source

修复字段

QuYueTing 4 months ago
parent
commit
12e5e909a5

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

@@ -881,10 +881,10 @@ public class TaskController {
         if (executorList.size() > 0) {
             List<String> exeIds = executorList.stream().map(TaskExecutor::getExecutorId).collect(Collectors.toList());
             //查询包含执行人(即使被停用)和在职的员工
-            userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, phone, job_number, department_id").eq("company_id", user.getCompanyId()).and(w->w.eq("is_active", 1).or().in("id", exeIds)));
+            userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, phone, job_number, department_id, is_active").eq("company_id", user.getCompanyId()).and(w->w.eq("is_active", 1).or().in("id", exeIds)));
         } else {
             //仅仅需要在职员工
-            userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, phone, job_number, department_id").eq("company_id", user.getCompanyId()).eq("is_active", 1));
+            userList = userMapper.selectList(new QueryWrapper<User>().select("id, name, phone, job_number, department_id, is_active").eq("company_id", user.getCompanyId()).eq("is_active", 1));
         }
         t.setUserList(userList);
         //查询项目负责人id以及所属任务分组负责人id

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java

@@ -13,6 +13,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
 import com.management.platform.config.PropertyMsg;
 import com.management.platform.entity.vo.GroupEstimatedWorkVO;
 import lombok.Data;
@@ -31,6 +32,7 @@ import org.springframework.format.annotation.DateTimeFormat;
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class Project extends Model<Project> {
 
     private static final long serialVersionUID=1L;

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/User.java

@@ -27,6 +27,7 @@ import org.springframework.format.annotation.DateTimeFormat;
 @Data
 @EqualsAndHashCode(callSuper = false)
 @Accessors(chain = true)
+@JsonInclude(JsonInclude.Include.NON_NULL)
 public class User extends Model<User> {
 
     private static final long serialVersionUID=1L;

+ 1 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -15,10 +15,9 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.101.180.183:17089/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://47.101.180.183:17089/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: P011430@Huoshi*
-
     hikari:
       maximum-pool-size: 60
       minimum-idle: 10

+ 6 - 3
fhKeeper/formulahousekeeper/timesheet/src/components/taskComponent.vue

@@ -949,8 +949,8 @@ export default {
         if(!obj.taskVue) {
             this.getStageList(obj.integrationTaskNingwai)
         }
-        this.getUsers(); // 获取名单数据
         if(obj.create) {
+            this.getUsers(); // 获取名单数据
             this.mileageCup = false
             this.addFormVisible = true;
             this.curProjectId = obj.stage.projectId;
@@ -1198,6 +1198,8 @@ export default {
                 // //删除中间传值的变量数组
                 delete this.addForm.executorList;
                 
+                //人员处理
+                this.users = res.data.userList;
                 // 触发类型切换事件
                 this.selchg()
             } else {
@@ -1527,6 +1529,7 @@ export default {
                 delete this.addForm.subTaskList;
                 delete this.addForm.refTaskList;
                 delete this.addForm.progress;
+                delete this.addForm.userList;
                 //去掉没有执行人的.(因为要有计划工时,执行人可以暂不设置)
                 // this.addForm.executorListFront = this.addForm.executorListFront.filter(exe=>exe.executorId);
                 if(this.addForm.executorListFront.serviceId){
@@ -1809,7 +1812,7 @@ export default {
         this.isEditFile = true;
         this.title = this.$t('editingtasks');
         this.getTaskDetail(row.taskId);
-        this.getUsers();
+        // this.getUsers();
         this.gain(row,1);
         this.getRelationTaskList(1, row.taskId)
         this.getTaskFileList(1,row.taskId)
@@ -2105,7 +2108,7 @@ export default {
 
         this.getTaskDetail(row.id);
         this.getTaskProgressList(row.id); // 获取任务进展列表 
-        this.getUsers(); // 获取名单数据
+        // this.getUsers(); // 获取名单数据
         this.gain(row); // 获取评论列表
         this.getDailyList(row.id) // 获取来自日报
         this.getRelationTaskList(1, row.id)