| | |
| | | import org.springblade.common.cache.DictCache; |
| | | import org.springblade.common.config.FtpConfig; |
| | | import org.springblade.common.enums.DictEnum; |
| | | import org.springblade.common.excel.CustomCellWriteHeightConfig; |
| | | import org.springblade.common.excel.CustomCellWriteWeightConfig; |
| | | import org.springblade.common.excel.RowWriteHandler; |
| | | import org.springblade.common.utils.arg; |
| | | import org.springblade.core.cache.utils.CacheUtil; |
| | |
| | | import org.springblade.core.tool.support.Kv; |
| | | import org.springblade.core.tool.utils.*; |
| | | import org.springblade.modules.FTP.FtpUtil; |
| | | import org.springblade.modules.exam.excel.ExportExamScoreExcel; |
| | | import org.springblade.modules.experience.entity.Experience; |
| | | import org.springblade.modules.experience.service.IExperienceService; |
| | | import org.springblade.modules.jurisdiction.entity.Jurisdiction; |
| | |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改发证时间 |
| | | */ |
| | | @PostMapping("/updatePaperTime") |
| | | public R updatePaperTime(@RequestBody User user) { |
| | | user.setPaperTime(new Date()); |
| | | userService.updateById(user); |
| | | String paperTime = null; |
| | | //发证日期处理 |
| | | if (user.getPaperTime() == null) { |
| | | paperTime = null; |
| | | } else { |
| | | paperTime = new SimpleDateFormat("yyyy-MM-dd").format(user.getPaperTime()); |
| | | } |
| | | String s1 = |
| | | "update blade_user set paper_time = " + "'" + paperTime + "'" |
| | | + ",user_type = " + "'" + user.getUserType() + "'" |
| | | + " " + "where id = " + "'" + user.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | return R.success("修改成功"); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | |
| | | // List<UserExcel> list = userService.exportUser(queryWrapper); |
| | | // ExcelUtil.export(response, "用户数据" + DateUtil.time(), "用户数据表", list, UserExcel.class); |
| | | // } |
| | | |
| | | |
| | | /** |
| | | * 导出模板 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 保安员列表树,帅选无保安证,下拉tree |
| | | */ |
| | | @GetMapping("/security-dispatcher-tree") |
| | | public R<List<TreeNode>> getSecurityDispatcherTree(UserVO user) { |
| | | List<TreeNode> tree = userService.getSecurityDispatcherTree(user); |
| | | return R.data(tree); |
| | | } |
| | | |
| | | /** |
| | | * 自定义用户列表(只有保安员) |
| | | */ |
| | | @GetMapping("/selectInr") |
| | |
| | | } |
| | | |
| | | @GetMapping("/zc") |
| | | public R zc(String username, String password) { |
| | | public R zc(String username, String password,String phone) { |
| | | User user = new User(); |
| | | user.setTenantId("000000"); |
| | | user.setAccount(username); |
| | | user.setPassword(DigestUtil.encrypt(password)); |
| | | user.setDeptId("1426355050199945218"); |
| | | user.setRoleId("1428177141018771458"); |
| | | user.setPhone(phone); |
| | | userService.saveOrUpdate(user); |
| | | return R.success("注册成功"); |
| | | } |