From 30df94c05573a426d030510d4dd58ae1d93bfb7a Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Mon, 06 Dec 2021 14:03:37 +0800
Subject: [PATCH] 1.资格审查排序
---
src/main/java/org/springblade/modules/system/controller/UserController.java | 63 +++++++++++++++++++++++--------
1 files changed, 46 insertions(+), 17 deletions(-)
diff --git a/src/main/java/org/springblade/modules/system/controller/UserController.java b/src/main/java/org/springblade/modules/system/controller/UserController.java
index f96dc5a..5afa230 100644
--- a/src/main/java/org/springblade/modules/system/controller/UserController.java
+++ b/src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -54,7 +54,9 @@
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
+import java.text.SimpleDateFormat;
import java.util.ArrayList;
+import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -80,7 +82,7 @@
@ApiOperationSupport(order = 1)
@ApiOperation(value = "查看详情", notes = "传入id")
@GetMapping("/detail")
- @PreAuth(RoleConstant.HAS_ROLE_ADMIN)
+ //@PreAuth(RoleConstant.HAS_ROLE_ADMIN)
public R<UserVO> detail(User user) {
User detail = userService.getOne(Condition.getQueryWrapper(user));
return R.data(UserWrapper.build().entityVO(detail));
@@ -132,12 +134,26 @@
/**
+ * 自定义用户列表,
+ */
+ @GetMapping("/pages")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "account", value = "账号名", paramType = "query", dataType = "string"),
+ @ApiImplicitParam(name = "realName", value = "姓名", paramType = "query", dataType = "string")
+ })
+ public R<IPage<UserVO>> pages(@ApiIgnore User user, Query query) {
+ IPage<User> pages = userService.selectUserPages(Condition.getPage(query), user);
+ return R.data(UserWrapper.build().pageVO(pages));
+ }
+
+
+ /**
* 自定义用户列表(只有保安员)
*/
@GetMapping("/page-security")
- public R<IPage<UserVO>> pageSecurity(@ApiIgnore UserVO user, Query query, Long deptId, BladeUser bladeUser) {
+ public R<IPage<UserVO>> pageSecurity(@ApiIgnore UserVO user, Query query) {
user.setAccount("admin");
- IPage<UserVO> pages = userService.selectUserPageSecurity(Condition.getPage(query), user, deptId, (bladeUser.getTenantId().equals(BladeConstant.ADMIN_TENANT_ID) ? StringPool.EMPTY : bladeUser.getTenantId()));
+ IPage<UserVO> pages = userService.selectUserPageSecurity(Condition.getPage(query), user);
return R.data(pages);
}
@@ -151,18 +167,18 @@
public R submit(@Valid @RequestBody User user) {
CacheUtil.clear(USER_CACHE);
//资格审查
- String body = InvestigateUtil.httpGet(user.getCardid());
- JSONObject jsonObject = new JSONObject(body);
- String data = jsonObject.get("data").toString();
- JSONObject jsonData = new JSONObject(data);
- JSONArray res = jsonData.getJSONArray("res");
- if (res.length()==0){
- //没有数据正常
- user.setExaminationType("0");
- }else {
- user.setExaminationType("1");
- user.setExaminationMx(res.getJSONObject(0).get("zdxsfzqkry").toString());
- }
+// String body = InvestigateUtil.httpGetOne(user.getCardid());
+// JSONObject jsonObject = new JSONObject(body);
+// String data = jsonObject.get("data").toString();
+// JSONObject jsonData = new JSONObject(data);
+// JSONArray res = jsonData.getJSONArray("res");
+// if (res.length()==0){
+// //没有数据正常
+// user.setExaminationType("0");
+// }else {
+// user.setExaminationType("1");
+// user.setExaminationMx(res.getJSONObject(0).get("zdrylbjh").toString());
+// }
return R.status(userService.submit(user));
}
@@ -341,10 +357,23 @@
@GetMapping("/updateUser")
- public R updateUser(String hold,String cardid) {
- userService.updateUser(hold, cardid);
+ public R updateUser(String hold, String cardid, String holdv) {
+ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
+ String time = df.format(new Date());
+ userService.updateUser(hold, cardid, holdv, time);
return R.success("吊销成功");
}
+ /**
+ * 查询押运人员
+ *
+ * @return
+ */
+ @GetMapping("/selectPeo")
+ public R selectPeo(@ApiIgnore UserVO user) {
+ List list = userService.selectPeo(user);
+ return R.data(list);
+ }
+
}
--
Gitblit v1.9.3