Browse Source

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

cs 2 years ago
parent
commit
6389ad7508

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

@@ -18,6 +18,7 @@ public class GanttDataItem {
     public Integer projectId;
     public Integer projectId;
     public String render;
     public String render;
     public String type;
     public String type;
+    public String translationType;
     public String color;
     public String color;
     public List<GanttDataItem> children;
     public List<GanttDataItem> children;
 }
 }

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

@@ -13,8 +13,10 @@ import java.util.Map;
 public class TimelinessRateVO {
 public class TimelinessRateVO {
     private String userName;
     private String userName;
     private String corpwxUserId;
     private String corpwxUserId;
+    private Integer corpwxDeptId;
     private String departmentName;
     private String departmentName;
     private String timelinessRate;
     private String timelinessRate;
+    private String timelinessRateWithLeave;
     private String jobNumber;
     private String jobNumber;
     private List<Map<String,Object>> dataList;
     private List<Map<String,Object>> dataList;
 }
 }

+ 81 - 32
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -5939,13 +5939,33 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             TimelinessRateVO timelinessRateVO=new TimelinessRateVO();
             TimelinessRateVO timelinessRateVO=new TimelinessRateVO();
             timelinessRateVO.setUserName(user.getName());
             timelinessRateVO.setUserName(user.getName());
             timelinessRateVO.setJobNumber(user.getJobNumber());
             timelinessRateVO.setJobNumber(user.getJobNumber());
-            timelinessRateVO.setTimelinessRate(String.valueOf(dft.format(0)));
+            timelinessRateVO.setCorpwxDeptId(user.getCorpwxDeptid());
+            timelinessRateVO.setCorpwxUserId(user.getCorpwxUserid());
             Optional<Department> first = departmentList.stream().filter(dp -> dp.getDepartmentId().equals(user.getDepartmentId())).findFirst();
             Optional<Department> first = departmentList.stream().filter(dp -> dp.getDepartmentId().equals(user.getDepartmentId())).findFirst();
             if(first.isPresent()){
             if(first.isPresent()){
                 timelinessRateVO.setDepartmentName(first.get().getDepartmentName());
                 timelinessRateVO.setDepartmentName(first.get().getDepartmentName());
             }
             }
             List<Map<String, Object>> mapList = listMap.get(user.getName());
             List<Map<String, Object>> mapList = listMap.get(user.getName());
+            //去掉填非工作日
+            for (LocalDateTime localDateTime : dateTimeList) {
+                if(mapList!=null){
+                    if(!WorkDayCalculateUtils.isWorkDay(localDateTime.toLocalDate())&&!mapList.stream().anyMatch(ml->{
+                        Object date = ml.get("createDate");
+                        LocalDate createDate = LocalDate.parse(String.valueOf(date));
+                        return createDate.isEqual(localDateTime.toLocalDate());
+                    })){
+                        days-=1;
+                    }
+                }else {
+                    if(!WorkDayCalculateUtils.isWorkDay(localDateTime.toLocalDate())){
+                        days-=1;
+                    }
+                }
+
+            }
             //请假的不参与及时率统计
             //请假的不参与及时率统计
+            //todo: 此处对请假的 数据做处理 计请假填报
+            long daysWithLeave =days;
             if(leaveSheets.size()>0){
             if(leaveSheets.size()>0){
                 for (LeaveSheet leaveSheet : leaveSheets) {
                 for (LeaveSheet leaveSheet : leaveSheets) {
                     List<LocalDateTime> leaveDateList = getDays(leaveSheet.getStartDate().atTime(LocalTime.MIN), leaveSheet.getEndDate().atTime(LocalTime.MIN));
                     List<LocalDateTime> leaveDateList = getDays(leaveSheet.getStartDate().atTime(LocalTime.MIN), leaveSheet.getEndDate().atTime(LocalTime.MIN));
@@ -5973,23 +5993,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                     }
                 }
                 }
             }
             }
