Browse Source

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

cs 2 years ago
parent
commit
d9c283142f
20 changed files with 486 additions and 356 deletions
  1. 28 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java
  2. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/WxCorpInfoService.java
  3. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java
  4. 9 4
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  5. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  6. 19 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java
  7. 184 181
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java
  8. 4 4
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/DockWithMLD.java
  9. 4 4
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages.properties
  10. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/i18n/messages_en_US.properties
  11. 42 36
      fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue
  12. 11 9
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  13. 60 25
      fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue
  14. 68 63
      fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue
  15. 2 1
      fhKeeper/formulahousekeeper/timesheet/src/views/profession/list.vue
  16. 5 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  17. 9 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  18. 2 1
      fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue
  19. 31 18
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  20. 3 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

+ 28 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java

@@ -673,27 +673,35 @@ public class ProjectController {
         List<ProjectKeyNodesSetting> projectKeyNodesSettings = projectKeyNodesSettingMapper.selectList(new QueryWrapper<ProjectKeyNodesSetting>().eq("company_id", companyId));
         List<String> collect = providerCategoryList.stream().map(pc -> pc.getProviderCategoryName()).distinct().collect(Collectors.toList());
         TimeType timeType = timeTypeMapper.selectById(companyId);
+        List<String> exampleDataList=new ArrayList<>();
         if(timeType.getMainProjectState()==1){
             //heads.add("主项目");
             heads.add(MessageUtils.message("entry.mainProject"));
+            exampleDataList.add("示例-主项目名称");
         }
         //heads.add("项目编号");
         heads.add(MessageUtils.message("entry.projectId"));
+        exampleDataList.add("XM001");
         if(company.getId()==936){
             //heads.add("合同编号");
             heads.add(MessageUtils.message("entry.contractNo"));
+            exampleDataList.add("HT001");
         }
         if(timeType.getMainProjectState()!=1){
             //heads.add("项目分类");
             heads.add(MessageUtils.message("entry.projectType"));
+            exampleDataList.add("示例-项目分类");
         }
         //heads.add("是否为公共项目");
         heads.add(MessageUtils.message("entry.publicProject"));
         //heads.add("项目名称");
         heads.add(MessageUtils.message("entry.projectName"));
+        exampleDataList.add("否");
+        exampleDataList.add("示例-项目名称");
         if(timeType.getMainProjectState()!=1){
             //heads.add("子项目(多个用,隔开)");
             heads.add(MessageUtils.message("entry.sonProject"));
+            exampleDataList.add("示例-子项目名称");
         }
         //heads.add("参与人");
         heads.add(MessageUtils.message("entry.Participants"));
@@ -701,17 +709,23 @@ public class ProjectController {
         heads.add(MessageUtils.message("entry.projectManager"));
         //heads.add("级别");
         heads.add(MessageUtils.message("entry.level"));
+        exampleDataList.add("张三");
+        exampleDataList.add("张三");
+        exampleDataList.add("");
         if(timeType.getProjectWithDept()==1){
             //heads.add("所属部门");
             heads.add(MessageUtils.message("entry.department"));
+            exampleDataList.add("");
         }
         if(company.getPackageCustomer()==1){
             //heads.add("客户");
             heads.add(MessageUtils.message("entry.customer"));
+            exampleDataList.add("示例-客户");
         }
         if(company.getPackageProvider()==1){
             for (String s : collect) {
                 heads.add(s);
+                exampleDataList.add("示例供应商名称");
             }
         }
         //heads.add("开始日期");
@@ -720,6 +734,9 @@ public class ProjectController {
         heads.add(MessageUtils.message("entry.endDate"));
         //heads.add("合同金额");
         heads.add(MessageUtils.message("entry.contract"));
+        exampleDataList.add("2000-01-01");
+        exampleDataList.add("2000-02-01");
+        exampleDataList.add("1000");
         if(company.getId()==936){
             //heads.add("质保开始时间");
             heads.add(MessageUtils.message("entry.warrantyST"));
@@ -735,6 +752,13 @@ public class ProjectController {
             heads.add(MessageUtils.message("entry.projectState"));
             //heads.add("项目阶段");
             heads.add(MessageUtils.message("entry.projectStage"));
+            exampleDataList.add("2000-01-01");
+            exampleDataList.add("2000-02-01");
+            exampleDataList.add("");
+            exampleDataList.add("");
+            exampleDataList.add("");
+            exampleDataList.add("");
+            exampleDataList.add("");
             for (ProjectKeyNodesSetting projectKeyNodesSetting : projectKeyNodesSettings) {
                 //heads.add(projectKeyNodesSetting.getName()+"计划完成日期");
                 heads.add(MessageUtils.message("entry.planCompDate",projectKeyNodesSetting.getName()));
@@ -742,10 +766,14 @@ public class ProjectController {
                 heads.add(MessageUtils.message("entry.actualComDate",projectKeyNodesSetting.getName()));
                 //heads.add(projectKeyNodesSetting.getName()+"节点状态");
                 heads.add(MessageUtils.message("entry.nodeStatus",projectKeyNodesSetting.getName()));
+                exampleDataList.add("");
+                exampleDataList.add("");
+                exampleDataList.add("");
             }
         }
         List<List<String>> allList = new ArrayList<>();
         allList.add(heads);
+        allList.add(exampleDataList);
         //String title = company.getCompanyName()+"_项目导入模板";
         String title = MessageUtils.message("fileName.projectImport",company.getCompanyName());
         /*msg.data = ExcelUtil.exportGeneralExcelByTitleAndList(fileName, allList, path);*/

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/WxCorpInfoService.java

@@ -56,5 +56,5 @@ public interface WxCorpInfoService extends IService<WxCorpInfo> {
 
     User generateUserInfo(Integer companyId, String corpwxOpenId);
 
-    HttpRespMsg getBatchSearchUserInfo(WxCorpInfo wxCorpInfo, List<String> userNameList) throws Exception;
+    HttpRespMsg getBatchSearchUserInfo(WxCorpInfo wxCorpInfo, List<String> userNameList,String cursor) throws Exception;
 }

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

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

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

@@ -1372,7 +1372,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     double costTime = 0;
                     List<Map<String, Object>> mapList = membList.stream().filter(mb -> mb.get("creatorId").equals(user.getId())).collect(Collectors.toList());
                     List<String> membRowData=new ArrayList<>();
-                    membRowData.add(user.getName());
+                    if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                        membRowData.add((String)("$userName="+user.getCorpwxUserid()+"$"));
+                    }else {
+                        membRowData.add(user.getName());
+                    }
                     for(Object i:projectIds){
                         List<Map<String, Object>> resultList = mapList.stream().filter(mp -> mp.get("projectId").equals(i)).collect(Collectors.toList());
                         if(resultList.size()>0){
@@ -3170,7 +3174,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 System.out.println("参与搜素的人员列表"+userNameList);
                 HttpRespMsg respMsg=new HttpRespMsg();
                 if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
+                    respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
                     if(respMsg.code.equals("0")){
                         msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
                         return msg;
@@ -3566,13 +3570,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 System.out.println("参与搜素的人员列表"+userNameList);
                 HttpRespMsg respMsg=new HttpRespMsg();
                 if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList);
+                    respMsg = wxCorpInfoService.getBatchSearchUserInfo(wxCorpInfo, userNameList,null);
                     if(respMsg.code.equals("0")){
                         msg.setError("姓名为["+String.valueOf(respMsg.data)+"]的人员存在重复,请使用工号!");
                         return msg;
                     }
                 }
                 List<User> targetUserList= (List<User>) respMsg.data;
+                System.out.println(targetUserList);
                 List<String> existCodeList = new ArrayList<>();
                 int importCount = 0;
                 for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {
@@ -3973,7 +3978,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                                         String curProviderName = split[i1].trim();
                                         Optional<ProviderInfo> first = providerInfoList.stream().filter(pd -> pd.getProviderName().equals(curProviderName)&&pd.getProviderCategoryId().equals(categoryId)).findFirst();
                                         if(!first.isPresent()){
-                                            //msg.setError("供应商["+curProviderName+"]在供应商分类["+providerCategoryList.get(j).getProviderCategoryName()+"]不存在");
+                                            //msg.setError("供应商["+curProviderName+"]在供应商分类["+providerCategoryList.get(j).getProviderCategoryName()+"]不存在");
                                             msg.setError(MessageUtils.message("supplier.noExist",curProviderName,providerCategoryList.get(j).getProviderCategoryName()));
                                             return msg;
                                         }else {

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

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

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

@@ -646,7 +646,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         return result;
     }
     @Override
-    public HttpRespMsg getBatchSearchUserInfo(WxCorpInfo wxCorpInfo, List<String> userNameList)throws Exception{
+    public HttpRespMsg getBatchSearchUserInfo(WxCorpInfo wxCorpInfo, List<String> userNameList ,String cursor)throws Exception{
         HttpRespMsg msg=new HttpRespMsg();
         List<User> userList=new ArrayList<>();
         String url = GET_BATCH_SEARCH_USER_INFO.replace("ACCESS_TOKEN",getProviderAccessToken());
@@ -663,7 +663,9 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
             item.put("query_range",1);
             item.put("limit",50);
             item.put("full_match_field",1);
-            item.put("cursor",CURSOR.get("cursor"));
+            if(cursor!=null){
+                item.put("cursor",cursor);
+            }
             jsonArray.add(item);
         }
         jsonObject.put("query_request_list",jsonArray);
@@ -677,6 +679,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                 throw new Exception(json.toJSONString());
             }
             JSONArray resultList = json.getJSONArray("query_result_list");
+            List<String> targetUserNameList=new ArrayList<>();
+            String nextCursor=null;
             for (int i = 0; i < resultList.size(); i++) {
                 User user=new User();
                 JSONObject item = resultList.getJSONObject(i);
@@ -696,7 +700,20 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                 }
                 user.setCorpwxUserid(openUseridList.get(0));
                 userList.add(user);
+                boolean isLast = item.getBoolean("is_last");
+                if(!isLast){
+                    nextCursor = item.getString("next_cursor");
+                    targetUserNameList.add(userName);
+                }
             }
+            if(targetUserNameList.size()>0){
+                HttpRespMsg respMsg = getBatchSearchUserInfo(wxCorpInfo, targetUserNameList,nextCursor);
+                if(!respMsg.code.equals("0")){
+                    List<User> targetUserList= (List<User>) respMsg.data;
+                    userList.addAll(targetUserList);
+                }
+            }
+
         }
         msg.data=userList;
         return msg;

+ 184 - 181
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -279,205 +279,208 @@ public class TimingTask {
 
 
     //每天2:11 同步钉钉用户前2天到未来30天时间段的打卡,请假,出差数据
-    @Scheduled(cron = "0 11 2 ? * *")
+    @Scheduled(cron = "0 41 15 ? * *")
     private void synFanWeiWorkData() {
-        if (isDev) return;
+        /*if (isDev) return;
+        if(!isPrivateDeploy) return;*/
         List<TimeType> timeTypeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("sync_fanwei", 1));
         List<Integer> compIds = timeTypeList.stream().map(TimeType::getCompanyId).collect(Collectors.toList());
         if(compIds.isEmpty()){
             return;
         }
-        DockWithMLD dockWithMLD=new DockWithMLD();
-        JSONObject jsonObject=new JSONObject();
-        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-        DateTimeFormatter dtf1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        DateTimeFormatter dtf2 = DateTimeFormatter.ofPattern("HH:mm");
-        LocalDateTime yesterday = LocalDateTime.now().minusDays(2);
-        String startDate = dtf.format(yesterday);
-        String endDate = dtf.format(yesterday.plusDays(32));
-        List<UserFvTime> oldUserFvTimeList = userFvTimeService.list(new QueryWrapper<UserFvTime>().in("company_id", compIds));
-        List<LeaveSheet> oldLeaveSheetList = leaveSheetService.list(new QueryWrapper<LeaveSheet>().in("company_id", compIds));
-        List<BusinessTrip> oldBusinessTripList = businessTripService.list(new QueryWrapper<BusinessTrip>().in("company_id", compIds));
-        jsonObject.put("startDate",startDate);
-        jsonObject.put("endDate",endDate);
-        String jsonString = jsonObject.toJSONString();
-        List<UserFvTime> userFvTimeList=new ArrayList<>();
-        List<LeaveSheet> leaveSheetList=new ArrayList<>();
-        List<BusinessTrip> businessTripList=new ArrayList<>();
-        //Todo: 获取打卡数据
-        HttpRespMsg workDataMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getWorkData", jsonString);
-        List<Map<String,Object>> workDataList= (List<Map<String, Object>>) workDataMsg.data;
-        List<String> userIds = workDataList.stream().map(map -> String.valueOf(map.get("userId"))).collect(Collectors.toList());
-        List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("job_number", userIds));
-        for (User user : userList) {
-            System.out.println("需要同步的用户列表-----"+userList);
-            LocalTime startTime=null;
-            LocalTime endTime=null;
-            LocalDate workDate=null;
-            for (Map<String, Object> map : workDataList) {
-                if (map.get("userId").equals(user.getJobNumber())) {
-                    if(String.valueOf(map.get("signtype")).equals("签到")){
-                        startTime=LocalTime.parse(String.valueOf(map.get("signtime")), dtf2);
-                        workDate= LocalDate.parse(String.valueOf(map.get("workDate")), dtf);
+        for (Integer compId : compIds) {
+            DockWithMLD dockWithMLD=new DockWithMLD();
+            JSONObject jsonObject=new JSONObject();
+            DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+            DateTimeFormatter dtf1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+            DateTimeFormatter dtf2 = DateTimeFormatter.ofPattern("HH:mm");
+            LocalDateTime yesterday = LocalDateTime.now().minusDays(2);
+            String startDate = dtf.format(yesterday);
+            String endDate = dtf.format(yesterday.plusDays(32));
+            List<UserFvTime> oldUserFvTimeList = userFvTimeService.list(new QueryWrapper<UserFvTime>().eq("company_id", compId));
+            List<LeaveSheet> oldLeaveSheetList = leaveSheetService.list(new QueryWrapper<LeaveSheet>().eq("company_id", compId));
+            List<BusinessTrip> oldBusinessTripList = businessTripService.list(new QueryWrapper<BusinessTrip>().eq("company_id", compId));
+            jsonObject.put("startDate",startDate);
+            jsonObject.put("endDate",endDate);
+            String jsonString = jsonObject.toJSONString();
+            List<UserFvTime> userFvTimeList=new ArrayList<>();
+            List<LeaveSheet> leaveSheetList=new ArrayList<>();
+            List<BusinessTrip> businessTripList=new ArrayList<>();
+            //Todo: 获取打卡数据
+            HttpRespMsg workDataMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getWorkData", jsonString);
+            List<Map<String,Object>> workDataList= (List<Map<String, Object>>) workDataMsg.data;
+            List<String> userIds = workDataList.stream().map(map -> String.valueOf(map.get("userId"))).collect(Collectors.toList());
+            List<User> userList = userMapper.selectList(new QueryWrapper<User>().in("job_number", userIds));
+            //获取休息设置
+            TimeAutoExclude timeAutoExclude = timeAutoExcludeMapper.selectOne(new QueryWrapper<TimeAutoExclude>().eq("company_id", compId));
+            TimeType allDay = timeTypeMapper.selectOne(new QueryWrapper<TimeType>().eq("company_id", compId));
+            for (User user : userList) {
+                System.out.println("需要同步的用户列表-----"+userList);
+                LocalTime startTime=null;
+                LocalTime endTime=null;
+                LocalDate workDate=null;
+                for (Map<String, Object> map : workDataList) {
+                    if (map.get("userId").equals(user.getJobNumber())) {
+                        if(String.valueOf(map.get("signtype")).equals("签到")){
+                            startTime=LocalTime.parse(String.valueOf(map.get("signtime")), dtf2);
+                            workDate= LocalDate.parse(String.valueOf(map.get("workDate")), dtf);
+                        }
+                        if(String.valueOf(map.get("signtype")).equals("签退")){
+                            endTime=LocalTime.parse(String.valueOf(map.get("signtime")), dtf2);
+                            workDate=LocalDate.parse(String.valueOf(map.get("workDate")),dtf);
+                        }
+                    }
+                }
+                UserFvTime userFvTime=new UserFvTime();
+                System.out.println("泛微同步人员打卡数据----"+user.getName());
+                if(compIds.contains(user.getCompanyId())){
+                    if(startTime==null||endTime==null){
+                        System.out.println("缺少上班或者下班打卡时间----"+user.getName());
+                        continue;
+                    }
+                    userFvTime.setWorkDate(workDate);
+                    Duration between = Duration.between(startTime, endTime);
+                    userFvTime.setStartTime(startTime.format(dtf2));
+                    userFvTime.setEndTime(endTime.format(dtf2));
+                    userFvTime.setCompanyId(user.getCompanyId());
+                    userFvTime.setUserId(user.getId());
+                    long workHours = between.toHours();
+                    long restHours;
+                    if(startTime.isBefore(LocalTime.parse(timeAutoExclude.getStartTime(),dtf2))
+                            &&endTime.isAfter(LocalTime.parse(timeAutoExclude.getEndTime(),dtf2))){
+                        Duration bt = Duration.between(LocalTime.parse(timeAutoExclude.getStartTime(),dtf2), LocalTime.parse(timeAutoExclude.getEndTime(),dtf2));
+                        restHours=bt.toHours();
+                    }else {
+                        restHours=0;
                     }
-                    if(String.valueOf(map.get("signtype")).equals("签退")){
-                        endTime=LocalTime.parse(String.valueOf(map.get("signtime")), dtf2);
-                        workDate=LocalDate.parse(String.valueOf(map.get("workDate")),dtf);
+                    userFvTime.setWorkHours(BigDecimal.valueOf(workHours).subtract(BigDecimal.valueOf(restHours)).floatValue());
+                    Optional<UserFvTime> first = oldUserFvTimeList.stream().filter(ol -> ol.getWorkDate().isEqual(userFvTime.getWorkDate()) && ol.getUserId().equals(userFvTime.getUserId())).findFirst();
+                    if(first.isPresent()){
+                        userFvTime.setId(first.get().getId());
                     }
+                    userFvTimeList.add(userFvTime);
                 }
             }
-            UserFvTime userFvTime=new UserFvTime();
-            //获取休息设置
-            TimeAutoExclude timeAutoExclude = timeAutoExcludeMapper.selectOne(new QueryWrapper<TimeAutoExclude>().eq("company_id", user.getCompanyId()));
-            System.out.println("泛微同步人员打卡数据----"+user.getName());
-            if(compIds.contains(user.getCompanyId())){
-                if(startTime==null||endTime==null){
-                    System.out.println("缺少上班或者下班打卡时间----"+user.getName());
+            if(userFvTimeList.size()>0){
+                userFvTimeService.saveOrUpdateBatch(userFvTimeList);
+            }
+            //Todo: 获取请假数据
+            HttpRespMsg leaveRecordMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getLeaveRecord", jsonString);
+            List<Map<String,Object>> leaveRecordList= (List<Map<String, Object>>) leaveRecordMsg.data;
+            for (Map<String, Object> map : leaveRecordList) {
+                User user = userMapper.selectOne(new QueryWrapper<User>().eq("job_number", map.get("rybh")));
+                if(user==null){
                     continue;
                 }
-                userFvTime.setWorkDate(workDate);
-                Duration between = Duration.between(startTime, endTime);
-                userFvTime.setStartTime(startTime.format(dtf2));
-                userFvTime.setEndTime(endTime.format(dtf2));
-                userFvTime.setCompanyId(user.getCompanyId());
-                userFvTime.setUserId(user.getId());
-                long workHours = between.toHours();
-                long restHours;
-                if(startTime.isBefore(LocalTime.parse(timeAutoExclude.getStartTime(),dtf2))
-                        &&endTime.isAfter(LocalTime.parse(timeAutoExclude.getEndTime(),dtf2))){
-                    Duration bt = Duration.between(LocalTime.parse(timeAutoExclude.getStartTime(),dtf2), LocalTime.parse(timeAutoExclude.getEndTime(),dtf2));
-                    restHours=bt.toHours();
-                }else {
-                    restHours=0;
-                }
-                userFvTime.setWorkHours(BigDecimal.valueOf(workHours).subtract(BigDecimal.valueOf(restHours)).floatValue());
-                Optional<UserFvTime> first = oldUserFvTimeList.stream().filter(ol -> ol.getWorkDate().isEqual(userFvTime.getWorkDate()) && ol.getUserId().equals(userFvTime.getUserId())).findFirst();
-                if(first.isPresent()){
-                    userFvTime.setId(first.get().getId());
-                }
-                userFvTimeList.add(userFvTime);
-            }
-        }
-        if(userFvTimeList.size()>0){
-            userFvTimeService.saveOrUpdateBatch(userFvTimeList);
-        }
-        //Todo: 获取请假数据
-        HttpRespMsg leaveRecordMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getLeaveRecord", jsonString);
-        List<Map<String,Object>> leaveRecordList= (List<Map<String, Object>>) leaveRecordMsg.data;
-        for (Map<String, Object> map : leaveRecordList) {
-            User user = userMapper.selectOne(new QueryWrapper<User>().eq("job_number", map.get("rybh")));
-            if(user==null){
-                continue;
-            }
-            System.out.println("泛微同步人员请假数据----"+user.getName());
-            if(compIds.contains(user.getCompanyId())){
-               LeaveSheet leaveSheet=new LeaveSheet();
-               leaveSheet.setCompanyId(user.getCompanyId());
-               leaveSheet.setStatus(0);
-               leaveSheet.setOwnerId(user.getId());
-               leaveSheet.setOwnerName(user.getName());
-               leaveSheet.setStartDate(LocalDate.parse(String.valueOf(map.get("startDate")),dtf1));
-               leaveSheet.setEndDate(LocalDate.parse(String.valueOf(map.get("endDate")),dtf1));
-               Integer timeType=null;
-               switch (String.valueOf(map.get("timeType"))){
-                   case "小时":timeType=1;
-                       break;
-                   case "天":timeType=0;
-                       break;
-               }
-               leaveSheet.setTimeType(timeType);
-               leaveSheet.setTimeDays(Float.parseFloat((String) map.get("timeDays")));
-               if (timeType == 0){
-                   TimeType allDay = timeTypeMapper.selectOne(new QueryWrapper<TimeType>().eq("company_id", user.getCompanyId()));
-                   leaveSheet.setTimeHours(leaveSheet.getTimeDays()*allDay.getAllday());
-               }else {
-                   leaveSheet.setTimeHours(Float.parseFloat((String) map.get("timeHours")));
-               }
-               Integer leaveType=null;
-               switch (String.valueOf(map.get("leaveType"))){
-                   case "事假":leaveType=0;
-                       break;
-                   case "病假":leaveType=1;
-                       break;
-                   case "年假":leaveType=2;
-                       break;
-                   case "产假":leaveType=3;
-                       break;
-                   case "婚假":leaveType=4;
-                       break;
-                   case "丧假":leaveType=5;
-                       break;
-                   case "调休":leaveType=6;
-                       break;
-                   case "陪产假":leaveType=7;
-                       break;
-                   default:leaveType=8;
-               }
-               leaveSheet.setLeaveType(leaveType);
-               leaveSheet.setProcinstId(String.valueOf(map.get("procinstId")));
-               leaveSheet.setGmtFinished(String.valueOf(map.get("gmtFinished")));
-                Optional<LeaveSheet> first = oldLeaveSheetList.stream().filter(ol -> ol.getStartDate().isEqual(leaveSheet.getStartDate())&&ol.getEndDate().isEqual(leaveSheet.getEndDate()) && ol.getOwnerId().equals(leaveSheet.getOwnerId())).findFirst();
-                if(first.isPresent()){
-                    leaveSheet.setId(first.get().getId());
+                System.out.println("泛微同步人员请假数据----"+user.getName());
+                if(compIds.contains(user.getCompanyId())){
+                    LeaveSheet leaveSheet=new LeaveSheet();
+                    leaveSheet.setCompanyId(user.getCompanyId());
+                    leaveSheet.setStatus(0);
+                    leaveSheet.setOwnerId(user.getId());
+                    leaveSheet.setOwnerName(user.getName());
+                    leaveSheet.setStartDate(LocalDate.parse(String.valueOf(map.get("startDate")),dtf1));
+                    leaveSheet.setEndDate(LocalDate.parse(String.valueOf(map.get("endDate")),dtf1));
+                    Integer timeType=null;
+                    switch (String.valueOf(map.get("timeType"))){
+                        case "小时":timeType=1;
+                            break;
+                        case "天":timeType=0;
+                            break;
+                    }
+                    leaveSheet.setTimeType(timeType);
+                    leaveSheet.setTimeDays(Float.parseFloat(((String) map.get("timeDays")).equals("")?"0.00":((String) map.get("timeDays"))));
+                    if (timeType == 0){
+                        leaveSheet.setTimeHours(leaveSheet.getTimeDays()*allDay.getAllday());
+                    }else {
+                        leaveSheet.setTimeHours(Float.parseFloat(((String) map.get("timeHours")).equals("")?"0.00":((String) map.get("timeHours"))));
+                    }
+                    Integer leaveType=null;
+                    switch (String.valueOf(map.get("leaveType"))){
+                        case "事假":leaveType=0;
+                            break;
+                        case "病假":leaveType=1;
+                            break;
+                        case "年假":leaveType=2;
+                            break;
+                        case "产假":leaveType=3;
+                            break;
+                        case "婚假":leaveType=4;
+                            break;
+                        case "丧假":leaveType=5;
+                            break;
+                        case "调休":leaveType=6;
+                            break;
+                        case "陪产假":leaveType=7;
+                            break;
+                        default:leaveType=8;
+                    }
+                    leaveSheet.setLeaveType(leaveType);
+                    leaveSheet.setProcinstId(String.valueOf(map.get("procinstId")));
+                    leaveSheet.setGmtFinished(String.valueOf(map.get("gmtFinished")));
+                    Optional<LeaveSheet> first = oldLeaveSheetList.stream().filter(ol -> ol.getStartDate().isEqual(leaveSheet.getStartDate())&&ol.getEndDate().isEqual(leaveSheet.getEndDate()) && ol.getOwnerId().equals(leaveSheet.getOwnerId())).findFirst();
+                    if(first.isPresent()){
+                        leaveSheet.setId(first.get().getId());
+                    }
+                    leaveSheetList.add(leaveSheet);
                 }
-               leaveSheetList.add(leaveSheet);
             }
-        }
-        if(leaveSheetList.size()>0){
-            leaveSheetService.saveOrUpdateBatch(leaveSheetList);
-        }
-        //Todo: 获取出差数据
-        HttpRespMsg travelRecordMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getTravelRecord", jsonString);
-        List<Map<String,Object>> travelRecordList= (List<Map<String, Object>>) travelRecordMsg.data;
-        for (Map<String, Object> map : travelRecordList) {
-            User user = userMapper.selectOne(new QueryWrapper<User>().eq("job_number", map.get("rybh")));
-            if(user==null){
-                continue;
+            if(leaveSheetList.size()>0){
+                leaveSheetService.saveOrUpdateBatch(leaveSheetList);
             }
-            System.out.println("泛微同步人员出差数据----"+user.getName());
-            if(compIds.contains(user.getCompanyId())){
-                BusinessTrip businessTrip=new BusinessTrip();
-                businessTrip.setCompanyId(user.getCompanyId());
-                businessTrip.setOwnerId(user.getId());
-                businessTrip.setOwnerName(user.getName());
-                businessTrip.setStartDate(LocalDate.parse(String.valueOf(map.get("startDate")),dtf1));
-                businessTrip.setEndDate(LocalDate.parse(String.valueOf(map.get("endDate")),dtf1));
-                Integer way=null;
-                switch (String.valueOf(map.get("way"))){
-                    case "飞机":way=0;
-                    break;
-                    case "高铁/火车":way=1;
-                        break;
-                    case "汽车":way=2;
-                        break;
-                    case "轮船":way=3;
-                        break;
-                    case "其他":way=4;
-                        break;
-                }
-                businessTrip.setWay(way);
-                businessTrip.setCityFrom((String) map.get("cityFrom"));
-                businessTrip.setCityTo((String) map.get("cityTo"));
-                Integer goBack=null;
-                switch (String.valueOf(map.get("goBack"))){
-                    case "单程":goBack=0;
-                    break;
-                    case "往返":goBack=1;
-                    break;
+            //Todo: 获取出差数据
+            HttpRespMsg travelRecordMsg = dockWithMLD.getResult("http://10.1.10.51:20175/api/cube/restful/interface/getModeDataPageList/getTravelRecord", jsonString);
+            List<Map<String,Object>> travelRecordList= (List<Map<String, Object>>) travelRecordMsg.data;
+            for (Map<String, Object> map : travelRecordList) {
+                User user = userMapper.selectOne(new QueryWrapper<User>().eq("job_number", map.get("rybh")));
+                if(user==null){
+                    continue;
                 }
-                businessTrip.setGoBack(goBack);
-                businessTrip.setDayCount(Integer.parseInt(String.valueOf(map.get("dayCount")).substring(0,1)));
-                businessTrip.setProcinstId((String) map.get("procinstId"));
-                businessTrip.setGmtFinished((String)map.get("gmtFinished"));
-                Optional<BusinessTrip> first = oldBusinessTripList.stream().filter(ol -> ol.getStartDate().isEqual(businessTrip.getStartDate())&&ol.getEndDate().isEqual(businessTrip.getEndDate()) && ol.getOwnerId().equals(businessTrip.getOwnerId())).findFirst();
-                if(first.isPresent()){
-                    businessTrip.setId(first.get().getId());
+                System.out.println("泛微同步人员出差数据----"+user.getName());
+                if(compIds.contains(user.getCompanyId())){
+                    BusinessTrip businessTrip=new BusinessTrip();
+                    businessTrip.setCompanyId(user.getCompanyId());
+                    businessTrip.setOwnerId(user.getId());
+                    businessTrip.setOwnerName(user.getName());
+                    businessTrip.setStartDate(LocalDate.parse(String.valueOf(map.get("startDate")),dtf1));
+                    businessTrip.setEndDate(LocalDate.parse(String.valueOf(map.get("endDate")),dtf1));
+                    Integer way=null;
+                    switch (String.valueOf(map.get("way"))){
+                        case "飞机":way=0;
+                            break;
+                        case "高铁/火车":way=1;
+                            break;
+                        case "汽车":way=2;
+                            break;
+                        case "轮船":way=3;
+                            break;
+                        case "其他":way=4;
+                            break;
+                    }
+                    businessTrip.setWay(way);
+                    businessTrip.setCityFrom((String) map.get("cityFrom"));
+                    businessTrip.setCityTo((String) map.get("cityTo"));
+                    Integer goBack=null;
+                    switch (String.valueOf(map.get("goBack"))){
+                        case "单程":goBack=0;
+                            break;
+                        case "往返":goBack=1;
+                            break;
+                    }
+                    businessTrip.setGoBack(goBack);
+                    businessTrip.setDayCount(Integer.parseInt(String.valueOf(map.get("dayCount")).substring(0,1)));
+                    businessTrip.setProcinstId((String) map.get("procinstId"));
+                    businessTrip.setGmtFinished((String)map.get("gmtFinished"));
+                    Optional<BusinessTrip> first = oldBusinessTripList.stream().filter(ol -> ol.getStartDate().isEqual(businessTrip.getStartDate())&&ol.getEndDate().isEqual(businessTrip.getEndDate()) && ol.getOwnerId().equals(businessTrip.getOwnerId())).findFirst();
+                    if(first.isPresent()){
+                        businessTrip.setId(first.get().getId());
+                    }
+                    businessTripList.add(businessTrip);
                 }
-                businessTripList.add(businessTrip);
             }
-        }
-        if(businessTripList.size()>0){
-            businessTripService.saveOrUpdateBatch(businessTripList);
+            if(businessTripList.size()>0){
+                businessTripService.saveOrUpdateBatch(businessTripList);
+            }
         }
     }
 

+ 4 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/DockWithMLD.java

@@ -77,10 +77,10 @@ public class DockWithMLD {
         header.put("Md5",md5OfStr);
         paramDatajson.put("header",header);
         //分页参数 处理全部数据 不需要进行分页
-        /*JSONObject pageInfo = new JSONObject();
-        pageInfo.put("pageNo", -1);
-        pageInfo.put("pageSize", -1);
-        paramDatajson.put("pageInfo",pageInfo);*/
+        JSONObject pageInfo = new JSONObject();
+        pageInfo.put("pageNo", 1);
+        pageInfo.put("pageSize",1000);
+        paramDatajson.put("pageInfo",pageInfo);
         //封装 mainTable 参数
         JSONObject mainTable  = JSON.parseObject(screenString);
         paramDatajson.put("mainTable",mainTable);

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

@@ -366,7 +366,7 @@ data.upSkip=自动更新{0}条已存在项目编码:{1}。
 data.exceedMonthError=获取数据时间段不得超过一个月
 data.verificationError=数据有误 验证失败
 #供应商相关
-supplier.noExist=供应商[{0}]在供应商分类[{1}]不存在
+supplier.noExist=供应商[{0}]在供应商分类[{1}]不存在
 supplier.addSupplier=请填写供应商数据
 supplier.lackNameOnRow=第{0}行缺少供应商名称
 supplier.nameRepeat=当前导入数据存在重复供应商名称[{0}]
@@ -538,10 +538,10 @@ fileName.leaveRemaining = 假期剩余表
 #excel
 excel.publicProject=是否为非项目
 excel.projectName=项目名称必填
-excel.manyPeople=多个参与人(姓名/工号)使用中文逗号(,)隔开
+excel.manyPeople=多个参与人(姓名)使用中文逗号(,)隔开
 excel.manyPeoplePlus=多个参与人(工号)使用中文逗号(,)隔开
-excel.projectManager=项目经理(姓名/工号)需存在于参与人中
-excel.projectManagerPlus=项目经理(姓名/工号)需存在于参与人中
+excel.projectManager=项目经理(姓名)需存在于参与人中
+excel.projectManagerPlus=项目经理(姓名)需存在于参与人中
 excel.projectCharge=负责人需存在于参与人中
 excel.dateFormat=日期格式:yyyy-MM-dd
 excel.forExample=例如: 2021-01-01

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

@@ -538,9 +538,9 @@ fileName.leaveRemaining = Leave Remaining Table
 #excel
 excel.publicProject=Whether it is a non project
 excel.projectName=Project name is required
-excel.manyPeople=Multiple participants (name/jobNumber) are separated by commas (,)
+excel.manyPeople=Multiple participants (name) are separated by commas (,)
 excel.manyPeoplePlus=Multiple participants (jobNumber) are separated by commas (,)
-excel.projectManager=The project manager (name/jobNumber) must exist in the participants
+excel.projectManager=The project manager (name) must exist in the participants
 excel.projectManagerPlus=The project manager (jobNumber) must exist in the participants
 excel.projectCharge=The person in charge must exist in the participants
 excel.dateFormat=Date Format:yyyy-MM-dd

+ 42 - 36
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -26,7 +26,7 @@
         <div class="transitionBox">
             <ul class="transitionBoxUl">
                 <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClist(item)"> 
-                    <span :class="item.children ? 'idxspan' : ''" v-if="!radios">
+                    <span :class="item.children ? 'idxspan' : ''" v-if="!radios || fistRadio">
                         <!-- {{item.label}} -->
                         <span v-if="userName">
                             <span v-if="item.type == 'dep'">
@@ -41,7 +41,7 @@
                         </span>
                         <!-- <ww-open-data type='departmentName' :openid='item.label'></ww-open-data> -->
                     </span>
-                    <span v-if="radios" style="margin-left: -15px">
+                    <span v-if="radios && !fistRadio" style="margin-left: -15px">
                         <el-radio v-model="optionsOId" :label="item.value">
                             <span class="idxspan" style="margin-left: -10px"> 
                                 <!-- {{item.label}}  -->
@@ -147,6 +147,11 @@ export default {
         userName: {
             type: Boolean,
             default: false
+        },
+        // 第一季是否不选中
+        fistRadio: {
+            type: Boolean,
+            default: false
         }
     },
     data() {
@@ -253,13 +258,15 @@ export default {
             if(arr) {
                 for(var i in arr) {
                     console.log(arr[i].value, idd)
-                    if(arr[i].value == idd) {
-                        console.log('将要付给的值', arr[i])
-                        this.selectName = arr[i].label
-                        if(arr[i].type) {
-                            this.selectNameType = arr[i].type
+                    if(arr[i].label != this.$t('lable.department') && arr[i].label != this.$t('designatedpersonnel')) {
+                        if(arr[i].value == idd) {
+                            console.log('将要付给的值', arr[i])
+                            this.selectName = arr[i].label
+                            if(arr[i].type) {
+                                this.selectNameType = arr[i].type
+                            }
+                            return
                         }
-                        return
                     }
                     if(arr[i].children) {
                         this.traverseArr(arr[i].children, idd)
@@ -298,36 +305,35 @@ export default {
         },
         // 点击
         liClist(item) {
-            console.log('我被你点击了')
-            if(!item.children) {
-                this.selectName = item.label
-                if(item.type) {
-                    this.selectNameType = item.type
-                }
-                let obj = {
-                    id: item.value,
-                    distinction: this.distinction
-                }
-                console.log('将要传出去的值1', obj)
-                this.$emit('vueCasader', obj)
-            }
-            if(this.radios) {
-                this.selectName = item.label
-                if(item.type) {
-                    this.selectNameType = item.type
+            if(item.label != this.$t('lable.department') && item.label != this.$t('designatedpersonnel')) {
+                if(!item.children) {
+                    this.selectName = item.label
+                    if(item.type) {
+                        this.selectNameType = item.type
+                    }
+                    let obj = {
+                        id: item.value,
+                        distinction: this.distinction
+                    }
+                    this.$emit('vueCasader', obj)
                 }
-                let obj = {
-                    id: item.value,
-                    distinction: this.distinction,
-                    item: item
+                if(this.radios) {
+                    this.selectName = item.label
+                    if(item.type) {
+                        this.selectNameType = item.type
+                    }
+                    let obj = {
+                        id: item.value,
+                        distinction: this.distinction,
+                        item: item
+                    }
+                    this.$emit('vueCasader', obj)
+                } else {
+                    this.transitionBoxLiIdx = ''
+                    this.show = !this.show
+                    this.classDiv = false
+                    this.move = false
                 }
-                console.log('将要传出去的值2', obj)
-                this.$emit('vueCasader', obj)
-            } else {
-                this.transitionBoxLiIdx = ''
-                this.show = !this.show
-                this.classDiv = false
-                this.move = false
             }
         },
         // 接受子组件传过来的值

+ 11 - 9
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -154,6 +154,7 @@ export default {
             type: Boolean,
             default: false
         },
+        
     },
     components: {
         selectWidth: '150',
@@ -186,8 +187,8 @@ export default {
                 this.options = newValue
                 if(this.flg) {
                     if(newValue) {
-                        this.selectName = newValue[0].name || newValue[0].auditorName
-                        this.optionsOId = newValue[0].id || newValue[0].auditorId
+                        this.selectName = newValue[0].auditorName || newValue[0].name
+                        this.optionsOId = newValue[0].auditorId || newValue[0].id
                     }
                 }
             },
@@ -207,7 +208,7 @@ export default {
                 if(!this.multiSelect) {
                     if(this.optionsOId) {
                         for(let i in this.options) {
-                            if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
+                            if(this.options[i].auditorId == this.optionsOId || this.options[i].id == this.optionsOId) {
                                 this.selectName = this.options[i].name || this.options[i].auditorName
                             }
                         }
@@ -218,7 +219,7 @@ export default {
                 if(this.multiSelect) {
                     for(var i in this.options) {
                         for(var j in this.optionsOId) {
-                            if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                            if(this.options[i].auditorId == this.optionsOId[j] || this.options[i].id == this.optionsOId[j]) {
                                 this.multiSelectList.push(this.options[i])
                                 this.options[i].flg = true
                             }
@@ -258,15 +259,15 @@ export default {
             if(!this.multiSelect) {
                 this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
                 for(let i in this.options) {
-                    if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
-                        this.selectName = this.options[i].name || this.options[i].auditorName
+                    if(this.options[i].auditorId == this.optionsOId || this.options[i].id == this.optionsOId) {
+                        this.selectName = this.options[i].auditorName || this.options[i].name 
                     }
                 }
             }
             if(this.multiSelect) {
                 for(var i in this.options) {
                     for(var j in this.optionsOId) {
-                        if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                        if( this.options[i].auditorId == this.optionsOId[j] || this.options[i].id == this.optionsOId[j]) {
                             this.multiSelectList.push(this.options[i])
                             this.options[i].flg = true
                         }
@@ -358,8 +359,9 @@ export default {
             this.transitionBoxLiIdx = index
         },
         liClick(item, itemIndex) {
-            let nameId = item.id || item.auditorId
-            this.selectName = item.name || item.auditorName
+            console.log(item, '进来的')
+            let nameId = item.auditorId || item.id
+            this.selectName = item.auditorName || item.name
             if(!this.multiSelect) {
                 console.log('我进来了', this.flg)
                 if(this.flgs) {

+ 60 - 25
fhKeeper/formulahousekeeper/timesheet/src/views/awayOffice/awayOffice.vue

@@ -333,7 +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>
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :widthStr="'240'" :subject="users" :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>
@@ -462,7 +462,7 @@
                     <el-form-item :label="$t('selectdepartmentsdesignatepersonnel')" >
                         <el-cascader filterable ref="deptCascader" v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept" v-if="user.userNameNeedTranslate != 1" :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
                         <!-- <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader> -->
-                        <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+                        <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :fistRadio="true" :userName="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                     </el-form-item>
                 </el-form>
                 <div slot="footer" class="dialog-footer">
@@ -929,9 +929,9 @@ export default {
                 this.ownerIdsId = obj.id
             } else if(obj.distinction == '11') {
                 if(obj.name != this.$t('defaultText.pleaseChoose')) {
-                this.keyword = obj.name
+                this.searchWord = obj.name
                 } else {
-                this.keyword = ''
+                this.searchWord = ''
                 }
                 this.statistical()
             }
@@ -1764,8 +1764,8 @@ export default {
                     var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
                     this.sdata = list;
                     this.soption = [
-                        {value: 1 , label : this.$t('lable.department') , children : this.changeArr(list1), type: 'dep'},
-                        {value: 2 , label : this.$t('designatedpersonnel'),children : this.susers, type: 'user'}
+                        {value: 1, label : this.$t('lable.department') , children : this.changeArr(list1), type: 'dep', id: 0},
+                        {value: 2 , label : this.$t('designatedpersonnel'),children : this.susers, type: 'user', id: 0}
                     ]
                 } else {
                     this.$message({
@@ -1861,37 +1861,44 @@ export default {
             this.curDeptId = null;
             this.curUserId = null;
             this.dialogVisible = true;
+            this.selectedAuuid = ''
         },
         submitInsert() {
-            this.http.post('/audit-workflow-setting/add',{json:JSON.stringify(this.dataArray), deptId: this.depData.id,type: 2},
-            res => {
-                this.listLoading = false;
-                if (res.code == "ok") {
-                    this.$message({
-                        message: this.$t('savesuccess'),
-                        type: "success"
-                    });
-                } else {
+            if(this.dataArray.length > 0) {
+                this.http.post('/audit-workflow-setting/add',{json:JSON.stringify(this.dataArray), deptId: this.depData.id,type: 2},
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: this.$t('savesuccess'),
+                            type: "success"
+                        });
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
                     this.$message({
-                        message: res.msg,
+                        message: error,
                         type: "error"
                     });
-                }
-            },
-            error => {
-                this.listLoading = false;
+                });
+            } else {
                 this.$message({
-                    message: error,
+                    message: '至少选择一个部门或者人员做为审核人',
                     type: "error"
                 });
-            });
+            }
         },
         deleteNode() {
             this.dialogVisible = false;
             this.dataArray.splice(this.sindex, 1);
         },
         addNode() {
-            this.dialogVisible = false;
             if (this.curDeptId == null) return;
 
             // var node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
@@ -1902,7 +1909,35 @@ export default {
             } else {
               node = this.addNodeObj
             }
-
+            let flgUserRadio = true
+              if(this.user.userNameNeedTranslate == 1) {
+                for(let s in this.dataArray) {
+                  if(node.type == 'dep') {
+                    if(this.dataArray[s].auditDeptName == node.label) {
+                      flgUserRadio = false
+                    }
+                  } else {
+                    if(this.dataArray[s].userName == node.label) {
+                      flgUserRadio = false
+                    }
+                  }
+                }
+              }
+              if(!flgUserRadio) {
+                if(node.type == 'dep') {
+                  this.$message({
+                      message: '已存在重复部门',
+                      type: "error"
+                  });
+                } else {
+                  this.$message({
+                      message: '已存在重复人员',
+                      type: "error"
+                  });
+                }
+                return false
+              }
+              this.dialogVisible = false;
             // var node = this.$refs.deptCascader.getCheckedNodes()[0];
             if (this.isAdd) {
                 // if(node.path[0] == 1){
@@ -1918,7 +1953,7 @@ export default {
                     nodes = {userId: node.value, userName: node.label, auditorType: 2};
                   }
                 } else {
-                  if(node.managerId) {
+                  if(node.type == 'dep') {
                     nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
                   } else {
                     nodes = {userId: node.value, userName: node.label, auditorType: 2};

+ 68 - 63
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -330,7 +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>
+              <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :widthStr="'240'" :subject="users" :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>
@@ -430,6 +430,7 @@
                     <icon class="iconfont firerock-iconInsertLine addNode" @click="showNodeDialog(0)"></icon>
                     <icon class="iconfont firerock-iconright"></icon>
                     <span v-for="(item, index) in dataArray" :key="item.seq" >
+
                         <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate == 1" @click="editNodeDialog(index, item)">
                           <!-- {{item.auditDeptName}} -->
                           <ww-open-data type='departmentName' :openid='item.auditDeptName'></ww-open-data>
@@ -438,6 +439,7 @@
                           <!-- {{item.userName}} -->
                             <ww-open-data type='userName' :openid='item.userName'></ww-open-data>
                         </el-button>
+
                         <el-button type="primary" v-if="item.auditorType == 1 && user.userNameNeedTranslate != 1" @click="editNodeDialog(index, item)">
                           {{item.auditDeptName}}
                         </el-button>
@@ -472,7 +474,7 @@
                   <el-cascader filterable ref="deptCascader"  v-model="curDeptId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 100%" @change="chooseDept"
                     :options="soption" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable v-show="user.userNameNeedTranslate != 1"></el-cascader>
 
-                  <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
+                    <vueCascader :size="'small'" :widthStr="'200'" :clearable="true" :userName="true" :fistRadio="true" :subjectId="this.selectedAuuid" :subject="soption" :radios="true" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
 
               </el-form-item>
               </el-form>
@@ -953,7 +955,6 @@ export default {
       this.getUsers() // 获取人员信息
       this.getDepartment();
       this.getAl();
-      this.getApproverList();
       this.getAuditWorkflow();
     }
   },
@@ -1207,35 +1208,6 @@ export default {
       this.getVacationList(1)
     },
 
-
-
-
-    getApproverList(){
-      this.http.post('/project/getMyParticiPMList',{
-      },res => {
-        if(res.code == 'ok'){
-          this.approverList = res.data
-          if(this.approverList.length == 0){
-            this.$message({
-              message: this.$t('configureanapprover'),
-              type: 'warning'
-            })
-          }
-          // console.log('list',res.data);
-        }else {
-          this.$message({
-            message: res.msg,
-            type: 'error'
-          })
-        }
-      },error => {
-        this.$message({
-          message: error,
-          type: 'error'
-        })
-      })
-    },
-
     changeAltime(e){
       if(e == 0 && this.AlchangeP.length == 0){
           this.$message(this.$t('selecttheitemsyouwanttobatchset'))
@@ -1380,8 +1352,8 @@ export default {
                         var list = res.data , list1 = JSON.parse(JSON.stringify(res.data));
                         this.sdata = list;
                         this.soption = [
-                          {value: 1 , label : this.$t('lable.department') , children : this.changeArr(list1), type: 'dep'},
-                          {value: 2 , label : this.$t('designatedpersonnel'),children : this.susers, type: 'user'}
+                          {value: 1 , label : this.$t('lable.department') , children : this.changeArr(list1), type: 'dep', id: 0},
+                          {value: 2 , label : this.$t('designatedpersonnel'),children : this.susers, type: 'user', id: 0}
                         ]
                         console.log(this.soption, '选人的数据')
                         this.Nsdata = list1
@@ -1424,6 +1396,7 @@ export default {
               this.curDeptId = null;
               this.curUserId = null;
               this.dialogVisible = true;
+              this.selectedAuuid = ''
             },
     editNodeDialog(index, item) {
                 //检查是否可编辑
@@ -1456,9 +1429,7 @@ export default {
                 
             },
     addNode() {
-      // console.log(this.curDeptId, 'zhilail')
-      // return
-              this.dialogVisible = false;
+              
               if (this.curDeptId == null) return;
               // if(this.user.userNameNeedTranslate != '1') {
               // var node = this.user.userNameNeedTranslate != '1' ? this.vueCasaderItem : this.$refs.deptCascader.getCheckedNodes()[0];
@@ -1472,7 +1443,35 @@ export default {
               }
               console.log(this.vueCasaderItem)
               console.log("node",node);
-              
+              let flgUserRadio = true
+              if(this.user.userNameNeedTranslate == 1) {
+                for(let s in this.dataArray) {
+                  if(node.type == 'dep') {
+                    if(this.dataArray[s].auditDeptName == node.label) {
+                      flgUserRadio = false
+                    }
+                  } else {
+                    if(this.dataArray[s].userName == node.label) {
+                      flgUserRadio = false
+                    }
+                  }
+                }
+              }
+              if(!flgUserRadio) {
+                if(node.type == 'dep') {
+                  this.$message({
+                      message: '已存在重复部门',
+                      type: "error"
+                  });
+                } else {
+                  this.$message({
+                      message: '已存在重复人员',
+                      type: "error"
+                  });
+                }
+                return false
+              }
+              this.dialogVisible = false;
               if (this.isAdd) {
                 if(this.user.userNameNeedTranslate != 1) {
                   var nodes
@@ -1482,7 +1481,7 @@ export default {
                     nodes = {userId: node.value, userName: node.label, auditorType: 2};
                   }
                 } else {
-                  if(node.managerId) {
+                  if(node.type == 'dep') {
                     nodes = {auditDeptId: node.value, auditDeptName: node.label, auditorType: 1};
                   } else {
                     nodes = {userId: node.value, userName: node.label, auditorType: 2};
@@ -1514,30 +1513,36 @@ export default {
                 this.dataArray.splice(this.sindex, 1);
             },
     submitInsert() {
-                this.http.post('/audit-workflow-setting/add',{json:JSON.stringify(this.dataArray), deptId: this.depData.id, type:1},
-                            res => {
-                                this.listLoading = false;
-                                if (res.code == "ok") {
-                                    this.$message({
-                                        message: this.$t('savesuccess'),
-                                        type: "success"
-                                    });
-                                } else {
-                                    this.$message({
-                                        message: res.msg,
-                                        type: "error"
-                                    });
-                                }
-                            },
-                            error => {
-                                this.listLoading = false;
-                                this.$message({
-                                    message: error,
-                                    type: "error"
-                                });
-                                }
-                            );
-            },
+      if(this.dataArray.length > 0) {
+        this.http.post('/audit-workflow-setting/add',{json:JSON.stringify(this.dataArray), deptId: this.depData.id, type:1},
+          res => {
+              this.listLoading = false;
+              if (res.code == "ok") {
+                  this.$message({
+                      message: this.$t('savesuccess'),
+                      type: "success"
+                  });
+              } else {
+                  this.$message({
+                      message: res.msg,
+                      type: "error"
+                  });
+              }
+          },
+          error => {
+              this.listLoading = false;
+              this.$message({
+                  message: error,
+                  type: "error"
+              });
+          });
+      } else {
+        this.$message({
+            message: '至少选择一个部门或者人员做为审核人',
+            type: "error"
+        });
+      }
+    },
     
     // 
     approve(item) {

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/profession/list.vue

@@ -226,7 +226,8 @@
 
             // 删除
             deletePro(i, item) {
-                this.$confirm("确定要专业" + item.customerName + "吗?","删除专业", {
+                console.log(item, '要删除的')
+                this.$confirm("确定要专业" + item.name + "吗?","删除专业", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
                     type: "warning"

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -146,11 +146,13 @@
                 </el-form-item>
                 
                 <el-form-item :label="$t('screening.selectPeople')" v-if="radio == $t('other.project') || radio == $t('projectclassification')">
-                    <el-select v-model="exportParam.userId"  :placeholder="$t('lable.allStaff')" style="width: 350px" filterable="true" clearable="true">
+                    <el-select v-if="user.userNameNeedTranslate != '1'" v-model="exportParam.userId"  :placeholder="$t('lable.allStaff')" style="width: 350px" filterable="true" clearable="true">
                         <span v-for="(item, index) in users" :key="index">
                         <el-option :label="item.name" :value="item.id"></el-option>
                         </span> 
                     </el-select>
+
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :distinction="'4'" :widthStr="'350'" :subject="users" :clearable="true" @selectCal="selectCal"></selectCat>
                 </el-form-item>
                 <el-form-item prop="type" :label="$t('choosethestyle')" v-if="radio == $t('other.project') || radio == $t('projectclassification')">
                     <el-select v-model="exportParam.type" :placeholder="$t('choosethestyle')" style="width:350px;" >
@@ -1297,6 +1299,8 @@
                 } else if(obj.distinction == 2) {
                     this.personnelValue = obj.name
                     this.personnel()
+                } else if(obj.distinction == 4) {
+                    this.exportParam.userId =  obj.id
                 }
             },
             vueCasader(obj) {

+ 9 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -652,7 +652,10 @@
                                                 {{$t('dai-fen-pei')}}
                                             </span>
                                             <span v-else>
-                                                <ww-open-data type='userName' :openid='scope.row.executorName'></ww-open-data>
+                                                <span v-for="item,index in scope.row.executorName" :key="index">
+                                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                                    <span v-if="index < scope.row.executorName.length - 1">,</span>
+                                                </span>
                                             </span>
                                         </span>
                                     </template>
@@ -2754,6 +2757,11 @@
                 this.http.post('/task/getTask',{id: id},
                 res => {
                     if (res.code == "ok") {
+                        if(this.user.userNameNeedTranslate == 1) {
+                            for(var i in res.data.subTaskList) {
+                                res.data.subTaskList[i].executorName = res.data.subTaskList[i].executorName.split(',')
+                            }
+                        }
                         this.addForm = res.data;
                         this.addForm.createDate = null;
                         this.addForm.indate = null;

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

@@ -725,7 +725,7 @@
               <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">
+        <el-dialog :title="$t('synchronizetheenterprisemicrodirectory')" :visible.sync="newSyncWithCorpWxDayload" width="400px" :before-close="handleClose">
         <span>
           同步前请联系企业微信管理员检查应用授权的可见范围 <br/>
           路径:管理企业-应用管理-工时管家-可见范围
@@ -1222,6 +1222,7 @@ export default {
           spinner: 'el-icon-loading',
           background: 'rgba(0, 0, 0, 0.7)'
         });
+        this.newSyncWithCorpWxDayload = false
       this.http.post(
         "/wxcorp/getCorpMembsFromPlatform",
         {

+ 31 - 18
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -491,26 +491,38 @@
                         <!-- 111111 -->
                         <el-form-item :label="$t('other.reviewer')" v-if="user.timeType.reportAuditType == 3">
                             <el-select v-model="domain.auditorFirst" :placeholder="$t('di-yi-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
-                                <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                                <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
+                                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                    <span v-else>{{item.name}}</span>
+                                </el-option>
                             </el-select>
 
                             <template v-if="user.timeType.auditLevel > 1">
                                 <i class="el-icon-right"></i>
                                 <el-select v-model="domain.auditorSec" :placeholder="$t('di-er-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
-                                    <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                                    <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
+                                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                        <span v-else>{{item.name}}</span>
+                                    </el-option>
                                 </el-select>
                             </template>
 
                             <template v-if="user.timeType.auditLevel > 2">
                                 <i class="el-icon-right"></i>
                                 <el-select v-model="domain.auditorThird" :placeholder="$t('di-san-shen-he-ren')" :disabled="!domain.canEdit" style="width:200px;">
-                                    <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                                    <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
+                                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                        <span v-else>{{item.name}}</span>
+                                    </el-option>
                                 </el-select>
                             </template>
                         </el-form-item>
                         <el-form-item :label="$t('chao-song-ren')" v-if="user.timeType.reportAuditType == 3">
                             <el-select v-model="domain.ccUserid" clearable :disabled="!domain.canEdit" style="width:200px;">
-                                <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
+                                <el-option v-for="item in allUsersList" :key="item.id" :label="item.name" :value="item.id">
+                                    <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                    <span v-else>{{item.name}}</span>
+                                </el-option>
                             </el-select>
                         </el-form-item>
 
@@ -6281,6 +6293,21 @@
                         type: 'error'
                     })
                 })
+            },
+            // 自定义事件
+            selectCal(obj) {
+                console.log(obj, '传数据来源')
+                if(obj.distinction == '1') {
+                    this.zhoBao.projectAuditorId = obj.id
+                } else if(obj.distinction == '2') {
+                    this.zhoBao.auditorFirst = obj.id
+                } else if(obj.distinction == '3') {
+                    this.zhoBao.auditorSec = obj.id
+                } else if(obj.distinction == '4') {
+                    this.zhoBao.auditorThird = obj.id
+                } else if(obj.distinction == '5') {
+                    this.zhoBao.ccUserid = obj.id
+                }
             }
         },
         created() {
@@ -6327,20 +6354,6 @@
                 },
             },
             ]);
-        },
-        // 自定义事件
-        selectCal(obj) {
-            if(obj.distinction == '1') {
-                this.zhoBao.projectAuditorId = obj.id
-            } else if(obj.distinction == '2') {
-                this.zhoBao.auditorFirst = obj.id
-            } else if(obj.distinction == '3') {
-                this.zhoBao.auditorSec = obj.id
-            } else if(obj.distinction == '4') {
-                this.zhoBao.auditorThird = obj.id
-            } else if(obj.distinction == '5') {
-                this.zhoBao.ccUserid = obj.id
-            }
         }
     };
 </script>

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -263,7 +263,9 @@
                 var href = window.location.href;
                 if (href.indexOf('path') > 0) {
                     var path = href.split('path=')[1].split('&')[0];
-                    this.$router.push(path);
+                    if (path == 'expense' || path == 'task') {
+                        this.$router.push(path);
+                    }
                 }
             },
             bindIfNessary() {