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/information/controller/InformationController.java | 80 ++++++++++++++++++++++++---------------
1 files changed, 49 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 9842c74..3bc4f69 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -35,12 +35,10 @@
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.support.Kv;
-import org.springblade.core.tool.utils.DateUtil;
-import org.springblade.core.tool.utils.DigestUtil;
-import org.springblade.core.tool.utils.Func;
-import org.springblade.core.tool.utils.StringUtil;
+import org.springblade.core.tool.utils.*;
import org.springblade.modules.FTP.FtpUtil;
import org.springblade.modules.FTP.OutJson;
+import org.springblade.modules.dispatcher.entity.DispatcherUnit;
import org.springblade.modules.information.entity.Information;
import org.springblade.modules.information.excel.ExportInformationExcel;
import org.springblade.modules.information.excel.ExportInformationSecurityStatistics;
@@ -194,7 +192,7 @@
information.setCreateTime(new Date());
- Information information1 = information;
+ Information information1 = Objects.requireNonNull(BeanUtil.copy(information, Information.class));
//敏感数据处理
if (null!=information1.getRepresentativecell() && !information1.getRepresentativecell().equals("")) {
information1.setRepresentativecell(DesensitizedUtil.desensitizedPhoneNumber(information1.getRepresentativecell()));
@@ -297,7 +295,7 @@
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入information")
public R update(@Valid @RequestBody Information information) throws Exception {
- Information information1 = information;
+ Information information1 = Objects.requireNonNull(BeanUtil.copy(information, Information.class));;
//敏感数据处理
if (null!=information1.getRepresentativecell() && !information1.getRepresentativecell().equals("")) {
information1.setRepresentativecell(DesensitizedUtil.desensitizedPhoneNumber(information1.getRepresentativecell()));
@@ -327,34 +325,54 @@
} else {
licences = "";
}
+
if (information.getEstablishtime() != null && !"".equals(information.getEstablishtime())) {
format = new SimpleDateFormat("yyyy-MM-dd").format(information.getEstablishtime());
+ //内网同步
+ String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" +
+ ",enterpriseName = " + "'" + information.getEnterprisename() + "'" +
+ ",representative = " + "'" + information.getRepresentative() + "'" +
+ ",establishTime = " + "'" + format + "'" +
+ ",registeredCapital = " + "'" + information.getRegisteredcapital() + "'" +
+ ",jurisdiction = " + "'" + information.getJurisdiction() + "'" +
+ ",enterprises = " + "'" + information.getEnterprises() + "'" +
+ ",address = " + "'" + information.getAddress() + "'" +
+ ",business = " + "'" + information.getBusiness() + "'" +
+ ",region = " + "'" + information.getRegion() + "'" +
+ ",registration = " + "'" + information.getRegistration() + "'" +
+ ",industry = " + "'" + information.getIndustry() + "'" +
+ ",departmentid = " + "'" + information.getDepartmentid() + "'" +
+ ",stats = " + "'" + information.getStats() + "'" +
+ ",representativecell = " + "'" + information.getRepresentativecell() + "'" +
+ ",contacts = " + "'" + information.getContacts() + "'" +
+ ",contactscell = " + "'" + information.getContactscell() + "'" +
+ ",business_License = " + "'" + businessLicenses + "'" +
+ ",licence = " + "'" + licences + "'" +
+ " " + "where id = " + "'" + information.getId() + "'";
+ }else {
+ //内网同步
+ String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" +
+ ",enterpriseName = " + "'" + information.getEnterprisename() + "'" +
+ ",representative = " + "'" + information.getRepresentative() + "'" +
+ ",registeredCapital = " + "'" + information.getRegisteredcapital() + "'" +
+ ",jurisdiction = " + "'" + information.getJurisdiction() + "'" +
+ ",enterprises = " + "'" + information.getEnterprises() + "'" +
+ ",address = " + "'" + information.getAddress() + "'" +
+ ",business = " + "'" + information.getBusiness() + "'" +
+ ",region = " + "'" + information.getRegion() + "'" +
+ ",registration = " + "'" + information.getRegistration() + "'" +
+ ",industry = " + "'" + information.getIndustry() + "'" +
+ ",departmentid = " + "'" + information.getDepartmentid() + "'" +
+ ",stats = " + "'" + information.getStats() + "'" +
+ ",representativecell = " + "'" + information.getRepresentativecell() + "'" +
+ ",contacts = " + "'" + information.getContacts() + "'" +
+ ",contactscell = " + "'" + information.getContactscell() + "'" +
+ ",business_License = " + "'" + businessLicenses + "'" +
+ ",licence = " + "'" + licences + "'" +
+ " " + "where id = " + "'" + information.getId() + "'";
+ //FtpUtil.sqlFileUpload(s1);
+ myAsyncService.FTP(s1);
}
-
-
- //内网同步
- String s1 = "update sys_information set creditCode = " + "'" + information.getCreditcode() + "'" +
- ",enterpriseName = " + "'" + information.getEnterprisename() + "'" +
- ",representative = " + "'" + information.getRepresentative() + "'" +
- ",establishTime = " + "'" + format + "'" +
- ",registeredCapital = " + "'" + information.getRegisteredcapital() + "'" +
- ",jurisdiction = " + "'" + information.getJurisdiction() + "'" +
- ",enterprises = " + "'" + information.getEnterprises() + "'" +
- ",address = " + "'" + information.getAddress() + "'" +
- ",business = " + "'" + information.getBusiness() + "'" +
- ",region = " + "'" + information.getRegion() + "'" +
- ",registration = " + "'" + information.getRegistration() + "'" +
- ",industry = " + "'" + information.getIndustry() + "'" +
- ",departmentid = " + "'" + information.getDepartmentid() + "'" +
- ",stats = " + "'" + information.getStats() + "'" +
- ",representativecell = " + "'" + information.getRepresentativecell() + "'" +
- ",contacts = " + "'" + information.getContacts() + "'" +
- ",contactscell = " + "'" + information.getContactscell() + "'" +
- ",business_License = " + "'" + businessLicenses + "'" +
- ",licence = " + "'" + licences + "'" +
- " " + "where id = " + "'" + information.getId() + "'";
- //FtpUtil.sqlFileUpload(s1);
- myAsyncService.FTP(s1);
}
return R.success("修改成功");
}
--
Gitblit v1.9.3