-            //去掉填未填日报非工作日
-            for (LocalDateTime localDateTime : dateTimeList) {
-                if(mapList!=null){
-                    if(!WorkDayCalculateUtils.isWorkDay(localDateTime.toLocalDate())&&!mapList.stream().anyMatch(ml->{
-                        Object date = ml.get("createDate");
-                        LocalDate createDate = LocalDate.parse(String.valueOf(date));
-                        return createDate.isEqual(localDateTime.toLocalDate());
-                    })){
-                        days-=1;
-                    }
-                }else {
-                    if(!WorkDayCalculateUtils.isWorkDay(localDateTime.toLocalDate())){
-                        days-=1;
-                    }
-                }
-
-            }
             int num=0;
             int num=0;
             if(mapList!=null){
             if(mapList!=null){
                 for (Map<String, Object> map : mapList) {
                 for (Map<String, Object> map : mapList) {
@@ -6025,7 +6028,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     dataList.add(objectMap);
                     dataList.add(objectMap);
                 }
                 }
                 BigDecimal bigDecimal=new BigDecimal(num);
                 BigDecimal bigDecimal=new BigDecimal(num);
+                BigDecimal bigDecimalWithLeave=new BigDecimal(num+(daysWithLeave-days));
                 BigDecimal divide;
                 BigDecimal divide;
+                BigDecimal divideWithLeave;
                 if(days!=0){
                 if(days!=0){
                      divide = bigDecimal.divide(BigDecimal.valueOf(days), 2, BigDecimal.ROUND_HALF_UP);
                      divide = bigDecimal.divide(BigDecimal.valueOf(days), 2, BigDecimal.ROUND_HALF_UP);
                 }else if(days==0){
                 }else if(days==0){
@@ -6040,11 +6045,29 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     divide=new BigDecimal(1);
                     divide=new BigDecimal(1);
                     log.error("填报及时率数据异常:==="+user.getName());
                     log.error("填报及时率数据异常:==="+user.getName());
                 }
                 }
+                if(daysWithLeave!=0){
+                    divideWithLeave = bigDecimalWithLeave.divide(BigDecimal.valueOf(daysWithLeave), 2, BigDecimal.ROUND_HALF_UP);
+                }else if(daysWithLeave==0){
+                    divideWithLeave=new BigDecimal(1);
+                    //查看当天有请假直接算100%
+                }else if (daysWithLeave==0&&num!=0&&leaveSheetList.size()>0){
+                    divideWithLeave=new BigDecimal(1);
+                }else{
+                    divideWithLeave=new BigDecimal(0);
+                }
+                if(divideWithLeave.compareTo(new BigDecimal(1))==1){
+                    divideWithLeave=new BigDecimal(1);
+                    log.error("填报及时率数据异常:==="+user.getName());
+                }
                 String number = dft.format(divide);
                 String number = dft.format(divide);
+                String numberWithLeave = dft.format(divideWithLeave);
                 timelinessRateVO.setTimelinessRate(String.valueOf(number));
                 timelinessRateVO.setTimelinessRate(String.valueOf(number));
+                timelinessRateVO.setTimelinessRateWithLeave(String.valueOf(numberWithLeave));
             }else {
             }else {
                 BigDecimal bigDecimal=new BigDecimal(num);
                 BigDecimal bigDecimal=new BigDecimal(num);
+                BigDecimal bigDecimalWithLeave=new BigDecimal(num+(daysWithLeave-days));
                 BigDecimal divide;
                 BigDecimal divide;
+                BigDecimal divideWithLeave;
                 if(days!=0){
                 if(days!=0){
                     divide = bigDecimal.divide(BigDecimal.valueOf(days), 2, BigDecimal.ROUND_HALF_UP);
                     divide = bigDecimal.divide(BigDecimal.valueOf(days), 2, BigDecimal.ROUND_HALF_UP);
                 }else if(days==0){
                 }else if(days==0){
@@ -6061,8 +6084,26 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     divide=new BigDecimal(1);
                     divide=new BigDecimal(1);
                     log.error("填报及时率数据异常:==="+user.getName());
                     log.error("填报及时率数据异常:==="+user.getName());
                 }
                 }
+                if(daysWithLeave!=0){
+                    divideWithLeave = bigDecimalWithLeave.divide(BigDecimal.valueOf(daysWithLeave), 2, BigDecimal.ROUND_HALF_UP);
+                }else if(daysWithLeave==0){
+                    divideWithLeave=new BigDecimal(1);
+                    //查看当天有请假直接算100%
+                }else if (daysWithLeave==0&&num!=0&&leaveSheetList.size()>0){
+                    divideWithLeave=new BigDecimal(1);
+                }else if(leaveSheets.size()>0){
+                    divideWithLeave=new BigDecimal(1);
+                }else{
+                    divideWithLeave=new BigDecimal(0);
+                }
+                if(divideWithLeave.compareTo(new BigDecimal(1))==1){
+                    divideWithLeave=new BigDecimal(1);
+                    log.error("填报及时率数据异常:==="+user.getName());
+                }
                 String number = dft.format(divide);
                 String number = dft.format(divide);
+                String numberWithLeave = dft.format(divideWithLeave);
                 timelinessRateVO.setTimelinessRate(String.valueOf(number));
                 timelinessRateVO.setTimelinessRate(String.valueOf(number));
+                timelinessRateVO.setTimelinessRateWithLeave(String.valueOf(numberWithLeave));
             }
             }
             timelinessRateVO.setDataList(dataList);
             timelinessRateVO.setDataList(dataList);
             resultList.add(timelinessRateVO);
             resultList.add(timelinessRateVO);
