智慧保安后台管理-外网
Administrator
2022-01-13 91890bac76ab5652fd07f955ebec3564a91f8011
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("成功");