From f2032d8331cd8939bb8dd4ef372033a2dcdbc850 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Thu, 17 Feb 2022 16:10:55 +0800
Subject: [PATCH] +添加法人变更,以及跨区域备案字段更改
---
src/main/java/org/springblade/modules/information/controller/InformationController.java | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 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 b3e4e4a..dd07305 100644
--- a/src/main/java/org/springblade/modules/information/controller/InformationController.java
+++ b/src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -54,6 +54,7 @@
import org.springblade.modules.system.service.IRoleService;
import org.springblade.modules.system.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -147,6 +148,7 @@
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入information")
+ @Transactional(rollbackFor = Exception.class)
public R save(@Valid @RequestBody Information information){
Dept dept = new Dept();
//自招保安公司
@@ -203,6 +205,7 @@
}
user.setDeptId(information.getDepartmentid());
user.setTenantId("000000");
+ user.setCreateUser(Long.parseLong(information.getCreateUserId()));
user.setCreateTime(new Date());
user.setUpdateTime(new Date());
user.setStatus(1);
@@ -247,23 +250,24 @@
"," + "'" + information.getContactscell() + "'" +
"," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(information.getCreateTime()) + "'" +
"," + "'" + information.getCreateUserId() + "'" + ");" +
- "insert into blade_dept(id,parent_id,tenant_id,dept_name,ancestors,dept_category,is_deleted) values(" + "'" + information.getDepartmentid() + "'" + "," + "'" + dept.getParentId() + "'" + ","
+ "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 + "'" + ");" +
- "insert into blade_user(id,tenant_id,account,password,role_id,dept_id,create_time,update_time,status,is_deleted) " +
+ "insert into blade_user(id,tenant_id,account,password,dept_id,create_user,create_time,update_time,status,is_deleted,role_id) " +
"values(" + "'" + user.getId() + "'" +
"," + "'" + user.getTenantId() + "'"
+ "," + "'" + user.getAccount() + "'" +
"," + "'" + user.getPassword() + "'" +
- "," + "'" + user.getRoleId() + "'" +
"," + "'" + user.getDeptId() + "'" +
+ "," + "'" + user.getCreateUser() + "'" +
"," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getCreateTime()) + "'" +
"," + "'" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getUpdateTime()) + "'" +
"," + "'" + user.getStatus() + "'" +
- "," + "'" + user.getIsDeleted() + "'" + ")";
+ "," + "'" + user.getIsDeleted() + "'" +
+ "," + "'" + user.getRoleId() + "'" + ")";
FtpUtil.sqlFileUpload(s);
}
return R.success("成功");
@@ -545,4 +549,14 @@
return R.data(informationService.getEducationStatistics(deptid, jurisdiction));
}
+ /**
+ * 获取部门信息()
+ * @param information
+ * @return
+ */
+ @GetMapping("/getInformationDetails")
+ public R getInformationDetails(InformationVO information) {
+ return R.data(informationService.getInformationDetails(information));
+ }
+
}
--
Gitblit v1.9.3