Pārlūkot izejas kodu

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

ggooalice 2 gadi atpakaļ
vecāks
revīzija
22c878db14
35 mainītis faili ar 566 papildinājumiem un 184 dzēšanām
  1. 98 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java
  2. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ContractDocumentController.java
  3. 7 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceController.java
  4. 8 8
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java
  5. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java
  6. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  7. 5 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ProjectMapper.java
  8. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ContractDocumentService.java
  9. 4 4
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java
  10. 53 51
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractDocumentServiceImpl.java
  11. 11 6
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java
  12. 3 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractTypeServiceImpl.java
  13. 64 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExpenseSheetServiceImpl.java
  14. 25 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java
  15. 31 12
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  16. 3 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  17. 10 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java
  18. 8 6
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java
  19. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml
  20. 25 10
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml
  21. 1 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportMapper.xml
  22. BIN
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/upload/员工工时导入模板.xlsx
  23. BIN
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/upload/费用报销导入模板.xlsx
  24. 2 2
      fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/controller/CompanyController.java
  25. 1 1
      fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/service/CompanyService.java
  26. 9 3
      fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/service/impl/CompanyServiceImpl.java
  27. BIN
      fhKeeper/formulahousekeeper/timesheet/src/assets/image/qiyeweix.png
  28. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/assets/js/wwLogin.js
  29. 5 4
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  30. 7 2
      fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue
  31. 147 45
      fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue
  32. 21 3
      fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue
  33. 4 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/summary.vue
  34. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/team/index.vue
  35. 3 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/msg/index.vue

+ 98 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -141,9 +141,105 @@ public class AuthRedirectController {
             }
         }
         if (isMobile) {
-            redirecUrl = "http://mobworktime.ttkuaiban.com/#/" + router;
+            redirecUrl = "https://mobworktime.ttkuaiban.com/#/" + router;
         } else {
-            redirecUrl = "http://worktime.ttkuaiban.com/#/" + router;
+            redirecUrl = "https://worktime.ttkuaiban.com/#/" + router;
+        }
+        ModelAndView modelAndView = new ModelAndView(
+                new RedirectView(redirecUrl), reqParam);
+
+        return modelAndView;
+    }
+
+    @RequestMapping("/corpWXScanningAuth")
+    public ModelAndView scanningAuth(String auth_code, String state)throws Exception {
+        Map<String,Object> reqParam = new HashMap<String,Object>(16);
+        String userAgent = request.getHeader("User-Agent");
+        //获取设备类型
+        String deviceType = UserAgentUtils.getDeviceType(userAgent);
+        boolean isMobile = "MOBILE".equals(deviceType);
+        String url = WeiXinCorpController.GET_CORP_SCANNING_CODE_LOGININFO_URL.replace("PROVIDER_ACCESS_TOKEN",wxCorpInfoService.getProviderAccessToken());
+        HttpHeaders headers = new HttpHeaders();
+        RestTemplate restTemplate = new RestTemplate();
+        MediaType type = MediaType.parseMediaType("application/json; charset=UTF-8");
+        headers.setContentType(type);
+        headers.add("Accept", MediaType.APPLICATION_JSON.toString());
+        JSONObject ob = new JSONObject();
+        ob.put("auth_code", auth_code);
+        HttpEntity<JSONObject> Entity = new HttpEntity<>(ob, headers);
+        ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, Entity, String.class);
+        String redirecUrl = null;
+        if (responseEntity.getStatusCode() == HttpStatus.OK) {
+            String resp = responseEntity.getBody();
+            System.err.println(resp);
+            JSONObject obj = JSONObject.parseObject(resp);
+            if (obj.getIntValue("errcode") == 0) {
+                JSONObject userInfo = obj.getJSONObject("user_info");
+                System.out.println(obj.toString());
+                String wxUserId = userInfo.getString("userid");
+                String openUserId = userInfo.getString("open_userid");
+                JSONObject corpInfo = obj.getJSONObject("corp_info");
+                String corpId = corpInfo.getString("corpid");
+                System.out.println("登录 wxUserId="+wxUserId+", openUserId="+openUserId);
+                List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("corpwx_userid", openUserId));
+                Integer companyId = 0;
+                if (userList.size() > 0) {
+                    //该用户已存在
+                    User curUser = userList.get(0);
+                    System.out.println("找到用户corpwxUserid=="+curUser.getCorpwxUserid());
+                    companyId = curUser.getCompanyId();
+                    if (curUser.getIsActive() == 1) {
+                        reqParam.put("userId", curUser.getId());
+                    } else {
+                        //提示账号已停用
+                        //reqParam.put("errorMsg", "您的账号已停用,无法登录");
+                        reqParam.put("errorMsg", MessageUtils.message("user.inactive"));
+                    }
+                } else {
+                    //使用UserId比对,之前有的老用户存的是UserId
+                    WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
+                    if (wxCorpInfo == null) {
+                        reqParam.put("errorMsg", MessageUtils.message("user.accountNoExist"));
+                    } else {
+                        User curUser = userMapper.selectOne(new QueryWrapper<User>().eq("company_id", wxCorpInfo.getCompanyId()).eq("corpwx_userid", wxUserId));
+                        if (curUser == null) {
+//                    reqParam.put("errorMsg", MessageUtils.message("user.accountNoExist"));
+                            //用户不存在,去生成该用户
+                            if (wxCorpInfo.getSaasSyncContact() == 1) {
+                                curUser = wxCorpInfoService.generateUserInfo(wxCorpInfo.getCompanyId(), openUserId);
+                            }
+                        }
+                        if (curUser != null) {
+                            if (curUser.getIsActive() == 1) {
+                                companyId = curUser.getCompanyId();
+                                reqParam.put("userId", curUser.getId());
+                            } else {
+                                //提示账号已停用
+                                //reqParam.put("errorMsg", "您的账号已停用,无法登录");
+                                reqParam.put("errorMsg", MessageUtils.message("user.inactive"));
+                            }
+                        } else {
+                            System.err.println("==生成企业微信User失败==");
+                            reqParam.put("errorMsg", MessageUtils.message("user.accountNoExist"));
+                        }
+
+                    }
+                }
+                if (!StringUtils.isEmpty(state) && state.length() > 1) {
+                    reqParam.put("path", state);
+                }
+                String router = "login";
+                if (companyId > 0) {
+                    HashMap compExpireInfo = getCompExpireInfo(companyId);
+                    if (compExpireInfo != null) {
+                        //过期了
+                        router = "expire";
+                        reqParam.put("expDate", compExpireInfo.get("expDate"));
+                        reqParam.put("version", compExpireInfo.get("version"));
+                    }
+                }
+                redirecUrl = "https://worktime.ttkuaiban.com/#/" + router;
+            }
         }
         ModelAndView modelAndView = new ModelAndView(
                 new RedirectView(redirecUrl), reqParam);

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

@@ -14,6 +14,7 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.List;
 
 /**
  * <p>
@@ -38,7 +39,7 @@ public class ContractDocumentController {
      * @return
      */
     @RequestMapping("/fileUpload")
-    public HttpRespMsg fileUpload (HttpServletRequest request, @RequestParam Integer ContractId, @RequestParam(required=false) Integer folderId, @RequestParam("file") MultipartFile files){
+    public HttpRespMsg fileUpload (HttpServletRequest request, @RequestParam Integer ContractId, @RequestParam(required=false) Integer folderId, @RequestParam("file") MultipartFile[] files){
         return contractDocumentService.fileUpload(request,ContractId,folderId,files);
     }
 

+ 7 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceController.java

@@ -97,12 +97,19 @@ public class FinanceController {
         }
     }
 
+    //导出分摊数据
     @RequestMapping("/exportData")
     public HttpRespMsg exportData(@RequestParam(required = false, defaultValue = "0") Integer groupByCategory,
                                   @RequestParam String date, Boolean assignNoProUser,HttpServletRequest request) {
         return financeService.exportData(groupByCategory, date, assignNoProUser, request);
     }
 
