Forráskód Böngészése

修改了研究中心的接口参数
手机版导入日报审核bug修复

seyason 3 éve
szülő
commit
7af2de4a81

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

@@ -109,7 +109,6 @@ public class ReportController {
     private void fillReportProgress(Report report, String professionProgress) {
         if (!StringUtil.isEmpty(professionProgress)) {
             professionProgress = professionProgress.replaceAll("@",",");
-            System.out.println("JSON=="+professionProgress);
             JSONArray array = JSONArray.parseArray(professionProgress);
             List<ReportProfessionProgress> list = new ArrayList<ReportProfessionProgress>();
             for(int i=0;i<array.size();i++) {
@@ -1109,7 +1108,7 @@ public class ReportController {
                                       Integer projectId,
                                       @RequestParam(required = false, defaultValue = "0") Integer dateType,
                                       String date,
-                                      @RequestParam(required = false, defaultValue = "0") Integer pageIndex,
+                                      @RequestParam(required = false, defaultValue = "1") Integer pageIndex,
                                       @RequestParam(required = false, defaultValue = "1000") Integer pageSize,
                                               Integer departmentId,
                                       HttpServletRequest request) {

+ 9 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportExtraDegreeController.java

@@ -13,6 +13,7 @@ import com.management.platform.service.ReportExtraDegreeService;
 import com.management.platform.util.HttpRespMsg;
 import org.apache.poi.util.StringUtil;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
@@ -141,15 +142,19 @@ public class ReportExtraDegreeController {
      * @return
      */
     @RequestMapping("/getAll")
-    public HttpRespMsg getAll() {
+    public HttpRespMsg getAll(@RequestParam(required = false, defaultValue = "0") Integer withProjects) {
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
-        List<Project> allProjects = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
+
         List<ReportExtraDegree> all = reportExtraDegreeMapper.getAll(user.getCompanyId());
-        for (ReportExtraDegree degree : all) {
-            degree.setProjects(allProjects.stream().filter(pro->pro.getAssociateDegreeNames().contains(degree.getName())).map(Project::getProjectName).collect(Collectors.joining(",")));
+        if (withProjects == 1) {
+            List<Project> allProjects = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()));
+            for (ReportExtraDegree degree : all) {
+                degree.setProjects(allProjects.stream().filter(pro->pro.getAssociateDegreeNames() != null && pro.getAssociateDegreeNames().contains(degree.getName())).map(Project::getProjectName).collect(Collectors.joining(",")));
+            }
         }
+
         msg.data = all;
         return msg;
     }

+ 30 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WxCorpInfoController.java

@@ -1,8 +1,15 @@
 package com.management.platform.controller;
 
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.management.platform.entity.User;
+import com.management.platform.entity.WxCorpInfo;
+import com.management.platform.mapper.UserMapper;
 import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.util.HttpRespMsg;
+import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 import org.springframework.web.bind.annotation.RestController;
@@ -23,12 +30,34 @@ public class WxCorpInfoController {
 
     @Resource
     WxCorpInfoService wxCorpInfoService;
-
+    @Resource
+    UserMapper userMapper;
     @RequestMapping("/testDownload")
     public HttpRespMsg testDownload() {
         HttpRespMsg msg = new HttpRespMsg();
         msg.data = wxCorpInfoService.testDownloadFile();
         return msg;
     }
+
+    @RequestMapping("/testSendTemplateMsg")
+    public HttpRespMsg testSendTemplateMsg(String userId) {
+        User user = userMapper.selectById(userId);
+        int companyId=user.getCompanyId();
+        WxCorpInfo corpInfo = wxCorpInfoService.getOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
+
+        //推送到企业微信
+        String corpUid = user.getCorpwxUserid();
+        JSONObject json=new JSONObject();
+        JSONArray dataJson=new JSONArray();
+        JSONObject jsonObj=new JSONObject();
+        jsonObj.put("key", "提醒");
+        jsonObj.put("value", "测试提醒消息");
+        dataJson.add(jsonObj);
+        json.put("template_id","tty9TkCAAAYoevY-40ciWD5lDncDfR5w");
+        json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://mobworktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+        json.put("content_item",dataJson);
+        wxCorpInfoService.sendWXCorpTemplateMsg(corpInfo, corpUid, json);
+        return new HttpRespMsg();
+    }
 }
 

+ 0 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DingDingServiceImpl.java

@@ -1292,7 +1292,6 @@ public class DingDingServiceImpl implements DingDingService {
                         LocalDate workDate =  LocalDateTime.ofEpochSecond(d/1000, 0, ZoneOffset.ofHours(8)).toLocalDate();
                         UserDingdingTime timeItem = new UserDingdingTime();
                         timeItem.setWorkDate(workDate);
-                        System.out.println("workDate====="+workDate);
                         List<DdingCardTimeItem> oneDayTimes = dailyMap.get(d);
 
                         DdingCardTimeItem onDutyEarleast = null;
@@ -1307,7 +1306,6 @@ public class DingDingServiceImpl implements DingDingService {
                             offDutyLatest = findOff.get();
                         }
                         if (onDutyEarleast != null) {
-                            System.out.println("最早打卡时间"+onDutyEarleast.getUserCheckTime());
                             timeItem.setDingdingCorpid(onDutyEarleast.getCorpId());
                             timeItem.setDingdingUserid(onDutyEarleast.getUserId());
                             timeItem.setUserId(uid);
@@ -1318,7 +1316,6 @@ public class DingDingServiceImpl implements DingDingService {
                             timeItem.setWeekDayTxt(DateTimeUtil.getWeekDayTxt(timeItem.getWeekDay()));
                         }
                         if (offDutyLatest != null) {
-                            System.out.println("最晚打卡时间"+offDutyLatest.getUserCheckTime());
                             LocalDateTime oLt = LocalDateTime.ofEpochSecond(offDutyLatest.getUserCheckTime()/1000, 0, ZoneOffset.ofHours(8));
                             timeItem.setEndTime(hmFormat.format(oLt));
                         }

+ 1 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -2872,6 +2872,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             }
             //pageIndex从1开始
             Integer startIndex = (pageIndex -1) * pageSize;
+            System.out.println("startIndex="+startIndex+", pageSize="+pageSize);
             List<Map<String, Object>> auditReportList = reportMapper.getDeptImportAuditList(companyId, leaderId, startDate, endDate, filterDeptIds, projectId, startIndex, pageSize);
             long total = reportMapper.getDeptImportAuditListCount(companyId, leaderId, startDate, endDate, filterDeptIds, projectId);
             HashMap result = new HashMap();

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

@@ -27,7 +27,7 @@
 
     <select id="customSelect" resultMap="RichMap">
         SELECT project_requirement.id, project.id AS project_id, project.`project_name`, project.`project_code`, project_requirement.`memb_req`, project_requirement.`task_req`,
-        (SELECT GROUP_CONCAT(DISTINCT user.`name`) FROM report LEFT JOIN USER ON user.`id` = report.`creator_id` WHERE report.company_id=#{companyId} AND report.create_time >= #{startDate} AND report.`project_id` = project.id) AS active_users
+        (SELECT GROUP_CONCAT(DISTINCT user.`name`) FROM report LEFT JOIN `user` ON user.`id` = report.`creator_id` WHERE report.company_id=#{companyId} AND report.create_time >= #{startDate} AND report.`project_id` = project.id) AS active_users
         FROM project LEFT JOIN project_requirement ON project.id = project_requirement.`project_id`
         WHERE project.`company_id` = #{companyId}
          <if test="projectId != null">

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/centerManage/centerManage.vue

@@ -119,7 +119,7 @@
             },
             getSub() {
                 this.listLoading = true;
-                this.http.post('/report-extra-degree/getAll ',{},
+                this.http.post('/report-extra-degree/getAll ',{withProjects:1},
                 res => {
                     this.listLoading = false;
                     if (res.code == "ok") {

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

@@ -3538,7 +3538,7 @@
                                 userNames:null,
                                 time: this.report.time
                             }
-                            if (this.timeBasecostList.length > 0) {
+                            if (this.timeBasecostList && this.timeBasecostList.length > 0) {
                                 //默认给第一个,必填字段
                                 this.workForm.domains[0].basecostId = this.timeBasecostList[0].id;
                             }
@@ -3867,7 +3867,6 @@
                     res => {
                         if (res.code == "ok") {
                             this.timeBasecostList = res.data;
-                            console.log(this.timeBasecostList);
                         }
                     });
                 }
@@ -4869,7 +4868,9 @@
             this.getDepartment();
             this.scrollFunction()
             this.userssHu();
-            this.getBasecostItemList();
+            if (this.user.company.packageProject == 1) {
+                this.getBasecostItemList();
+            }
             if(this.user.timeType.lockWorktime){
                 this.timeRange = this.timeRange.filter(item => {return item <= this.user.timeType.allday})
             }

+ 4 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/audit/audit.vue

@@ -33,7 +33,8 @@ export default {
         return {
             search: {
                 date: null,
-                projectId: null
+                projectId: null,
+                pageIndex:1,
             },
             list: [],
             denyReasonDialog: false,
@@ -61,10 +62,10 @@ export default {
                 forbidClick: true,
                 duration: 0
             });
-            this.$axios.get('/report/listImportByState', this.search)
+            this.$axios.post('/report/listImportByState', this.search)
             .then(res => {
                 this.$toast.clear();
-                this.list = res.data
+                this.list = res.data.record;
             }).catch(err=> {
                 this.$toast.clear();
                 alert('err=' + err);