From f6638674a2d07ff62a22ceba28b2a540df93d63e Mon Sep 17 00:00:00 2001 From: "zhiyong.ning" <354350178@qq.com> Date: Wed, 12 Aug 2020 11:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../liuwanr/controller/StaffController.java | 2 +- ...affProfessionalArchitectureController.java | 23 ++++++++++ .../liuwanr/controller/UserController.java | 46 +++++++++++++++++++ .../com/yipin/liuwanr/entity/Student.java | 18 ++++---- .../StaffProfessionalArchitectureMapper.java | 4 ++ .../yipin/liuwanr/mapper/StudentMapper.java | 2 +- .../com/yipin/liuwanr/mapper/UserMapper.java | 6 +++ .../StaffProfessionalArchitectureService.java | 14 ++++++ .../yipin/liuwanr/service/StaffService.java | 9 ++-- .../yipin/liuwanr/service/UserService.java | 34 +++++++++++++- 10 files changed, 142 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/StaffController.java b/src/main/java/com/yipin/liuwanr/controller/StaffController.java index 93ca95c..21e8128 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StaffController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StaffController.java @@ -150,7 +150,7 @@ public class StaffController { } return resp; } - + /** * 删除员工 */ diff --git a/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java b/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java index 17f9de8..df1f825 100644 --- a/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java +++ b/src/main/java/com/yipin/liuwanr/controller/StaffProfessionalArchitectureController.java @@ -146,4 +146,27 @@ public class StaffProfessionalArchitectureController { } return resp; } + + /** + * 查询员工专业架构名称 + */ + @GetMapping("/queryStaffPAN") + Response queryStaffPAN(@RequestParam String name) { + Response resp = new Response(); + if (name == null) { + resp.setStatus(300); + resp.setMessage("专业组织架构名称为空!"); + }else { + HashMap ret = staffProfessionalArchitectureService.queryStaffPAN(name); + int status = (int) ret.get("retcode"); + if (200 == status) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + } + return resp; + } } diff --git a/src/main/java/com/yipin/liuwanr/controller/UserController.java b/src/main/java/com/yipin/liuwanr/controller/UserController.java index 55d803f..d9a01b4 100644 --- a/src/main/java/com/yipin/liuwanr/controller/UserController.java +++ b/src/main/java/com/yipin/liuwanr/controller/UserController.java @@ -510,4 +510,50 @@ public class UserController { } return resp; } + + /** + * 查询账号是否存在 + */ + @GetMapping("/queryAccountIsExist") + Response queryAccountIsExist(@RequestParam String userAccount) { + Response resp = new Response(); + if (userAccount==null) { + resp.setStatus(300); + resp.setErrmessage("账号为空!"); + }else { + HashMap ret = userService.queryAccountIsExist(userAccount); + int status = (int) ret.get("retcode"); + if (200 == status) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + } + return resp; + } + + /** + * 查询学号、工号是否存在 + */ + @GetMapping("/queryWorkNumberIsExist") + Response queryWorkNumberIsExist(@RequestParam String workNumber) { + Response resp = new Response(); + if (workNumber==null) { + resp.setStatus(300); + resp.setErrmessage("账号为空!"); + }else { + HashMap ret = userService.queryWorkNumberIsExist(workNumber); + int status = (int) ret.get("retcode"); + if (200 == status) { + resp.setStatus(status); + resp.setMessage(ret.get("retvalue")); + } else { + resp.setStatus(status); + resp.setErrmessage(ret.get("retvalue").toString()); + } + } + return resp; + } } diff --git a/src/main/java/com/yipin/liuwanr/entity/Student.java b/src/main/java/com/yipin/liuwanr/entity/Student.java index 503fcaa..849fa02 100644 --- a/src/main/java/com/yipin/liuwanr/entity/Student.java +++ b/src/main/java/com/yipin/liuwanr/entity/Student.java @@ -22,8 +22,6 @@ public class Student { private Integer gradeId; //绑定班级ID private Integer classId; - //用户密码 - private String studentPassword; //外部实体实验班级名称 private String experimentalClassName; //外部实体实验班级ID @@ -56,7 +54,15 @@ public class Student { private String lastLoginTime; //考勤统计 private String attendance; - + //学生专业组织架构名称 + private String stuProfessionalArchitectureName; + + public String getStuProfessionalArchitectureName() { + return stuProfessionalArchitectureName; + } + public void setStuProfessionalArchitectureName(String stuProfessionalArchitectureName) { + this.stuProfessionalArchitectureName = stuProfessionalArchitectureName; + } public String getAttendance() { return attendance; } @@ -195,12 +201,6 @@ public class Student { public void setClassId(Integer classId) { this.classId = classId; } - public String getStudentPassword() { - return studentPassword; - } - public void setStudentPassword(String studentPassword) { - this.studentPassword = studentPassword; - } public String getExperimentalClassName() { return experimentalClassName; } diff --git a/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java index b5c51b4..3df3d3e 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StaffProfessionalArchitectureMapper.java @@ -20,6 +20,10 @@ public interface StaffProfessionalArchitectureMapper { "SELECT staffProfessionalArchitectureId,staffProfessionalArchitectureName,schoolId from staff_professional_architecture where isdel = 0 and schoolId = #{schoolId}", " "}) List queryStaffProfessionalArchitecture(Integer schoolId); + + @Select("SELECT staffProfessionalArchitectureId,staffProfessionalArchitectureName,schoolId from staff_professional_architecture where isdel = 0 and staffProfessionalArchitectureName = #{staffProfessionalArchitectureName}") + List queryStaffPAN(String staffProfessionalArchitectureName); + @Update("UPDATE staff_professional_architecture SET isdel = 1 where staffProfessionalArchitectureId = #{staffProfessionalArchitectureId}") void deleteStaffProfessionalArchitecture(Integer staffProfessionalArchitectureId); diff --git a/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java b/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java index 799adb4..c2ecad6 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/StudentMapper.java @@ -19,7 +19,7 @@ public interface StudentMapper { //查询学生 @Select({ "