@@ -6082,21 +6123,26 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg msg = getUserReportTimelinessRate(request, startDate, endDate, null, null, null, null);
         HttpRespMsg msg = getUserReportTimelinessRate(request, startDate, endDate, null, null, null, null);
         HashMap map= (HashMap) msg.data;
         HashMap map= (HashMap) msg.data;
         List<TimelinessRateVO> list = (List<TimelinessRateVO>) map.get("list");
         List<TimelinessRateVO> list = (List<TimelinessRateVO>) map.get("list");
-        //String[] s={"人员","工号","部门","填报及时率"};
-        String[] s={MessageUtils.message("entry.personnel"),MessageUtils.message("entry.No"),MessageUtils.message("excel.department"),MessageUtils.message("excel.timeFill")};
+        //String[] s={"人员","工号","部门","填报及时率","填报及时率(含请假)"};
+        String[] s={MessageUtils.message("entry.personnel"),MessageUtils.message("entry.No"),MessageUtils.message("excel.department"),MessageUtils.message("excel.timeFill"),MessageUtils.message("excel.timeFillWithLeave")};
         List<String> titleString = Arrays.asList(s);
         List<String> titleString = Arrays.asList(s);
         List<List<String>> dataList=new ArrayList<>();
         List<List<String>> dataList=new ArrayList<>();
         dataList.add(titleString);
         dataList.add(titleString);
         for (TimelinessRateVO timelinessRateVO : list) {
         for (TimelinessRateVO timelinessRateVO : list) {
             List<String> item=new ArrayList<>();
             List<String> item=new ArrayList<>();
             if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
             if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                item.add(timelinessRateVO.getCorpwxUserId()==null?"":timelinessRateVO.getCorpwxUserId());
+                item.add("$userName="+(timelinessRateVO.getCorpwxUserId()==null?"":timelinessRateVO.getCorpwxUserId())+"$");
             }else {
             }else {
                 item.add(timelinessRateVO.getUserName());
                 item.add(timelinessRateVO.getUserName());
             }
             }
             item.add(timelinessRateVO.getJobNumber());
             item.add(timelinessRateVO.getJobNumber());
-            item.add(timelinessRateVO.getDepartmentName());
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                item.add("$departmentName="+(String.valueOf(timelinessRateVO.getCorpwxDeptId()==null?"":timelinessRateVO.getCorpwxDeptId()))+"$");
+            }else {
+                item.add(timelinessRateVO.getDepartmentName());
+            }
             item.add(timelinessRateVO.getTimelinessRate());
             item.add(timelinessRateVO.getTimelinessRate());
+            item.add(timelinessRateVO.getTimelinessRateWithLeave());
             dataList.add(item);
             dataList.add(item);
         }
         }
         //生成excel文件导出
         //生成excel文件导出
@@ -7895,14 +7941,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         System.out.println(dataDetailList);
         System.out.println(dataDetailList);
         HashMap map= (HashMap) msg.data;
         HashMap map= (HashMap) msg.data;
         List<TimelinessRateVO> list = (List<TimelinessRateVO>) map.get("list");
         List<TimelinessRateVO> list = (List<TimelinessRateVO>) map.get("list");
-        //String[] s={"人员","工号","部门","填报及时率"};
-        String[] s={MessageUtils.message("entry.personnel"),MessageUtils.message("entry.No"),MessageUtils.message("excel.department"),MessageUtils.message("excel.timeFill")};
+        String[] s={"人员","工号","部门","总及时率","总及时率(含请假)"};
         List<String> titleString = new ArrayList<>(Arrays.asList(s));
         List<String> titleString = new ArrayList<>(Arrays.asList(s));
         for (Map<String, Object> objectMap : dataDetailList) {
         for (Map<String, Object> objectMap : dataDetailList) {
             List<Map<String,Object>> data = (List<Map<String, Object>>) objectMap.get("data");
             List<Map<String,Object>> data = (List<Map<String, Object>>) objectMap.get("data");
             for (Map<String, Object> datum : data) {
             for (Map<String, Object> datum : data) {
                 String week =String.valueOf( datum.get("week"));
                 String week =String.valueOf( datum.get("week"));
-
                 titleString.add(week+"_"+String.valueOf(datum.get("startDate"))+"-"+ String.valueOf(datum.get("endDate"))+"及时率");
                 titleString.add(week+"_"+String.valueOf(datum.get("startDate"))+"-"+ String.valueOf(datum.get("endDate"))+"及时率");
             }
             }
         }
         }
@@ -7916,8 +7960,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 item.add(timelinessRateVO.getUserName());
                 item.add(timelinessRateVO.getUserName());
             }
             }
             item.add(timelinessRateVO.getJobNumber());
             item.add(timelinessRateVO.getJobNumber());