+    /**
+     * 导出薪资数据
+     * @param date
+     * @param request
+     * @return
+     */
     @RequestMapping("/exportFinance")
     public HttpRespMsg exportFinance(@RequestParam String date, HttpServletRequest request) {
         return financeService.exportFinance(date, request);

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

@@ -219,8 +219,8 @@ public class ProjectController {
      * 获取查询者所在公司每个项目的工时成本
      */
     @RequestMapping("/getTimeCost")
-    public HttpRespMsg getTimeCost(String startDate, String endDate, String userId) {
-        return projectService.getTimeCost(startDate, endDate, userId, request);
+    public HttpRespMsg getTimeCost(String startDate, String endDate, String userIds) {
+        return projectService.getTimeCost(startDate, endDate, userIds, request);
     }
 
     /**
@@ -235,24 +235,24 @@ public class ProjectController {
      * 获取查询者所在公司每个项目分类的工时成本
      */
     @RequestMapping("/getTimeCostByCategory")
-    public HttpRespMsg getTimeCostByCategory(String startDate, String endDate, String userId) {
-        return projectService.getTimeCostByCategory(startDate, endDate, userId, request);
+    public HttpRespMsg getTimeCostByCategory(String startDate, String endDate, String userIds) {
+        return projectService.getTimeCostByCategory(startDate, endDate, userIds, request);
     }
 
     /**
      * 导出查询者所在公司每个项目的工时成本
      */
     @RequestMapping("/exportTimeCost")
-    public HttpRespMsg exportTimeCost(String exportContent,String startDate, String endDate, Integer projectId, String userId, Boolean projectSum,Integer type,Integer deptId,@RequestParam(defaultValue = "1") Integer stateKey) {
-        return projectService.exportTimeCost(exportContent,startDate, endDate, projectId, userId, projectSum,type,deptId,stateKey, request);
+    public HttpRespMsg exportTimeCost(String exportContent,String startDate, String endDate, Integer projectId, String userIds, Boolean projectSum,Integer type,Integer deptId,@RequestParam(defaultValue = "1") Integer stateKey) {
+        return projectService.exportTimeCost(exportContent,startDate, endDate, projectId, userIds, projectSum,type,deptId,stateKey, request);
     }
 
     /**
      * 导出查询者所在公司每个项目分类的工时成本
      */
     @RequestMapping("/exportTimeCostByCategory")
-    public HttpRespMsg exportTimeCostByCategory(String exportContent,String startDate, String endDate, Integer projectCategoryId, String userId, Boolean projectSum,Integer type) {
-        return projectService.exportTimeCostByCategory(exportContent,startDate, endDate, projectCategoryId, userId, projectSum,type, request);
+    public HttpRespMsg exportTimeCostByCategory(String exportContent,String startDate, String endDate, Integer projectCategoryId, String userIds, Boolean projectSum,Integer type) {
+        return projectService.exportTimeCostByCategory(exportContent,startDate, endDate, projectCategoryId, userIds, projectSum,type, request);
     }
 
     /**

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

@@ -124,12 +124,12 @@ public class TaskController {
             String colors = executorList.stream().filter(f->!StringUtils.isEmpty(f.getExecutorId())).map(TaskExecutor::getExecutorColor).collect(Collectors.joining(","));
             task.setExecutorColor(StringUtils.isEmpty(colors)?null:colors);
             //总时长
-            task.setPlanHours(executorList.stream().mapToInt(TaskExecutor::getPlanHours).sum());
+            task.setPlanHours(executorList.stream().filter(f->f.getPlanHours() != null).mapToInt(TaskExecutor::getPlanHours).sum());
             //检查执行人是否在当前分组的参与人当中
             List<GroupParticipator> groupParticipatorList = groupParticipatorMapper.selectList(new QueryWrapper<GroupParticipator>().eq("group_id", task.getGroupId()));
             List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", task.getProjectId()));
             for (TaskExecutor executor : executorList) {
-                if(executor.getExecutorId()!=null){
+                if(!StringUtils.isEmpty(executor.getExecutorId())){
                     boolean b = groupParticipatorList.stream().anyMatch(gp -> gp.getUserId() != null && gp.getUserId().equals(executor.getExecutorId()));
                     if(!b){
                         GroupParticipator g=new GroupParticipator();

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -82,6 +82,8 @@ public class WeiXinCorpController {
     public static final String GET_LIST_MEMB_AUTH = "https://qyapi.weixin.qq.com/cgi-bin/user/list_member_auth?access_token=ACCESS_TOKEN";
     //网页获取企业内部用户信息
     public static final String GET_CORP_INSIDE_USERINFO_URL = "https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo?access_token=ACCESS_TOKEN&code=CODE";
+    //扫码获取企业用户信息
+    public static final String GET_CORP_SCANNING_CODE_LOGININFO_URL = "https://qyapi.weixin.qq.com/cgi-bin/service/get_login_info?access_token=PROVIDER_ACCESS_TOKEN";
     //获取员工打卡日报统计信息
     public static final String GET_CHECKIN_DAYDATA = "https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckin_daydata?access_token=ACCESS_TOKEN";
 

+ 5 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/mapper/ProjectMapper.java

@@ -26,13 +26,13 @@ public interface ProjectMapper extends BaseMapper<Project> {
     List<Map<String, Object>> getOnlyJoinProjects(@Param("userId") String userId, @Param("companyId") Integer companyId);
 
     List<Map<String, Object>> getTimeCost(@Param("companyId") Integer companyId, @Param("startDate") String startDate, @Param("endDate") String endDate,
-                                          @Param("projectId") Integer projectId, @Param("userId") String userId,
+                                          @Param("projectId") Integer projectId, @Param("userIdList") List<String> userIdList,
                                           @Param("deptIds")List<Integer> deptIds,@Param("filterDeptIds")List<Integer> filterDeptIds, @Param("deptRelatedProjectIds") List<Integer> deptRelatedProjectIds);
 
     List<Map<String, Object>> getCustomDataSum(@Param("companyId") Integer companyId, @Param("startDate") String startDate, @Param("endDate") String endDate,
                                           @Param("projectId") Integer projectId, @Param("userId") String userId);
 
-    List<Map<String, Object>> getProjectCost(@Param("companyId")Integer companyId,@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("projectId") Integer projectId,@Param("stateKey")Integer stateKey, @Param("userId") String userId,@Param("deptIds")List<Integer> deptIds,@Param("filterDeptIds")List<Integer> filterDeptIds);
+    List<Map<String, Object>> getProjectCost(@Param("companyId")Integer companyId,@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("projectId") Integer projectId,@Param("stateKey")Integer stateKey, @Param("userIdList") List<String> userIdList,@Param("deptIds")List<Integer> deptIds,@Param("filterDeptIds")List<Integer> filterDeptIds);
 
     List<Map<String, Object>> getProjectCusDataSumItem(@Param("companyId") Integer companyId, @Param("startDate") String startDate,
                                                        @Param("endDate") String endDate, @Param("projectId") Integer projectId,
@@ -92,11 +92,11 @@ public interface ProjectMapper extends BaseMapper<Project> {
 
     List getBaseCostAndRealCost(Integer companyId, Integer pageStart, Integer pageSize, Integer projectId);
 
-    List<Map<String, Object>> getProjectCostGroupByProject(Integer companyId, String startDate, String endDate, Integer projectId,String userId,List<Integer> deptIds);
+    List<Map<String, Object>> getProjectCostGroupByProject(Integer companyId, String startDate, String endDate, Integer projectId,List<String> userIdList,List<Integer> deptIds);
 
-    List<Map<String, Object>> getTimeCostByCategory(Integer companyId, String startDate, String endDate, Integer projectCategoryId, String userId,List<Integer> deptIds);
+    List<Map<String, Object>> getTimeCostByCategory(Integer companyId, String startDate, String endDate, Integer projectCategoryId,List<String> userIdList,List<Integer> deptIds);
 
-    List<Map<String, Object>> getProjectCostGroupByCategory(Integer companyId, String startDate, String endDate, Integer projectCategoryId,String userId,List<Integer> deptIds);
+    List<Map<String, Object>> getProjectCostGroupByCategory(Integer companyId, String startDate, String endDate, Integer projectCategoryId,List<String> userIdList,List<Integer> deptIds);
 
     List<Map<String, Object>> getProjectCostByCategory(Integer companyId, String startDate, String endDate, Integer curProjectCategoryId, String userId);
 

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

@@ -19,7 +19,7 @@ import javax.servlet.http.HttpServletResponse;
  * @since 2022-12-09
  */
 public interface ContractDocumentService extends IService<ContractDocument> {
-    HttpRespMsg fileUpload(HttpServletRequest request, @RequestParam Integer ContractId, @RequestParam(required=false) Integer folderId, @RequestParam("file") MultipartFile files);
+    HttpRespMsg fileUpload(HttpServletRequest request, @RequestParam Integer ContractId, @RequestParam(required=false) Integer folderId, @RequestParam("file") MultipartFile[] files);
 
     HttpRespMsg fileDown(HttpServletRequest request, HttpServletResponse response, Integer folderId, Integer contractId,Integer fileId);
 

+ 4 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java

@@ -51,7 +51,7 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg deleteProject(Integer id, Integer force);
 
-    HttpRespMsg getTimeCost(String startDate, String endDate, String userId, HttpServletRequest request);
+    HttpRespMsg getTimeCost(String startDate, String endDate, String userIds, HttpServletRequest request);
 
     HttpRespMsg getProjectCost(String startDate, String endDate, Integer projectId,Integer stateKey, HttpServletRequest request);
 
@@ -59,7 +59,7 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg getAllMembCost(String startDate, String endDate, Integer projectId, HttpServletRequest request);
 
-    HttpRespMsg exportTimeCost(String exportContent,String startDate, String endDate, Integer projectId,String userId, Boolean projectSum,Integer type,Integer deptId,Integer stateKey,HttpServletRequest request);
+    HttpRespMsg exportTimeCost(String exportContent,String startDate, String endDate, Integer projectId,String userIds, Boolean projectSum,Integer type,Integer deptId,Integer stateKey,HttpServletRequest request);
 
     HttpRespMsg updateProgress(Integer id, Integer progress, HttpServletRequest request);
 
@@ -142,9 +142,9 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg getProjectByCustomer(Integer customerId, HttpServletRequest request);
 
-    HttpRespMsg getTimeCostByCategory(String startDate, String endDate, String userId, HttpServletRequest request);
+    HttpRespMsg getTimeCostByCategory(String startDate, String endDate, String userIds, HttpServletRequest request);
 
-    HttpRespMsg exportTimeCostByCategory(String exportContent,String startDate, String endDate, Integer projectCategoryId, String userId, Boolean projectSum, Integer type, HttpServletRequest request);
+    HttpRespMsg exportTimeCostByCategory(String exportContent,String startDate, String endDate, Integer projectCategoryId, String userIds, Boolean projectSum, Integer type, HttpServletRequest request);
 
     HttpRespMsg getUserWorkingTimeList(String userId, Integer projectId, String startDate, String endDate, Integer pageIndex, Integer pageSize,HttpServletRequest request,Integer departmentId);
 

+ 53 - 51
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractDocumentServiceImpl.java

@@ -56,66 +56,68 @@ public class ContractDocumentServiceImpl extends ServiceImpl<ContractDocumentMap
      * @param request
      * @param ContractId
      * @param folderId
-     * @param file
+     * @param files
      * @return
      */
     @Override
-    public HttpRespMsg fileUpload(HttpServletRequest request, @RequestParam Integer ContractId, @RequestParam(required=false) Integer folderId, @RequestParam("file") MultipartFile file) {
+    public HttpRespMsg fileUpload(HttpServletRequest request, @RequestParam Integer ContractId, @RequestParam(required=false) Integer folderId, @RequestParam("file") MultipartFile[] files) {
         HttpRespMsg msg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
         if(functionContractList.size() <= 0){
             msg.setError(MessageUtils.message("access.operationError"));
             return msg;
         }
-        ContractDocument record = new ContractDocument();
-        record.setCreatorId(user.getId());
-        record.setCreatorName(user.getName());
-        record.setDocumentName(file.getOriginalFilename());
-        record.setFolderId(folderId);
-        record.setContractId(ContractId);
-        if (file != null && !file.isEmpty()) {
-            //截取文件后缀
-            String fileSuffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
-            record.setDocumentType(DocumentTypeUtil.DocumentType(fileSuffix));
-            //处理文件
-            File dir = new File(path);
-            if (!dir.exists()) {
-                dir.mkdir();
-            }
-            String fileName= "";
-            if (file!=null && !file.isEmpty()) {
-                fileName = file.getOriginalFilename();
+        for (MultipartFile file : files) {
+            ContractDocument record = new ContractDocument();
+            record.setCreatorId(user.getId());
+            record.setCreatorName(user.getName());
+            record.setDocumentName(file.getOriginalFilename());
+            record.setFolderId(folderId);
+            record.setContractId(ContractId);
+            if (file != null && !file.isEmpty()) {
+                //截取文件后缀
+                String fileSuffix = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
+                record.setDocumentType(DocumentTypeUtil.DocumentType(fileSuffix));
+                //处理文件
+                File dir = new File(path);
+                if (!dir.exists()) {
+                    dir.mkdir();
+                }
+                String fileName= "";
+                if (file!=null && !file.isEmpty()) {
+                    fileName = file.getOriginalFilename();
 
-                int pos = fileName.lastIndexOf(".");
-                String suffix = fileName.substring(pos).toLowerCase();
-                //用uuid替换原始的文件名
-                String purFName = UUID.randomUUID().toString().replaceAll("-", "");
-                fileName = purFName + suffix;
-                File saveFile = new File(dir, fileName);
-                try {
-                    saveFile.createNewFile();
-                    file.transferTo(saveFile);
-                    //计算文件大小
-                    long fileSize = saveFile.length();
-                    String fileLength = FileUtil.getReadableFileSize(fileSize);
-                    record.setServerName(path + fileName);
-                    record.setSize(fileLength);
-                    String pathPrefix = "/upload/";
-                    record.setUrl(pathPrefix + fileName);
-                    contractDocumentMapper.insert(record);
-                    msg.data = record;
-                } catch (IOException e) {
-                    e.printStackTrace();
-                    fileName = null;
-                    msg.setError(e.getMessage()+", path="+dir.getAbsolutePath());
-                } catch (Exception e) {
-                    e.printStackTrace();
-                    fileName = null;
-                    msg.setError(e.getMessage()+", path="+dir.getAbsolutePath());
+                    int pos = fileName.lastIndexOf(".");
+                    String suffix = fileName.substring(pos).toLowerCase();
+                    //用uuid替换原始的文件名
+                    String purFName = UUID.randomUUID().toString().replaceAll("-", "");
+                    fileName = purFName + suffix;
+                    File saveFile = new File(dir, fileName);
+                    try {
+                        saveFile.createNewFile();
+                        file.transferTo(saveFile);
+                        //计算文件大小
+                        long fileSize = saveFile.length();
+                        String fileLength = FileUtil.getReadableFileSize(fileSize);
+                        record.setServerName(path + fileName);
+                        record.setSize(fileLength);
+                        String pathPrefix = "/upload/";
+                        record.setUrl(pathPrefix + fileName);
+                        contractDocumentMapper.insert(record);
+                        msg.data = record;
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                        fileName = null;
+                        msg.setError(e.getMessage()+", path="+dir.getAbsolutePath());
+                    } catch (Exception e) {
+                        e.printStackTrace();
+                        fileName = null;
+                        msg.setError(e.getMessage()+", path="+dir.getAbsolutePath());
+                    }
+                } else {
+                    msg.setError(MessageUtils.message("file.nonExistentError"));
                 }
-            } else {
-                msg.setError(MessageUtils.message("file.nonExistentError"));
             }
         }
         return msg;
@@ -134,7 +136,7 @@ public class ContractDocumentServiceImpl extends ServiceImpl<ContractDocumentMap
     public HttpRespMsg fileDown(HttpServletRequest request, HttpServletResponse response, Integer folderId, Integer contractId,Integer fileId) {
         HttpRespMsg msg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
         if(functionContractList.size() <= 0){
             msg.setError(MessageUtils.message("access.viewError"));
             return msg;
@@ -203,7 +205,7 @@ public class ContractDocumentServiceImpl extends ServiceImpl<ContractDocumentMap
     public HttpRespMsg fileDelete(HttpServletRequest request, ContractFileDelVO contractFileDelVo) {
         HttpRespMsg msg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("Token"));
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
         if(functionContractList.size() <= 0){
             msg.setError(MessageUtils.message("access.deleteError"));
             return msg;

+ 11 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ContractServiceImpl.java

@@ -83,7 +83,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         try {
             String token = request.getHeader("token");
             User user = userMapper.selectById(token);
-            List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看合同");
+            List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
             if(functionContractList.size() <= 0){
                 httpRespMsg.setError(MessageUtils.message("access.viewError"));
                 return httpRespMsg;
@@ -183,6 +183,11 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     public HttpRespMsg ExportContract(HttpServletRequest request, String number, String name, String typeName, Integer status, String startDate, String endDate) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "导出合同");
+        if(functionContractList.size() <= 0){
+            httpRespMsg.setError(MessageUtils.message("access.operationError"));
+            return httpRespMsg;
+        }
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
         HttpRespMsg contractPage = getContractPage(request, null, null, number, name, typeName, status, startDate, endDate);
         HashMap<String, Object> resultDate = (HashMap<String, Object>) contractPage.data;
@@ -249,7 +254,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     public HttpRespMsg addContract(HttpServletRequest request, Contract contract) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "新增合同");
         if(functionContractList.size() <= 0){
             httpRespMsg.setError(MessageUtils.message("access.operationError"));
             return httpRespMsg;
@@ -296,7 +301,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
     public HttpRespMsg editContract(HttpServletRequest request, Contract contract) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
         if(functionContractList.size() <= 0){
             httpRespMsg.setError(MessageUtils.message("access.operationError"));
             return httpRespMsg;
@@ -341,7 +346,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "导入合同");
         if(functionContractList.size() <= 0){
             msg.setError(MessageUtils.message("access.operationError"));
             return msg;
@@ -561,7 +566,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
         if(functionContractList.size() <= 0){
             msg.setError(MessageUtils.message("access.viewError"));
             return msg;
@@ -593,7 +598,7 @@ public class ContractServiceImpl extends ServiceImpl<ContractMapper, Contract> i
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "管理全部合同");
         if(functionContractList.size() <= 0){
             msg.setError(MessageUtils.message("access.deleteError"));
             return msg;

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

@@ -54,7 +54,7 @@ public class ContractTypeServiceImpl extends ServiceImpl<ContractTypeMapper, Con
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String token = request.getHeader("token");
         User user = userMapper.selectById(token);
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "查看全部合同");
         if(functionContractList.size() <= 0){
             return httpRespMsg;
         }
@@ -74,7 +74,7 @@ public class ContractTypeServiceImpl extends ServiceImpl<ContractTypeMapper, Con
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String token = request.getHeader("token");
         User user = userMapper.selectById(token);
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "合同类型管理");
         if(functionContractList.size() <= 0){
             httpRespMsg.setError(MessageUtils.message("access.operationError"));
             return httpRespMsg;
@@ -116,7 +116,7 @@ public class ContractTypeServiceImpl extends ServiceImpl<ContractTypeMapper, Con
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         String token = request.getHeader("token");
         User user = userMapper.selectById(token);
-        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "编辑合同");
+        List<SysRichFunction> functionContractList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "合同类型管理");
         if(functionContractList.size() <= 0){
             httpRespMsg.setError(MessageUtils.message("access.deleteError"));
             return httpRespMsg;

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

@@ -54,9 +54,13 @@ import java.util.stream.Collectors;
 @Service
 @Transactional
 public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, ExpenseSheet> implements ExpenseSheetService {
+    @Resource
+    private HttpServletRequest request;
     @Resource
     private UserMapper userMapper;
     @Resource
+    private InformationMapper informationMapper;
+    @Resource
     private ExpenseSheetMapper expenseSheetMapper;
     @Resource
     private ExpenseItemService expenseItemService;
@@ -262,23 +266,83 @@ public class ExpenseSheetServiceImpl extends ServiceImpl<ExpenseSheetMapper, Exp
 
     @Override
     public HttpRespMsg approve(Integer id) {
+        String token = request.getHeader("TOKEN");
+        User user = userMapper.selectById(token);
         ExpenseSheet sheet = new ExpenseSheet();
         sheet.setId(id);
         sheet.setStatus(0);
         expenseSheetMapper.updateById(sheet);
+
+        sheet = expenseSheetMapper.selectById(id);
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        if (wxCorpInfo != null) {
+            sendAuditResult(wxCorpInfo, user, sheet, null);
+        }
+        saveNotifyToApplier(sheet, user);
+
         return new HttpRespMsg();
     }
 
     @Override
     public HttpRespMsg deny(Integer id,String denyReason) {
+        String token = request.getHeader("TOKEN");
+        User user = userMapper.selectById(token);
         ExpenseSheet sheet = new ExpenseSheet();
         sheet.setId(id);
         sheet.setStatus(2);
         sheet.setDenyReason(denyReason);
         expenseSheetMapper.updateById(sheet);
+
+        //给填报人发送消息
+        sheet = expenseSheetMapper.selectById(id);
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+        if (wxCorpInfo != null) {
+            sendAuditResult(wxCorpInfo, user, sheet, denyReason);
+        }
+        saveNotifyToApplier(sheet, user);
+
         return new HttpRespMsg();
     }
 
+
+    //发送审核结果消息提醒
+    private void sendAuditResult(WxCorpInfo wxCorpInfo, User auditor, ExpenseSheet sheet, String denyReason) {
+        //推送到企业微信
+        StringBuilder stringBuilder = new StringBuilder();
+        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("M月d日");
+        stringBuilder.append("$userName="+auditor.getCorpwxUserid()+"$")
+                .append(sheet.getStatus() == 0?"通过":"驳回")
+                .append("了您")
+                .append(dateTimeFormatter.format(sheet.getCreateDate()))
+                .append("的费用报销申请。");
+        if (sheet.getStatus() == 2) {
+            //驳回加原因
+            stringBuilder.append("原因: ").append(denyReason);
+        }
+
+        String ownerId = sheet.getOwnerId();
+        User owner = userMapper.selectById(ownerId);
+        wxCorpInfoService.sendWXCorpMsg(wxCorpInfo,owner.getCorpwxUserid(), stringBuilder.toString(), "expense",
+                sheet.getStatus() == 0?WxCorpInfoServiceImpl.TEXT_CARD_MSG_EXPENSE_AGREE:WxCorpInfoServiceImpl.TEXT_CARD_MSG_EXPENSE_DENY);
+
+    }
+
+
+    private void saveNotifyToApplier(ExpenseSheet sheet, User auditor) {
+        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("M月d日");
+        String ownerId = sheet.getOwnerId();
+        User owner = userMapper.selectById(ownerId);
+        //系统内消息
+        Information information=new Information();
+        information.setUserId(owner.getId());
+        information.setTime(LocalDateTime.now());
+        information.setMsg("您"+dateTimeFormatter.format(sheet.getCreateDate()) + "费用报销申请审核"+(sheet.getStatus() == 0?"已通过":"已驳回")+", 审核人:"
+                +(auditor.getCorpwxUserid() != null ? ("$userName="+auditor.getCorpwxUserid()+"$"):auditor.getName()));
+        information.setType(3);//费用报销模块
+        information.setContent(sheet.getId()+"");
+        informationMapper.insert(information);
+    }
+
     @Override
     public HttpRespMsg importData(HttpServletRequest request,MultipartFile[] files) {
         HttpRespMsg msg = new HttpRespMsg();

+ 25 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java

@@ -851,7 +851,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     List<String> rowData = new ArrayList<String>();
                     rowData.add(p.projectCode);
                     rowData.add(p.project);
-                    rowData.add("");
+                    rowData.add("项目合计");
                     userCustoms.forEach(userCustom -> {rowData.add("");});
                     rowData.add(p.workingTime+"");
                     rowData.add(p.salary.toPlainString());
@@ -879,8 +879,8 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                         if (membMap.get("project").equals(p.project)) {
                             //匹配到项目了
                             List<String> membRowData = new ArrayList<String>();
-                            membRowData.add("");
-                            membRowData.add("");
+                            membRowData.add(p.projectCode);
+                            membRowData.add(p.project);
                             Double workingTime = (Double) membMap.get("workingTime");
                             String creatorId = (String) membMap.get("creatorId");
                             User us = userList.stream().filter(u->u.getId().equals(creatorId)).findFirst().get();
@@ -956,8 +956,8 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     if (assignNoProUser != null && assignNoProUser) {
                         for (Finance npu : noProjectUser) {
                             List<String> membRowData = new ArrayList<String>();
-                            membRowData.add("");
-                            membRowData.add("");
+                            membRowData.add(p.projectCode);
+                            membRowData.add(p.project);
                             Double workingTime = new Double(0);
                             Finance userFinance = npu;
                             Optional<Map> op = noPUserDataList.stream().filter(map->((Integer)map.get("projectId")).equals(p.projectId) && ((String)map.get("creatorId")).equals(npu.getUserId())).findFirst();
@@ -986,6 +986,26 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                                     }else {
                                         membRowData.add(npu.getName());
                                     }
+                                    //自定义字段的显示
+                                    for (int i = 0; i < userCustoms.size(); i++) {
+                                        switch (i){
+                                            case 0:
+                                                membRowData.add(us.getPlate1()==null?"":us.getPlate1());
+                                                break;
+                                            case 1:
+                                                membRowData.add(us.getPlate2()==null?"":us.getPlate2());
+                                                break;
+                                            case 2:
+                                                membRowData.add(us.getPlate3()==null?"":us.getPlate3());
+                                                break;
+                                            case 3:
+                                                membRowData.add(us.getPlate4()==null?"":us.getPlate4());
+                                                break;
+                                            case 4:
+                                                membRowData.add(us.getPlate5()==null?"":us.getPlate5());
+                                                break;
+                                        }
+                                    }
                                     membRowData.add(workingTime+"");
                                     membRowData.add(salary.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());
                                     membRowData.add(bonus.setScale(2, BigDecimal.ROUND_HALF_UP).toPlainString());

+ 31 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1037,7 +1037,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
     //获取查询者所在公司每个项目的工时成本
     @Override
-    public HttpRespMsg getTimeCost(String startDate, String endDate, String userId, HttpServletRequest request) {
+    public HttpRespMsg getTimeCost(String startDate, String endDate, String userIds, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             //根据系统配置的员工成本计算方式,按固定时薪还是固定月薪,分情况计算。
@@ -1080,8 +1080,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
 
             }
-
-            List<Map<String, Object>> list = projectMapper.getTimeCost(companyId, startDate, endDate, null, userId,deptIds,null, deptRelatedProjectIds);
+            List<String> userIdList=new ArrayList<>();
+            if(userIds!=null&&userIds.length()>0){
+                String[] split = userIds.split(",");
+                userIdList = Arrays.asList(split);
+            }
+            List<Map<String, Object>> list = projectMapper.getTimeCost(companyId, startDate, endDate, null, userIdList,deptIds,null, deptRelatedProjectIds);
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
             for (Map<String, Object> map : list) {
                 if (!map.containsKey("cost")) {
@@ -1120,7 +1124,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
     //导出查询者所在公司每个项目的工时成本,包括项目人员明细统计
     @Override
-    public HttpRespMsg exportTimeCost(String exportContent,String startDate, String endDate,Integer projectId, String userId, Boolean projectSum,Integer type,Integer deptId, Integer stateKey,HttpServletRequest request) {
+    public HttpRespMsg exportTimeCost(String exportContent,String startDate, String endDate,Integer projectId, String userIds, Boolean projectSum,Integer type,Integer deptId, Integer stateKey,HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             User targetUser = userMapper.selectById(request.getHeader("Token"));
@@ -1178,7 +1182,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
             }
             System.out.println(filterDeptIds);
-            List<Map<String, Object>> list = projectMapper.getTimeCost(companyId, startDate, endDate, projectId, userId,deptIds,filterDeptIds,deptRelatedProjectIds);
+            List<String> userIdList=new ArrayList<>();
+            if(userIds!=null&&userIds.length()>0){
+                String[] split = userIds.split(",");
+                userIdList = Arrays.asList(split);
+            }
+            List<Map<String, Object>> list = projectMapper.getTimeCost(companyId, startDate, endDate, projectId, userIdList,deptIds,filterDeptIds,deptRelatedProjectIds);
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
             List<List<String>> allList=null ;
             List<String> sumRow = null;
@@ -1256,7 +1265,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     } else {
                         finalDeptIds = deptIds;
                     }
-                    List<Map<String, Object>> membList = projectMapper.getProjectCost(companyId,startDate, endDate, curProjectId,stateKey, userId,finalDeptIds,filterDeptIds);
+                    List<Map<String, Object>> membList = projectMapper.getProjectCost(companyId,startDate, endDate, curProjectId,stateKey, userIdList,finalDeptIds,filterDeptIds);
                     map.put("membList", membList);
                     for (Map<String, Object> membMap : membList) {
                         double pTotalTime = 0;
@@ -1366,7 +1375,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 allList=new ArrayList<>();
                 allList.add(headList);
                 //统计当前所有项目所有人的时间成本投入
-                List<Map<String, Object>> membList = projectMapper.getProjectCostGroupByProject(companyId,startDate, endDate, projectId,userId,deptIds);
+                List<Map<String, Object>> membList = projectMapper.getProjectCostGroupByProject(companyId,startDate, endDate, projectId,userIdList,deptIds);
                 for (User user : userList) {
                     BigDecimal moneyCost = BigDecimal.valueOf(0);
                     double costTime = 0;
@@ -5644,7 +5653,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     }
 
     @Override
-    public HttpRespMsg getTimeCostByCategory(String startDate, String endDate, String userId, HttpServletRequest request) {
+    public HttpRespMsg getTimeCostByCategory(String startDate, String endDate, String userIds, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             User targetUser = userMapper.selectById(request.getHeader("Token"));
@@ -5676,7 +5685,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
             }
             TimeType timeType = timeTypeMapper.selectById(companyId);
-            List<Map<String, Object>> list = projectMapper.getTimeCostByCategory(companyId, startDate, endDate, null, userId,deptIds);
+            List<String> userIdList=new ArrayList<>();
+            if(userIds!=null&&userIds.length()>0){
+                String[] split = userIds.split(",");
+                userIdList = Arrays.asList(split);
+            }
+            List<Map<String, Object>> list = projectMapper.getTimeCostByCategory(companyId, startDate, endDate, null,userIdList,deptIds);
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
             for (Map<String, Object> map : list) {
                 if (!map.containsKey("cost")) {
@@ -5712,7 +5726,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     }
 
     @Override
-    public HttpRespMsg exportTimeCostByCategory(String exportContent,String startDate, String endDate, Integer projectCategoryId, String userId, Boolean projectSum, Integer type, HttpServletRequest request) {
+    public HttpRespMsg exportTimeCostByCategory(String exportContent,String startDate, String endDate, Integer projectCategoryId, String userIds, Boolean projectSum, Integer type, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             //根据系统配置的员工成本计算方式,按固定时薪还是固定月薪,分情况计算。
@@ -5745,7 +5759,12 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     }
                 }
             }
-            List<Map<String, Object>> list = projectMapper.getTimeCostByCategory(companyId, startDate, endDate, projectCategoryId, userId,deptIds);
+            List<String> userIdList=new ArrayList<>();
+            if(userIds!=null&&userIds.length()>0){
+                String[] split = userIds.split(",");
+                userIdList = Arrays.asList(split);
+            }
+            List<Map<String, Object>> list = projectMapper.getTimeCostByCategory(companyId, startDate, endDate, projectCategoryId, userIdList,deptIds);
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
             List<List<String>> allList=null ;
             List<String> sumRow = null;
@@ -5863,7 +5882,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 allList=new ArrayList<>();
                 allList.add(headList);
                 //统计当前所有项目所有人的时间成本投入
-                List<Map<String, Object>> membList = projectMapper.getProjectCostGroupByCategory(companyId,startDate,endDate, projectCategoryId,userId,deptIds);
+                List<Map<String, Object>> membList = projectMapper.getProjectCostGroupByCategory(companyId,startDate,endDate, projectCategoryId,userIdList,deptIds);
                 for (User user : userList) {
                     BigDecimal moneyCost = BigDecimal.valueOf(0);
                     double costTime = 0;

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

@@ -2596,9 +2596,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                                             } else {
                                                 //还有下个节点
                                                 Integer auditDeptid = upR.getAuditDeptid();
-                                                for (int m=0;m<settings.size(); m++) {
-                                                    if (auditDeptid.equals(settings.get(m).getAuditDeptId()) && m < settings.size() -1) {
-                                                        AuditWorkflowTimeSetting nextNode = settings.get(m + 1);
+                                                for (int m=0;m<deptSettings.size(); m++) {
+                                                    if (auditDeptid.equals(deptSettings.get(m).getAuditDeptId()) && m < deptSettings.size() -1) {
+                                                        AuditWorkflowTimeSetting nextNode = deptSettings.get(m + 1);
                                                         upR.setIsDeptAudit(nextNode.getIsDeptAudit());
                                                         if (upR.getIsDeptAudit() == 1) {
                                                             upR.setAuditDeptid(nextNode.getAuditDeptId());

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

@@ -76,7 +76,8 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     public static final int TEXT_CARD_MSG_REPORT_DENY = 10;//日报驳回
     public static final int TEXT_CARD_MSG_REPORT_AGREE = 11; //日报审核通过
 
-    public static final HashMap CURSOR=new HashMap();
+    public static final int TEXT_CARD_MSG_EXPENSE_AGREE = 21;//费用报销审核通过
+    public static final int TEXT_CARD_MSG_EXPENSE_DENY = 22;//费用报销审核驳回
 
     @Value("${suitId}")
     private String suitId;
@@ -269,6 +270,14 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     } else if (msgType.equals(TEXT_CARD_MSG_BUSTRIP_DENY)) {
                         title = "出差审核驳回";
                     }
+                } else if ("expense".equals(pageRouter)) {
+                    //费用报销
+                    title = "费用报销通知";
+                    if (msgType.equals(TEXT_CARD_MSG_EXPENSE_AGREE)) {
+                        title = "费用报销审核通过";
+                    } else if (msgType.equals(TEXT_CARD_MSG_EXPENSE_DENY)) {
+                        title = "费用报销审核驳回";
+                    }
                 }
             }
             cardJson.put("title", title);

+ 8 - 6
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -279,10 +279,10 @@ public class TimingTask {
 
 
     //每天2:11 同步钉钉用户前2天到未来30天时间段的打卡,请假,出差数据
-    @Scheduled(cron = "0 41 15 ? * *")
+    @Scheduled(cron = "0 11 2 ? * *")
     private void synFanWeiWorkData() {
-        /*if (isDev) return;
-        if(!isPrivateDeploy) 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()){
@@ -306,14 +306,14 @@ public class TimingTask {
             List<UserFvTime> userFvTimeList=new ArrayList<>();
             List<LeaveSheet> leaveSheetList=new ArrayList<>();
             List<BusinessTrip> businessTripList=new ArrayList<>();
+            TimeType allDay = timeTypeMapper.selectOne(new QueryWrapper<TimeType>().eq("company_id", compId));
+            //获取休息设置
+            TimeAutoExclude timeAutoExclude = timeAutoExcludeMapper.selectOne(new QueryWrapper<TimeAutoExclude>().eq("company_id", compId));
             //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;
@@ -364,6 +364,7 @@ public class TimingTask {
             if(userFvTimeList.size()>0){
                 userFvTimeService.saveOrUpdateBatch(userFvTimeList);
             }
+            System.out.println(workDataList);
             //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;
@@ -428,6 +429,7 @@ public class TimingTask {
             if(leaveSheetList.size()>0){
                 leaveSheetService.saveOrUpdateBatch(leaveSheetList);
             }
+            System.out.println(leaveRecordList);
             //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;

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -15,7 +15,7 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.101.180.183:3306/man_dev?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://47.101.180.183:3306/man_mld?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: HuoshiDB@2022
     hikari:
@@ -131,7 +131,7 @@ referer:
     - mldworktime.ttkuaiban.com
     - gs.farben.com.cn
     - 47.101.180.183
-excludeUrls: /wxcorp/*,/wxcorp/*/*,/dingding/*,/error,/testClient,/corpWXAuth,/corpInsideWXAuth,/wx-corp-info/*,/clean/*,/innerRoles/*,/report/getReportListByToken,/report/getProcessErrorData,/project/synchronizationProject
+excludeUrls: /wxcorp/*,/wxcorp/*/*,/dingding/*,/error,/testClient,/corpWXAuth,/corpWXScanningAuth,/corpInsideWXAuth,/wx-corp-info/*,/clean/*,/innerRoles/*,/report/getReportListByToken,/report/getProcessErrorData,/project/synchronizationProject
 
 #企业微信相关参数
 suitId: ww4e237fd6abb635af

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

@@ -138,8 +138,11 @@
         <if test="projectId != null">
             AND a.id = #{projectId}
         </if>
-        <if test="userId != null">
-            AND b.creator_id = #{userId}
+        <if test="userIdList != null and userIdList.size()>0">
+            AND b.creator_id in
+            <foreach collection="userIdList" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="startDate != null and endDate != null">
             AND b.create_date between #{startDate} and #{endDate}
@@ -210,8 +213,11 @@
         <if test="projectCategoryId != null">
             AND a.category = #{projectCategoryId}
         </if>
-        <if test="userId != null">
-            AND b.creator_id = #{userId}
+        <if test="userIdList != null and userIdList.size()>0">
+            AND b.creator_id in
+            <foreach collection="userIdList" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="startDate != null and endDate != null">
             AND b.create_date between #{startDate} and #{endDate}
@@ -308,8 +314,11 @@
         <if test="startDate != null and endDate != null">
             AND a.create_date between #{startDate} and #{endDate}
         </if>
-        <if test="userId != null">
-            AND a.creator_id = #{userId}
+        <if test="userIdList != null and userIdList.size()>0">
+            AND a.creator_id in
+            <foreach collection="userIdList" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <choose>
             <when test="filterDeptIds!=null and filterDeptIds.size()>0">
@@ -365,8 +374,11 @@
         <if test="startDate != null and endDate != null">
             AND a.create_date between #{startDate} and #{endDate}
         </if>
-        <if test="userId != null">
-            AND a.creator_id = #{userId}
+        <if test="userIdList != null and userIdList.size()>0">
+            AND a.creator_id in
+            <foreach collection="userIdList" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="deptIds!=null and deptIds.size()>0">
             and a.dept_id in
@@ -393,8 +405,11 @@
         <if test="startDate != null and endDate != null">
             AND a.create_date between #{startDate} and #{endDate}
         </if>
-        <if test="userId != null">
-            AND a.creator_id = #{userId}
+        <if test="userIdList != null and userIdList.size()>0">
+            AND a.creator_id in
+            <foreach collection="userIdList" item="item" open="(" separator="," close=")">
+                #{item}
+            </foreach>
         </if>
         <if test="deptIds!=null and deptIds.size()>0">
             and a.dept_id in

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

@@ -286,7 +286,7 @@
 
     <!--根据任务id,全部报告信息-->
     <select id="getReportByTask" resultType="java.util.Map">
-        SELECT a.id,my.id as userId,  my.name as userName, a.project_id as projectId,b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
+        SELECT a.id,date_format(a.create_date, '%Y-%m-%d') as createDate,  my.id as userId, my.name as userName, a.project_id as projectId,b.project_name AS project, a.working_time AS time, a.content, a.state, a.time_type as timeType, a.cost, a.report_time_type as reportTimeType, a.start_time as startTime,
         a.end_time as endTime, b.incharger_id as inchargerId,b.project_code as projectCode,
         a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime

BIN
fhKeeper/formulahousekeeper/management-platform/src/main/resources/upload/员工工时导入模板.xlsx


BIN
fhKeeper/formulahousekeeper/management-platform/src/main/resources/upload/费用报销导入模板.xlsx


+ 2 - 2
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/controller/CompanyController.java

@@ -124,8 +124,8 @@ public class CompanyController {
      * @return
      */
     @RequestMapping("/setMeal")
-    public HttpRespMsg setMeal(Integer companyId) {
-        return companyService.setMeal(companyId);
+    public HttpRespMsg setMeal(Integer companyId,Integer meal) {
+        return companyService.setMeal(companyId,meal);
     }
 
     /**

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

@@ -19,7 +19,7 @@ public interface CompanyService extends IService<Company> {
 
     HttpRespMsg addMembCount(Integer companyId, int addCount);
 
-    HttpRespMsg setMeal(Integer companyId);
+    HttpRespMsg setMeal(Integer companyId,Integer meal);
 
     HttpRespMsg setExpDate(Integer companyId, String date);
 

+ 9 - 3
fhKeeper/formulahousekeeper/ops-platform/src/main/java/com/management/platform/service/impl/CompanyServiceImpl.java

@@ -84,14 +84,20 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
     }
 
     @Override
-    public HttpRespMsg setMeal(Integer companyId) {
+    public HttpRespMsg setMeal(Integer companyId,Integer meal) {
         HttpRespMsg msg = new HttpRespMsg();
         Company company = new Company();
         company.setId(companyId);
-        company.setSetMeal(1);
+        company.setSetMeal(meal);
         companyMapper.updateById(company);
         String name = companyMapper.selectById(companyId).getCompanyName();
-        saveLog("设置["+name+"]为已签约");
+        switch (meal){
+            case 0:saveLog("["+name+"]取消签约");
+            break;
+            case 1:saveLog("设置["+name+"]为已签约");
+            break;
+        }
+
         return msg;
     }
 

BIN
fhKeeper/formulahousekeeper/timesheet/src/assets/image/qiyeweix.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/assets/js/wwLogin.js


+ 5 - 4
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -264,10 +264,11 @@ export default {
                     }
                 }
             }
-            if(this.multiSelect) {
+            console.log(this.options, this.subjectId)
+            if(this.multiSelect) { 
                 for(var i in this.options) {
-                    for(var j in this.optionsOId) {
-                        if( this.options[i].auditorId == this.optionsOId[j] || this.options[i].id == this.optionsOId[j]) {
+                    for(var j in this.subjectId) {
+                        if(this.options[i].id == this.subjectId[j] || this.options[i].auditorId == this.subjectId[j]) {
                             this.multiSelectList.push(this.options[i])
                             this.options[i].flg = true
                         }
@@ -275,7 +276,7 @@ export default {
                 }
             }
         }
-        console.log(this.subject)
+        console.log(this.subject, this.subjectId)
         this.dailyListIndex = this.idx
     },
     methods: {

+ 7 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -112,7 +112,7 @@
                         <!-- <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{roleArray[user.role]}}</span></el-dropdown-item> -->
                         <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-view" ></i>{{user.roleName}}</span></el-dropdown-item>
                         <el-dropdown-item disabled ><span style="font-size:12px;"><i class="el-icon-medal" v-if="user.jobNumber"></i>{{user.jobNumber}}</span></el-dropdown-item>
-                        <el-dropdown-item @click.native="reset" v-if="!isCorpWX">{{$t('other.changeThePassword')}}</el-dropdown-item>
+                        <el-dropdown-item @click.native="reset" v-if="user.userNameNeedTranslate != 1">{{$t('other.changeThePassword')}}</el-dropdown-item>
                         <!-- <el-dropdown-item @click.native="editInfoOpen">修改信息</el-dropdown-item> -->
                         <el-dropdown-item divided @click.native="logout" v-if="!isCorpWX" >{{$t('other.launchTheLogin')}}</el-dropdown-item>
                     </el-dropdown-menu>
@@ -547,12 +547,17 @@
 
             // 获取企业微信的参数
             agentConfig() {
+                var isCorpWX = true
+                var ua = navigator.userAgent.toLowerCase();
+                if (ua.indexOf("wxwork") > 0) {
+                    isCorpWX = false;
+                } 
                 var curUrl = location.href.split("#")[0];
                 this.http.post("/wxcorp/getCorpWXConfig", {url: curUrl, token: this.user.id}, (res) => {
                     if (res.code == "ok") {
                         wx.config({ 
                         beta: true,
-                        debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
+                        debug: isCorpWX, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
                         appId: res.data.appid, // 必填,公众号的唯一标识 
                         timestamp: res.data.timestamp, // 必填,生成签名的时间戳 
                         nonceStr: res.data.noncestr, // 必填,生成签名的随机串 

+ 147 - 45
fhKeeper/formulahousekeeper/timesheet/src/views/Login.vue

@@ -1,53 +1,73 @@
 <template>
-    <div class="login">
-        <div class="login-par">
-            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" label-width="0px" class="demo-ruleForm login-container">
-                <div class="login-logo">
-                    <img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
-                </div>
-                <h3 class="title">{{ $t('workingHoursHousekeeper') }}</h3>
-                <el-form-item class="login-input" prop="username">
-                    <el-input type="text" v-model="ruleForm.username" autocomplete="off" :placeholder="$t('zhang-hao-shou-ji-hao')" clearable prefix-icon="el-icon-user-solid"></el-input>
-                </el-form-item>
-                <el-form-item class="login-input" prop="password">
-                    <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="handleSubmit" autocomplete="off" :placeholder="$t('mi-ma')" show-password prefix-icon="el-icon-lock"></el-input>
-                </el-form-item>
-                <el-form-item class="login-button" style="width:100%;">
-                    <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('login') }}</el-button>
-                </el-form-item>
-                <div class="toRegister">
-                    <el-link type="primary" class="btn" style="float:left;" :underline="false">{{ $t('lian-xi-ke-fu') }}
-                        <div class="service">
-                            <p style="color: #333">{{ $t('sao-ma-jia-ke-fu-wei-xin') }}</p>
-                            <img src="../assets/image/code.jpg">
-                            <p><span style="color: #333">QQ:</span><span id="QQ">3052894409</span></p>
+    <div>
+        <div class="login" v-if="!isCorpWX">
+            <div class="login-par">
+                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-position="left" label-width="0px" class="demo-ruleForm login-container">
+                    <div class="login-logo">
+                        <img src="../assets/image/login_logo.png" style="width:80px;height:80px;"/>
+                    </div>
+                    <h3 class="title">{{ $t('workingHoursHousekeeper') }}</h3>
+                    <el-form-item class="login-input" prop="username">
+                        <el-input type="text" v-model="ruleForm.username" autocomplete="off" :placeholder="$t('zhang-hao-shou-ji-hao')" clearable prefix-icon="el-icon-user-solid"></el-input>
+                    </el-form-item>
+                    <el-form-item class="login-input" prop="password">
+                        <el-input type="password" v-model="ruleForm.password" @keyup.enter.native="handleSubmit" autocomplete="off" :placeholder="$t('mi-ma')" show-password prefix-icon="el-icon-lock"></el-input>
+                    </el-form-item>
+                    <el-form-item class="login-button" style="width:100%;">
+                        <el-button type="primary" style="width:100%;" @click.native.prevent="handleSubmit" :loading="logining">{{ $t('login') }}</el-button>
+                    </el-form-item>
+                    <div class="additional">
+                        <el-divider content-position="center">或</el-divider>
+                    </div>
+                    <div class="externalLanding">
+                        <div class="externalLanding_img" @click="wxworkCli()">
+                            <img src="../assets/image/qiyeweix.png" alt="">
                         </div>
-                    </el-link>
-                    <el-link type="primary" style="margin-right:5px;" @click="dialogVisible=true" :underline="false">
-                        {{ $t('shi-yong-shuo-ming') }} </el-link>
-                    <el-link type="primary" v-if="!isCorpWX" @click="jumpTo" :underline="false">{{ $t('qi-ye-zhu-ce') }}</el-link>
+                    </div>
+                    <div class="toRegister">
+                        <el-link type="primary" class="btn" style="float:left;" :underline="false">{{ $t('lian-xi-ke-fu') }}
+                            <div class="service">
+                                <p style="color: #333">{{ $t('sao-ma-jia-ke-fu-wei-xin') }}</p>
+                                <img src="../assets/image/code.jpg">
+                                <p><span style="color: #333">QQ:</span><span id="QQ">3052894409</span></p>
+                            </div>
+                        </el-link>
+                        <el-link type="primary" style="margin-right:5px;" @click="dialogVisible=true" :underline="false">
+                            {{ $t('shi-yong-shuo-ming') }} </el-link>
+                        <el-link type="primary" v-if="!isCorpWX" @click="jumpTo" :underline="false">{{ $t('qi-ye-zhu-ce') }}</el-link>
+                    </div>
+                </el-form>
+            </div>
+            <el-dialog :title="$t('shi-yong-shuo-ming')" :visible.sync="dialogVisible" width="500px">
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_基础版.docx" download="工时管家使用说明_基础版.docx" 
+                            target="_blank">工时管家使用说明_基础版.docx</a></p>
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目管理专业版.docx" download="工时管家使用说明_项目管理专业版.docx" 
+                            target="_blank">工时管家使用说明_项目管理专业版.docx</a></p>
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_建筑工程专业版.docx" download="工时管家使用说明_建筑工程专业版.docx" 
+                            target="_blank">工时管家使用说明_建筑工程专业版.docx</a></p>
+                <!-- <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目经理.docx" download="工时管家使用说明_项目经理.docx" 
+                            target="_blank">工时管家使用说明_项目经理.docx</a></p>
+                <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_普通员工.docx" download="工时管家使用说明_普通员工.docx" 
+                            target="_blank">工时管家使用说明_普通员工.docx</a></p> -->
+                
+            </el-dialog>
+            <el-dialog title="企业微信扫码登陆" :visible.sync="wxworkFlg" width="500px">
+                <div>
+                    <div id="wxcode"></div>
                 </div>
-            </el-form>
+            </el-dialog>
+        </div>
+        <!-- 企业微信的话 -->
+        <div class="qiweix" v-if="isCorpWX">
+            正在进入系统...
         </div>
-        <el-dialog :title="$t('shi-yong-shuo-ming')" :visible.sync="dialogVisible" width="500px">
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_基础版.docx" download="工时管家使用说明_基础版.docx" 
-                        target="_blank">工时管家使用说明_基础版.docx</a></p>
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目管理专业版.docx" download="工时管家使用说明_项目管理专业版.docx" 
-                        target="_blank">工时管家使用说明_项目管理专业版.docx</a></p>
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_建筑工程专业版.docx" download="工时管家使用说明_建筑工程专业版.docx" 
-                        target="_blank">工时管家使用说明_建筑工程专业版.docx</a></p>
-            <!-- <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_项目经理.docx" download="工时管家使用说明_项目经理.docx" 
-                        target="_blank">工时管家使用说明_项目经理.docx</a></p>
-            <p><a style="color:#409EFF;text-decoration:none" href="upload/工时管家使用说明_普通员工.docx" download="工时管家使用说明_普通员工.docx" 
-                        target="_blank">工时管家使用说明_普通员工.docx</a></p> -->
-            
-        </el-dialog>
     </div>
 </template>
 
 <script>
     import * as dd from 'dingtalk-jsapi';
     import "../permissions.js"
+    import WxLogin from "../assets/js/wwLogin.js"
     export default {
         inject:['reloads'],
         data() {
@@ -63,9 +83,17 @@
                 rules: {
                     username: [{ required: true, message: this.$t('peaseenterthe'), trigger: 'blur' },],
                     password: [{ required: true, message: this.$t('peaseenterthe'), trigger: 'blur' },]
-                }
+                },
+                wxworkFlg: false
             };
         },
+        watch: {
+            $route(to) {
+				if (to.query.code) {
+					this.getStaffInfo(to.query.code)
+				}
+			}
+        },
         created() {
             // this.langChange()
             if (localStorage.userInfo != null) {
@@ -82,13 +110,14 @@
             }
         },
         mounted() {
+            // this.wxworkCli()
             var ua = navigator.userAgent.toLowerCase();
             if (ua.indexOf("wxwork") > 0) {
                 this.isCorpWX = true;
             } 
+            let href = window.location.href;
             if (this.isCorpWX) {
                 //企业微信环境下,尝试自动登录
-                let href = window.location.href;
                 //判断企业微信,是否存在授权
                 //尝试自动登录
                 if (href.indexOf('hasTriedAutoLogin') == -1) {
@@ -124,7 +153,19 @@
                     }
                 }
             } else {
-                if (localStorage.userInfo != null) {
+                //浏览器上使用扫码登录
+                if (href.indexOf("userId") > 0) {
+                    //后台经过验证后,重定向过来带上了userId
+                    var loginUserId = href.substring(href.indexOf("userId=")+"userId=".length);
+                    if (loginUserId.includes('#/')) {
+                        loginUserId = loginUserId.substring(0, loginUserId.indexOf('#/'));
+                    }
+                    var path = null;
+                    if (href.indexOf('path') > 0) {
+                        path = href.split('path=')[1].split('&')[0];
+                    }
+                    this.loginByUserId(loginUserId, path);
+                } else if (localStorage.userInfo != null) {
                     var user = JSON.parse(localStorage.userInfo);
                     if (user.company.packageSimple == 1) {
                         //简易模式,直接进入工时统计表
@@ -176,6 +217,24 @@
             }
         },
         methods: {
+            wxworkCli() {
+                // this.wxworkFlg = true
+                // this.$nextTick(()=>{
+                //     var obj = new WxLogin({
+                //         id: 'wxcode', // 登录页面显示二维码的容器id
+                //         appid: 'wwf11426cf618e1703', // 企业微信的CorpID,在企业微信管理端查看
+                //         redirect_uri: encodeURIComponent('http://localhost:10086/#/login'), // 重定向的地址,需要进行encode
+                //         usertype: 'member'
+                //     })
+                // })
+                var appId = "wwf11426cf618e1703";//企业微信第三方的SUIT ID
+                var url = "https://worktime.ttkuaiban.com/api/corpWXScanningAuth";//授权回调页面
+                var weixinUrl=`https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid=${appId}&redirect_uri=${url}&state=0&usertype=member`;
+                window.location.href = weixinUrl;
+            },
+            getStaffInfo() {
+                console.log('执行了没')
+            },
             setlangChange() {
                 localStorage.setItem("lang", 'en')
             },
@@ -251,7 +310,7 @@
             },
             tryAutoLogin() {
                 var appId = "ww4e237fd6abb635af";//企业微信第三方的SUIT ID
-                var url = "http://worktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
+                var url = "https://worktime.ttkuaiban.com/api/corpWXAuth";//授权回调页面
                 var weixinUrl="https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appId+"&redirect_uri="+encodeURI(url)+"&response_type=code&scope=snsapi_base&state=1#wechat_redirect";
                 window.location.href = weixinUrl;
             },
@@ -268,6 +327,14 @@
                                     } else {
                                         this.$router.push({ path: user.moduleList[0].path })
                                     }
+                                    if (!path) {
+                                        path = user.moduleList[0].path;
+                                    }
+                                    //去掉链接上存在的参数
+                                    if (location.href.indexOf("?")>0) {
+                                        var newHref = location.href.split("?")[0] + '#' + (path.indexOf('/')>-1?path:('/'+path));
+                                        location.href = newHref;
+                                    }
                                 }
                             } else {
                                 this.$message({
@@ -429,6 +496,41 @@
 </script>
 
 <style lang="scss" scoped>
+    .qiweix {
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        padding: 50px 0;
+        font-size: 40px;
+        color: #505458;
+    }
+    .additional {
+        width: 100%;
+        text-align: center;
+        padding: 20px 0;
+        color: #505458;
+    }
+    .externalLanding {
+        width: 100%;
+        display: flex;
+        justify-content: center;
+        .externalLanding_img {
+            width: 30px;
+            height: 30px;
+            border: 1px solid #409EFF;
+            border-radius: 50%;
+            position: relative;
+            overflow: hidden;
+            cursor: pointer;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            img {
+                width: 80%;
+                height: 80%;
+            }
+        }
+    }
     .login {
         height: 100%;
         .login-par {
@@ -449,7 +551,7 @@
                 -moz-border-radius: 5px;
                 background-clip: padding-box;
                 width: 315px;
-                height: 380px;
+                // height: 380px;
                 padding: 25px 35px 25px 35px;
                 background: #fff;
                 border: 1px solid #eaeaea;

+ 21 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue

@@ -448,15 +448,17 @@
         <el-dialog :title="$t('editParticipants')" v-if="pVisible" :visible.sync="pVisible" :close-on-click-modal="false" customClass="customWidth" width="600px">
             <el-form ref="participForm" :model="addForm" :rules="rules" label-width="120px">
                 <el-form-item :label="$t('Allparticipants')">
-                    <el-select v-model="addForm.userId" multiple filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" @change="changeParticipator">
+                    <el-select v-model="addForm.userId" multiple filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" @change="changeParticipator" v-if="user.userNameNeedTranslate != 1">
                         <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
+
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :multiSelect="true" :widthStr="'430'" :size="'medium'" :subject="users" :subjectId="addForm.userId" :distinction="'12'" @selectCal="selectCal"></selectCat>
                 </el-form-item>
                 <el-form-item :label="$t('projectmanager')" >
                     <el-select v-if="user.userNameNeedTranslate != 1" v-model="addForm.inchargerId"  filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" >
                         <el-option v-for="item in project.participationList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
-                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="project.participationList" :subjectId="addForm.inchargerId" :distinction="'1'" @selectCal="selectCal"></selectCat>
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :widthStr="'430'" :size="'medium'" :subject="project.participationList" :subjectId="addForm.inchargerId" :distinction="'1'" @selectCal="selectCal"></selectCat>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -469,9 +471,11 @@
         <el-dialog :title="$t('addingParticipant')" v-if="addMembVisible" :visible.sync="addMembVisible" :close-on-click-modal="false" customClass="customWidth" width="600px">
             <el-form ref="addMembForm" :model="addMembForm"  label-width="120px">
                 <el-form-item :label="$t('addAdding')">
-                    <el-select v-model="addMembForm.userId" multiple filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" >
+                    <el-select v-model="addMembForm.userId" multiple filterable :placeholder="$t('defaultText.pleaseChoose')" style="width:100%;" v-if="user.userNameNeedTranslate != 1">
                         <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
+
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :multiSelect="true" :widthStr="'430'" :size="'medium'" :subject="users" :subjectId="addMembForm.userId" :distinction="'13'" @selectCal="selectCal"></selectCat>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -1998,6 +2002,20 @@
                 } else if(obj.distinction == '3') {
                     let userList = obj.id
                     this.curProfessionRow.membList[obj.other].membId = userList
+                } else if(obj.distinction == '12') {
+                    let arrList = obj.arrUserList
+                    let arr = []
+                    for(var i in arrList) {
+                        arr.push(arrList[i].id)
+                    }
+                    this.addForm.userId = arr
+                } else if(obj.distinction == '13') {
+                    let arrList = obj.arrUserList
+                    let arr = []
+                    for(var i in arrList) {
+                        arr.push(arrList[i].id)
+                    }
+                    this.addMembForm.userId = arr
                 }
             }
         },

+ 4 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/summary.vue

@@ -202,6 +202,7 @@
                               top: "center"
                             },
                             toolbox: {
+                                right: 25,
                                 show: true,
                                 feature:{
                                     saveAsImage:{
@@ -296,6 +297,7 @@
                               top: "center"
                             },
                             toolbox: {
+                                right: 25,
                                 show: true,
                                 feature:{
                                     saveAsImage:{
@@ -373,6 +375,7 @@
                               top: "center"
                             },
                             toolbox: {
+                                right: 25,
                                 show: true,
                                 feature:{
                                     saveAsImage:{
@@ -501,6 +504,7 @@
                       top: "center"
                     },
                     toolbox: {
+                        right: 25,
                         show: true,
                         feature:{
                             saveAsImage:{

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

@@ -215,7 +215,7 @@
                 </el-table-column>
                 <el-table-column :label="$t('state.states')" width="100">
                     <template slot-scope="scope">
-                        <span>{{scope.row.isActive==0 ? $t('ting-yong')+'(' + scope.row.inactiveDate + ')' : $t('zai-zhi')}}</span>
+                        <span>{{scope.row.isActive==0 ? $t('ting-yong')+(scope.row.inactiveDate != null? '(' + scope.row.inactiveDate + ')':''): $t('zai-zhi')}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column :label="$t('creationtime')" width="150" prop="createTime">

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

@@ -83,6 +83,9 @@
                             if (item.type == 1 || (item.msg != null && item.msg.indexOf('任务') > 0)) {
                                 //跳到待办任务上
                                 this.$router.push('/task'); 
+                            } else if (item.type == 3) {
+                                //跳到费用报销上
+                                this.$router.push('/expense'); 
                             } 
                         } 
                     }).catch(err=> {this.$toast.clear();});