diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index 7961896d..f32087f9 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -4003,7 +4003,7 @@ public class PageController { ModelAndView mv = new ModelAndView(); mv.addObject("type", type); mv.addObject("echartType", echartType); - mv.setViewName("pages/depository/InAndOut_echart/LineOrBarChart"); + mv.setViewName("pages/depository/Tableechart/LineOrBarChart"); return mv; } @@ -4020,7 +4020,7 @@ public class PageController { Map previousMonth = DateUtil.getPreviousMonth(); List monthNames = ObjectFormatUtil.objToList(previousMonth.get("monthNames"), String.class); mv.addObject("monthNames", monthNames); - mv.setViewName("pages/depository/InAndOut_echart/SunburstChart"); + mv.setViewName("pages/depository/Tableechart/SunburstChart"); return mv; } } diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/QyWxOperationController.java b/src/main/java/com/dreamchaser/depository_manage/controller/QyWxOperationController.java index cbe32a30..ee9bbea4 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/QyWxOperationController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/QyWxOperationController.java @@ -16,6 +16,7 @@ import com.dreamchaser.depository_manage.security.pool.HandlesOtherFunctionalThr import com.dreamchaser.depository_manage.security.pool.RedisPool; import com.dreamchaser.depository_manage.service.*; import com.dreamchaser.depository_manage.service.impl.QyWxOperationService; +import com.dreamchaser.depository_manage.utils.EncryptionAlgorithmUtil; import com.dreamchaser.depository_manage.utils.Md5; import com.dreamchaser.depository_manage.utils.ObjectFormatUtil; import com.dreamchaser.depository_manage.utils.QyWxXMLUtils; @@ -264,18 +265,15 @@ public class QyWxOperationController { String userId = jsonObject.getString("userid"); if (errCode == 0) { // 如果成功获取userid - Map portInfo = PublicConfig.findUserByQyWxUserId(userId); - UserByPort userByPort = (UserByPort) portInfo.get("user"); - - String key = (String) portInfo.get("key"); - String token = (String) portInfo.get("token"); +// Map portInfo = PublicConfig.findUserByQyWxUserId(userId); +// UserByPort userByPort = (UserByPort) portInfo.get("user"); + UserByPort userByPort = userService.findUserByWorkWechat(userId); + EncryptionAlgorithmUtil encryptionAlgorithmUtils = new EncryptionAlgorithmUtil(); + Map userKeyAndUserToken = encryptionAlgorithmUtils.getUserKeyAndUserToken(userByPort); + String key = userKeyAndUserToken.get("key"); + String token = userKeyAndUserToken.get("token"); if (userByPort != null) { // 如果数据库中存在该用户 - // 获取当前用户所在主部门 - Long maindeparment = userByPort.getMaindeparment(); - if (maindeparment == 309) { - userByPort.setMaindeparment(userByPort.getAdminorg()); - } // 设置放入时间 userByPort.setInstant(Instant.now()); AuthenticationTokenPool.addUserToken(token, userByPort); diff --git a/src/main/java/com/dreamchaser/depository_manage/utils/EncryptionAlgorithmUtil.java b/src/main/java/com/dreamchaser/depository_manage/utils/EncryptionAlgorithmUtil.java index 04bb8cff..38f7dbb2 100644 --- a/src/main/java/com/dreamchaser/depository_manage/utils/EncryptionAlgorithmUtil.java +++ b/src/main/java/com/dreamchaser/depository_manage/utils/EncryptionAlgorithmUtil.java @@ -65,8 +65,8 @@ public class EncryptionAlgorithmUtil { String userToken = DigestUtils.sha1Hex(sha1Str); - result.put("userKey", userKey); - result.put("userToken", userToken); + result.put("key", userKey); + result.put("token", userToken); return result; } diff --git a/src/main/resources/templates/pages/depository/InAndOut_echart/LineOrBarChart.html b/src/main/resources/templates/pages/depository/Tableechart/LineOrBarChart.html similarity index 100% rename from src/main/resources/templates/pages/depository/InAndOut_echart/LineOrBarChart.html rename to src/main/resources/templates/pages/depository/Tableechart/LineOrBarChart.html diff --git a/src/main/resources/templates/pages/depository/InAndOut_echart/SunburstChart.html b/src/main/resources/templates/pages/depository/Tableechart/SunburstChart.html similarity index 100% rename from src/main/resources/templates/pages/depository/InAndOut_echart/SunburstChart.html rename to src/main/resources/templates/pages/depository/Tableechart/SunburstChart.html