From 02c1cdc64b62e5248b7b5bdadcfd5cc661b43248 Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Wed, 25 Aug 2021 15:04:09 +0800
Subject: [PATCH] 1.单位
---
src/main/java/org/springblade/modules/record/controller/RecordController.java | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/springblade/modules/record/controller/RecordController.java b/src/main/java/org/springblade/modules/record/controller/RecordController.java
index e53259f..80ba7a0 100644
--- a/src/main/java/org/springblade/modules/record/controller/RecordController.java
+++ b/src/main/java/org/springblade/modules/record/controller/RecordController.java
@@ -39,7 +39,7 @@
import java.util.Map;
/**
- * 控制器
+ * 控制器
*
* @author BladeX
* @since 2021-07-12
@@ -94,27 +94,29 @@
public R save(@Valid @RequestBody Record record) {
String cardid = record.getCardid();
Map map = recordService.selectIn(cardid);
- if (map!=null){
+ if (map != null) {
String id = map.get("id").toString();
recordService.removeByIds(Func.toLongList(id));
}
record.setStorage("1");
+ record.setType("2");
record.setPermitime(new Date());
recordService.save(record);
String formatStr = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(record.getEstablishtime());
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,creditCode,enterpriseName,representative,establishTime," +
"registeredCapital,organizationCode,registrationNumber,identificationNumber,enterprises," +
- "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime)" +
+ "address,business,region,registration,industry,type,permitime,deptid,ptype,representativecell,contacts,contactscell,perid,offices,officetime,jurisdiction)" +
"values(" + "'" + record.getId() + "'" + "," + "'" + record.getCreditcode() + "'" + "," + "'" + record.getEnterprisename() + "'" + "," + "'"
+ record.getRepresentative() + "'" + "," +
"'" + formatStr + "'" + "," + "'" + record.getRegisteredcapital() + "'" + "," + "'"
+ record.getOrganizationcode() + "'" + "," + "'" + record.getRegistrationnumber() + "'" + "," +
"'" + record.getIdentificationnumber() + "'" + "," + "'" + record.getEnterprises() + "'" + "," + "'" +
record.getAddress() + "'" + "," + "'" + record.getBusiness() + "'" + "," + "'" +
- record.getRegion() + "'" + "," + "'" + record.getRegistration() + "'" + "," + "'" + record.getIndustry()+ "'" + "," + "'"+ record.getType() + "'" + "," +"'" + record.getPermitime() + "'" + "," + "'" + record.getDeptid() + "'" + "," + "'" + record.getPtype() + "'" + "," +
- "'" + record.getRepresentativecell() + "'" + "," + "'" + record.getContacts() + "'" + "," + "'" + record.getContactscell() + "'"+"," +
- "'" + record.getPerid() + "'"+"," + "'" + record.getOffices() + "'"+"," + "'" + offtime + "'"+")" ;
+ record.getRegion() + "'" + "," + "'" + record.getRegistration() + "'" + "," + "'" + record.getIndustry() + "'" + "," + "'" + record.getType() + "'" + "," + "'" + pertime + "'" + "," + "'" + record.getDeptid() + "'" + "," + "'" + record.getPtype() + "'" + "," +
+ "'" + record.getRepresentativecell() + "'" + "," + "'" + record.getContacts() + "'" + "," + "'" + record.getContactscell() + "'" + "," +
+ "'" + record.getPerid() + "'" + "," + "'" + record.getOffices() + "'" + "," + "'" + offtime + "'" + "'" + "," + "'" + record.getJurisdiction() + "'" + ")";
FtpUtil.sqlFileUpload(s);
return R.success("成功");
}
@@ -128,12 +130,11 @@
public R rocordsave(@Valid @RequestBody Record record) {
String cardid = record.getCardid();
Map map = recordService.selectIn(cardid);
- if (map!=null){
+ if (map != null) {
record.setStorage("0");
record.setPermitime(new Date());
recordService.updateById(record);
- }
- else {
+ } else {
record.setStorage("0");
record.setType("2");
record.setPtype("2");
--
Gitblit v1.9.3