From cf28e9992cb05efc608550d2037e968eea758975 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 21 Jun 2022 14:06:37 +0800
Subject: [PATCH] 制证批量审批修改
---
src/main/java/org/springblade/modules/sqlAsyc/Sql.java | 10 +++++
src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java | 25 +++++-------
src/main/java/org/springblade/modules/sqlAsyc/SqlAsyncController.java | 26 +++++++++++++
3 files changed, 46 insertions(+), 15 deletions(-)
diff --git a/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java b/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
index 551faab..c821770 100644
--- a/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/exam/service/impl/ScoreAuditRecordsServiceImpl.java
@@ -183,12 +183,7 @@
" " + "where id = " + "'" + examScore.getId() + "';"+
"update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
",cancel = " + "'" + trainingRegistration.getCancel() + "'" +
- " " + "where id = " + "'" + trainingRegistration.getId() + "';"+
- "update blade_user set hold = " + "'" + user.getHold() + "'" +
- ",securitynumber = " + "'" + user.getSecuritynumber() + "'" +
- ",user_type = " + "'" + user.getUserType() + "'" +
- ",is_train = " + "'" + user.getIsTrain() + "'" +
- " " + "where id = " + "'" + user.getId() + "'";
+ " " + "where id = " + "'" + trainingRegistration.getId() + "'";
myAsyncService.FTP(s1);
}
}
@@ -273,13 +268,13 @@
//设置为未制证的状态
user.setUserType(7);
//如果已有保安证编号,不更保安证编号信息
- if (null == user.getSecuritynumber() || user.getSecuritynumber().equals("")) {
- //去内网生成保安证编号,由内网生成,无需返回
- //数据推送
- Map<String, Object> map = new HashMap<>(1);
- map.put("key",examScore);
- myAsyncService.FTPSecurityNumberBit(map);
- }
+// if (null == user.getSecuritynumber() || user.getSecuritynumber().equals("")) {
+// //去内网生成保安证编号,由内网生成,无需返回
+// //数据推送
+// Map<String, Object> map = new HashMap<>(1);
+// map.put("key",examScore);
+// myAsyncService.FTPSecurityNumberBit(map);
+// }
} else {
//不合格
examScore.setQualified(1);
@@ -312,8 +307,8 @@
" " + "where id = " + "'" + examScore.getId() + "';"+
"update sys_training_registration set is_exam = " + "'" + trainingRegistration.getIsExam() + "'" +
" " + "where id = " + "'" + trainingRegistration.getId() + "';"+
- "update blade_user set hold = " + "'" + user.getHold() + "'" +
- ",securitynumber = " + "'" + user.getSecuritynumber() + "'" +
+ "update blade_user set hold = " + "'" + 2 + "'" +
+ ",securitynumber = " + "'" + "" + "'" +
",user_type = " + "'" + user.getUserType() + "'" +
",is_train = " + "'" + user.getIsTrain() + "'" +
" " + "where id = " + "'" + user.getId() + "'";
diff --git a/src/main/java/org/springblade/modules/sqlAsyc/Sql.java b/src/main/java/org/springblade/modules/sqlAsyc/Sql.java
new file mode 100644
index 0000000..de2f331
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sqlAsyc/Sql.java
@@ -0,0 +1,10 @@
+package org.springblade.modules.sqlAsyc;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class Sql implements Serializable {
+ private String sql;
+}
diff --git a/src/main/java/org/springblade/modules/sqlAsyc/SqlAsyncController.java b/src/main/java/org/springblade/modules/sqlAsyc/SqlAsyncController.java
new file mode 100644
index 0000000..977c758
--- /dev/null
+++ b/src/main/java/org/springblade/modules/sqlAsyc/SqlAsyncController.java
@@ -0,0 +1,26 @@
+package org.springblade.modules.sqlAsyc;
+
+import lombok.AllArgsConstructor;
+import org.springblade.modules.system.service.MyAsyncService;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * sql 同步内网
+ * @author zhongrj
+ * @since 2022-06-21
+ */
+@RestController
+@RequestMapping("/sql")
+@AllArgsConstructor
+public class SqlAsyncController {
+
+ private final MyAsyncService myAsyncService;
+
+ /**
+ * sql 同步
+ */
+ @PostMapping("/async")
+ public void sqlAsyc(@RequestBody Sql sql){
+ myAsyncService.FTP(sql.getSql());
+ }
+}
--
Gitblit v1.9.3