张涛 1 年之前
父節點
當前提交
dc5dc27446

+ 1
- 1
application/src/main/java/com/lyg/application/controller/UploadController.java 查看文件

@@ -124,7 +124,7 @@ public class UploadController extends BaseController {
124 124
     @GetMapping("/as/holiday")
125 125
     public void promptWarning() throws Exception {
126 126
 
127
-        taRotationService.selectGetWaring();
127
+//        taRotationService.selectGetWaring();
128 128
 //        taMandatoryLeaveService.selectGetPrompt();
129 129
 
130 130
     }

+ 0
- 52
application/src/main/java/com/lyg/application/service/impl/TaRotationServiceImpl.java 查看文件

@@ -144,59 +144,7 @@ public class TaRotationServiceImpl extends BaseServiceImpl<TaRotationMapper, TaR
144 144
 
145 145
     @Override
146 146
     public void selectGetWaring() {
147
-//
148
-////预警 消息
149
-//        List<TaRotation> earlyWaringList = baseMapper.waring(localDate);
150
-//
151
-//        if (!earlyWaringList.isEmpty()) {
152
-//            for (TaRotation item : earlyWaringList) {
153
-//                TaMessage taMessage = new TaMessage();
154
-//                String uuid = StringUtil.UUID();
155
-//                taMessage.setMessageId(uuid);
156
-//                taMessage.setSourceId(item.getRotationId());
157
-//                StringBuilder sb = new StringBuilder(warningTmp);
158
-//                sb.insert(Constants.numI, item.getEmployeeNum());
159
-//                Integer i = item.getEmployeeNum().length() + Constants.nameI;
160
-//                sb.insert(i, item.getEmployeeName());
161
-//                taMessage.setContentSent(sb.toString());
162
-//                taMessage.setSourceName("taRotation");
163
-//                taMessage.setWaringType("waring");
164
-//
165
-//                Long count = taMessageService.countBy("source_id", item.getRotationId(), true);
166
-//                if (count == 0) {
167
-//                    taMessageMapper.insert(taMessage);
168
-//                    insertIntoTaSending(item.getCreateUser(), uuid);
169
-//                }
170
-//
171
-//            }
172
-//        }
173
-////提示消息
174
-//        List<TaRotation> earlyPromptList = baseMapper.prompt(localDate);
175
-//
176
-//        if (earlyPromptList.size() != 0) {
177
-//            for (TaRotation item : earlyPromptList) {
178
-//                TaMessage taMessage = new TaMessage();
179
-//                String uuid = StringUtil.UUID();
180
-//                taMessage.setMessageId(uuid);
181
-//                taMessage.setSourceId(item.getRotationId());
182
-//                StringBuilder sb = new StringBuilder(promptTmp);
183
-//                sb.insert(Constants.numI, item.getEmployeeNum());
184
-//                Integer i = item.getEmployeeNum().length() + Constants.nameI;
185
-//                sb.insert(i, item.getEmployeeName());
186
-//                taMessage.setContentSent(sb.toString());
187
-//                taMessage.setSourceName("taRotation");
188
-//                taMessage.setWaringType("prompt");
189
-//
190
-//                Long count = taMessageService.countBy("source_id", item.getRotationId(), true);
191
-//                if (count == 0) {
192
-//                    taMessageMapper.insert(taMessage);
193
-//                    insertIntoTaSending(item.getCreateUser(), uuid);
194
-//                }
195
-//
196
-//            }
197
-//        }
198 147
 
199
-//        return;
200 148
         LocalDate localDate = LocalDate.now();
201 149
 
202 150
         // 预警消息处理

+ 1
- 3
application/src/main/java/com/lyg/application/util/Rule.java 查看文件

@@ -51,11 +51,9 @@ public class Rule {
51 51
             if (!result.isEmpty()) {
52 52
                 isRulesCompatible = result.stream()
53 53
                         .allMatch(error -> error.getRules() != null && error.getRules().contains(COMPATIBLE_TEXT));
54
-
55
-
56 54
             }
57 55
 
58
-            String message = (isRulesCompatible  ? "相容" : "相容";
56
+            String message = (isRulesCompatible  ? "相容" : "相容");
59 57
 
60 58
 
61 59
                 int statusCode = 200; // HTTP状态码

+ 3
- 1
application/src/main/resources/mapper/TaRotationMapper.xml 查看文件

@@ -10,7 +10,7 @@
10 10
         AND r.specific_org_num != r.org_num_job_rotation
11 11
         AND r.specific_org_num=#{params.oldOrgCode}
12 12
         AND r.org_num_job_rotation=#{params.newOrgCode}
13
-        AND r.rotation_exe_time &lt;=#{newDate}
13
+        AND r.rotation_exe_time &gt;=#{newDate}
14 14
         AND r.counter_imp_positions IN
15 15
         <foreach item="item" index="index" collection="orgList" open="(" separator="," close=")">
16 16
             #{item}
@@ -20,6 +20,8 @@
20 20
         <foreach item="item" index="index" collection="targetList" open="(" separator="," close=")">
21 21
             #{item}
22 22
         </foreach>
23
+        And r.counter_imp_positions != r.counter_imp_post_rotation
24
+
23 25
     </select>
24 26
     <select id="waring" resultType="com.lyg.application.entity.TaRotation">
25 27
         SELECT * FROM TA_ROTATION r

+ 2
- 2
system/src/main/java/com/lyg/system/controller/BaseController.java 查看文件

@@ -1,7 +1,6 @@
1 1
 package com.lyg.system.controller;
2 2
 
3 3
 import cn.dev33.satoken.stp.StpUtil;
4
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
5 4
 import com.lyg.common.Constants;
6 5
 import com.lyg.common.util.StringUtil;
7 6
 import com.lyg.system.entity.SysUser;
@@ -34,7 +33,8 @@ public class BaseController {
34 33
     @SneakyThrows
35 34
     public String checkAuth() {
36 35
         SysUser sysUser = currentUser();
37
-        if (sysUser.getIsAdmin() != 1) {
36
+        Integer isAdmin = sysUser.getIsAdmin();
37
+        if (isAdmin != 1 || isAdmin == null) {
38 38
             return sysUser.getUserId();
39 39
         }
40 40
         return null;