Browse Source

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

seyason 2 years ago
parent
commit
1ba93db4a2

+ 13 - 7
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -4501,7 +4501,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
     //用于报表展示:递归获取企业微信所有上级部门字符串,格式:"上级部门/上级部门/部门"
     private String getWxDepartment(Department department) {
-        String depHierarchy = department.getCorpwxDeptid().toString();
+        String depHierarchy = department.getCorpwxDeptid()+"";
         //搜到父部门进行添加
         if (department.getCorpwxDeptpid()==null || department.getCorpwxDeptpid()==1) {
             return depHierarchy;
@@ -4513,6 +4513,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
     //用于导出:递归获取企业微信所有上级部门字符串,格式:"上级部门/上级部门/部门"
     private String exportWxDepartment(Department department) {
+        if(department.getCorpwxDeptid() == null){
+            return "";
+        }
         String depHierarchy = "$departmentName="+department.getCorpwxDeptid()+"$";
         //搜到父部门进行添加
         if (department.getCorpwxDeptpid()==null || department.getCorpwxDeptpid()==1) {
@@ -6085,11 +6088,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             TimelinessRateVO timelinessRateVO=new TimelinessRateVO();
             timelinessRateVO.setUserName(user.getName());
             timelinessRateVO.setJobNumber(user.getJobNumber());
-            timelinessRateVO.setCorpwxDeptId(user.getCorpwxDeptid());
+
+//            timelinessRateVO.setCorpwxDeptId(user.getCorpwxDeptid());
             timelinessRateVO.setCorpwxUserId(user.getCorpwxUserid());
             Optional<Department> first = departmentList.stream().filter(dp -> dp.getDepartmentId().equals(user.getDepartmentId())).findFirst();
             if(first.isPresent()){
                 timelinessRateVO.setDepartmentName(first.get().getDepartmentName());
+                timelinessRateVO.setCorpwxDeptId(first.get().getCorpwxDeptid());
             }
             List<Map<String, Object>> mapList = listMap.get(user.getName());
             //去掉填非工作日
@@ -6291,7 +6296,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             }
             item.add(timelinessRateVO.getJobNumber());
             if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                item.add("$departmentName="+(String.valueOf(timelinessRateVO.getCorpwxDeptId()==null?"":timelinessRateVO.getCorpwxDeptId()))+"$");
+                item.add("$departmentName=" + (timelinessRateVO.getCorpwxDeptId()==null?"":timelinessRateVO.getCorpwxDeptId()) + "$");
             }else {
                 item.add(timelinessRateVO.getDepartmentName());
             }
@@ -6520,7 +6525,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("$userName="+(map.get("corpwxUserId")==null?"":map.get("corpwxUserId"))+"$");
                 item.add(String.valueOf(StringUtils.isEmpty(map.get("jobNumber"))?"":map.get("jobNumber")));
                 item.add("$deprtmentName="+(map.get("corpwxDeptId")==null?"":map.get("corpwxDeptId"))+"$");
             }else {
@@ -7785,7 +7790,7 @@ 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.put("name",(map.get("corpwxUserId")==null?"":map.get("corpwxUserId")));
             }
         }
         Map<String,Object> map=new HashMap<>();
