| | |
| | | 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; |
| | | |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入information") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R save(@Valid @RequestBody Information information){ |
| | | Dept dept = new Dept(); |
| | | //自招保安公司 |
| | |
| | | } |
| | | user.setDeptId(information.getDepartmentid()); |
| | | user.setTenantId("000000"); |
| | | user.setCreateUser(Long.parseLong(information.getCreateUserId())); |
| | | user.setCreateTime(new Date()); |
| | | user.setUpdateTime(new Date()); |
| | | user.setStatus(1); |
| | |
| | | "," + "'" + 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("成功"); |