智慧保安后台管理-外网
tangzy
2022-02-24 d4b00c05321d9373a33bfb26618735e2a5868a81
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -53,6 +53,7 @@
import org.springblade.modules.system.service.IDeptService;
import org.springblade.modules.system.service.IRoleService;
import org.springblade.modules.system.service.IUserService;
import org.springblade.modules.system.service.MyAsyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -97,6 +98,7 @@
   private final IUserService userService;
   private final IRoleService roleService;
   private final MyAsyncService myAsyncService;
   /**
    * 详情
@@ -221,10 +223,9 @@
         Role oneRole = roleService.getOne(Condition.getQueryWrapper(role));
         user.setRoleId(oneRole.getId().toString());
         //插入用户数据
         userService.save(user);
         boolean save = userService.save(user);
         if (save) {
         Integer isDeleted = 0;
         //Integer id = information.getId();
         String s = "insert into sys_information(id,creditCode,enterpriseName,representative" +
                  ",registeredCapital,organizationCode,registrationNumber, enterprises, address," +
                  " business,region,registration,industry,departmentid,stats,jurisdiction,representativecell," +
@@ -268,7 +269,10 @@
                  "," + "'" + user.getStatus() + "'" +
                  "," + "'" + user.getIsDeleted() + "'" +
                  "," + "'" + user.getRoleId() + "'" + ")";
         FtpUtil.sqlFileUpload(s);
            //FtpUtil.sqlFileUpload(s);
            myAsyncService.FTP(s);
         }
      }
      return R.success("成功");
   }
@@ -280,7 +284,8 @@
   @ApiOperationSupport(order = 5)
   @ApiOperation(value = "修改", notes = "传入information")
   public R update(@Valid @RequestBody Information information) throws Exception {
      informationService.updateById(information);
      boolean b = informationService.updateById(information);
      if (b) {
      String businessLicense = null;
      String businessLicenses = null;
      String licence = null;
@@ -322,7 +327,9 @@
         ",business_License = " + "'" + businessLicenses + "'" +
         ",licence = " + "'" + licences + "'" +
         " " + "where id = " + "'" + information.getId() + "'";
      FtpUtil.sqlFileUpload(s1);
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.FTP(s1);
      }
      return R.success("修改成功");
   }
@@ -358,19 +365,24 @@
           informationService.deleteUserByDeptId(s);
         //保安公司信息
         String s1 = "delete from sys_information where departmentid = " + "'" + s + "'";
         FtpUtil.sqlFileUpload(s1);
         //FtpUtil.sqlFileUpload(s1);
         myAsyncService.FTP(s1);
         //主要管理人
         String s2 = "delete from sys_shareholder where dept_id = " + "'" + s + "'";
         FtpUtil.sqlFileUpload(s2);
         //FtpUtil.sqlFileUpload(s2);
         myAsyncService.FTP(s2);
         //出资人
         String s3 = "delete from sys_member where dept_id = " + "'" + s + "'";
         FtpUtil.sqlFileUpload(s3);
         //FtpUtil.sqlFileUpload(s3);
         myAsyncService.FTP(s3);
         //组织机构信息逻辑删除
         String s4 = "update blade_dept set is_deleted  = 1 where id = " + "'" + s + "'";
         FtpUtil.sqlFileUpload(s4);
         //FtpUtil.sqlFileUpload(s4);
         myAsyncService.FTP(s4);
         //保安公司人员信息删除
         String s5 = "update blade_user set is_deleted  = 1 where dept_id " + "'" + s + "'";
         FtpUtil.sqlFileUpload(s5);
         //FtpUtil.sqlFileUpload(s5);
         myAsyncService.FTP(s5);
      });
      //返回
      return R.success("删除成功");
@@ -432,7 +444,6 @@
      }
      return R.data(list);
   }
   /**
@@ -540,6 +551,7 @@
   /**
    * 查询学历统计信息
    *
    * @param deptid 部门id
    * @param jurisdiction 辖区
    * @return
@@ -551,6 +563,7 @@
   /**
    * 获取部门信息()
    *
    * @param information
    * @return
    */