From 391d800ea9a131beb2304c7a9550727c65f01fc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Thu, 21 Mar 2024 23:11:50 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/LabourApiController.java | 24 ++++++++++++++++++- .../views/trouble/pshProblemmodify/index.vue | 8 +++++++ .../views/trouble/sspProblemmodify/index.vue | 10 +++++++- .../ruoyi/web/common/CaptchaController.java | 1 - .../trouble/SmzSspProblemmodifyMapper.xml | 2 +- 5 files changed, 41 insertions(+), 4 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java b/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java index b3d76347..1a18b409 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/api/labour/controller/LabourApiController.java @@ -837,7 +837,29 @@ public class LabourApiController extends BaseController { } public static void main(String[] args) { - pushLabourGroup(); + String baseUrl = "https://szgc.jhncidg.com/jhapi"; + String timestamp = String.valueOf(System.currentTimeMillis()); + String appId = "jhcf17054840354615gUkkFJvTn003"; + try { + // 明文信息->公钥加密 + String encryptByPublicKeyStr = AuthRsaUtils.encryptByPublicKey(publicKey, appId+timestamp); + log.info("公钥加密...{}" , encryptByPublicKeyStr); + // redis中查询->未查询到则重新获取 + String url = baseUrl + "/api/labour/v1/getToken"; + Map body = new HashMap<>(); + body.put("appId",appId); + body.put("sign",encryptByPublicKeyStr); + body.put("timestamp",timestamp); + String result = HttpClientUtil.doPost(url, null, com.alibaba.fastjson2.JSON.toJSONString(body)); + JSONObject jsonObject = JSONObject.parseObject(result); + if(jsonObject.getInteger("code")==200){ + // 获取到存入redis,设置30分钟有效期 + String token = jsonObject.getString("Authorization"); + log.info("Authorization...{}" , token); + } + }catch (Exception e){ + e.printStackTrace(); + } } } diff --git a/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue b/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue index c3709046..0978a736 100644 --- a/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue +++ b/ruoyi-ui/src/views/trouble/pshProblemmodify/index.vue @@ -44,6 +44,14 @@ /> + + + - + + + + >>>"+code); redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES); // 转换流信息写出 FastByteArrayOutputStream os = new FastByteArrayOutputStream(); diff --git a/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml b/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml index 8c05417d..e45f554d 100644 --- a/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/trouble/SmzSspProblemmodifyMapper.xml @@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and ssp.problemArea like concat('%', #{problemArea}, '%') and ssp.workParts like concat('%', #{workParts}, '%') and ssp.changeInfo like concat('%', #{changeInfo}, '%') - and ssp.lordSent = #{lordSent} + and (ssp.lordSent like concat('%', #{lordSent}, '%') or ssp.lordSentUser like concat('%', #{lordSent}, '%')) and ssp.lordSentUser = #{lordSentUser} and ssp.copySend = #{copySend} and ssp.copySendUser = #{copySendUser} From ad4692ea799e439ff70c38806a01d89c121e6681 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E7=8E=89=E7=90=A6?= <7507756+jiang_yuqi@user.noreply.gitee.com> Date: Fri, 22 Mar 2024 01:09:25 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/work/emergencyDrill/emergencyDrillDrawer.vue | 7 ++++--- .../src/main/resources/mapper/work/WorkTrainMapper.xml | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue b/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue index 6bf4661b..01260aef 100644 --- a/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue +++ b/ruoyi-ui/src/views/work/emergencyDrill/emergencyDrillDrawer.vue @@ -481,13 +481,14 @@ export default { this.deptOptions = response.data; this.open = true; }); + let that = this; getWorkTrain(id).then((response) => { - this.form = response.data; + that.form = response.data; let depts = []; - this.form.workTrainDeptList.forEach((item) => { + that.form.workTrainDeptList.forEach((item) => { depts.push(item.deptId); }); - this.form.workTrainDeptList = depts; + that.form.workTrainDeptList = depts; if (that.form.trainFile) { that.files = that.form.trainFile.split(","); } diff --git a/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml b/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml index d93b5939..fe5b82dd 100644 --- a/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml +++ b/yanzhu-jh/src/main/resources/mapper/work/WorkTrainMapper.xml @@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"