智慧保安后台管理-外网
liuyg
2022-02-17 f2032d8331cd8939bb8dd4ef372033a2dcdbc850
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("成功");
@@ -429,6 +433,8 @@
      return R.data(list);
   }
   /**
    * 导入单位信息
    */
@@ -523,4 +529,34 @@
      ExcelUtil.export(response, "保安员统计数据" + DateUtil.time(), "保安员统计数据表", list, ExportInformationSecurityStatistics.class);
   }
   /**
    * 保安员详情
    */
   @PostMapping("/selectUIn")
   public R<IPage> selectUIn(String deptid, String name, String hold, String photo, String examinationtype, String dispatch, String soil, Query query) {
      IPage list = informationService.selectUIn(Condition.getPage(query), deptid, name, hold, photo, examinationtype, dispatch, soil);
      return R.data(list);
   }
   /**
    * 查询学历统计信息
    * @param deptid 部门id
    * @param jurisdiction 辖区
    * @return
    */
   @PostMapping("/getEducationStatistics")
   public R getEducationStatistics(String deptid, String jurisdiction) {
      return R.data(informationService.getEducationStatistics(deptid, jurisdiction));
   }
   /**
    * 获取部门信息()
    * @param information
    * @return
    */
   @GetMapping("/getInformationDetails")
   public R getInformationDetails(InformationVO information) {
      return R.data(informationService.getInformationDetails(information));
   }
}