From 8b375fe00a241b3a769b82fe3dac8d1c9dce8a02 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 16 Jun 2022 14:36:07 +0800
Subject: [PATCH] 模拟考试修改

---
 src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java b/src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java
index 4f6a993..266afc5 100644
--- a/src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java
+++ b/src/main/java/org/springblade/modules/recordLegalperson/controller/RecordLegalpersonController.java
@@ -146,7 +146,7 @@
 		if (map != null) {
 			String id = map.get("id").toString();
 			recordService.removeByIds(Func.toLongList(id));
-			String s1 = "delete from sys_record where id = " + "'" + id + "'";
+			String s1 = "delete from sys_record_legalperson where id = " + "'" + id + "'";
 			//FtpUtil.sqlFileUpload(s1);
 			myAsyncService.FTP(s1);
 		}
@@ -170,7 +170,7 @@
 		recordService.save(record1);
 		//String offtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getOfficetime());
 		//String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getPermitime());
-		String s = "insert into sys_record(id,representative," +
+		String s = "insert into sys_record_legalperson(id,representative," +
 			"address,business,registration,industry,type,ptype,representativecell,contacts,contactscell,perid,offices,jurisdiction,cardid,storage," +
 			"overtime," +
 			"changecontacts," +
@@ -239,7 +239,7 @@
 				recordService.updateById(record);
 				status = true;
 				//数据同步到内网
-				String s1 = "update sys_record set type = " + "'" + record.getType() + "'" +
+				String s1 = "update sys_record_legalperson set type = " + "'" + record.getType() + "'" +
 							",approve = " + "'" + record.getApprove() + "'" +
 							" " + "where id = " + "'" + record.getId() + "';" +
 							"update sys_information set representative = " + "'" + information1.getRepresentative() + "'" +
@@ -263,7 +263,7 @@
 					recordService.updateById(record);
 					status = true;
 					//数据同步到内网
-					String s1 = "update sys_record set type = " + "'" + record.getType() + "'" +
+					String s1 = "update sys_record_legalperson set type = " + "'" + record.getType() + "'" +
 						",approve = " + "'" + record.getApprove() + "'" +
 						" " + "where id = " + "'" + record.getId() + "';" +
 						"update sys_information set representative = " + "'" + information1.getRepresentative() + "'" +
@@ -277,7 +277,7 @@
 					record.setApprove("当前公司单位未保安服务系统存在,请先注册!");
 					recordService.updateById(record);
 					//数据同步到内网
-					String s1 = "update sys_record set type = " + "'" + record.getType() + "'" +
+					String s1 = "update sys_record_legalperson set type = " + "'" + record.getType() + "'" +
 						",approve = " + "'" + record.getApprove() + "'" +
 						" " + "where id = " + "'" + record.getId() + "'";
 					//FtpUtil.sqlFileUpload(s1);
@@ -291,7 +291,7 @@
 			//更新
 			recordService.updateById(record);
 			//数据同步
-			String s1 = "update sys_record set type = " + "'" + record.getType() + "'" +
+			String s1 = "update sys_record_legalperson set type = " + "'" + record.getType() + "'" +
 				",approve = " + "'" + record.getApprove() + "'" +
 				" " + "where id = " + "'" + record.getId() + "'";
 			//FtpUtil.sqlFileUpload(s1);
@@ -319,6 +319,13 @@
 	@ApiOperationSupport(order = 8)
 	@ApiOperation(value = "删除", notes = "传入ids")
 	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		//内网删除
+		List<Long> list = Func.toLongList(ids);
+		list.forEach(id -> {
+			//内网同步
+			String s1 = "delete from sys_record_legalperson where id = " + "'" + id + "'";
+			myAsyncService.FTP(s1);
+		});
 		return R.status(recordService.removeByIds(Func.toLongList(ids)));
 	}
 

--
Gitblit v1.9.3