Переглянути джерело

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

ggooalice 2 роки тому
батько
коміт
cdae62ed58

+ 7 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java

@@ -328,10 +328,13 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
                 }
                 userNameList.add(value);
                 System.out.println("参与搜素的人员列表"+userNameList);
-                HttpRespMsg respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
-                if(respMsg.code.equals("0")){
-                    msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
-                    return msg;
+                HttpRespMsg respMsg=new HttpRespMsg();
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                    respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
+                    if(respMsg.code.equals("0")){
+                        msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
+                        return msg;
+                    }
                 }
                 List<User> targetUserList= (List<User>) respMsg.data;
                 if (reimburserCell != null) reimburserCell.setCellType(CellType.STRING);

+ 25 - 9
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -3168,10 +3168,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                 }
                 System.out.println("参与搜素的人员列表"+userNameList);
-                HttpRespMsg respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
-                if(respMsg.code.equals("0")){
-                    msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
-                    return msg;
+                HttpRespMsg respMsg=new HttpRespMsg();
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                    respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
+                    if(respMsg.code.equals("0")){
+                        msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
+                        return msg;
+                    }
                 }
                 List<User> targetUserList= (List<User>) respMsg.data;
                 int importCount = 0;
@@ -3561,10 +3564,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                 }
                 System.out.println("参与搜素的人员列表"+userNameList);
-                HttpRespMsg respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
-                if(respMsg.code.equals("0")){
-                    msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
-                    return msg;
+                HttpRespMsg respMsg=new HttpRespMsg();
+                if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                    respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
+                    if(respMsg.code.equals("0")){
+                        msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
+                        return msg;
+                    }
                 }
                 List<User> targetUserList= (List<User>) respMsg.data;
                 List<String> existCodeList = new ArrayList<>();
@@ -4683,6 +4689,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 //        headList.add("创建日期");
         if(timeType.getMainProjectState()==1){
             headList.add(MessageUtils.message("entry.mainProject"));
+            headList.add(MessageUtils.message("entry.mainProjectCode"));
         }
         headList.add(MessageUtils.message("entry.projectId"));
         headList.add(MessageUtils.message("entry.projectType"));
@@ -4758,13 +4765,22 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         collect.add(-1);
         List<ProjectSeparate> projectSeparateList= projectSeparateMapper.selectList(new QueryWrapper<ProjectSeparate>().in("id", collect));
         List<ProjectKeyNodes> nodesList = projectKeyNodesMapper.selectList(new QueryWrapper<ProjectKeyNodes>().in("project_id", collect));
+        List<ProjectMain> projectMainList = projectMainMapper.selectList(new QueryWrapper<ProjectMain>().eq("company_id", company.getId()));
         LocalDateTime d=LocalDateTime.now();
         Duration between1 = Duration.between(c, d);
         System.out.println("此处耗时----------------"+between1.toMillis());
         for (ProjectVO projectVO : projectVOList) {
             List<String> rowData = new ArrayList<>();
             if(timeType.getMainProjectState()==1){
-                rowData.add(projectVO.getProjectMainName());
+                Optional<ProjectMain> first = projectMainList.stream().filter(pl -> pl.getId().equals(projectVO.getProjectMainId())).findFirst();
+                if(first.isPresent()){
+                    rowData.add(first.get().getName());
+                    rowData.add(first.get().getCode());
+                }else {
+                    rowData.add("");
+                    rowData.add("");
+                }
+
             }
             rowData.add(projectVO.getProjectCode());
             rowData.add(projectVO.getCategoryName());

+ 7 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -3532,10 +3532,13 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                 userNameList.add(username);
             }
             System.out.println("参与搜素的人员列表"+userNameList);