@@ -7825,7 +7830,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((String) map.get("name"));
+                item.add("$userName=" + map.get("name") +"$");
                 item.add("$deprtmentName="+(map.get("corpwxDeptId")==null?"":map.get("corpwxDeptId"))+"$");
             }else {
                 item.add((String) map.get("name"));
@@ -7933,6 +7938,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 List<Map<String,Object>> businessTrips = null;
                 if (wxCorpInfo!=null && wxCorpInfo.getSaasSyncContact()==1 && department != null){
                     stringObjectMap.put("deptName",getWxDepartment(department));
+                    stringObjectMap.put("exportWxDeptId",exportWxDepartment(department));
                 }else {
                     stringObjectMap.put("deptName",getSupDepartment(department));
                 }
@@ -8012,7 +8018,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         dataList.add(titleList);
         for (Map<String, Object> map : resultList) {
             List<String> item=new ArrayList<>();
-            item.add(map.get("deptName").toString());
+            item.add(map.get("exportWxDeptId").toString());
             item.add(map.get("deptHeadCount").toString());
             item.add(map.get("projectCount").toString());
             item.add(map.get("centerCount").toString());

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

@@ -654,7 +654,7 @@
     <select id="getOvertimeDetail" resultType="java.util.Map">
         SELECT date_format(report.`create_date`, '%Y-%m-%d') AS createDate,
         report.`creator_id` AS userId, user.`name` AS username,user.corpwx_userid as corpwxUserId,user.job_number as jobNumber, report.`working_time` AS workingTime,
-        IFNULL(report.`overtime_hours`, 0) AS overtimeHours,project.id as projectId,user.corpwx_deptid as corpwxDeptId,
+        IFNULL(report.`overtime_hours`, 0) AS overtimeHours,project.id as projectId,department.corpwx_deptid as corpwxDeptId,
         project.project_name as projectName,project.project_code as projectCode,
         IFNULL(report.overtime_cost, 0) AS cost,
         IFNULL(report_extra_degree.name,'') as degreeName, department.department_name as departmentName FROM report LEFT JOIN user ON user.id = report.`creator_id`
@@ -883,7 +883,7 @@
                 ORDER BY a.create_date desc, a.creator_id asc
             </when>
             <otherwise>
-                SELECT 	u.name as userName,u.corpwx_userid as corpwxUserId,dp.department_name as departmentName,COUNT(1) as num
+                SELECT 	u.name as userName,u.corpwx_userid as corpwxUserId,dp.department_name as departmentName,dp.corpwx_deptid as wxDeptId,COUNT(1) as num
                 FROM report AS a
                 left join user on user.id = a.creator_id
                 JOIN project AS b ON a.project_id=b.id

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/index.html

@@ -71,12 +71,12 @@
             .projectSelectPopperClass .el-select-dropdown__item span:nth-child(1){
                 font-size: 13px;
                 height: 34px;
-                width: 35%;
+                max-width: 350px;
             }
             .projectSelectPopperClass .el-select-dropdown__item span:nth-child(2){
                 font-size: 13px;
                 height: 34px;
-                width: 65%;
+                max-width: 650px;
                 overflow: hidden;
                 white-space: nowrap;
                 text-overflow: ellipsis;

+ 3 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -44,15 +44,15 @@
                                 src="../assets/image/code.jpg" />
                             </div>
                             <div v-if="isCorpWX">
-                                <div>{{ $t('ke-fu-wei-xin') }}</div>
+                                <!-- <div>{{ $t('ke-fu-wei-xin') }}</div> -->
+                                <div>请扫码添加企业微信客服</div>
                                 <img
                                 style="width: 120px; height: 120px"
                                 src="../assets/image/qwcode.png" />
                             </div>
                             <div>
-                                <div>操作手册</div>
                                 <div>
-                                    <el-link type="primary" :underline="false" href="https://doc.weixin.qq.com/doc/w3_AQAACQauAEA1Ucywi0bQGy7XLaYYE?scode=AMsA1AfkAAgBITHypgAQAACQauAEA">点击查看文档</el-link>
+                                    <el-link type="primary" :underline="false" href="https://doc.weixin.qq.com/doc/w3_AQAACQauAEA1Ucywi0bQGy7XLaYYE?scode=AMsA1AfkAAgBITHypgAQAACQauAEA">点击查看操作手册</el-link>
                                 </div>
                             </div>
                         </el-dropdown-item>

+ 4 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -945,6 +945,7 @@
                         if(this.radio == this.$t('other.project') || this.radio == this.$t('projectclassification') || this.radio==this.$t('lable.department') || this.radio == this.$t('zhu-xiang-mu')) {
                             // this.allListData = res.data.costList
                             this.total = this.allListData.costList ? this.allListData.costList.length : 0
+                            
                             list = this.allListData.costList.slice(0+50*(this.page-1),49+50*(this.page-1))
                             for(var i in list) {
                                 if(i>20) {
@@ -1018,6 +1019,7 @@
                         else if(this.theCustomListFlg) {
                             // this.allListData = res.data.list ? res.data.list : []
                             this.total = this.allListData.list ? this.allListData.list.length : 0
+                            console.log('jieliu_echarts',this.allListData);
                             list = this.total ? this.allListData.list.slice(0+50*(this.page-1),49+50*(this.page-1)) : []
                             // list = res.data.list
                             
@@ -1043,10 +1045,10 @@
                         } 
                         else {
                             //自定义列表:data:{cost:3, costMoney:222}
-                            this.total = this.allListData.costList ? this.allListData.costList.length : 0
+                            this.total = this.allListData ? this.allListData.length : 0
                             console.log('slice',this.allListData);
                             // if(this.total){
-                                list = this.allListData.costList.slice(0+50*(this.page-1),49+50*(this.page-1))
+                                list = this.allListData.slice(0+50*(this.page-1),49+50*(this.page-1))
                             // }else{
                             //     list = 
                             // }

+ 30 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -520,7 +520,18 @@
                                                 <span @click="deleteTaskProgress(recentProgressInfo.id)"><i class="el-icon-delete"></i>{{ $t('deleteList ') }}</span></el-dropdown-item>
                                         </el-dropdown-menu>
                                 </el-dropdown>
-                                <div class="elCard_qu">{{recentProgressInfo.creatorName}}{{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}</div>
+                                <!-- <div class="elCard_qu">{{recentProgressInfo.creatorName}}{{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}</div> -->
+                                <div class="elCard_qu">
+                                    <span>
+                                        <span v-if="user.userNameNeedTranslate != '1'">
+                                            {{recentProgressInfo.creatorName}}
+                                        </span>
+                                        <span v-if="user.userNameNeedTranslate == '1'">
+                                            <ww-open-data type='userName' :openid='recentProgressInfo.creatorName'></ww-open-data>
+                                        </span>
+                                    </span>
+                                    {{ $t('geng-xin-yu') }}{{recentProgressInfo.indate | relativeTime}}
+                                </div>
                                 <p style="padding-left: 20px;">{{recentProgressInfo.content}}</p>
                                 <div class="examine"><el-button type="text" @click="innerVisibless = true" style="color: #8F87A3;">{{ $t('viewingHistory') }}</el-button></div>
                             </div>
@@ -760,7 +771,7 @@
                     <div class="subject">
                         <div class="sub-all">{{ $t('alldynamic') }}</div>
                         <div class="sub-details" ref="main">
-                            <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto" ref="contRoll">
+                            <ul class="infinite-list" v-infinite-scroll="load" ref="contRoll">
                                 <div style="width: 100%" v-if="commentList.length <= 0">
                                     <img src="../../assets/image/xiao.png" alt="">
                                 </div>
@@ -2505,6 +2516,23 @@
                 this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
                 res => {
                     if(res.code == "ok"){
+                        if(res.data.content.indexOf('$userName=') != '-1') {
+                            let obj = {
+                                msg1: res.data.content.split('$')[0],
+                                msg2: res.data.content.split('$')[1].split('=')[1],
+                                msg3: res.data.content.split('$')[2]
+                            }
+                            res.data.content = obj
+                        } else {
+                            if(this.user.userNameNeedTranslate == 1) {
+                                let obj = {
+                                    msg1: res.data.content,
+                                    msg2: '',
+                                    msg3: ''
+                                }
+                                res.data.content = obj
+                            }
+                        }
                         this.commentList.push(res.data)
                         this.sppk(this.commentList)
                         this.textarea2 = ""

+ 18 - 6
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -434,7 +434,7 @@
                     <div class="subject">
                         <div class="sub-all">{{ $t('alldynamic') }}</div>
                         <div class="sub-details" ref="main">
-                            <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto" ref="contRoll">
+                            <ul class="infinite-list" v-infinite-scroll="load" ref="contRoll">
                                 <div style="width: 100%" v-if="commentList.length <= 0">
                                     <img src="../../assets/image/xiao.png" alt="">
                                 </div>
@@ -1350,11 +1350,6 @@ import { error } from 'dingtalk-jsapi';
                                     }
                                     res.data[i].content = obj
                                 }
-                                // let obj = {
-                                //     name: '',
-                                //     con: res.data[i].content
-                                // }
-                                // res.data[i].content = obj
                             }
                         }
                         this.commentList = res.data
@@ -1576,6 +1571,23 @@ import { error } from 'dingtalk-jsapi';
                 this.http.post('/task-comment/add', {taskId: this.taskId, userId: this.user.id, content: this.textarea2},
                 res => {
                     if(res.code == "ok"){
+                        if(res.data.content.indexOf('$userName=') != '-1') {
+                            let obj = {
+                                msg1: res.data.content.split('$')[0],
+                                msg2: res.data.content.split('$')[1].split('=')[1],
+                                msg3: res.data.content.split('$')[2]
+                            }
+                            res.data.content = obj
+                        } else {
+                            if(this.user.userNameNeedTranslate == 1) {
+                                let obj = {
+                                    msg1: res.data.content,
+                                    msg2: '',
+                                    msg3: ''
+                                }
+                                res.data.content = obj
+                            }
+                        }
                         this.commentList.push(res.data)
                         this.sppk(this.commentList)
                         this.textarea2 = ""