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/information/controller/InformationController.java |   62 +++++++++++++++---------------
 1 files changed, 31 insertions(+), 31 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 178163a..96104dd 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -186,11 +186,10 @@
 		String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(information.getEstablishtime());
 		//Integer id = information.getId();
 		String s = "insert into sys_information(id,creditcode,enterprisename,representative,establishtime," +
-			"registeredcapital,organizationcode,registrationnumber,identificationnumber, enterprises, address," +
+			"registeredcapital,organizationcode,registrationnumber, enterprises, address," +
 			" business,region,registration,industry,departmentid,stats,jurisdiction,representativecell,contacts,contactscell) " +
 			"values(" + "'" + information.getId() + "'" + "," + "'" + information.getCreditcode() + "'" + "," + "'" + information.getEnterprisename() + "'" + "," + "'" + information.getRepresentative() + "'" + "," +
-			"'" + formatStr + "'" + "," + "'" + information.getRegisteredcapital() + "'" + "," + "'" + information.getOrganizationcode() + "'" + "," + "'" + information.getRegistrationnumber() + "'" + "," +
-			"'" + information.getIdentificationnumber() + "'" + "," + "'" + information.getEnterprises() + "'" + "," + "'" +
+			"'" + formatStr + "'" + "," + "'" + information.getRegisteredcapital() + "'" + "," + "'" + information.getOrganizationcode() + "'" + "," + "'" + information.getRegistrationnumber() + "'" + "," + "'" + information.getEnterprises() + "'" + "," + "'" +
 			information.getAddress() + "'" + "," + "'" + information.getBusiness() + "'" + "," + "'" +
 			information.getRegion() + "'" + "," + "'" + information.getRegistration() + "'" + "," + "'" + information.getIndustry() + "'" + "," + "'" + information.getDepartmentid() + "'" + "," +
 			"'" + information.getStats() + "'" + "," + "'" + information.getJurisdiction() + "'" + "," + "'" + information.getRepresentativecell() + "'" + "," +
@@ -208,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("修改成功");
 	}
 
 	/**
@@ -314,32 +341,5 @@
 		return R.success("操作成功");
 	}
 
-
-	public static void main(String[] args) {
-
-//		File file = new File("D:\\anbao");
-//		if (file.exists()) {
-//			File[] files = file.listFiles();
-//			if (null == files || files.length == 0) {
-//				System.out.println("文件夹是空的!");
-//				return;
-//			} else {
-//				for (File file2 : files) {
-//					if (file2.isDirectory()) {
-//						System.out.println("文件夹:" + file2.getAbsolutePath());
-//					} else {
-//						System.out.println("文件:" + file2.getAbsolutePath());
-//						String urls = file2.getAbsolutePath();
-//						String s = OutJson.TestJsons(urls);
-//						//sql语句
-//						String sql = OutJson.stringReplace(s);
-//						System.out.println(sql);
-//					}
-//				}
-//			}
-//		} else {
-//			System.out.println("文件不存在!");
-//		}
-	}
 
 }

--
Gitblit v1.9.3