-            HttpRespMsg respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
-            if(respMsg.code.equals("0")){
-                msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
-                return msg;
+            HttpRespMsg respMsg=new HttpRespMsg();
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
+                if(respMsg.code.equals("0")){
+                    msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
+                    return msg;
+                }
             }
             List<User> targetUserList= (List<User>) respMsg.data;
             for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {

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

@@ -653,8 +653,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         HttpHeaders headers = new HttpHeaders();
         headers.setContentType(MediaType.APPLICATION_JSON);
         JSONObject jsonObject=new JSONObject();
-        jsonObject.put("auth_corpid","wwf11426cf618e1703");
-        jsonObject.put("agentid","1000066");
+        jsonObject.put("auth_corpid",wxCorpInfo.getCorpid());
+        jsonObject.put("agentid",wxCorpInfo.getAgentid());
         JSONArray jsonArray=new JSONArray();
         for (String s : userNameList) {
             JSONObject item=new JSONObject();

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

@@ -397,6 +397,7 @@ entry.projectCost=项目外包费
 entry.labourCost=劳务外包费
 entry.OtherOutsourceCost=其他外包费
 entry.mainProject=主项目
+entry.mainProjectCode=主项目编号
 entry.projectId=项目编号
 entry.contractNo=合同编号
 entry.projectType=项目分类

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

@@ -397,6 +397,7 @@ entry.projectCost=Project outsourcing fee
 entry.labourCost=Labor outsourcing fee
 entry.OtherOutsourceCost=Other outsourcing fees
 entry.mainProject=Main project
+entry.mainProjectCode=Main project code
 entry.projectId=project No
 entry.contractNo=Contract No
 entry.projectType=Project classification

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -333,6 +333,7 @@
                     <el-input style="float:left;" v-if="user.userNameNeedTranslate != 1" v-model="searchWord" class="input-with-select" :placeholder="$t('pleaseenterstaffsearch')" clearable="true" size="small">
                         <el-button slot="append" @click="statistical()" icon="el-icon-search"></el-button>
                     </el-input>
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :widthStr="'240'" :subject="users" :subjectId="addForm.ownerId" :distinction="'11'" :disabled="false" @selectCal="selectCal" :clearable="true"></selectCat>
                 </div>
                 <div style="display: inline-block;width: 700px;margin-left: 100px">
                     <span style="display: inline-block;margin: 0 15px 0 20px;color: rgb(96, 98, 102);">{{ $t('message.period') }}</span>
@@ -926,6 +927,13 @@ export default {
                 this.billss(obj.other)
             } else if(obj.distinction == '2') {
                 this.ownerIdsId = obj.id
+            } else if(obj.distinction == '11') {
+                if(obj.name != this.$t('defaultText.pleaseChoose')) {
+                this.keyword = obj.name
+                } else {
+                this.keyword = ''
+                }
+                this.statistical()
             }
         },
         //获取添加出差单时的审批流

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -330,6 +330,7 @@
               <el-input style="float:left;" v-if="user.userNameNeedTranslate != 1" v-model="keyword" class="input-with-select" :placeholder="$t('pleaseenterstaffsearch')" clearable="true" size="small">
                   <el-button slot="append" @click="statistical()" icon="el-icon-search"></el-button>
               </el-input>
+              <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :widthStr="'240'" :subject="users" :subjectId="addForm.ownerId" :distinction="'11'" :disabled="false" @selectCal="selectCal" :clearable="true"></selectCat>
             </div>
             <div style="display: inline-block;width: 340px">
               <span style="display: inline-block;margin: 0 15px 0 20px;color: rgb(96, 98, 102);">{{ $t('time.startDate') }}</span>
@@ -2167,6 +2168,13 @@ export default {
       } else if(obj.distinction == '4') {
         this.addForm.ownerId = obj.id
         this.selts()
+      } else if(obj.distinction == '11') {
+        if(obj.name != this.$t('defaultText.pleaseChoose')) {
+          this.keyword = obj.name
+        } else {
+          this.keyword = ''
+        }
+        this.statistical()
       }
     },
     vueCasader(obj) {

+ 14 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue

@@ -114,8 +114,10 @@
                         <el-link type="primary" :underline="false" @click="syncMembByCardTime">{{ $t('associateenterprisemicroidentity') }}</el-link>
                     </el-form-item>
                     <el-form-item style="float:right;" v-if="user.corpwxUserid != null && permissions.structureImport && user.companyId!=469">
+                        <!-- <el-link type="primary" v-if="user.userNameNeedTranslate != '1'" :underline="false" @click="syncWithCorpWxDayload">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link>
+                        <el-link type="primary" v-if="user.userNameNeedTranslate == '1'" :underline="false" @click="newSyncWithCorpWx">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link> -->
                         <el-link type="primary" v-if="user.userNameNeedTranslate != '1'" :underline="false" @click="syncWithCorpWx">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link>
-                        <el-link type="primary" v-if="user.userNameNeedTranslate == '1'" :underline="false" @click="newSyncWithCorpWx">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link>
+                        <el-link type="primary" v-if="user.userNameNeedTranslate == '1'" :underline="false" @click="newSyncWithCorpWxDayload = true">{{ $t('synchronizetheenterprisemicrodirectory') }}</el-link>
                     </el-form-item>
                     <el-form-item style="float:right;" v-if="user.dingdingUserid != null && permissions.structureImport">
                         <el-link type="primary" :underline="false" @click="syncWithCorpDingding">{{ $t('synchronizetheaddressbook') }}</el-link>
@@ -723,6 +725,15 @@
               <el-col :span="18">{{recordMsg.msg}}</el-col>
             </el-row>
         </el-dialog>
+        <el-dialog :title="$t('synchronizetheenterprisemicrodirectory')" :visible.sync="dialogVisible" width="400px" :before-close="handleClose">
+        <span>
+          同步前请联系企业微信管理员检查应用授权的可见范围 <br/>
+          路径:管理企业-应用管理-工时管家-可见范围
+        </span>
+        <span slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="newSyncWithCorpWx">开始同步</el-button>
+        </span>
+      </el-dialog>
     </div>
   </div>
 </template>
@@ -1006,7 +1017,8 @@ export default {
       insertFormPlates: [],
       saveBtnLoading: false,
       onlyDirect: false,
-      nextCursor: ''
+      nextCursor: '',
+      newSyncWithCorpWxDayload: false
     };
   },
   filters: {