From 18464ca2adbfc5e4e0f4c111be78a29658d96e3d Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 27 Aug 2021 22:36:04 +0800
Subject: [PATCH] 题目生成修改,考试成绩计算修改,用户新增接口修改
---
src/main/java/org/springblade/modules/system/controller/UserController.java | 68 ++++++++++++++++++++++++++++++++-
1 files changed, 65 insertions(+), 3 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 32a5d7d..6111ea7 100644
--- a/src/main/java/org/springblade/modules/system/controller/UserController.java
+++ b/src/main/java/org/springblade/modules/system/controller/UserController.java
@@ -203,13 +203,16 @@
user.setJurisdiction(one.getId().toString());
}
userService.submit(user);
- String birthday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getBirthday());
- String rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getRtime());
+ // String birthday = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getBirthday());
+ String rtime = null;
+ if (null!=user.getRtime()) {
+ rtime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(user.getRtime());
+ }
String s = "insert into blade_user(id,tenant_id,account,password,name,real_name,avatar,email,phone,birthday,sex,role_id,dept_id,cardid,nativePlace,nation,education," +
"politicaloutlook,healstats,height,address,registered,rtime,securitynumber,hold,jurisdiction) " +
"values(" + "'" + user.getId() + "'" + "," + "'" + 000000 + "'" + "," + "'" + user.getAccount() + "'" + "," +
"'" + user.getPassword() + "'" + "," +"'" + user.getName() + "'" + "," + "'" + user.getRealName() + "'" + "," + "'" + user.getAvatar() + "'" + "," +
- "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + birthday + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
+ "'" + user.getEmail() + "'" + "," + "'" + user.getPhone() + "'" + "," + "'" + user.getSex() + "'" + "," + "'" + user.getRoleId() + "'" +
"," + "'" + user.getDeptId() + "'" + "," + "'" + user.getCardid() + "'" + "," + "'" + user.getNativeplace() + "'" + "," + "'"
+ user.getNation() + "'" + "," + "'" + user.getEducation() + "'" + "," + "'" + user.getPoliticaloutlook() + "'" + "," + "'" + user.getHealstats() + "'"
+ "," +"'" + user.getHeight() + "'" + "," + "'" + user.getAddress() + "'" +"," + "'" + user.getRegistered() + "'"+ "," +
@@ -407,6 +410,40 @@
@ApiOperation(value = "导出模板")
public void exportSecurity(HttpServletResponse response) {
List<UserExcel> list = new ArrayList<>();
+ UserExcel userExcel = new UserExcel();
+ userExcel.setDeptId("xxx保安公司");
+ userExcel.setRealName("张三");
+ userExcel.setEmail("xxx@**.com");
+ userExcel.setPhone("12345678901");
+ userExcel.setSex("男");
+ userExcel.setCardid("360XXX19XXXXXX****");
+ userExcel.setNativeplace("江西南昌");
+ userExcel.setNation("汉");
+ userExcel.setPoliticaloutlook("中共党员");
+ userExcel.setHeight(180);
+ userExcel.setAddress("江西省南昌市******");
+ userExcel.setRegistered("江西南昌");
+ userExcel.setRtime("2021-05-01");
+ userExcel.setHold("是");
+ userExcel.setSecuritynumber("赣洪202100001");
+ list.add(userExcel);
+ UserExcel userExcel1 = new UserExcel();
+ userExcel1.setDeptId("xxx保安公司");
+ userExcel1.setRealName("李四");
+ userExcel1.setEmail("xxx@**.com");
+ userExcel1.setPhone("12345678901");
+ userExcel1.setSex("女");
+ userExcel1.setCardid("360XXX19XXXXXX****");
+ userExcel1.setNativeplace("江西南昌");
+ userExcel1.setNation("汉");
+ userExcel1.setPoliticaloutlook("中共党员");
+ userExcel1.setHeight(180);
+ userExcel1.setAddress("江西省南昌市******");
+ userExcel1.setRegistered("江西南昌");
+ userExcel1.setRtime("2021-05-01");
+ userExcel1.setHold("否");
+ userExcel1.setSecuritynumber("");
+ list.add(userExcel1);
ExcelUtil.export(response, "保安员导入数据模板", "保安员数据表", list, UserExcel.class);
}
@@ -606,5 +643,30 @@
}
+ /**
+ * 保安员信息
+ * @param user
+ * @return
+ */
+ @GetMapping("/getUserDetails")
+ public R getUserDetails(User user) {
+ return R.data(userService.getUserDetails(user));
+ }
+
+
+ /**
+ *
+ * @param type 1:保安 2:公安
+ * @param deptid
+ * @param jurisdiction
+ * @return
+ */
+ @GetMapping("/seleL")
+ public R seleL(String type,String deptid, String jurisdiction) {
+ List<Map<String, Object>> list = userService.seleL(type,deptid, jurisdiction);
+ return R.data(list);
+ }
+
+
}
--
Gitblit v1.9.3