Kaynağa Gözat

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

ggooalice 2 yıl önce
ebeveyn
işleme
14da27b1ee
15 değiştirilmiş dosya ile 245 ekleme ve 57 silme
  1. 1 1
      fhKeeper/formulahousekeeper/inva_4_tivo/css/customer.css
  2. 9 3
      fhKeeper/formulahousekeeper/inva_4_tivo/css/index.css
  3. 8 6
      fhKeeper/formulahousekeeper/inva_4_tivo/customer.html
  4. 12 12
      fhKeeper/formulahousekeeper/inva_4_tivo/index.html
  5. 3 0
      fhKeeper/formulahousekeeper/inva_4_tivo/js/customer.js
  6. 5 10
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java
  7. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskCommentController.java
  8. 5 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  9. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  10. 19 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/vo/OvertimeListVO.java
  11. 3 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java
  12. 76 14
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  13. 16 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskProgressServiceImpl.java
  14. 80 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/SplitDateUtil.java
  15. 2 2
      fhKeeper/formulahousekeeper/timesheet/config/index.js

+ 1 - 1
fhKeeper/formulahousekeeper/inva_4_tivo/css/customer.css

@@ -511,7 +511,7 @@ html {font-size: 10px; -webkit-text-size-adjust:none; -webkit-tap-highlight-colo
 }
 .specialShowProgressbar span {
     display: inline-block;
-    width: 13.75rem;
+    /* width: 13.75rem; */
     height: .1875rem;
     background: #20a0ff;
     position: absolute;

+ 9 - 3
fhKeeper/formulahousekeeper/inva_4_tivo/css/index.css

@@ -16,7 +16,9 @@
 }
 .navigationTitle {
     max-width: 81.25rem;
-    height: 6.375rem;
+    /* height: 6.375rem; */
+    /* max-width: 102.25rem; */
+    height: 8rem;
     margin: auto;
     position: relative;
     display: flex;
@@ -146,15 +148,19 @@
     width: 100%;
     position: fixed;
     z-index: 10;
-    top: 6.25rem;
+    /* top: 6.25rem; */
+    top: 8rem;
     left: 0;
     background: #fff;
-    height: 18.75rem;
+    /* height: 18.75rem; */
+    height: 23.1rem;
     border-top: .0625rem solid rgb(163, 163, 163);
 }
 .connont {
     width: 81.25rem;
     margin: auto;
+    transform: scale(1.258);
+    margin-top: 2rem;
 }
 
 .tils::before {

+ 8 - 6
fhKeeper/formulahousekeeper/inva_4_tivo/customer.html

@@ -79,7 +79,7 @@
                 ·用高效的客户追踪系统和智能数据处理,节约销售成本,提高企业营收·
             </div>
             <a href="http://clinic.ttkuaiban.com/#/register">
-                <div class="bannBtn">MORE</div>
+                <!-- <div class="bannBtn">MORE</div> -->
             </a>
         </div>
     </div>
@@ -119,7 +119,7 @@
                     <div style="display: inline-block;"> 
                         <h4>数据分析</h4>
                         <p>线索分析、来源排行、<br/> 商机分析、任务统计</p>
-                        <span>了解更多</span>
+                        <!-- <span>了解更多</span> -->
                     </div>
                 </div>
                 <div class="coreFunctionConRihtCon">
@@ -127,7 +127,7 @@
                     <div style="display: inline-block;"> 
                         <h4>产品管理</h4>
                         <p>产品基础信息、销售时间、<br/> 产品描述等</p>
-                        <span>了解更多</span>
+                        <!-- <span>了解更多</span> -->
                     </div>
                 </div>
                 <div class="coreFunctionConRihtCon">
@@ -135,7 +135,7 @@
                     <div style="display: inline-block;"> 
                         <h4>个性化</h4>
                         <p>自定义组件、个性化UI等</p>
-                        <span>了解更多</span>
+                        <!-- <span>了解更多</span> -->
                     </div>
                 </div>
             </div>
@@ -189,7 +189,7 @@
             <div class="specialShowTil">
                 <h2><span>特色</span>展示</h2>
                 <div class="specialShowProgressbar">
-                    <div><span></span><p>90%</p></div>
+                    <div><span style="width: 9%;" id="tesSpan"></span><p id="tesTex">1/11</p></div>
                 </div>
             </div>
             <div class="specialShowCon">
@@ -284,7 +284,9 @@
 
     <!-- 客户评价  -->
     <div class="evaluation">
-        <div class="evaluationLogo"><img src="./image/customer/hezuo.png" alt=""></div>
+        <div class="evaluationLogo">
+            <!-- <img src="./image/customer/hezuo.png" alt=""> -->
+        </div>
         <div class="evaluationC">
             <div class="evaluationCon">
                 <div class="evaluationConIkun" style="left: 0rem;">

+ 12 - 12
fhKeeper/formulahousekeeper/inva_4_tivo/index.html

@@ -17,6 +17,16 @@
     <!-- 统计文件 -->
     <!-- <script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
     <script>LA.init({id: "Jk62Sh8gvUhl1xcU",ck: "Jk62Sh8gvUhl1xcU"})</script> -->
+    <script>
+        function bodyScale() {
+            var devicewidth = document.documentElement.clientWidth;
+            var scale = devicewidth / 1920;  // 设计稿的尺寸
+            document.body.style.zoom = scale;
+        }
+        window.onload = window.onresize = function () {
+            bodyScale();
+        };
+    </script>
 </head>
 
 <body data-spy="scroll" data-target=".fixed-top" id="body">
@@ -30,7 +40,7 @@
     </div> -->
 
     <!-- <nav class="navbar navbar-expand-lg navbar-dark navbar-custom fixed-top"> -->
-    <nav class="navbar headers" style="z-index: 9;">
+    <nav class="navbar headers" style="z-index: 9;transform: scale(1.258);">
         <div class="navigationBar">
             <div class="navigationBarBack" id="all"></div>
             <div class="navigationTitle abc" id="abc">
@@ -69,7 +79,7 @@
         <img id="consultigImg" src="./image/ions/kefu2.png" alt="">
     </div>
     <!-- 产品介绍 -->
-    <div class="product" id="product" style="display: none">
+    <div class="product" id="product" style="display: none;">
         <div class="connont">
             <div style="display: flex;">
                 <div class="management">
@@ -661,15 +671,5 @@
 
     <!-- <script src="js/js/scripts.js"></script>  -->
     <script src="js/index.js"></script>
-    <script>
-        function bodyScale() {
-            var devicewidth = document.documentElement.clientWidth;
-            var scale = devicewidth / 1920;  // 设计稿的尺寸
-            document.body.style.zoom = scale;
-        }
-        window.onload = window.onresize = function () {
-            bodyScale();
-        };
-    </script>
 </body>
 </html>

+ 3 - 0
fhKeeper/formulahousekeeper/inva_4_tivo/js/customer.js

@@ -80,6 +80,9 @@ $('#product').hover(function () {
 // 特色展示 
 $('#specialShowConLeftUL li').click(function () {
     let index = $(this).index()
+    // console.log(index, '索引')
+    $('#tesTex').html(+index + 1 + '/11')
+    $('#tesSpan').css('width', (+index + 1) * 9.09 + '%')
     let arr = $('#specialShowConLeftUL li')
     // if(index != '1' && index != '7') {
        for(let i in arr) {

+ 5 - 10
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java

@@ -4,6 +4,7 @@ package com.management.platform.controller;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.management.platform.entity.*;
+import com.management.platform.entity.vo.OvertimeListVO;
 import com.management.platform.mapper.*;
 import com.management.platform.service.OperationRecordService;
 import com.management.platform.service.ProjectService;
@@ -490,14 +491,11 @@ public class ProjectController {
 
     /**
      *
-     * @param projectId 项目id, 非必传
-     * @param startDate 开始日期 必传
-     * @param endDate  结束日期 必传
      * @return
      */
     @RequestMapping("/getOvertimeList")
-    public HttpRespMsg getOvertimeList(String userId, Integer projectId, String startDate, String endDate,Integer departmentId) {
-        return projectService.getOvertimeList(userId, projectId, startDate, endDate, request,departmentId);
+    public HttpRespMsg getOvertimeList(OvertimeListVO overtimeListVO) {
+        return projectService.getOvertimeList(overtimeListVO);
     }
 
     /**
@@ -516,14 +514,11 @@ public class ProjectController {
 
     /**
      * 导出加班统计报表
-     * @param projectId
-     * @param startDate
-     * @param endDate
      * @return
      */
     @RequestMapping("/exportOvertimeList")
-    public HttpRespMsg exportOvertimeList(String userId, Integer projectId, String startDate, String endDate) {
-        return projectService.exportOvertimeList(userId, projectId, startDate, endDate, request);
+    public HttpRespMsg exportOvertimeList(OvertimeListVO overtimeListVO) {
+        return projectService.exportOvertimeList(overtimeListVO, request);
     }
 
     /**

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

@@ -72,7 +72,8 @@ public class TaskCommentController {
             for (TaskComment taskComment : taskComments) {
                 String userName = taskComment.getUserName();
                 String content = taskComment.getContent();
-                taskComment.setContent(content.replace("userName", "$userName=" + userName + "$"));
+                String newContent = content.replace(userName, "$userName=" + userName + "$");
+                taskComment.setContent(newContent);
             }
         }
         HttpRespMsg msg = new HttpRespMsg();

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

@@ -290,14 +290,16 @@ public class TaskController {
     private void updateProjectProgress(Integer projectId) {
         //只有里程碑才更新项目进度, 非已撤销状态的
         List<Task> all = taskMapper.simpleList(new QueryWrapper<Task>().eq("project_id", projectId).ne("task_status", 2).eq("task_type",1));
+        Project project = new Project();
+        project.setId(projectId);
         if (all.size() > 0) {
             long running = all.stream().filter(a -> a.getTaskStatus() == 1).count();
             int progress = ((int) running) * 100 / all.size();
-            Project project = new Project();
-            project.setId(projectId);
             project.setProgress(progress);
-            projectService.updateById(project);
+        } else {
+            project.setProgress(0);
         }
+        projectService.updateById(project);
     }
 
     @RequestMapping("/finish")

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -2720,8 +2720,10 @@ public class WeiXinCorpController {
             String paidCorpId = jsonObject.getString("PaidCorpId");
             WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("corpid", paidCorpId));
             Company company = companyMapper.selectById(wxCorpInfo.getCompanyId());
+            System.err.println("版本变更的公司信息为:");
+            System.err.println(wxCorpInfo.toString());
             JSONObject map = new JSONObject();
-            map.put("auth_corpid",corpId);
+            map.put("auth_corpid",wxCorpInfo.getCorpid());
             map.put("permanent_code",wxCorpInfo.getPermanentCode());
             HttpEntity<JSONObject> detailEntity = new HttpEntity<>(map, headers);
             ResponseEntity<String> detailResponseEntity = restTemplate.postForEntity(url, detailEntity, String.class);
@@ -2769,6 +2771,7 @@ public class WeiXinCorpController {
                         break;
                 }
                 companyMapper.updateById(company);
+                System.out.println(company.getCompanyName()+"已成功变更版本,版本号为:"+edition_id);
             }else {
                 System.out.println("++++++++++++++++++++++"+"版本变更失败!"+"++++++++++++++++++++++++");
                 return false;

+ 19 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/vo/OvertimeListVO.java

@@ -0,0 +1,19 @@
+package com.management.platform.entity.vo;
+
+import lombok.Data;
+
+/**
+ * @author cs
+ * @version 1.0
+ * @ClassName OvertimeListVO
+ * @Description
+ * @date 2022-11-10 20:14
+ */
+@Data
+public class OvertimeListVO {
+    private String userId;
+    private Integer projectId;
+    private String startDate;
+    private String endDate;
+    private Integer[] departmentId;
+}

+ 3 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java

@@ -3,6 +3,7 @@ package com.management.platform.service;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.management.platform.entity.Project;
 import com.management.platform.entity.ProjectSeparate;
+import com.management.platform.entity.vo.OvertimeListVO;
 import com.management.platform.util.HttpRespMsg;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
@@ -102,9 +103,9 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg exportProjectStagesCost( HttpServletRequest request,String stageNames);
 
-    HttpRespMsg getOvertimeList(String userId, Integer projectId, String startDate, String endDate, HttpServletRequest request,Integer departmentId);
+    HttpRespMsg getOvertimeList(OvertimeListVO overtimeListVO);
 
-    HttpRespMsg exportOvertimeList(String userId, Integer projectId, String startDate, String endDate, HttpServletRequest request);
+    HttpRespMsg exportOvertimeList(OvertimeListVO overtimeListVO, HttpServletRequest request);
 
     HttpRespMsg getDegreeCost(String startDate, String endDate, Integer projectId, HttpServletRequest request);
 

+ 76 - 14
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -2737,7 +2737,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     }
 
     @Override
-    public HttpRespMsg getOvertimeList(String userId, Integer projectId, String startDate, String endDate, HttpServletRequest request,Integer departmentId) {
+    public HttpRespMsg getOvertimeList(OvertimeListVO overtimeListVO) {
+        Integer projectId = overtimeListVO.getProjectId();
+        String startDate = overtimeListVO.getStartDate();
+        String endDate = overtimeListVO.getEndDate();
+        String userId = overtimeListVO.getUserId();
+        Integer[] deptId = overtimeListVO.getDepartmentId();
+        ArrayList<Integer> departmentId = null;
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
@@ -2762,8 +2768,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             }
         }
         List<Integer> branchDepartment =null;
-        if(departmentId!=null){
-            branchDepartment = getBranchDepartment(departmentId, allDepartmentList);
+        if(deptId!=null){
+            departmentId = new ArrayList<>(Arrays.asList(deptId));
+            branchDepartment = new ArrayList<>();
+            for (Integer dept : departmentId) {
+                branchDepartment.addAll(getBranchDepartment(dept, allDepartmentList));
+            }
         }
         List<Map<String, Object>> list = projectMapper.getOvertimeDetail(userId, user.getCompanyId(), startDate, endDate, projectId,branchDepartment,deptIds);
         boolean hasViewSalary = sysFunctionService.hasPriviledge(user.getRoleId(), "查看加班成本");
@@ -2780,8 +2790,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     }
 
     @Override
-    public HttpRespMsg exportOvertimeList(String userId, Integer projectId, String startDate, String endDate, HttpServletRequest request) {
+    public HttpRespMsg exportOvertimeList(OvertimeListVO overtimeListVO, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
+        String userId = overtimeListVO.getUserId();
+        String startDate = overtimeListVO.getStartDate();
+        String endDate = overtimeListVO.getEndDate();
+        Integer projectId = overtimeListVO.getProjectId();
+        Integer[] deptId = overtimeListVO.getDepartmentId();
         try {
             String token = request.getHeader("TOKEN");
             User user = userMapper.selectById(token);
@@ -2807,7 +2822,15 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                 }
             }
-            List<Map<String, Object>> list = projectMapper.getOvertimeDetail(userId, user.getCompanyId(), startDate, endDate, projectId,null,deptIds);
+            List<Integer> branchDepartment =null;
+            if(deptId!=null){
+                ArrayList<Integer> departmentId = new ArrayList<>(Arrays.asList(deptId));
+                branchDepartment = new ArrayList<>();
+                for (Integer dept : departmentId) {
+                    branchDepartment.addAll(getBranchDepartment(dept, allDepartmentList));
+                }
+            }
+            List<Map<String, Object>> list = projectMapper.getOvertimeDetail(userId, user.getCompanyId(), startDate, endDate, projectId,branchDepartment,deptIds);
             boolean hasViewSalary = sysFunctionService.hasPriviledge(user.getRoleId(), "查看加班成本");
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
             List<String> headList = new ArrayList<String>();
@@ -7543,6 +7566,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
             }
         }
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", targetUser.getCompanyId()));
+        if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+            for (Map<String, Object> map : resultList) {
+                map.put("name","$userName="+(map.get("corwxUserId")==null?"":map.get("corwxUserId"))+"$");
+            }
+        }
         Map<String,Object> map=new HashMap<>();
         map.put("result",resultList);
         map.put("total",total);
@@ -7580,7 +7609,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         for (Map<String, Object> map : resultList) {
             List<String> item=new ArrayList<>();
             if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                item.add("$userName="+(map.get("corwxUserId")==null?"":map.get("corwxUserId"))+"$");
+                item.add((String) map.get("name"));
                 item.add("$deprtmentName="+(map.get("corpwxDeptId")==null?"":map.get("corpwxDeptId"))+"$");
             }else {
                 item.add((String) map.get("name"));
@@ -7614,7 +7643,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
     //递归获取所有子部门
     private List<Department> getSubDepts(Department dp, List<Department> list) {
-        List<Department> collect = list.stream().filter(l -> dp.getDepartmentId().equals(l.getSuperiorId())).collect(Collectors.toList());;
+        List<Department> collect = list.stream().filter(l -> dp.getDepartmentId().equals(l.getSuperiorId())).collect(Collectors.toList());
         List<Department> allList = new ArrayList<>();
         allList.addAll(collect);
         if (collect.size() > 0) {
@@ -7718,10 +7747,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                             int dayCount = Integer.parseInt(businessTrip.get("dayCount").toString());
                             businessTrip.put("dayCount",dayCount-day);
                         }
-                        System.err.println(stringObjectMap.get("deptId"));
-                        System.err.print(tripStart);
-                        System.err.println(tripEnd);
-                        System.err.println(businessTrip.get("dayCount"));
                     }
                     Integer dayCount = businessTrips.stream().collect(Collectors.summingInt((b) -> Integer.parseInt(b.get("dayCount").toString())));
                     stringObjectMap.put("tripCount",dayCount==null?0:dayCount);
@@ -7742,7 +7767,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         return  httpRespMsg;
     }
 
-    //导出员工月度工时
+    //导出部门参与项目情况
     @Override
     public HttpRespMsg exportDeptPartInProjects(String month, Integer departmentId, HttpServletRequest request){
         HttpRespMsg msg=new HttpRespMsg();
@@ -7796,6 +7821,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         DateTimeFormatter df=DateTimeFormatter.ofPattern("yyyy-MM-dd");
         Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId));
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         String startDate=null;
         String endDate=null;
@@ -7828,40 +7854,76 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 break;
         }
         HttpRespMsg msg = getUserReportTimelinessRate(request, startDate, endDate, null, null, null, null);
+        List<Map<String,Object>> dataDetailList=new ArrayList<>();
         try {
             List<String> monthList = SplitDateUtil.doDateByStatisticsType("month", startDate, endDate);
             for (int i = 0; i < monthList.size(); i++) {
                 String sDate = monthList.get(i);
                 String eDate = monthList.get(i + 1);
                 i++;
+                Map<String,Object> itemMap=new HashMap<>();
                 List<String> weekList = SplitDateUtil.doDateByStatisticsType("week", sDate, eDate);
+                List<Map<String,Object>> itemList=new ArrayList<>();
+                int a=1;
                 for (int i1 = 0; i1 < weekList.size(); i1++) {
                     String sDate1 = weekList.get(i1);
                     String eDate1 = weekList.get(i1 + 1);
+                    Map<String,Object> map=new HashMap<>();
+                    map.put("startDate",sDate1);
+                    map.put("endDate",eDate1);
+                    map.put("week",a);
                     i1++;
+                    a++;
+                    itemList.add(map);
                     System.out.println(sDate1+"-----"+eDate1);
                 }
+                itemMap.put("month",LocalDate.parse(sDate,df).getMonthValue());
+                itemMap.put("data",itemList);
+                dataDetailList.add(itemMap);
             }
         } catch (ParseException e) {
             e.printStackTrace();
         }
+        System.out.println(dataDetailList);
         HashMap map= (HashMap) msg.data;
         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")};
-        List<String> titleString = Arrays.asList(s);
+        List<String> titleString = new ArrayList<>(Arrays.asList(s));
+        for (Map<String, Object> objectMap : dataDetailList) {
+            List<Map<String,Object>> data = (List<Map<String, Object>>) objectMap.get("data");
+            Integer month = Integer.valueOf(String.valueOf(objectMap.get("month")));
+            for (Map<String, Object> datum : data) {
+                Integer week =Integer.valueOf(String.valueOf( datum.get("week")));
+                titleString.add(month+"月份第"+week+"周及时率");
+            }
+        }
         List<List<String>> dataList=new ArrayList<>();
         dataList.add(titleString);
         for (TimelinessRateVO timelinessRateVO : list) {
             List<String> item=new ArrayList<>();
             if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                item.add(timelinessRateVO.getCorpwxUserId()==null?"":timelinessRateVO.getCorpwxUserId());
+                item.add("$userName="+(timelinessRateVO.getCorpwxUserId()==null?"":timelinessRateVO.getCorpwxUserId())+"$");
             }else {
                 item.add(timelinessRateVO.getUserName());
             }
             item.add(timelinessRateVO.getJobNumber());
             item.add(timelinessRateVO.getDepartmentName());
             item.add(timelinessRateVO.getTimelinessRate());
+            for (Map<String, Object> objectMap : dataDetailList) {
+                List<Map<String,Object>> data = (List<Map<String, Object>>) objectMap.get("data");
+                for (Map<String, Object> datum : data) {
+                    Optional<User> first = userList.stream().filter(ul ->(ul.getJobNumber()!=null&&ul.getJobNumber().equals(timelinessRateVO.getJobNumber()))||ul.getName().equals(timelinessRateVO.getUserName())).findFirst();
+                    String startDate1 =String.valueOf( datum.get("startDate"));
+                    String endDate1 =String.valueOf( datum.get("endDate"));
+                    HttpRespMsg itemMsg = getUserReportTimelinessRate(request, startDate1, endDate1, null, first.get().getId(), null, null);
+                    HashMap itemMap= (HashMap) itemMsg.data;
+                    List<TimelinessRateVO> itemList = (List<TimelinessRateVO>) itemMap.get("list");
+                    for (TimelinessRateVO rateVO : itemList) {
+                        item.add(rateVO.getTimelinessRate());
+                    }
+                }
+            }
             dataList.add(item);
         }
         //生成excel文件导出

+ 16 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/TaskProgressServiceImpl.java

@@ -9,6 +9,7 @@ import com.management.platform.service.TprogressPaticipatorsService;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.ListUtil;
 import com.management.platform.util.MessageUtils;
+import jdk.nashorn.internal.ir.IfNode;
 import org.apache.poi.ss.usermodel.Header;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -45,7 +46,6 @@ public class TaskProgressServiceImpl extends ServiceImpl<TaskProgressMapper, Tas
     @Resource
     private TaskCommentMapper taskCommentMapper;
     //String[] statusList = new String[]{"状态正常", "存在风险", "进展逾期"};
-    String[] statusList = new String[]{MessageUtils.message("excel.staNormal"), MessageUtils.message("excel.atRisk"), MessageUtils.message("excel.overduePro")};
     @Override
     public HttpRespMsg addProgress(TaskProgress progress, String participatorIds, HttpServletRequest request) {
         HttpRespMsg msg = new HttpRespMsg();
@@ -59,8 +59,22 @@ public class TaskProgressServiceImpl extends ServiceImpl<TaskProgressMapper, Tas
         comment.setUserId(progress.getCreatorId());
         comment.setUserName(creator.getName());
         comment.setType(2);
+        String status = null;
+        switch (progress.getStatus()){
+            case 0:
+                status = MessageUtils.message("excel.staNormal");
+                break;
+            case 1:
+                status = MessageUtils.message("excel.atRisk");
+                break;
+            case 2:
+                status = MessageUtils.message("excel.overduePro");
+                break;
+            default:
+                status = "";
+        }
         //String updateStr = creator.getName()+"更新任务进展为 " + statusList[progress.getStatus()];
-        String updateStr = creator.getName()+MessageUtils.message("stages.upTask") + statusList[progress.getStatus()];
+        String updateStr = creator.getName()+MessageUtils.message("stages.upTask") + status;
         comment.setContent(updateStr);
         taskCommentMapper.insert(comment);
 

+ 80 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/SplitDateUtil.java

@@ -0,0 +1,80 @@
+package com.management.platform.util;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.ehcache.core.internal.util.CollectionUtil;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+public class SplitDateUtil {
+    /**
+     * 根据传入的参数,来对日期区间进行拆分,返回拆分后的日期List
+     * @param statisticsType
+     * @param startDate
+     * @param endDate
+     * @return
+     * @throws ParseException
+     * @author lihq 2019-6-24
+     * @editor
+     * @editcont
+     */
+    public static List<String> doDateByStatisticsType(String statisticsType,String startDate,String endDate) throws ParseException {
+        List<String> listWeekOrMonth = new ArrayList<String>();
+        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date sDate = dateFormat.parse(startDate);
+        Calendar sCalendar = Calendar.getInstance();
+        sCalendar.setFirstDayOfWeek(Calendar.MONDAY);
+        sCalendar.setTime(sDate);
+        Date eDate = dateFormat.parse(endDate);
+        Calendar eCalendar = Calendar.getInstance();
+        eCalendar.setFirstDayOfWeek(Calendar.MONDAY);
+        eCalendar.setTime(eDate);
+        boolean bool =true;
+        if(statisticsType.equals("week")){
+            while(sCalendar.getTime().getTime()<eCalendar.getTime().getTime()){
+                if(bool||sCalendar.get(Calendar.DAY_OF_WEEK)==2||sCalendar.get(Calendar.DAY_OF_WEEK)==1){
+                    listWeekOrMonth.add(dateFormat.format(sCalendar.getTime()));
+                    bool = false;
+                }
+                sCalendar.add(Calendar.DAY_OF_MONTH, 1);
+            }
+        }else{
+            while(sCalendar.getTime().getTime()<eCalendar.getTime().getTime()){
+                if(bool||sCalendar.get(Calendar.DAY_OF_MONTH)==1||sCalendar.get(Calendar.DAY_OF_MONTH)==sCalendar.getActualMaximum(Calendar.DAY_OF_MONTH)){
+                    listWeekOrMonth.add(dateFormat.format(sCalendar.getTime()));
+                    bool = false;
+                }
+                sCalendar.add(Calendar.DAY_OF_MONTH, 1);
+            }
+        }
+        listWeekOrMonth.add(dateFormat.format(eCalendar.getTime()));
+        if(listWeekOrMonth.size()%2!=0){
+            listWeekOrMonth.add(dateFormat.format(eCalendar.getTime()));
+        }
+        return listWeekOrMonth;
+    }
+
+    public static void main(String[] args) {
+        try {
+            List<String> list = doDateByStatisticsType("month", "2022-01-01", "2022-03-30");
+            for (int i = 0; i < list.size(); i++) {
+                String sDate = list.get(i);
+                String eDate = list.get(i + 1);
+                i++;
+                System.out.println(sDate+"-----"+eDate);
+                List<String> twoList = doDateByStatisticsType("week", sDate, eDate);
+                for (int i1 = 0; i1 < twoList.size(); i1++) {
+                    String sDate1 = twoList.get(i1);
+                    String eDate1 = twoList.get(i1 + 1);
+                    i1++;
+                    System.out.println(sDate1+"-----"+eDate1);
+                }
+            }
+        } catch (ParseException e) {
+            e.printStackTrace();
+        }
+    }
+}
+

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -1,10 +1,10 @@
 var path = require('path')
 
 //  var ip = '127.0.0.1'
-var ip = '47.101.180.183'
+// var ip = '47.101.180.183'
 // var ip = '47.100.37.243'
 // var ip = '192.168.2.31'
-// var ip = '192.168.2.20'
+var ip = '192.168.2.45'
 
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {