Bläddra i källkod

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

Min 1 år sedan
förälder
incheckning
45e2873728

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

@@ -965,13 +965,15 @@ public class FeishuInfoController {
         //todo:处理人员
         //获取应用可用范围内的人员
         JSONArray userArrays = (JSONArray) availableRange.get("user_ids");
+        System.out.println("userArrays==========="+userArrays.toJSONString());
         if(userArrays!=null&&userArrays.size()>0){
             for (int i = 0; i < userArrays.size(); i++) {
-                JSONObject userOb = userArrays.getJSONObject(i);
-                boolean b = allUserList.stream().anyMatch(al -> al.getFeishuUserid() != null && al.getFeishuUserid().equals(userOb.getString("open_id")));
+                String uid = userArrays.getString(i);
+                boolean b = allUserList.stream().anyMatch(al -> al.getFeishuUserid() != null && al.getFeishuUserid().equals(uid));
                 if(!b){
                     //不存在的人员, 进行插入
                     User user = new User();
+                    JSONObject userOb = feishuInfoService.getUserInfo(feishuInfo, uid);
                     user.setId(SnowFlake.nextId()+"")
                             .setRoleId(role.getId())//默认普通员工
                             .setRoleName(role.getRolename())

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

@@ -1373,8 +1373,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     private void deleteProData(Integer id) {
         List<Report> rList = reportMapper.selectList(new QueryWrapper<Report>().select("id").eq("project_id", id));
         if (rList.size() > 0) {
-            //删除日报的审核日志
-            reportAuditLogMapper.delete(new QueryWrapper<ReportAuditLog>().in("report_id", rList.stream().map(Report::getId).collect(Collectors.toList())));
+            //TODO: 删除日报的审核日志,按项目相关的审核报告进行删除
+//            reportAuditLogMapper.delete(new QueryWrapper<ReportAuditLog>().in("report_id", rList.stream().map(Report::getId).collect(Collectors.toList())));
             reportMapper.delete(new QueryWrapper<Report>().eq("project_id", id));
         }