From 345d17cf82e1bbc1fbfbeec10193c2bed59cd674 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 27 Sep 2021 22:21:21 +0800
Subject: [PATCH] 注册登录,车辆,装备,枪支,招聘,培训考试修改

---
 src/main/java/org/springblade/modules/information/controller/InformationController.java |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/src/main/java/org/springblade/modules/information/controller/InformationController.java b/src/main/java/org/springblade/modules/information/controller/InformationController.java
index 49c2774..a7ee002 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -23,7 +23,7 @@
 import lombok.AllArgsConstructor;
 import com.alibaba.fastjson.JSON;
 import org.springblade.common.cache.DictCache;
-import org.springblade.common.constant.FtpConstant;
+import org.springblade.common.config.FtpConfig;
 import org.springblade.common.enums.DictEnum;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.cache.utils.CacheUtil;
@@ -185,6 +185,7 @@
 		}
 		informationService.save(information);
 		String formatStr = new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime());
+		Integer isDeleted = 0;
 		//Integer id = information.getId();
 		String s = "insert into sys_information(id,creditCode,enterpriseName,representative,establishTime," +
 			"registeredCapital,organizationCode,registrationNumber, enterprises, address," +
@@ -195,8 +196,12 @@
 			information.getRegion() + "'" + "," + "'" + information.getRegistration() + "'" + "," + "'" + information.getIndustry() + "'" + "," + "'" + information.getDepartmentid() + "'" + "," +
 			"'" + information.getStats() + "'" + "," + "'" + information.getJurisdiction() + "'" + "," + "'" + information.getRepresentativecell() + "'" + "," +
 			"'" + information.getContacts() + "'" + "," + "'" + information.getContactscell() + "'" + ");" +
-			"insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category) values(" + "'" + information.getDepartmentid() + "'" + "," + "'" + dept.getParentId() + "'" + ","
-			+ "'" + dept.getTenantId() + "'" + "," + "'" + information.getEnterprisename() + "'" + "," + "'" + dept.getAncestors() + "'" + "," + "'" + dept.getDeptCategory() + "'" + ")";
+			"insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + information.getDepartmentid() + "'" + "," + "'" + dept.getParentId() + "'" + ","
+			+ "'" + dept.getTenantId() + "'" +
+			"," + "'" + information.getEnterprisename() + "'" +
+			"," + "'" + dept.getAncestors() + "'" +
+			"," + "'" + dept.getDeptCategory() + "'" +
+			"," + "'" + isDeleted + "'" + ")";
 		FtpUtil.sqlFileUpload(s);
 		return R.success("成功");
 	}
@@ -216,13 +221,13 @@
 		String format = "";
 		if (information.getBusinessLicense() != null && !"".equals(information.getBusinessLicense())) {
 			businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length());
-			businessLicenses = FtpConstant.ip + businessLicense;
+			businessLicenses = FtpConfig.ip + businessLicense;
 		} else {
 			businessLicenses = "";
 		}
 		if (information.getLicence() != null && !"".equals(information.getLicence())) {
 			licence = information.getLicence().substring(26, information.getLicence().length());
-			licences = FtpConstant.ip + licence;
+			licences = FtpConfig.ip + licence;
 		} else {
 			licences = "";
 		}
@@ -278,11 +283,18 @@
 			informationService.deleteIn(strArray[i]);
 			informationService.deleteSh(strArray[i]);
 			informationService.deleteMe(strArray[i]);
-
+			String s1 = "delete from sys_information where creditCode = " + "'" + strArray[i] + "'";
+			FtpUtil.sqlFileUpload(s1);
+			String s2 = "delete from sys_shareholder where creditCode = " + "'" + strArray[i] + "'";
+			FtpUtil.sqlFileUpload(s2);
+			String s3 = "delete from sys_member where creditCode = " + "'" + strArray[i] + "'";
+			FtpUtil.sqlFileUpload(s3);
 		}
 		for (int j = 0; j < strArrays.length; j++) {
 			//机构删除
 			informationService.deleteDept(strArrays[j]);
+			String s4 = "delete from blade_dept where id = " + "'" + strArrays[j] + "'";
+			FtpUtil.sqlFileUpload(s4);
 		}
 
 		return R.success("删除成功");

--
Gitblit v1.9.3