-            item.add(timelinessRateVO.getDepartmentName());
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                item.add("$departmentName="+(String.valueOf(timelinessRateVO.getCorpwxDeptId()==null?"":timelinessRateVO.getCorpwxDeptId()))+"$");
+            }else {
+                item.add(timelinessRateVO.getDepartmentName());
+            }
             item.add(timelinessRateVO.getTimelinessRate());
             item.add(timelinessRateVO.getTimelinessRate());
+            item.add(timelinessRateVO.getTimelinessRateWithLeave());
             for (Map<String, Object> objectMap : dataDetailList) {
             for (Map<String, Object> objectMap : dataDetailList) {
                 List<Map<String,Object>> data = (List<Map<String, Object>>) objectMap.get("data");
                 List<Map<String,Object>> data = (List<Map<String, Object>>) objectMap.get("data");
                 for (Map<String, Object> datum : data) {
                 for (Map<String, Object> datum : data) {
@@ -8021,7 +8070,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     parent.id=department.getDepartmentId().toString();
                     parent.id=department.getDepartmentId().toString();
                     parent.time = 0;
                     parent.time = 0;
                     parent.text=department.getDepartmentName();
                     parent.text=department.getDepartmentName();
-                    parent.type="department";
+                    parent.translationType="department";
                     if(department.getSuperiorId()!=null){
                     if(department.getSuperiorId()!=null){
                         parent.parent=String.valueOf(department.getSuperiorId());
                         parent.parent=String.valueOf(department.getSuperiorId());
                         parent.type="milestone";
                         parent.type="milestone";
@@ -8061,7 +8110,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         userGantt.color=u.getColor();
                         userGantt.color=u.getColor();
                         userGantt.parent=String.valueOf(u.getDepartmentId());
                         userGantt.parent=String.valueOf(u.getDepartmentId());
                         userGantt.children=new ArrayList<>();
                         userGantt.children=new ArrayList<>();
-                        userGantt.type="user";
+                        userGantt.translationType="user";
                         itemList=getUserGanttDataItemList(userGantt,itemList);
                         itemList=getUserGanttDataItemList(userGantt,itemList);
                     }
                     }
                 }
                 }
@@ -8236,7 +8285,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             curItem.text = MessageUtils.message("leave.busTra")+"/" + businessTrip.getOwnerName();
                             curItem.text = MessageUtils.message("leave.busTra")+"/" + businessTrip.getOwnerName();
                             curItem.start_date = bustripProject.getStartDate().toString();
                             curItem.start_date = bustripProject.getStartDate().toString();
                             curItem.end_date = bustripProject.getEndDate().toString();
                             curItem.end_date = bustripProject.getEndDate().toString();
-                            curItem.type="user";
+                            curItem.translationType="user";
                             curItem.parent = btLastItemId;
                             curItem.parent = btLastItemId;
                             itemList=getUserGanttDataItemList(curItem,itemList);
                             itemList=getUserGanttDataItemList(curItem,itemList);
                             btLastItemId = String.valueOf(bustripProject.getProjectId());
                             btLastItemId = String.valueOf(bustripProject.getProjectId());
@@ -8277,7 +8326,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         parent.start_date = start_date;
                         parent.start_date = start_date;
                         parent.end_date = end_date;
                         parent.end_date = end_date;
                         parent.time = 0;
                         parent.time = 0;
-                        parent.type="user";
+                        parent.translationType="user";
                         parent.parent=String.valueOf(departmentId);
                         parent.parent=String.valueOf(departmentId);
                         parent.children=new ArrayList<>();
                         parent.children=new ArrayList<>();
                         Optional<User> optional = AllUser.stream().filter(au -> au.getId().equals(userId)).findFirst();
                         Optional<User> optional = AllUser.stream().filter(au -> au.getId().equals(userId)).findFirst();
@@ -8322,7 +8371,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     curItem.start_date = start_date;
                     curItem.start_date = start_date;
                     curItem.end_date = end_date;
                     curItem.end_date = end_date;
                     curItem.time = (Integer)map.get("duration");
                     curItem.time = (Integer)map.get("duration");
-                    curItem.type="user";
+                    curItem.translationType="user";
                     curItem.parent = lastItemId;
                     curItem.parent = lastItemId;
                     itemList=getUserGanttDataItemList(curItem,itemList);
                     itemList=getUserGanttDataItemList(curItem,itemList);
                     lastItemId = projectId;
                     lastItemId = projectId;
@@ -8363,7 +8412,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             subParent.id=dept.getDepartmentId().toString();
             subParent.id=dept.getDepartmentId().toString();
             subParent.time = 0;
             subParent.time = 0;
             subParent.text=dept.getDepartmentName();
             subParent.text=dept.getDepartmentName();
-            subParent.type="department";
+            subParent.translationType="department";
             if(dept.getSuperiorId()!=null){
             if(dept.getSuperiorId()!=null){
                 subParent.parent=String.valueOf(dept.getSuperiorId());
                 subParent.parent=String.valueOf(dept.getSuperiorId());
                 subParent.type="milestone";
                 subParent.type="milestone";

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties

@@ -639,6 +639,7 @@ excel.planTime=计划完成时间
 excel.actualTime=实际完成时间
 excel.actualTime=实际完成时间
 excel.unclassified=未分类
 excel.unclassified=未分类
 excel.timeFill=填报及时率
 excel.timeFill=填报及时率
+excel.timeFillWithLeave=填报及时率(含请假)
 excel.propActualTime=实际用时占比
 excel.propActualTime=实际用时占比
 excel.classification=分类
 excel.classification=分类
 excel.name=名称
 excel.name=名称

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties

@@ -639,6 +639,7 @@ excel.planTime=Planned completion time
 excel.actualTime=Actual completion time
 excel.actualTime=Actual completion time
 excel.unclassified=Unclassified
 excel.unclassified=Unclassified
 excel.timeFill=Timeliness rate of filling
 excel.timeFill=Timeliness rate of filling
+excel.timeFillWithLeave=Timeliness rate of filling(Contain leave)
 excel.propActualTime=Proportion of actual time
 excel.propActualTime=Proportion of actual time
 excel.classification=classification
 excel.classification=classification
 excel.name=name
 excel.name=name

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml

@@ -678,7 +678,7 @@
     </select>
     </select>
 
 
     <select id="getUserReportTimelinessRate" resultType="java.util.Map">
     <select id="getUserReportTimelinessRate" resultType="java.util.Map">
-        select `user`.name as userName,`user`.corpwx_userid as corpwxUserId,rl.create_date as createDate,MIN(rl.operate_date )as createTime from report_log rl
+        select `user`.name as userName,`user`.corpwx_userid as corpwxUserId,`user`.corpwx_deptid as corpwxDeptId,rl.create_date as createDate,MIN(rl.operate_date )as createTime from report_log rl
         left join `user` on `user`.id=rl.operator_id
         left join `user` on `user`.id=rl.operator_id
         where rl.company_id=#{companyId}
         where rl.company_id=#{companyId}
         and rl.create_date between  #{startDate} and #{endDate}
         and rl.create_date between  #{startDate} and #{endDate}

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -1446,5 +1446,7 @@
   "can-yu-ren-ci": "Number of participants",
   "can-yu-ren-ci": "Number of participants",
   "chu-cha-de-tian-shu": "Days of business trip",
   "chu-cha-de-tian-shu": "Days of business trip",
   "xiang-mu-chuang-jian-shi-jian-duan": "Project Creation Period",
   "xiang-mu-chuang-jian-shi-jian-duan": "Project Creation Period",
-  "dao-chu-jia-qi": "Export holidays"
+  "dao-chu-jia-qi": "Export holidays",
+  "an-ji-du-dao-chu": "export by quarter",
+  "han-qing-jia": "(including leave)"
 }
 }

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -1446,5 +1446,7 @@
   "can-yu-ren-ci": "参与人次",
   "can-yu-ren-ci": "参与人次",
   "chu-cha-de-tian-shu": "出差的天数",
   "chu-cha-de-tian-shu": "出差的天数",
   "xiang-mu-chuang-jian-shi-jian-duan": "项目创建时间段",
   "xiang-mu-chuang-jian-shi-jian-duan": "项目创建时间段",
-  "dao-chu-jia-qi": "导出假期"
+  "dao-chu-jia-qi": "导出假期",
+  "an-ji-du-dao-chu": "按季度导出",
+  "han-qing-jia": "(含请假)"
 }
 }

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

