From 91cb12265462fbee47c2d0965f967ba72248bfe8 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 13 Jul 2022 09:44:39 +0800
Subject: [PATCH] 制证申请流程修改,去除去重校验,防止丢包问题

---
 src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java |   60 ++++++++++++++++++++++++++++++------------------------------
 1 files changed, 30 insertions(+), 30 deletions(-)

diff --git a/src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java b/src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java
index 977451c..c779fa4 100644
--- a/src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java
+++ b/src/main/java/org/springblade/modules/accreditation/service/impl/AccreditationRecordsServiceImpl.java
@@ -70,42 +70,42 @@
 			//判断类型,如果是上岗证则判断是否有申请,有申请的不在新增记录
 			if (accreditationRecords.getType() == 1) {
 				//查询当前人员是否有申请记录
-				int count = baseMapper.getAccreditationRecordsByUserIdCount(id);
-				if (count < 1) {
-					//新增
-					this.save(records);
+//				int count = baseMapper.getAccreditationRecordsByUserIdCount(id);
+//				if (count < 1) {
+				//新增
+				this.save(records);
 
-					//内网新增
-					String s = "insert into sys_accreditation_records(id,user_id,create_time,create_user,status,type,audit_status) " +
-						"values(" + "'" + records.getId() + "'" + ","
-						+ "'" + records.getUserId() + "'" + ","
-						+ "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(records.getCreateTime()) + "'" + ","
-						+ "'" + records.getCreateUser() + "'" + ","
-						+ "'" + records.getStatus() + "'" + ","
-						+ "'" + records.getType() + "'" + ","
-						+ "'" + records.getAuditStatus() + "'" + ")";
-					myAsyncService.FTP(s);
-				}
+				//内网新增
+				String s = "insert into sys_accreditation_records(id,user_id,create_time,create_user,status,type,audit_status) " +
+					"values(" + "'" + records.getId() + "'" + ","
+					+ "'" + records.getUserId() + "'" + ","
+					+ "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(records.getCreateTime()) + "'" + ","
+					+ "'" + records.getCreateUser() + "'" + ","
+					+ "'" + records.getStatus() + "'" + ","
+					+ "'" + records.getType() + "'" + ","
+					+ "'" + records.getAuditStatus() + "'" + ")";
+				myAsyncService.FTP(s);
+//				}
 			}
 			//判断类型,如果是证书的,审核未通过的可以再次申请,审核通过的,暂时不给于新增记录
 			if (accreditationRecords.getType() == 2) {
 				//查询当前人员是否有待审核和审核通过的记录数
-				int count = baseMapper.getAccreditationRecordsByUserIdAuditCount(id, 2);
-				if (count < 1) {
-					//新增
-					this.save(records);
+//				int count = baseMapper.getAccreditationRecordsByUserIdAuditCount(id, 2);
+//				if (count < 1) {
+				//新增
+				this.save(records);
 
-					//内网新增
-					String s = "insert into sys_accreditation_records(id,user_id,create_time,create_user,status,type,audit_status) " +
-						"values(" + "'" + records.getId() + "'" + ","
-						+ "'" + records.getUserId() + "'" + ","
-						+ "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(records.getCreateTime()) + "'" + ","
-						+ "'" + records.getCreateUser() + "'" + ","
-						+ "'" + records.getStatus() + "'" + ","
-						+ "'" + records.getType() + "'" + ","
-						+ "'" + records.getAuditStatus() + "'" + ")";
-					myAsyncService.FTP(s);
-				}
+				//内网新增
+				String s = "insert into sys_accreditation_records(id,user_id,create_time,create_user,status,type,audit_status) " +
+					"values(" + "'" + records.getId() + "'" + ","
+					+ "'" + records.getUserId() + "'" + ","
+					+ "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(records.getCreateTime()) + "'" + ","
+					+ "'" + records.getCreateUser() + "'" + ","
+					+ "'" + records.getStatus() + "'" + ","
+					+ "'" + records.getType() + "'" + ","
+					+ "'" + records.getAuditStatus() + "'" + ")";
+				myAsyncService.FTP(s);
+//				}
 			}
 
 		});

--
Gitblit v1.9.3