Browse Source

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

ggooalice 2 years ago
parent
commit
800c10f55f

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

@@ -68,6 +68,8 @@ public class TaskController {
     @Resource
     private TaskExecutorMapper taskExecutorMapper;
     @Resource
+    private ParticipationMapper participationMapper;
+    @Resource
     private TaskExecutorService taskExecutorService;
     @Resource
     private CompanyDingdingService companyDingdingService;
@@ -122,6 +124,7 @@ public class TaskController {
             task.setPlanHours(executorList.stream().mapToInt(TaskExecutor::getPlanHours).sum());
             //检查执行人是否在当前分组的参与人当中
             List<GroupParticipator> groupParticipatorList = groupParticipatorMapper.selectList(new QueryWrapper<GroupParticipator>().eq("group_id", task.getGroupId()));
+            List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", task.getProjectId()));
             for (TaskExecutor executor : executorList) {
                 if(executor.getExecutorId()!=null){
                     boolean b = groupParticipatorList.stream().anyMatch(gp -> gp.getUserId() != null && gp.getUserId().equals(executor.getExecutorId()));
@@ -131,6 +134,13 @@ public class TaskController {
                         g.setUserId(executor.getExecutorId());
                         groupParticipatorMapper.insert(g);
                     }
+                    boolean b1 = participationList.stream().anyMatch(pl -> pl.getUserId() != null && pl.getUserId().equals(executor.getExecutorId()));
+                    if(!b1){
+                        Participation participation=new Participation();
+                        participation.setUserId(executor.getExecutorId());
+                        participation.setProjectId(task.getProjectId());
+                        participationMapper.insert(participation);
+                    }
                 }
             }
         }

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -194,7 +194,7 @@ public class TimingTask {
         if (isDev) return;
         List<TimeType> timeTypeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("sync_fanwei", 1));
         List<Integer> compIds = timeTypeList.stream().map(TimeType::getCompanyId).collect(Collectors.toList());
-        if(compIds.size()<0){
+        if(compIds.isEmpty()){
             return;
         }
         DockWithMLD dockWithMLD=new DockWithMLD();

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -86,7 +86,7 @@
           </el-option>
         </el-select>
         <!-- 月份选择 -->
-        <el-date-picker v-if="ins == 14" value-format="yyyy-MM" v-model="monthPersonnel" type="month" :placeholder="$t('Selectmonth')" @change="selcts()" size="small"></el-date-picker>
+        <el-date-picker v-if="ins == 14" value-format="yyyy-MM" v-model="monthPersonnel" type="month" :placeholder="$t('Selectmonth')" :clearable="false" @change="selcts()" size="small"></el-date-picker>
           
           <!-- 部门筛选 -->
           <el-cascader v-if="((ins == 9 && permissions.reportAllTimely) || (ins == 8 && permissions.reportAllTimeDivide) || (ins == 6 && permissions.reportAllOvertime) || (ins == 11 && permissions.reportPersonnel) || (ins == 14)) && user.userNameNeedTranslate != 1" v-model="departmentIdArray" :options="departmentList" :placeholder="$t('qing-xuan-ze-bu-men')"