@@ -134,7 +134,7 @@
       </div>
       </div>
       <p :style="ins == 9 ? 'float: right;margin-right: 25px;width:20%' : 'float: right;margin-right: 25px;width:10%'" >
       <p :style="ins == 9 ? 'float: right;margin-right: 25px;width:20%' : 'float: right;margin-right: 25px;width:10%'" >
         <el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
         <el-button type="primary" @click="exportExcel" size="mini">{{ $t('reporderived') }}</el-button>
-        <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9 && user.companyId == 876">按季度导出</el-button>
+        <el-button type="primary" @click="exportExcelByQuarter" size="mini" v-if="ins == 9 && user.companyId == 876">{{ $t('an-ji-du-dao-chu') }}</el-button>
       </p>
       </p>
       
       
     </div>
     </div>
@@ -593,6 +593,18 @@
                     <span v-else>{{scope.row.timelinessRate}}</span>
                     <span v-else>{{scope.row.timelinessRate}}</span>
                   </template>
                   </template>
                 </el-table-column>
                 </el-table-column>
+                <el-table-column prop="timelinessRate" :label="$t('timelyreportingrate')" min-width="200" align="center">
+                  <template slot="header">
+                    <span>{{ $t('timelyreportingrate') + $t('han-qing-jia') }}</span>
+                    <el-tooltip effect="dark" :content="'请假计为填报及时'" placement="top-start">
+                        <i class="el-icon-question" style="color:#606266"></i>
+                    </el-tooltip>
+                  </template>
+                  <template slot-scope="scope">
+                    <el-link v-if="scope.row.dataList != null" style="color:#409eff;" @click="timelyDetail(scope.row.dataList)">{{scope.row.timelinessRateWithLeave}}</el-link>
+                    <span v-else>{{scope.row.timelinessRateWithLeave}}</span>
+                  </template>
+                </el-table-column>
                 <!-- <el-table-column prop="dataList" label="详情" width="100" fixed="right" align="center">
                 <!-- <el-table-column prop="dataList" label="详情" width="100" fixed="right" align="center">
                   <template slot-scope="scope">
                   <template slot-scope="scope">
                     <el-button @click="timelyDetail(scope.row.dataList)">详情</el-button>
                     <el-button @click="timelyDetail(scope.row.dataList)">详情</el-button>

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

