From a3d9cd860ed721f7ca1be0907c28b9e2c3a64a9e Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Fri, 27 Aug 2021 17:07:47 +0800
Subject: [PATCH] 1.许可审批

---
 src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java                |    4 +++-
 src/main/java/org/springblade/modules/revoke/controller/RevokeController.java           |    4 ++--
 src/main/java/org/springblade/modules/recordk/controller/RecordkController.java         |    4 ++--
 src/main/java/org/springblade/modules/information/controller/InformationController.java |   30 +++++++++++++++++++++++++++++-
 4 files changed, 36 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 4aeecaa..96104dd 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -207,7 +207,35 @@
 	@ApiOperationSupport(order = 5)
 	@ApiOperation(value = "修改", notes = "传入information")
 	public R update(@Valid @RequestBody Information information) throws Exception {
-		return R.status(informationService.updateById(information));
+		informationService.updateById(information);
+		String ip = "http://192.168.0.108";
+		String businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length());
+		String licence = information.getLicence().substring(26, information.getLicence().length());
+		//内网同步
+		String s1 = "update sys_information set creditcode = " + "'" + information.getCreditcode() + "'" +
+			",enterprisename = " + "'" + information.getEnterprisename() + "'" +
+			",representative = " + "'" + information.getRepresentative() + "'" +
+			",establishtime = " + "'" + new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime()) + "'" +
+			",registeredcapital = " + "'" + information.getRegisteredcapital() + "'" +
+			",organizationcode = " + "'" + information.getOrganizationcode() + "'" +
+			",registrationnumber = " + "'" + information.getRegistrationnumber() + "'" +
+			",enterprises = " + "'" + information.getEnterprises() + "'" +
+			",address = " + "'" + information.getAddress() + "'" +
+			",business = " + "'" + information.getBusiness() + "'" +
+			",region = " + "'" + information.getRegion() + "'" +
+			",registration = " + "'" + information.getRegistration() + "'" +
+			",industry = " + "'" + information.getIndustry() + "'" +
+			",departmentid = " + "'" + information.getDepartmentid() + "'" +
+			",stats = " + "'" + information.getStats() + "'" +
+			",jurisdiction = " + "'" + information.getJurisdiction() + "'" +
+			",representativecell = " + "'" + information.getRepresentativecell() + "'" +
+			",contacts = " + "'" + information.getContacts() + "'" +
+			",contactscell = " + "'" + information.getContactscell() + "'" +
+			",business_License = " + "'" + ip + businessLicense + "'" +
+			",licence = " + "'" + ip + licence + "'" +
+			" " + "where id = " + "'" + information.getId() + "'";
+		FtpUtil.sqlFileUpload(s1);
+		return R.success("修改成功");
 	}
 
 	/**
diff --git a/src/main/java/org/springblade/modules/recordk/controller/RecordkController.java b/src/main/java/org/springblade/modules/recordk/controller/RecordkController.java
index ed0b0b0..fc63983 100644
--- a/src/main/java/org/springblade/modules/recordk/controller/RecordkController.java
+++ b/src/main/java/org/springblade/modules/recordk/controller/RecordkController.java
@@ -110,7 +110,7 @@
 		String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(recordk.getPermitime());
 		String s = "insert into sys_record(id,creditCode,enterpriseName,representative,establishtime," +
 			"registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," +
-			"address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,jurisdiction)" +
+			"address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,cardid)" +
 			"values(" + "'" + recordk.getId() + "'" + "," + "'" + recordk.getCreditcode() + "'" + "," + "'" + recordk.getEnterprisename() + "'" + "," + "'"
 			+ recordk.getRepresentative() + "'" + "," +
 			"'" + formatStr + "'" + "," + "'" + recordk.getRegisteredcapital() + "'" + "," + "'"
@@ -119,7 +119,7 @@
 			recordk.getAddress() + "'" + "," + "'" + recordk.getBusiness() + "'" + "," + "'" +
 			recordk.getRegion() + "'" + "," + "'" + recordk.getRegistration() + "'" + "," + "'" + recordk.getIndustry() + "'" + "," + "'" + recordk.getType() + "'" + "," + "'" + pertime + "'" + "," + "'" + recordk.getDeptid() + "'" + "," + "'" + recordk.getPtype() + "'" + "," +
 			"'" + recordk.getRepresentativecell() + "'" + "," + "'" + recordk.getContacts() + "'" + "," + "'" + recordk.getContactscell() + "'" + "," +
-			"'" + recordk.getPerid() + "'" + "," + "'" + recordk.getOffices() + "'" + "," + "'" + offtime + "'" + "," + "'"+ ")";
+			"'" + recordk.getPerid() + "'" + "," + "'" + recordk.getOffices() + "'" + "," + "'" + offtime + "'"+ "," + "'" + recordk.getCardid() + "'"+")";
 		FtpUtil.sqlFileUpload(s);
 		return R.success("成功");
 	}
diff --git a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
index cdadc8a..f4d2c00 100644
--- a/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
+++ b/src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -251,6 +251,7 @@
 		String newName = "upload/picture/" + UUID.randomUUID().toString().replaceAll("-", "")
 			+ fileName.substring(fileName.lastIndexOf("."));
 		InputStream in = file.getInputStream();
+		String[] split = newName.split("/");
 		//创建头部信息
 		Map<String, String> headers = new HashMap<>(1 << 2);
 		//添加自定义内容类型
@@ -261,6 +262,7 @@
 				in, in.available(), -1)
 				.headers(headers)
 				.build());
+		FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], in);
 		in.close();
 		String urls = "http://223.82.109.183:2081/zhba/" + newName;
 		//数据封装
@@ -407,7 +409,7 @@
 		} else {
 			s1 += ") " +
 				"values(" + "'" + attach.getId() + "'" + "," +
-				"'" + 000000 + "'" + "," +
+				"'" + attach.getTenantId() + "'" + "," +
 				"'" + imgurl + "'" + "," +
 				"'" + ip + "'" + "," +
 				"'" + split[2] + "'" + "," +
diff --git a/src/main/java/org/springblade/modules/revoke/controller/RevokeController.java b/src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
index 9597958..b333f12 100644
--- a/src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
+++ b/src/main/java/org/springblade/modules/revoke/controller/RevokeController.java
@@ -108,7 +108,7 @@
 		String pertime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(revoke.getPermitime());
 		String s = "insert into sys_revoke(id,creditCode,enterpriseName,representative,establishTime," +
 			"registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," +
-			"address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,reason,jurisdiction)" +
+			"address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,reason,jurisdiction,cardid)" +
 			"values(" + "'" + revoke.getId() + "'" + "," + "'" + revoke.getCreditcode() + "'" + "," + "'" + revoke.getEnterprisename() + "'" + "," + "'"
 			+ revoke.getRepresentative() + "'" + "," +
 			"'" + formatStr + "'" + "," + "'" + revoke.getRegisteredcapital() + "'" + "," + "'"
@@ -119,7 +119,7 @@
 			+ revoke.getType() + "'" + "," +
 			"'" + pertime + "'" + "," + "'" + revoke.getDeptid() + "'" + "," + "'" + revoke.getPtype() + "'" + "," +
 			"'" + revoke.getRepresentativecell() + "'" + "," + "'" + revoke.getContacts() + "'" + "," + "'" + revoke.getContactscell() + "'" + "," +
-			"'" + revoke.getReason() + "'" + "," + "'" + revoke.getJurisdiction() + "'" + ")";
+			"'" + revoke.getReason() + "'" + "," + "'" + revoke.getJurisdiction() + "'" +"," + "'" + revoke.getCardid() + "'"+ ")";
 		FtpUtil.sqlFileUpload(s);
 		return R.success("成功");
 	}

--
Gitblit v1.9.3