Przeglądaj źródła

去除一些打印日志

seyason 2 lat temu
rodzic
commit
7039b96c57

+ 0 - 12
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -40,12 +40,6 @@ public class AuthRedirectController {
     private String suitId;
     @Value("${suitSecret}")
     private String suitSecret;
-    @Value("${token}")
-    private String token;
-    @Value("${encodingAesKey}")
-    private String encodingAesKey;
-    @Value("${corpId}")
-    private String corpId;
 
     @Resource
     SysConfigMapper sysConfigMapper;
@@ -55,8 +49,6 @@ public class AuthRedirectController {
     UserMapper userMapper;
     @Resource
     WxCorpInfoMapper wxCorpInfoMapper;
-    @Resource
-    UserService userService;
 
     @RequestMapping("/corpWXAuth")
     public ModelAndView auth(String code, String state) {
@@ -65,12 +57,9 @@ public class AuthRedirectController {
         //获取设备类型
         String deviceType = UserAgentUtils.getDeviceType(userAgent);
         boolean isMobile = "MOBILE".equals(deviceType);
-        System.out.println("corpWXAuth state=="+state);
-        System.out.println("企微用户登录 code="+code);
         String url = WeiXinCorpController.GET_CORP_USERINFO_URL.replace("SUITE_ACCESS_TOKEN", getSuiteAccessToken()).replace("CODE", code);
         String forObject = this.restTemplate.getForObject(url, String.class);
         JSONObject obj = JSONObject.parseObject(forObject);
-        System.out.println("企微身份:"+obj.toString());
         String wxUserId = obj.getString("UserId");
         String openUserId = obj.getString("open_userid");
         String corpId = obj.getString("CorpId");
@@ -80,7 +69,6 @@ public class AuthRedirectController {
         if (userList.size() > 0) {
             //该用户已存在
             User curUser = userList.get(0);
-            System.out.println("企微用户是:"+curUser.getName());
             if (curUser.getIsActive() == 1) {
                 reqParam.put("userId", curUser.getId());
             } else {

+ 5 - 41
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ReportController.java

@@ -200,7 +200,6 @@ public class ReportController {
             return msg;
         }
         if (subProjectId == null) {
-            System.out.println("!!===!!有空的子项目");
             subProjectId = new Integer[projectId.length];
             for(int i=0;i<subProjectId.length; i++) {
                 subProjectId[i] = 0;
@@ -225,6 +224,11 @@ public class ReportController {
                 groupId[i] = 0;
             }
         }
+        if (groupId.length != id.length) {
+            HttpRespMsg msg = new HttpRespMsg();
+            msg.setError("请设置任务分组");
+            return msg;
+        }
         if (customData == null) {
             customData = new Double[projectId.length];
             for(int i=0;i<customData.length; i++) {
@@ -288,48 +292,9 @@ public class ReportController {
             }
         }
 
-
         //检查项目是否可填报; 修改为不校验项目,前端加载的项目已经过滤掉了完成和撤销的
         List<Integer> integers = Arrays.asList(projectId);
         List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", integers));
-//        for (int i=0;i<projectId.length; i++) {
-//            int pid = projectId[i];
-//            Optional<Project> findP = projectList.stream().filter(p->p.getId().equals(pid)).findFirst();
-//            if (findP.isPresent()) {
-//                Project curP = findP.get();
-//                if (!createDate[i].contains("@")) {
-//                    if (curP.getStatus() == 2) {
-//                        HttpRespMsg msg = new HttpRespMsg();
-//                        //msg.setError("项目["+curP.getProjectName()+"]已完成。");
-//                        msg.setError(MessageUtils.message("project.complete",curP.getProjectName()));
-//                        return msg;
-//                    }
-//                    if (curP.getStatus() == 3) {
-//                        HttpRespMsg msg = new HttpRespMsg();
-//                        //msg.setError("项目["+curP.getProjectName()+"]已撤销。");
-//                        msg.setError(MessageUtils.message("project.revoke",curP.getProjectName()));
-//                        return msg;
-//                    }
-//                } else {
-//                    //批量填报(含代填)
-//                    String[] dateArr = createDate[i].split("@");
-//                    for (String curDate : dateArr) {
-//                        if (curP.getStatus() == 2) {
-//                            HttpRespMsg msg = new HttpRespMsg();
-//                            //msg.setError("项目["+curP.getProjectName()+"]已完成。");
-//                            msg.setError(MessageUtils.message("project.complete",curP.getProjectName()));
-//                            return msg;
-//                        }
-//                        if (curP.getStatus() == 3) {
-//                            HttpRespMsg msg = new HttpRespMsg();
-//                            //msg.setError("项目["+curP.getProjectName()+"]已撤销。");
-//                            msg.setError(MessageUtils.message("project.revoke",curP.getProjectName()));
-//                            return msg;
-//                        }
-//                    }
-//                }
-//            }
-//        }
         TimeType comTimeType = timeTypeMapper.selectById(user.getCompanyId());
         List<ReportAuditorSetting> auditorSettingList = null;
         if (comTimeType.getReportAuditType() == 3) {
@@ -343,7 +308,6 @@ public class ReportController {
                 auditorSettingList = new ArrayList<>();
                 for (int i=0;i<auditorSettingArray.length; i++) {
                     String str = auditorSettingArray[i];
-                    System.out.println(str);
                     if (str.contains("@")) {
                         str = str.replaceAll("@", ",");
                     }

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

@@ -256,8 +256,6 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
     public void sendWXCorpTemplateMsg(WxCorpInfo corpInfo, String corpUserid, JSONObject msg) {
         try {
             if (isDev) return;
-            log.info("发送企业微信模板消息===" + corpUserid);
-            System.out.println("发送企业微信模板消息===" + corpUserid);
             String accessToken = getCorpAccessToken(corpInfo);
             String url = URL_SEND_WXCORP_MSG.replaceAll("ACCESS_TOKEN", accessToken);
             HttpHeaders headers = new HttpHeaders();
@@ -275,17 +273,15 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     HttpMethod.POST, requestEntity, String.class);
             if (responseEntity.getStatusCode() == HttpStatus.OK) {
                 String resp = responseEntity.getBody();
-                log.info("发送企业微信模板消息返回结果==" + resp);
-                System.out.println("发送企业微信模板消息返回结果==" + resp);
                 JSONObject json = JSONObject.parseObject(resp);
                 if (json.getIntValue("errcode") == 0) {
                     //发送成功
 
                 } else {
+                    System.out.println("发送企业微信模板消息发生错误==" + resp);
                     throw new Exception(json.toJSONString());
                 }
             } else {
-                log.error("发送失败:" + responseEntity.getStatusCode() + ", " + responseEntity.getBody());
                 System.err.println("发送失败:" + responseEntity.getStatusCode() + ", " + responseEntity.getBody());
             }