Bläddra i källkod

Merge remote-tracking branch 'origin/master'

yurk 2 år sedan
förälder
incheckning
d4a4d545ff

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

@@ -742,13 +742,11 @@
     </select>
 
     <select id="getDefaultDegree" resultType="java.util.Map">
-        select r.* FROM report
-        LEFT JOIN report_extra_degree as r
-        ON report.degree_id = r.id
+        select report.degree_id as id FROM report
         WHERE report.company_id = #{companyId}
         AND project_id = #{projectId}
         AND creator_id = #{userId}
-        ORDER BY create_date DESC
-        LIMIT 0,1
+        ORDER BY create_time DESC
+        LIMIT 1
     </select>
 </mapper>

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/UserMapper.xml

@@ -137,9 +137,11 @@
     <select id="getPushDingdingUserList" resultType="java.util.Map">
         SELECT a.company_id as companyId, a.dingding_userid as dingdingUserid
         FROM user AS a left join time_type on time_type.company_id = a.company_id
+        left join company on a.company_id = company.id
         WHERE a.dingding_userid is not null and time_type.alert_time = #{alertTime}
         AND a.is_active = 1
         AND a.report_status=0
+        AND company.expiration_date >= NOW()
         AND NOT EXISTS(SELECT 1 FROM report WHERE report.`creator_id` = a.id AND ((report.`create_date` = DATE_FORMAT(date_sub(NOW(),interval 1 day), '%Y-%m-%d') and time_type.alert_type=1)or(report.`create_date` = DATE_FORMAT(NOW(), '%Y-%m-%d') and time_type.alert_type=0)))
         <if test="date != null">
             and not exists (select 1 from leave_sheet where owner_id = a.id and start_date &lt;= #{date} and end_date &gt;= #{date} and leave_sheet.status = 0)

+ 30 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -652,7 +652,29 @@ import timetoolVue from '../timetool/timetool.vue';
                     this.projectss = this.proads
                 }
             },
+
+            selectDegreeId(domain, index, domainItem, list) {
+                this.$axios.post("/report/defaultDegree", {
+                    projectId: domain.id
+                })
+                .then(res => {
+                    if(res.code == "ok") {
+                        var arr = domainItem.wuduList
+                        for(var i in arr) {
+                            if(arr[i].id == res.data.id) {
+                                domainItem.weiduName = arr[i].name
+                                domainItem.degreeId = res.data.id
+                            }
+                        }
+                        this.$forceUpdate();
+                    } else {
+                        this.$toast.fail('获取失败:'+res.msg);
+                    }
+                }).catch(err=> {this.$toast.clear();});
+            },
+
             fZr(item,index) {
+
                 var domainItem = this.form.domains[this.clickIndex];
                 domainItem.projectId = item.id;
                 domainItem.projectName = item.projectName;
@@ -693,6 +715,14 @@ import timetoolVue from '../timetool/timetool.vue';
                 if (curProject && this.user.timeType.reportAuditType == 0) {
                     this.getProjectAuditorList(domainItem, index);
                 }
+
+                console.log(item, '数据')
+                if(this.user.timeType.customDegreeActive == 1 && item) {
+                    var that = this
+                    setTimeout(()=>{
+                        that.selectDegreeId(item, index, that.form.domains[that.clickIndex])
+                    }, 500)
+                }
             },
             //获取项目下的任务分组
             getTaskGroups(domainItem, index) {