Kaynağa Gözat

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

Lijy 2 yıl önce
ebeveyn
işleme
ea6bc35aa2

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

@@ -36,8 +36,8 @@ public class DepartmentController {
     }
 
     @RequestMapping("/listAllMemb")
-    public HttpRespMsg listAllMemb(HttpServletRequest request,String keyword) {
-        return departmentService.listAllMemb(request,keyword);
+    public HttpRespMsg listAllMemb(HttpServletRequest request,String keyword,String cursor) {
+        return departmentService.listAllMemb(request,keyword,cursor);
     }
 
     //获取我可以管辖到的人员列表,进行代填时选择的人员列表用到

+ 24 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java

@@ -9,6 +9,7 @@ import com.management.platform.entity.vo.SysRichFunction;
 import com.management.platform.mapper.*;
 import com.management.platform.service.ExcelExportService;
 import com.management.platform.service.ReportService;
+import com.management.platform.service.WxCorpInfoService;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
@@ -24,6 +25,7 @@ import javax.servlet.http.HttpServletRequest;
 import java.math.BigDecimal;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
+import java.time.LocalTime;
 import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -67,6 +69,8 @@ public class UserCorpwxTimeController {
     WxCorpInfoMapper wxCorpInfoMapper;
     @Resource
     ExcelExportService excelExportService;
+    @Resource
+    WxCorpInfoService wxCorpInfoService;
 
     @RequestMapping("/getMyDeptMembsData")
     public HttpRespMsg getMyDeptMembsData(String startDate, String endDate) {
@@ -303,5 +307,25 @@ public class UserCorpwxTimeController {
         fileName += MessageUtils.message("fileName.workHour",startDate,endDate);
         return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo, fileName, allData, path);
     }
+
+    @RequestMapping("/getPunchRecordBySelf")
+    public HttpRespMsg getUserPunchRecord(String date){
+        HttpRespMsg msg=new HttpRespMsg();
+        DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        LocalDate localDate = LocalDate.parse(date, df);
+        LocalDateTime start = LocalDateTime.of(localDate, LocalTime.MIN);
+        LocalDateTime end = LocalDateTime.of(localDate, LocalTime.MAX).withSecond(0).withNano(0);
+        User user = userMapper.selectById(request.getHeader("token"));
+        wxCorpInfoService.getUserPunchRecord(user.getCompanyId(),user.getId(),start,end,false);
+        Map<String,Object> resultMap =new HashMap<>();
+        List<UserCorpwxTime> corpwxTimes = userCorpwxTimeMapper.selectList(new QueryWrapper<UserCorpwxTime>()
+                .eq("corpwx_userid", user.getCorpwxUserid()).eq("create_date", date));
+        if (corpwxTimes.size() > 0) {
+            UserCorpwxTime time = corpwxTimes.get(0);
+            resultMap.put("time", time);
+        }
+        msg.data=resultMap;
+        return msg;
+    }
 }
 

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

@@ -27,13 +27,15 @@ public interface DepartmentService extends IService<Department> {
 
     HttpRespMsg getDepartmentList(HttpServletRequest request);
 
+    HttpRespMsg getDepartmentListById(User user);
+
     HttpRespMsg getDepartmentStatistics(Integer parentDeptId, String startDate, String endDate, HttpServletRequest request);
 
     HttpRespMsg getUserStatistics(String startDate, String endDate, Integer departmentId, HttpServletRequest request);
 
     HttpRespMsg exportUserStatistic(String startDate, String endDate, String userIds, HttpServletRequest request);
 
-    HttpRespMsg listAllMemb(HttpServletRequest request,String keyword);
+    HttpRespMsg listAllMemb(HttpServletRequest request,String keyword,String cursor);
 
     HttpRespMsg listMyMembs(HttpServletRequest request);
 

+ 98 - 34
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java

@@ -368,6 +368,52 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
         return httpRespMsg;
     }
 
+    //获取某个人所在的部门列表
+    @Override
+    public HttpRespMsg getDepartmentListById(User user) {
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        try {
+            //查询该员工所在部门
+            Department userDept = departmentMapper.selectOne(new QueryWrapper<Department>()
+                    .eq("department_id", user.getDepartmentId()));
+            List<Department> allDepartmentList = departmentMapper.selectList(new QueryWrapper<Department>()
+                    .eq("company_id", user.getCompanyId()));
+            ArrayList<Department> departmentList = new ArrayList<>();
+            //查找出员工所在顶层部门
+            if (userDept!=null){
+                departmentList.add(userDept);
+                while (true){
+                    if (userDept.getSuperiorId()==null){
+                        break;
+                    }else {
+                        for (Department supDept : allDepartmentList) {
+                            if (supDept.getDepartmentId().equals(userDept.getSuperiorId())){
+                                userDept = supDept;
+                                departmentList.add(supDept);
+                            }
+                        }
+                    }
+                }
+            }
+            List<DepartmentOtherManager> departmentOtherManagerList = departmentOtherManagerMapper.selectList(new QueryWrapper<DepartmentOtherManager>().eq("company_id", user.getCompanyId()));
+            //结果列表
+            List<DepartmentVO> list = new ArrayList<>();
+            List<Department> rootDepartments = departmentList.stream().filter(dept -> dept.getSuperiorId() == null).collect(Collectors.toList());
+            rootDepartments.forEach(root->{
+                DepartmentVO rootDeptVO = formatDepartmentToVO(root, departmentOtherManagerList);
+                list.add(rootDeptVO);
+                fillSubDepartmentList(departmentList, rootDeptVO, departmentOtherManagerList);
+            });
+            //返回数据
+            httpRespMsg.data = list;
+        } catch (NullPointerException e) {
+            //httpRespMsg.setError("验证失败");
+            httpRespMsg.setError(MessageUtils.message("Company.validationError"));
+            return httpRespMsg;
+        }
+        return httpRespMsg;
+    }
+
     //将部门PO转化为部门VO
     private DepartmentVO formatDepartmentToVO(Department department, List<DepartmentOtherManager> departmentOtherManagerList) {
         List<String> collect = departmentOtherManagerList.stream().filter(dm -> dm.getDepartmentId().equals(department.getDepartmentId())).map(vo -> vo.getOtherManagerId()).collect(Collectors.toList());
@@ -800,8 +846,10 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
 
     //根据关键词查询微信通讯录人员的openid以及部门
     //keyword不可为空格或空字符串,否则请求参数错误
-    private Object[] getOpenId(String corpId,String keyword) {
-        Object[] user = null;
+    private HashMap<String, List> getOpenId(String corpId,String keyword,String cursor) {
+        HashMap<String, List> result = new HashMap<>();
+        List<Object> user = new ArrayList<>();
+        String itemCursor = "";
         String url = "https://qyapi.weixin.qq.com/cgi-bin/service/contact/search?provider_access_token=ACCESS_TOKEN";
         HttpHeaders headers = new HttpHeaders();
         RestTemplate restTemplate = new RestTemplate();
@@ -817,8 +865,8 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             requestMap.put("query_word", keyword);
             requestMap.put("query_type", 0);
             requestMap.put("query_range", 1);
-            requestMap.put("limit", 200);
-            //requestMap.put("cursor", pageSize);
+            requestMap.put("limit", 20);
+            requestMap.put("cursor", cursor);
             HttpEntity<JSONObject> entity = new HttpEntity<>(requestMap, headers);
             ResponseEntity<String> ResponseEntity = restTemplate.postForEntity(url, entity, String.class);
             if (ResponseEntity.getStatusCode() == HttpStatus.OK) {
@@ -829,62 +877,78 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
                         if (!queryResult.isEmpty()){
                             JSONArray jsonArray = queryResult.getJSONObject("user").getJSONArray("open_userid");
                             if (jsonArray!=null){
-                                user = jsonArray.toArray();
+                                Object[] objects = jsonArray.toArray();
+                                for (Object object : objects) {
+                                    user.add(object);
+                                }
+                            }
+                            Boolean is_last = respJson.getBoolean("is_last");
+                            if (!is_last){
+                                itemCursor = respJson.getString("next_cursor");
                             }
                         }
                     }
             }
         }
-        return user;
+        List<Object> nextCursor = new ArrayList<>();
+        nextCursor.add(itemCursor);
+        result.put("nextCursor",nextCursor);
+        result.put("user",user);
+        return result;
     }
 
     @Override
-    public HttpRespMsg listAllMemb(HttpServletRequest request,String keyword) {
+    public HttpRespMsg listAllMemb(HttpServletRequest request,String keyword,String cursor) {
         Integer companyId = userMapper.selectById(request.getHeader("TOKEN")).getCompanyId();
         HttpRespMsg msg = new HttpRespMsg();
         List<HashMap> userMapList = new ArrayList<>();
-        HttpRespMsg departmentList = departmentService.getDepartmentList(request);
-        List<DepartmentVO> list = (List<DepartmentVO>) departmentList.data;
-        //加上未分配的部门
-        DepartmentVO unAssignedDept = new DepartmentVO();
-        unAssignedDept.setId(0);
-        //unAssignedDept.setLabel("未分配");
-        unAssignedDept.setLabel(MessageUtils.message("department.noDistribution"));
-        list.add(unAssignedDept);
         //通讯录查询人员
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         if (StringUtils.isNotBlank(keyword) && wxCorpInfo!=null && wxCorpInfo.getSaasSyncContact()==1){
-            Object[] users = getOpenId(wxCorpInfo.getCorpid(), keyword);
-            if (users!=null){
+            HashMap<String, List> result = getOpenId(wxCorpInfo.getCorpid(), keyword, cursor);
+            List users = result.get("user");
+            if (users.size()!=0){
                 List<User> realUser = userMapper.selectList(new QueryWrapper<User>().in("corpwx_userid", users));
-                List<DepartmentVO> temp = new ArrayList<>();
-                //重新封装list集合,把没有查询人员的部门去掉
                 if (realUser.size()!=0){
-                    for (DepartmentVO departmentVO : list) {
-                        for (User user : realUser) {
-                            if (departmentVO.getId().equals(user.getDepartmentId())){
-                                temp.add(departmentVO);
-                                continue;
-                            }
+                    List<DepartmentVO> listById = new ArrayList<>();
+                    for (User item : realUser) {
+                        HttpRespMsg departmentListById = getDepartmentListById(item);
+                        listById = (List<DepartmentVO>) departmentListById.data;
+                        if (listById.size()==0){
+                            //加上未分配的部门
+                            DepartmentVO unAssignedDeptById = new DepartmentVO();
+                            unAssignedDeptById.setId(0);
+                            //unAssignedDept.setLabel("未分配");
+                            unAssignedDeptById.setLabel(MessageUtils.message("department.noDistribution"));
+                            listById.add(unAssignedDeptById);
                         }
-                    }
-                    list = temp;
-                    for (User u : realUser) {
+                        //封装员工信息
                         HashMap<String, Object> user = new HashMap<String, Object>();
-                        user.put("id", u.getId());
-                        user.put("name", u.getName());
-                        user.put("departmentId", u.getDepartmentId());
+                        user.put("id", item.getId());
+                        user.put("name", item.getName());
+                        user.put("departmentId", item.getDepartmentId());
                         userMapList.add(user);
-                        fillDeptUser(list, userMapList);
-                        msg.data = list;
-                        return msg;
+                        fillDeptUser(listById, userMapList);
                     }
+                    HashMap<String, Object> data = new HashMap<>();
+                    data.put("data",listById);
+                    data.put("nextCursor","");
+                    msg.data = data;
+                    return msg;
                 }
             }
             ArrayList<Object> emptyList = new ArrayList<>();
             msg.data = emptyList;
             return msg;
         }else {
+            HttpRespMsg departmentList = departmentService.getDepartmentList(request);
+            List<DepartmentVO> list = (List<DepartmentVO>) departmentList.data;
+            //加上未分配的部门
+            DepartmentVO unAssignedDept = new DepartmentVO();
+            unAssignedDept.setId(0);
+            //unAssignedDept.setLabel("未分配");
+            unAssignedDept.setLabel(MessageUtils.message("department.noDistribution"));
+            list.add(unAssignedDept);
             //获取公司全部人员
             List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", companyId).eq("is_active", 1));
             for (User u : userList) {

+ 35 - 39
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -622,12 +622,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
 
     //根据关键词查询微信通讯录人员的openid
     //keyword不可为空格或空字符串,否则请求参数错误
-    private HashMap<String, Object> getOpenId(String corpId,String keyword,String cursor) {
-        HashMap<String, Object> result = new HashMap<>();
-        Object[] user = null;
-        String nextCursor = "";
-        result.put("user",user);
-        result.put("nextCursor",nextCursor);
+    private HashMap<String, List> getOpenId(String corpId,String keyword,String cursor) {
+        HashMap<String, List> result = new HashMap<>();
+        List<Object> user = new ArrayList<>();
+        String itemCursor = "";
         String url = "https://qyapi.weixin.qq.com/cgi-bin/service/contact/search?provider_access_token=ACCESS_TOKEN";
         HttpHeaders headers = new HttpHeaders();
         RestTemplate restTemplate = new RestTemplate();
@@ -655,16 +653,17 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                     if (!queryResult.isEmpty()){
                         JSONArray jsonArray = queryResult.getJSONObject("user").getJSONArray("open_userid");
                         if (jsonArray!=null){
-                            user = jsonArray.toArray();
+                            Object[] objects = jsonArray.toArray();
+                            for (Object object : objects) {
+                                user.add(object);
+                            }
                         }
                     }else{
                         System.err.println("==================通讯录查询请求无userid列表===================");
                     }
-                    JSONObject isLast = respJson.getJSONObject("is_last");
-                    if (isLast!=null){
-                        if (!respJson.getBoolean("is_last")){
-                            nextCursor = respJson.getString("next_cursor");
-                        }
+                    Boolean is_last = respJson.getBoolean("is_last");
+                    if (!is_last){
+                        itemCursor = respJson.getString("next_cursor");
                     }
                 }else {
                     System.err.println("===================通讯录查询请求失败=================");
@@ -673,6 +672,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         }else {
             System.out.println("=============token查询失败=================");
         }
+        List<Object> nextCursor = new ArrayList<>();
+        nextCursor.add(itemCursor);
+        result.put("nextCursor",nextCursor);
+        result.put("user",user);
         return result;
     }
 
@@ -688,12 +691,12 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         //当企业开启了微信通讯录的情况下
         if (org.apache.commons.lang3.StringUtils.isNotBlank(keyword) && wxCorpInfo!=null && wxCorpInfo.getSaasSyncContact()==1 && departmentId == -1){
             System.out.println("====================开始查询通讯录名单======================");
-            HashMap<String, Object> result = getOpenId(wxCorpInfo.getCorpid(), keyword, cursor);
-            Object users = result.get("user");
-            if (users!=null){
+            HashMap<String, List> result = getOpenId(wxCorpInfo.getCorpid(), keyword, cursor);
+            List users = result.get("user");
+            if (users.size()!=0){
                 List<User> realUser = userMapper.selectList(new QueryWrapper<User>().in("corpwx_userid", users));
                 data.put("records",realUser);
-                data.put("nextCursor",result.get("nextCursor"));
+                data.put("nextCursor",result.get("nextCursor").get(0));
                 return httpRespMsg;
             }else {
                 System.err.println("======================user列表没有查询到数据===========================");
@@ -2300,42 +2303,35 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
         String nextCursor = "";
-        QueryWrapper<User> wrapper = new QueryWrapper<User>().select("id, name, phone, job_number, department_id").eq("company_id", user.getCompanyId()).eq("is_active", 1);
-        if (departmentId != null) {
-            //获取全部子部门
-            List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
-            List<Integer> deptIds = departmentService.getDeptIncludeSubDeptIds(departmentId, allDeptList);
-            wrapper.in("department_id", deptIds);
-        }
-        List<User> userList = userMapper.selectList(wrapper);
         //企业微信通讯录搜索功能
         Integer WXCompanyId = user.getCompanyId();
         WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", WXCompanyId));
         //当企业开启了微信通讯录的情况下
         if (org.apache.commons.lang3.StringUtils.isNotBlank(keyword) && wxCorpInfo!=null && wxCorpInfo.getSaasSyncContact()==1){
-            HashMap<String, Object> result = getOpenId(wxCorpInfo.getCorpid(), keyword, cursor);
+            HashMap<String, List> result = getOpenId(wxCorpInfo.getCorpid(), keyword, cursor);
             HashMap<String, Object> msgResult = new HashMap<>();
-            List<User> retUser = new ArrayList<>();
-            nextCursor = result.get("nextCursor").toString();
-            Object users = result.get("user");
-            msgResult.put("retUser",retUser);
+            nextCursor = result.get("nextCursor").get(0).toString();
+            List users = result.get("user");
             msgResult.put("nextCursor",nextCursor);
-            msg.data = result;
-            if (users!=null){
+            msg.data = msgResult;
+            if (users.size()!=0){
                 List<User> realUser = userMapper.selectList(new QueryWrapper<User>().in("corpwx_userid", users));
-                for (User item : userList) {
-                    for (User realItem : realUser) {
-                        if (item.getId().equals(realItem.getId())){
-                            retUser.add(realItem);
-                            continue;
-                        }
-                    }
-                }
+                msgResult.put("retUser",realUser);
                 return msg;
             }else {
+                ArrayList<User> nullUser = new ArrayList<>();
+                msgResult.put("retUser",nullUser);
                 return msg;
             }
         }else {
+            QueryWrapper<User> wrapper = new QueryWrapper<User>().select("id, name, phone, job_number, department_id").eq("company_id", user.getCompanyId()).eq("is_active", 1);
+            if (departmentId != null) {
+                //获取全部子部门
+                List<Department> allDeptList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
+                List<Integer> deptIds = departmentService.getDeptIncludeSubDeptIds(departmentId, allDeptList);
+                wrapper.in("department_id", deptIds);
+            }
+            List<User> userList = userMapper.selectList(wrapper);
             msg.data = userList;
             return msg;
         }

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

@@ -472,6 +472,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         String url = null;
         try {
             startDateTime = startDateTime.withHour(0).withMinute(0).withSecond(0).withNano(0);
+            LocalDate date=startDateTime.toLocalDate();
             long startTime = startDateTime.toEpochSecond(ZoneOffset.of("+8"));
             endDateTime = endDateTime.withHour(23).withMinute(59).withSecond(0).withNano(0);
             long endTime = endDateTime.toEpochSecond(ZoneOffset.of("+8"));
@@ -500,7 +501,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                 int toIndex = (i + 1) * batchSize;
                 if (toIndex > totalLength) toIndex = totalLength;
                 Object[] objects = corpwxUserIds.subList(fromIndex, toIndex).toArray(new String[0]);
-                reqPunchRecord(corpInfo, startTime, endTime, objects, showLog);
+                reqPunchRecord(corpInfo, startTime, endTime, objects, showLog,userId,date);
             }
         } catch (Exception exception) {
             exception.printStackTrace();
@@ -509,7 +510,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
         return msg;
     }
 
-    public void reqPunchRecord(WxCorpInfo corpInfo, long startTime, long endTime, Object[] objects, boolean showLog)throws Exception {
+    public void reqPunchRecord(WxCorpInfo corpInfo, long startTime, long endTime, Object[] objects, boolean showLog,String userId,LocalDate date)throws Exception {
         DateTimeFormatter mdFormat = DateTimeFormatter.ofPattern("yyyy/M/d");
         LocalDateTime needDataTime = LocalDateTime.now().withHour(0).withMinute(0).withSecond(0).withNano(0);
         long dataTime = needDataTime.toEpochSecond(ZoneOffset.of("+8"));
@@ -585,16 +586,27 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     DateTimeFormatter df = DateTimeFormatter.ofPattern("HH:mm");
                     userCorpwxTime.setStartTime(LocalTime.parse(minTime,df).plusHours(8).format(df));
                     userCorpwxTime.setEndTime(LocalTime.parse(maxTime,df).plusHours(8).format(df));
-                    userCorpwxTime.setCreateDate(LocalDate.now());
                     userCorpwxTime.setWxCorpid(corpInfo.getCorpid());
-                    userCorpwxTime.setWeekDay(LocalDate.now().getDayOfWeek().getValue());
+                    if(userId!=null){
+                        userCorpwxTime.setCreateDate(date);
+                        userCorpwxTime.setWeekDay(date.getDayOfWeek().getValue());
+                    }else {
+                        userCorpwxTime.setCreateDate(LocalDate.now());
+                        userCorpwxTime.setWeekDay(LocalDate.now().getDayOfWeek().getValue());
+                    }
                     userCorpwxTime.setWeekDayTxt(DateTimeUtil.getWeekDayTxt(userCorpwxTime.getWeekDay()));
                     BigDecimal bigDecimal=new BigDecimal(Duration.between(LocalTime.parse(minTime,df).plusHours(8),LocalTime.parse(maxTime,df).plusHours(8)).toMinutes());
                     bigDecimal=bigDecimal.divide(BigDecimal.valueOf(60),1,BigDecimal.ROUND_HALF_UP).subtract(new BigDecimal(restTime));
                     userCorpwxTime.setWorkHours(bigDecimal.doubleValue());
                     System.out.println(userCorpwxTime);
-                    UserCorpwxTime item = userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", (String) objects[i])
-                            .eq("create_date", LocalDate.now()));
+                    UserCorpwxTime item;
+                    if(userId!=null){
+                         item= userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", (String) objects[i])
+                                .eq("create_date", date));
+                    }else {
+                         item= userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", (String) objects[i])
+                                .eq("create_date", LocalDate.now()));
+                    }
                     if (item != null) {
                         userCorpwxTime.setId(item.getId());
                         //已存在记录,进行更新

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

@@ -1,4 +1,4 @@
-# 用户相关信息
+# \u7528\u6237\u76F8\u5173\u4FE1\u606F
 user.notExists=user does not exist
 user.accountNoExist=The account does not exist.
 user.accountDeactivation=The account has been deactivated.
@@ -13,7 +13,7 @@ user.pwdError=password error
 user.NoPermission=You are not authorized to use the system. Please contact the administrator.
 user.roleNameRepeat=The role name cannot be duplicate.
 user.AccountDeactivation=Your account has been deactivated, unable to operate.
-#注册相关
+#\u6CE8\u518C\u76F8\u5173
 register.codeError=Incorrect verification code.
 register.phoneExist=The phone number is already registered.
 register.phoneError=The phone number already exists.
@@ -24,7 +24,7 @@ register.peopleFullAndCallRoot=The number of people has reached the upper limit
 register.peopleNoEnough=Only "{0}" people can be added. Please reduce the number of people imported this time or contact customer service to increase the maximum number of people.
 register.phoneRepeat=Failed to batch create accounts with duplicate mobile phone numbers: {0}.
 register.fullError=Company personnel has reached the upper limit, unable to enable.
-#权限相关
+#\u6743\u9650\u76F8\u5173
 access.operationError=No permission to operate.
 access.viewError=No permission to view.
 access.deleteError=No permission to delete.
@@ -41,13 +41,13 @@ access.otherCompanyProject=No right to view project details of other companies.
 access.otherCompanyPeople=You can only delete the account of a person in the same company.
 access.staffStop={0} has been deactivated. Please enable the employee before transferring.
 access.deactivated=deactivated
-#名称相关
+#\u540D\u79F0\u76F8\u5173
 name.nullNameError=Name cannot be empty.
 name.nameRepeat=The name already exists.
 Company.nameRepeatByParam=The name ['{0}'] already exists.
 name.nameRepeatByParam=Duplicate {0} name.
 name.CategoryNameRepeat=Category name already exists.
-#其他
+#\u5176\u4ED6
 other.error=Other errors occurred.
 other.errorByParameter=Other error {0} occurred.
 other.update=Update failed.
@@ -74,13 +74,13 @@ other.taskGroup=Task grouping
 other.proDailyRep=Project, approved by daily report
 other.modGroupCharge=Modified the group leader, before [{0}, after [{1}]
 other.phoneNull=Mobile number cannot be empty
-# 请求相关
+# \u8BF7\u6C42\u76F8\u5173
 request.countLimit=The number of interface accesses exceeds the limit. Please try again in 1 minute.
 request.illegal=Illegal request
 request.frequently=Too many requests, please try again later.
 request.outTime=Processing timeout...
-# 部门相关
-department.duplicateError=save fail department [{0}] already exists
+# \u90E8\u95E8\u76F8\u5173
+department.duplicateError=save fail\uFF1A department [{0}] already exists
 department.reviewedError=The current department has a report to be approved, unable to operate!
 department.ParentNull=No selected parent department.
 department.modifyOtherError=Departments of other companies cannot be modified.
@@ -94,7 +94,7 @@ department.leaveDate=The current department has been used by leave data.
 department.approvalProcess=The current department has been used by hour approval process data.
 department.leaveAndTravel=The current department has been used by the leave and travel approval process data.
 department.noExistentOrAccess=Department does not exist or has no permission to view.
-# 日期相关
+# \u65E5\u671F\u76F8\u5173
 date.dateNullError=Start date and end date cannot be blank.
 date.startDateError=Start date cannot be earlier than {0}.
 date.endDateError=End date cannot be earlier than {0}.
@@ -103,7 +103,7 @@ date.startThanEnd=The start date cannot be later than the end date.
 date.dateThan365=The date interval shall not exceed 365 days.
 date.formatError=Incorrect date format
 data.NullErrorByRow=Missing date in row '{0}'
-# 公司相关
+# \u516C\u53F8\u76F8\u5173
 Company.nullNameError=Name cannot be empty
 Company.nameRepeat=The name already exists.
 Company.accessError=Operation without permission.
@@ -112,7 +112,7 @@ Company.synError=Synchronization is in progress, please try again later.
 Company.sysDDError=Non DingDing enterprises, unable to synchronize.
 Company.validationError=Validation failed.
 Company.update=Update failed.
-# 客户相关
+# \u5BA2\u6237\u76F8\u5173
 customer.nameRepeat=Customer name already exists.
 customer.noRepeat=Customer number already exists.
 customer.accessError=No permission to delete.
@@ -124,7 +124,7 @@ DD.dateError=The start date cannot be later than the end date.
 DD.keyAndSecretError=The company is not set innerAppkey and innerAppSecrt
 expense.deleteError=Failed to delete. Expense reimbursement data has been bound.
 expense.notExist=The customer ["{0}"] does not exist.
-# 文件相关
+# \u6587\u4EF6\u76F8\u5173
 file.error=File processing error.
 file.generateError=File generation error
 file.dateNull=Please fill in the data before uploading
@@ -138,13 +138,13 @@ file.deleteError=Delete failed.
 file.deleteSuc=Deletion succeeded.
 file.excelScu=System prompt: Excel file exported successfully!
 file.duplicateTemplate=A file with template name [{0}] already exists. Please delete it and download it again.
-# 配置相关
+# \u914D\u7F6E\u76F8\u5173
 config.used=The current configuration ['{0}'] is already in use.
 config.usedNoParam=The current configuration is already in use.
 config.isPrivateDeploy=Please configure isPrivateDeploy: true.
 config.ddCorpId=Please add a core in the company_dingding table: "{0}
 config.companyIdExist=The companyId already exists. If you need to reinitialize, please reset the company first_ The companyId of this piece of data in dingding is null.
-# 审核相关
+# \u5BA1\u6838\u76F8\u5173
 finance.operationStateError=You can only operate in the status of pending approval.
 finance.revokeReport=Only reports in pending approval status can be withdrawn.
 finance.revokeStateError=Only approved status can be revoked.
@@ -155,9 +155,9 @@ finance.skipData=Skipping the following audited data: '{0}'.
 finance.importErrorByAllAdopt=This data has been approved and cannot be imported.
 finance.review=Professional review
 finance.dept=Department review
-# pdf相关
+# pdf\u76F8\u5173
 pdf.previewError=This format does not support online preview.
-# 日报相关
+# \u65E5\u62A5\u76F8\u5173
 profession.existsError=The major already has a daily report and cannot be deleted.
 profession.repairError=The daily report to be filled in cannot be earlier than "{0}". Please contact the system administrator to fill in.
 profession.repeatError=Daily report: "{0}" already exists, please reselect the date range.
@@ -178,7 +178,7 @@ profession.impProReject=The {1} project in the daily report you {0} imported was
 profession.fillProReject=The {1} project in the daily report you filled in by {0} was rejected by [{2}]. Reason: {3}.
 profession.approver=Please set approver
 profession.checker=Please set reviewer
-# 项目相关
+# \u9879\u76EE\u76F8\u5173
 project.deleteErrorByProject=Failed to delete, bound item.
 project.deleteErrorByMaster=Failed to delete, the master project has been bound.
 project.DateRelation=The data has been associated with the following items and cannot be deleted: {0}.
@@ -222,12 +222,12 @@ project.storesReserve=Project preparation materials
 project.processDocuments=Project process documents
 project.deliverable=Project Deliverable
 project.manage = manage
-# 供货相关
+# \u4F9B\u8D27\u76F8\u5173
 provider.noRepeat=Vendor No. already exists.
 provider.classNameRepeat=The supplier name under this category already exists.
 provider.NameRepeat=The supplier name already exists.
 provider.deleteError=Cannot delete, the following items are already associated with this vendor: {0}.
-# 任务相关
+# \u4EFB\u52A1\u76F8\u5173
 Stages.RepeatInGroup=The task list already exists in the current group and cannot be added repeatedly.
 Stages.deleteError=There are tasks in this task list, which cannot be deleted.
 Stages.SubTasksError=Please complete all subtasks first.
@@ -238,11 +238,11 @@ Stages.noExistAndRefresh=This task does not exist, please refresh and view.
 Stages.ListNull=The task list is empty and cannot be saved.
 Stages.ListNotExist=The task list ["{0}"] does not exist.
 Stages.leastOneGroup=Keep at least one task group.
-#分组相关
+#\u5206\u7EC4\u76F8\u5173
 group.RepeatName=Group has duplicate name.
 group.userNull=The user ["{0}"] does not exist. Please add the member in the organization structure.
 group.userNullById=The user ["{0}", "{1}"] does not exist. Please add the member in the organization structure.
-#微信相关
+#\u5FAE\u4FE1\u76F8\u5173
 wx.TicketError=jsapiTicket Get failed.
 wx.bindError=The user has not been bound to WeChat and needs to log in through the account password.
 wx.dockError=The enterprise has not connected to WeChat.
@@ -252,7 +252,7 @@ wx.noNewMemberUp=No new member updates
 wx.AssCompleted=Processing completed. Currently, no new personnel need WeChat identity of affiliated enterprises.
 wx.AssCompletedByParam=Processing completed. This time: {0} people are automatically associated:{1}.
 wx.noWXUser=Only enterprise WeChat users support this operation.
-#请假相关
+#\u8BF7\u5047\u76F8\u5173
 leave.leave=leave
 leave.leaveOfDay=Leave of the day
 leave.businessRepeat=There is already a travel application in this period, which cannot be submitted repeatedly.
@@ -294,16 +294,16 @@ leave.compensatory=Compensatory leave
 leave.paternity=Paternity leave
 leave.notFill=Not filled in
 leave.clockIn=Clock in
-#报销相关
+#\u62A5\u9500\u76F8\u5173
 Reimbursement.nameNull=The name of the reimbursement applicant cannot be blank.
 Reimbursement.costTypeNull=Expense type cannot be empty
 Reimbursement.dataNull=The filling date cannot be blank
 Reimbursement.PeopleNull=Reimbursement applicant ["{0}"] does not exist.
 Reimbursement.TypeError=The [{1}] type does not exist in the current expense type [{0}].
-#薪资相关
+#\u85AA\u8D44\u76F8\u5173
 salary.uploadErrorByAdopt={0} The monthly salary has been approved and cannot be uploaded.
 salary.lackAndUpAgain=The salary cost of ["{0}"] is missing, please modify the data and upload again.
-#报表相关
+#\u62A5\u8868\u76F8\u5173
 report.report=report form
 report.userNull=User ["{0}"] does not exist in the financial statement, please import again.
 report.warningType=Cost budget with hour alert type has been set, and importing hours is not supported temporarily.
@@ -317,7 +317,7 @@ report.hourAll=You participated in {0} projects last week with a total of {1} ho
 report.dailyReject=The {1} project in the daily report you filled in by {0} was rejected by [{2}]. Reason: {3}
 report.reportApp=Daily report approved
 report.hourReportNoFilled=Your work hour report for {0} has not been completed.
-#模板相关
+#\u6A21\u677F\u76F8\u5173
 Template.subProject=subproject
 Template.AlreadyExists=The template name already exists.
 Template.lackSonProject=The sub item column is missing. Please download the latest template.
@@ -330,13 +330,13 @@ Template.finishProject=completed the project
 Template.revokeProject=cancelled the project
 Template.restart=Restarted the project
 Template.projectSus=suspended the project
-#角色相关
+#\u89D2\u8272\u76F8\u5173
 role.role=role
 role.noExist=The role does not exist
 role.deleteRootError=Cannot delete super administrator
 role.deleteErrorByDefault=This role is the default role when adding new employees. Please set other roles as default before attempting to delete
 role.deleteErrorByHavePeople=There are related persons in this role. Please modify them to other roles before deleting them.
-#员工相关
+#\u5458\u5DE5\u76F8\u5173
 staff.nameNullByRow=Employee name is missing in row "{0}".
 staff.peopleNullAndAdd=The person ["{0}"] does not exist. Please add it in the organization structure first or import it synchronously through Ding Talk.
 staff.proportionError=The personnel ["{0}"] "+" allocation proportion does not meet 100%. The current proportion ["{1}"%], please check.
@@ -345,23 +345,23 @@ staff.deleteErrorByDaily=The employee has daily reports filled in and cannot be
 staff.deleteErrorByTask=The employee has a task and cannot be deleted.
 staff.deleteErrorByProject=The employee has a responsible project and cannot be deleted.
 staff.jobNoNull=The job number cannot be empty
-#数据相关
+#\u6570\u636E\u76F8\u5173
 data.importRepeat=Do not import duplicate data
 data.importSucRow=Successfully imported '{0}' pieces of data.
 data.OversizeError=The data volume is too large, please export in different time periods
 data.upSkip=Auto update '{0}' item code already exists: '{1}'.
 data.exceedMonthError=The data acquisition period shall not exceed one month.
 data.verificationError=Data error,verification failed
-#供应商相关
+#\u4F9B\u5E94\u5546\u76F8\u5173
 supplier.noExist=Supplier ["{0}"] does not exist in supplier category ["{1}"].
 supplier.addSupplier=Please fill in the supplier data
 supplier.lackNameOnRow=The supplier name is missing in row "{0}"
 supplier.nameRepeat=The current imported data has duplicate supplier names ["{0}"].
-#研究中心相关
+#\u7814\u7A76\u4E2D\u5FC3\u76F8\u5173
 research.addData=Please fill in the data of the research center.
 research.nameNull=The center name is missing in row '{0}'.
 research.nameRepeat=The current imported data has duplicate center name ["{0}"].
-#条目
+#\u6761\u76EE
 entry.No=Job No
 entry.name=name
 entry.materialCost=Material cost
@@ -473,7 +473,7 @@ entry.noFill=Not filled
 entry.workingHours=Working hours
 entry.none=nothing
 entry.deviation=deviation
-#文件名
+#\u6587\u4EF6\u540D
 fileName.financialCost={0}_ Financial Staff Cost Template
 fileName.projectImport={0}_ Project import Template
 fileName.resourceDemand=Resource demand statistics report_ {0}
@@ -526,8 +526,8 @@ excel.projectManager=The project manager must exist in the participants
 excel.projectCharge=The person in charge must exist in the participants
 excel.dateFormat=Date Format:yyyy-MM-dd
 excel.forExample=for example: 2021-01-01
-excel.yesPublic=yespublic project
-excel.noPublic=noaverage project
+excel.yesPublic=yes\uFF1Apublic project
+excel.noPublic=no\uFF1Aaverage project
 excel.yes=yes
 excel.no=no
 excel.normal=normal
@@ -664,12 +664,12 @@ excel.standard=Standard working hours
 excel.actual=Actual working time
 excel.leave=Time of leave
 excel.workWeather=Whether the working hours are met
-#推送
+#\u63A8\u9001
 push.fillIn=Your work hour report for today has not been completed.
 push.name=Qu Yue ting
 push.Dep=Marketing Department
 push.ASAP=Please fill in as soon as possible.
-#阶段
+#\u9636\u6BB5
 stages.engineering=engineering design
 stages.research=Software and hardware R&D
 stages.service=Customer service work order processing
@@ -697,13 +697,13 @@ stages.withdrawn=Withdrawn
 stages.passed=Passed
 stages.toBeSub=To be submitted
 stages.upTask=Update task progress to
-#统计表
+#\u7EDF\u8BA1\u8868
 Statistics.tj=Statistics
 Statistics.OvertimeDet=Overtime Details
 Statistics.ByPro=Statistics by project
 Statistics.ByPeople=Statistics by personnel
 Statistics.ProjectCostBase=Project Cost Baseline Table_
-#星期
+#\u661F\u671F
 week.Monday=Monday
 week.Tuesday=Tuesday
 week.Wednesday=Wednesday

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -108,6 +108,9 @@
                                         <span v-if="index < groupDetailData.participators.length - 1">、</span>
                                     </span>
                                 </el-form-item>
+                                <el-form-item label="wbsCode" v-if="user.companyId == 936">
+                                    <span>{{groupDetailData.wbsCode}}</span>
+                                </el-form-item>
                             </el-form>
                         </div>
                         <span slot="footer" class="dialog-footer">