@@ -507,7 +507,10 @@
                         <!-- <el-select v-model="addForm.inchargerId"  :disabled="(addForm.userId.length==0 && addForm.isPublic == 0) || (!permissions.projectManagement && user.id != addForm.creatorId)" filterable placeholder="请选择项目经理" style="width:32%;" > -->
                         <!-- <el-select v-model="addForm.inchargerId"  :disabled="(addForm.userId.length==0 && addForm.isPublic == 0) || (!permissions.projectManagement && user.id != addForm.creatorId)" filterable placeholder="请选择项目经理" style="width:32%;" > -->
 
 
                         <el-select v-if="user.userNameNeedTranslate != 1" v-model="addForm.inchargerId" filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:32%;" >
                         <el-select v-if="user.userNameNeedTranslate != 1" v-model="addForm.inchargerId" filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:32%;" >
-                            <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                            <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id">
+                                <span style="float: left">{{ item.name }}</span>
+                                <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
+                            </el-option>
                         </el-select>
                         </el-select>
 
 
                         <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal"></selectCat>
                         <selectCat v-if="user.userNameNeedTranslate == 1" :size="'medium'" :subject="participator" :subjectId="addForm.inchargerId" :distinction="'3'" @selectCal="selectCal"></selectCat>

+ 20 - 12
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -49,17 +49,17 @@
       <!-- 人员/项目筛选 -->
       <!-- 人员/项目筛选 -->
       <div class="head_select">
       <div class="head_select">
         <span>{{(this.radio1 == $t('an-ren-yuan-cha-kan') ? $t('ren-yuan') : $t('other.project'))}}</span>
         <span>{{(this.radio1 == $t('an-ren-yuan-cha-kan') ? $t('ren-yuan') : $t('other.project'))}}</span>
-      <el-select clearable filterable v-model="valuex" :placeholder="$t('defaultText.pleaseChoose')" size="small" style="margin-left:9px;width:10vw" @change="optupdata()">
-        <el-option
-          v-for="item in screenList"
-          :key="item.id"
-          :label="reqpar1 ? item.projectName : item.name"
-          :value="item.id"
-          >
-          <span v-if="reqpar1" style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
-          <span v-if="reqpar1" style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
-        </el-option>
-      </el-select>
+          <el-select v-if="reqpar1" clearable filterable v-model="valuex" :placeholder="$t('defaultText.pleaseChoose')" size="small" style="margin-left:9px;width:10vw" @change="optupdata()">
+            <el-option v-for="item in screenList" :key="item.id" :label="item.projectName" :value="item.id">
+              <span v-if="reqpar1" style="float: left;color: #8492a6;">{{ item.projectCode }}</span>
+              <span v-if="reqpar1" style="float: right;font-size: 13px;margin-left: 20px">{{ item.projectName }}</span>
+            </el-option>
+          </el-select>
+          <el-select v-if="!reqpar1 && user.userNameNeedTranslate != '1'" clearable filterable v-model="valuex" :placeholder="$t('defaultText.pleaseChoose')" size="small" style="margin-left:9px;width:10vw" @change="optupdata()">
+            <el-option v-for="item in screenList" :key="item.id" :label="item.name" :value="item.id">
+            </el-option>
+          </el-select>
+          <selectCat v-if="!reqpar1 && user.userNameNeedTranslate == '1'" style="margin-left:9px;" :size="'small'" :widthStr="'153'" :subject="screenList" :subjectId="valuex" :distinction="'1'" @selectCal="selectCal"></selectCat>
       </div>
       </div>
       <!-- 资源需求导入/导出 -->
       <!-- 资源需求导入/导出 -->
       <div class="head_files" v-if="!isDataLoaded">
       <div class="head_files" v-if="!isDataLoaded">
@@ -180,11 +180,13 @@
 import { error } from 'dingtalk-jsapi';
 import { error } from 'dingtalk-jsapi';
 import Gantt from './gantt.vue';
 import Gantt from './gantt.vue';
 import vueGantt from './vueGantt.vue'
 import vueGantt from './vueGantt.vue'
+// 自定义select组件
+import SelectCat from "@/components/select.vue"
 
 
 export default {
 export default {
   name: 'project_gantt',
   name: 'project_gantt',
   props: {},
   props: {},
-  components: {Gantt, vueGantt},
+  components: {Gantt, vueGantt, SelectCat},
   data() {
   data() {
     return {
     return {
       taskType: '',
       taskType: '',
@@ -240,6 +242,12 @@ export default {
     this.isDataLoaded = true
     this.isDataLoaded = true
   },
   },
   methods: {
   methods: {
+    selectCal(obj) {
+      if(obj.distinction == '1') {
+          this.valuex = obj.id
+          this.optupdata()
+      }
+    },
     setGroup() {
     setGroup() {
           this.$refs.ganttTable1.setGroup();
           this.$refs.ganttTable1.setGroup();
           // this.$refs.ganttTable2.setGroup();
           // this.$refs.ganttTable2.setGroup();

+ 6 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/project/vueGantt.vue

@@ -4,21 +4,21 @@
         <el-table-column prop="text" label="姓名" width="240" fixed="left" v-if="stafforpro != '按项目查看'">
         <el-table-column prop="text" label="姓名" width="240" fixed="left" v-if="stafforpro != '按项目查看'">
           <template slot-scope="scope">
           <template slot-scope="scope">
               <!-- user.userNameNeedTranslate == 1 -->
               <!-- user.userNameNeedTranslate == 1 -->
-              <span v-if="user.userNameNeedTranslate == 1 && scope.row.type == 'department'"><ww-open-data type='departmentName' :openid='scope.row.text'></ww-open-data></span>
-              <span v-if="user.userNameNeedTranslate == 1 && scope.row.type == 'user'"><ww-open-data type='userName' :openid='scope.row.text'></ww-open-data></span>
-              <span v-if="user.userNameNeedTranslate == 1 && (scope.row.type == 'null' || scope.row.type == null)">{{scope.row.text}}</span>
+              <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'department'"><ww-open-data type='departmentName' :openid='scope.row.text'></ww-open-data></span>
+              <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'"><ww-open-data type='userName' :openid='scope.row.text'></ww-open-data></span>
+              <span v-if="user.userNameNeedTranslate == 1 && (scope.row.translationType == 'null' || scope.row.translationType == null)">{{scope.row.text}}</span>
               <span v-if="user.userNameNeedTranslate != 1">{{scope.row.text}}</span>
               <span v-if="user.userNameNeedTranslate != 1">{{scope.row.text}}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="text" label="项目" width="240" fixed="left" v-if="stafforpro == '按项目查看'">
         <el-table-column prop="text" label="项目" width="240" fixed="left" v-if="stafforpro == '按项目查看'">
           <template slot-scope="scope">
           <template slot-scope="scope">
-            <span v-if="user.userNameNeedTranslate == 1 && scope.row.type == 'user'">
+            <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'">
               <span v-for="(item, index) in scope.row.userNameList" :key="index">
               <span v-for="(item, index) in scope.row.userNameList" :key="index">
                 <ww-open-data type='userName' :openid='scope.row.text'></ww-open-data>
                 <ww-open-data type='userName' :openid='scope.row.text'></ww-open-data>
               </span>
               </span>
             </span>
             </span>
-            <span v-if="user.userNameNeedTranslate == 1 && scope.row.type == 'user'">{{scope.row.proNameText}}</span>
-            <span v-if="user.userNameNeedTranslate == 1 && (scope.row.type == 'null' || scope.row.type == null)"> {{scope.row.text}}</span>
+            <span v-if="user.userNameNeedTranslate == 1 && scope.row.translationType == 'user'">{{scope.row.proNameText}}</span>
+            <span v-if="user.userNameNeedTranslate == 1 && (scope.row.translationType == 'null' || scope.row.translationType == null)"> {{scope.row.text}}</span>
             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.text}}</span>
             <span v-if="user.userNameNeedTranslate != 1">{{scope.row.text}}</span>
           </template>
           </template>
         </el-table-column>
         </el-table-column>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -5606,7 +5606,7 @@
                     if (valid) {
                     if (valid) {
                         
                         
                 if(this.totalReportHours < this.user.timeType.allday){
                 if(this.totalReportHours < this.user.timeType.allday){
-                    this.$confirm('当日工时不足8.0小时,是否确定提交?', '提示', {
+                    this.$confirm('当日工时不足' + this.user.timeType.allday.toFixed(1) + '小时,是否确定提交?', '提示', {
                         confirmButtonText: '确定',
                         confirmButtonText: '确定',
                         cancelButtonText: '取消',
                         cancelButtonText: '取消',
                         type: 'warning'
                         type: 'warning'

+ 19 - 7
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -1513,7 +1513,25 @@ import timetoolVue from '../timetool/timetool.vue';
                 this.$refs.loginForm.validate().then(
                 this.$refs.loginForm.validate().then(
                 ()=>{
                 ()=>{
                 // 验证通过
                 // 验证通过
-                    this.dateAr = []
+                    if(this.totalReportHours < this.user.timeType.allday){
+                        this.$dialog.confirm({
+                            title: '提示',
+                            message: '当日工时不足' + this.user.timeType.allday.toFixed(1) + '小时,是否确定提交?'
+                        }).then(()=>{
+                            this.submitReportSon()
+                        }).catch(()=>{})
+                    }else{
+                        this.submitReportSon()
+                    }
+                }).catch(()=>{
+                //验证失败
+                console.log('验证失败');
+                    return
+                })
+                
+            },
+            submitReportSon(){
+                this.dateAr = []
                     let alp = []
                     let alp = []
                     if(this.user.timeType.multiWorktime == 1) {
                     if(this.user.timeType.multiWorktime == 1) {
                         for(var p in this.form.domains) {
                         for(var p in this.form.domains) {
@@ -1827,12 +1845,6 @@ import timetoolVue from '../timetool/timetool.vue';
                             this.$toast.fail((this.isDraft==0?'提交失败':'暂存失败')+':'+res.msg);
                             this.$toast.fail((this.isDraft==0?'提交失败':'暂存失败')+':'+res.msg);
                         }
                         }
                     }).catch(err=> {this.$toast.clear(); this.flgLg = true});
                     }).catch(err=> {this.$toast.clear(); this.flgLg = true});
-                }).catch(()=>{
-                //验证失败
-                console.log('验证失败');
-                    return
-                })
-                
             },
             },
             //初始化参数
             //初始化参数
             initWxConfig() {
             initWxConfig() {

+ 17 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue

@@ -42,6 +42,7 @@
                                 <span v-else></span>
                                 <span v-else></span>
                             </div>
                             </div>
                             <div class="task_button">
                             <div class="task_button">
+                                <van-button size="small" type="danger" v-if="user.id == item.creatorId || user.id == projectDetail.creatorId ||user.id == projectDetail.inchargerId || projectManagement" @click="taskDelete(item)">删除</van-button>
                                 <van-button size="small" type="info" @click="toEditask(item.id)">编辑</van-button>
                                 <van-button size="small" type="info" @click="toEditask(item.id)">编辑</van-button>
                                 <van-button size="small" type="primary" @click="taskStatus(item.id,0,item)" v-if="item.taskStatus == 0">完成</van-button>
                                 <van-button size="small" type="primary" @click="taskStatus(item.id,0,item)" v-if="item.taskStatus == 0">完成</van-button>
                                 <van-button size="small" color="#e6a23c" @click="taskStatus(item.id,1,item)" v-if="item.taskStatus == 1">重启</van-button>
                                 <van-button size="small" color="#e6a23c" @click="taskStatus(item.id,1,item)" v-if="item.taskStatus == 1">重启</van-button>
@@ -329,6 +330,22 @@ export default {
                 }
                 }
             }).catch(err=> {this.$toast.clear();console.log(err)});
             }).catch(err=> {this.$toast.clear();console.log(err)});
         },
         },
+        taskDelete(taskitem){
+            this.$dialog.confirm({
+                title: '提示',
+                message: taskitem.subTaskList.length > 0 ? '您确定删除当前任务及其子任务吗?' : '您确定删除当前任务吗?'
+            }).then(()=>{
+                this.$axios.post("/task/delete", {id: taskitem.id})
+                .then(res => {
+                    if(res.code == "ok") {
+                        this.$toast.success('删除成功');
+                        this.inside.taskList = this.inside.taskList.filter(item => item.id != taskitem.id)
+                    } else {
+                        this.$toast.fail('操作失败');
+                    }
+                }).catch(err=> {this.$toast.clear();console.log(err)});
+            }).catch(()=>{})
+        },
         
         
         openProject(){
         openProject(){
             if(this.active == 1 && (this.projectManagement || this.user.id==this.projectDetail.inchargerId || this.user.id==this.projectDetail.creatorId)){
             if(this.active == 1 && (this.projectManagement || this.user.id==this.projectDetail.inchargerId || this.user.id==this.projectDetail.creatorId)){