yundouzou 11 months ago
commit 2a18aa23af

@ -0,0 +1,130 @@
package com.cya.service;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.cya.entity.Admin;
import com.cya.entity.DormBuild;
import com.cya.entity.DormManage;
import com.cya.entity.Notice;
import com.cya.entity.PageResult;
import com.cya.entity.PunchClock;
import com.cya.entity.PunchClockRecord;
import com.cya.entity.Record;
import com.cya.entity.Student;
public interface IAdminService {
/*-------------------------宿管---------------------------*/
public PageResult getDormManage(int pageNum, int pageSize,String filter,String key);
public void addDormManage(DormManage dormManage);
public DormManage getDormMangerById(int dormManId);
public void updataDormManageById(DormManage dormManage);
public void deleteDormManageById(Integer dormManId);
/*-------------------------宿管---------------------------*/
/*-------------------------学生---------------------------*/
public PageResult getStudentManage(int pageNum, int pageSize,String filter,String key);
public void addStudentManage(Student student);
public Student getStudentMangerById(int studentId);
public void updataStudentManageById(Student student);
public void studentManagerDeleteById(int studentId);
/*-------------------------学生---------------------------*/
/*-------------------------宿舍楼---------------------------*/
public PageResult getBuildManage(int pageNum, int pageSize,String filter,String key);
public void addBuildManage(DormBuild dormBuild);
public DormBuild getBuildMangerById(int dormBuildId);
public void updataBuildManageById(DormBuild dormBuild);
public void buildManagerDeleteById(Integer dormBuildId);
public List<DormManage> getDormMangerByBuildId(Integer dormBuildId);
public List<DormManage> getDormManage2();
public void addDormManageToBuild(Integer dormBuildId,Integer dormManId);
public void removeaDormManageToBuild(Integer dormManId);
/*-------------------------宿舍楼---------------------------*/
/*-------------------------考勤---------------------------*/
public PageResult getRecordManage(int pageNum, int pageSize,String filter,String key);
public void recordManagerDeleteById(Integer recordId);
/*-------------------------考勤---------------------------*/
/*-------------------------公告---------------------------*/
public PageResult getNoticeManage(Integer pageNum,Integer pageSize,String filter, String key);
public void addNoticeManage(Notice notice);
public Notice getNoticeMangerById(Integer noticeId);
public void updataNoticeManageById(Notice notice);
public void noticeManagerDeleteById(Integer noticeId);
/*-------------------------公告---------------------------*/
/*-------------------------我的---------------------------*/
public Admin getMyMsgById(Integer adminId);
public void updateMyMsgById(Admin admin);
public void updatePsd(Admin admin);
/*-------------------------我的---------------------------*/
/*-------------------------打卡---------------------------*/
public PageResult getPunchClockManage(int pageNum, int pageSize,String filter,String key);
public void addPunchClockManageMsg(PunchClock punchClock);
public PunchClock getPunchClockMangerById(String id);
public void updataPunchClockManageMsgById(PunchClock punchClock);
public void punchClockManagerDeleteById(String id);
public List<Student> getStudentMsg();
public void insertIntoPunchClockRecord(PunchClockRecord punchClockRecord);
public void updateIntoPunchClockRecordById(PunchClock punchClock);
public void deletePunchClockRecordById(String id);
/*-------------------------打卡---------------------------*/
}

@ -0,0 +1,47 @@
package com.cya.service;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.cya.entity.Admin;
import com.cya.entity.DormManage;
import com.cya.entity.Notice;
import com.cya.entity.PageResult;
import com.cya.entity.Record;
import com.cya.entity.Student;
public interface IDormManageService {
public PageResult getStudentMsgByBuildId(int pageNum, int pageSize,String filter,String key,Integer dormBuildId);
public void studentMsgDeleteById(int studentId);
public PageResult getRecordMsg(int pageNum, int pageSize,String filter,String key,Integer dormBuildId);
public Record getRecordById(int recordId);
public void updataRecordMsg(Record record);
public void addRecordMsg(Record record);
public void recordManagerDeleteById1(Integer recordId);
/*-------------------------我的---------------------------*/
public DormManage dorm_getMyMsgById(Integer dormManId);
public void dorm_updateMyMsgById(DormManage dormManage);
public void dorm_updatePsd(DormManage dormManage);
/*-------------------------我的---------------------------*/
public List<Notice> getNoticeAll();
/*-------------------------打卡---------------------------*/
public PageResult getPunchClockRecordMsgByDormBuildId(int pageNum, int pageSize,String filter,String key,Integer dormBuildId);
/*-------------------------打卡---------------------------*/
}

@ -0,0 +1,10 @@
package com.cya.service;
import java.util.List;
import com.cya.entity.Login;
public interface ILoginService {
public List login(Login login);
}

@ -0,0 +1,25 @@
package com.cya.service;
import org.apache.ibatis.annotations.Param;
import com.cya.entity.PageResult;
import com.cya.entity.PunchClockRecord;
import com.cya.entity.Student;
public interface IStudentService {
public PageResult getRecordMMsgByStuNum(Integer pageNum,Integer pageSize,String filter, String key,String studentNumber);
public Student student_getMyMsgById(Integer studentId);
public void student_updateMyMsgById(Student student);
public void student_updatePsd(Student student);
public PageResult getPunchClockRecordMsgByStuNum(Integer pageNum,Integer pageSize,String filter, String key,String studentNumber);
public PunchClockRecord getPunckColcokRecordById(Integer id);
public void updataPunchClockRecordMsg(PunchClockRecord punchClockRecord);
}

@ -0,0 +1,316 @@
package com.cya.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cya.entity.Admin;
import com.cya.entity.DormBuild;
import com.cya.entity.DormManage;
import com.cya.entity.Notice;
import com.cya.entity.PageResult;
import com.cya.entity.PunchClock;
import com.cya.entity.PunchClockRecord;
import com.cya.entity.Record;
import com.cya.entity.Student;
import com.cya.mapper.IAdminMapper;
import com.cya.service.IAdminService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@Service
public class AdminServiceImpl implements IAdminService{
@Autowired
private IAdminMapper adminMapperImpl;
/*-------------------------宿管---------------------------*/
@Override
public PageResult getDormManage(int pageNum, int pageSize,String filter,String key) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<DormManage>dormManageList= adminMapperImpl.getDormManage(filter,key);
Page<DormManage> page=(Page<DormManage>) dormManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public void addDormManage(DormManage dormManage) {
// TODO Auto-generated method stub
adminMapperImpl.addDormManage(dormManage);
}
@Override
public DormManage getDormMangerById(int dormManId) {
// TODO Auto-generated method stub
return adminMapperImpl.getDormMangerById(dormManId);
}
@Override
public void updataDormManageById(DormManage dormManage) {
// TODO Auto-generated method stub
adminMapperImpl.updataDormManageById(dormManage);
}
@Override
public void deleteDormManageById(Integer dormManId) {
// TODO Auto-generated method stub
adminMapperImpl.deleteDormManageById(dormManId);
}
/*-------------------------宿管---------------------------*/
/*-------------------------学生---------------------------*/
//获取学生信息
@Override
public PageResult getStudentManage(int pageNum, int pageSize, String filter, String key) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<Student>studentManageList= adminMapperImpl.getStudentManage(filter, key);
Page<Student> page=(Page<Student>) studentManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public void addStudentManage(Student student) {
// TODO Auto-generated method stub
adminMapperImpl.addStudentManage(student);
}
@Override
public Student getStudentMangerById(int studentId) {
// TODO Auto-generated method stub
return adminMapperImpl.getStudentMangerById(studentId);
}
@Override
public void updataStudentManageById(Student student) {
// TODO Auto-generated method stub
adminMapperImpl.updataStudentManageById(student);
}
@Override
public void studentManagerDeleteById(int studentId) {
// TODO Auto-generated method stub
adminMapperImpl.studentManagerDeleteById(studentId);
}
/*-------------------------学生---------------------------*/
/*-------------------------宿舍楼---------------------------*/
@Override
public PageResult getBuildManage(int pageNum, int pageSize, String filter, String key) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<DormBuild>buildList= adminMapperImpl.getBuildManage(filter, key);
Page<DormBuild> page=(Page<DormBuild>) buildList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public void addBuildManage(DormBuild dormBuild) {
// TODO Auto-generated method stub
adminMapperImpl.addBuildManage(dormBuild);
}
@Override
public DormBuild getBuildMangerById(int dormBuildId) {
// TODO Auto-generated method stub
return adminMapperImpl.getBuildMangerById(dormBuildId);
}
@Override
public void updataBuildManageById(DormBuild dormBuild) {
// TODO Auto-generated method stub
adminMapperImpl.updataBuildManageById(dormBuild);
}
@Override
public void buildManagerDeleteById(Integer dormBuildId) {
// TODO Auto-generated method stub
adminMapperImpl.buildManagerDeleteById(dormBuildId);
}
@Override
public List<DormManage> getDormMangerByBuildId(Integer dormBuildId) {
// TODO Auto-generated method stub
return adminMapperImpl.getDormMangerByBuildId(dormBuildId);
}
@Override
public List<DormManage> getDormManage2() {
// TODO Auto-generated method stub
return adminMapperImpl.getDormManage2();
}
@Override
public void addDormManageToBuild(Integer dormBuildId, Integer dormManId) {
// TODO Auto-generated method stub
adminMapperImpl.addDormManageToBuild(dormBuildId, dormManId);
}
@Override
public void removeaDormManageToBuild(Integer dormManId) {
// TODO Auto-generated method stub
adminMapperImpl.removeaDormManageToBuild(dormManId);
}
/*-------------------------宿舍楼---------------------------*/
/*-------------------------考勤---------------------------*/
@Override
public PageResult getRecordManage(int pageNum, int pageSize, String filter, String key) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<Record>recordManageList= adminMapperImpl.getRecordManage(filter, key);
Page<Record> page=(Page<Record>) recordManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public void recordManagerDeleteById(Integer recordId) {
// TODO Auto-generated method stub
adminMapperImpl.recordManagerDeleteById(recordId);
}
/*-------------------------考勤---------------------------*/
/*-------------------------公告---------------------------*/
@Override
public PageResult getNoticeManage(Integer pageNum,Integer pageSize,String filter, String key) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<Notice>noticeManageList= adminMapperImpl.getNoticeManage(filter, key);
Page<Notice> page=(Page<Notice>) noticeManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public void addNoticeManage(Notice notice) {
// TODO Auto-generated method stub
adminMapperImpl.addNoticeManage(notice);
}
@Override
public Notice getNoticeMangerById(Integer noticeId) {
// TODO Auto-generated method stub
return adminMapperImpl.getNoticeMangerById(noticeId);
}
@Override
public void updataNoticeManageById(Notice notice) {
// TODO Auto-generated method stub
adminMapperImpl.updataNoticeManageById(notice);
}
@Override
public void noticeManagerDeleteById(Integer noticeId) {
// TODO Auto-generated method stub
adminMapperImpl.noticeManagerDeleteById(noticeId);
}
/*-------------------------公告---------------------------*/
/*-------------------------我的---------------------------*/
@Override
public Admin getMyMsgById(Integer adminId) {
// TODO Auto-generated method stub
return adminMapperImpl.getMyMsgById(adminId);
}
@Override
public void updateMyMsgById(Admin admin) {
// TODO Auto-generated method stub
adminMapperImpl.updateMyMsgById(admin);
}
@Override
public void updatePsd(Admin admin) {
// TODO Auto-generated method stub
adminMapperImpl.updatePsd(admin);
}
/*-------------------------我的---------------------------*/
/*-------------------------打卡---------------------------*/
@Override
public PageResult getPunchClockManage(int pageNum, int pageSize, String filter, String key) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<PunchClock>punchClockManageList= adminMapperImpl.getPunchClockManage(filter, key);
Page<PunchClock> page=(Page<PunchClock>) punchClockManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public void addPunchClockManageMsg(PunchClock punchClock) {
// TODO Auto-generated method stub
adminMapperImpl.addPunchClockManageMsg(punchClock);
}
@Override
public PunchClock getPunchClockMangerById(String id) {
// TODO Auto-generated method stub
return adminMapperImpl.getPunchClockMangerById(id);
}
@Override
public void updataPunchClockManageMsgById(PunchClock punchClock) {
// TODO Auto-generated method stub
adminMapperImpl.updataPunchClockManageMsgById(punchClock);
}
@Override
public void punchClockManagerDeleteById(String id) {
// TODO Auto-generated method stub
adminMapperImpl.punchClockManagerDeleteById(id);
}
@Override
public List<Student> getStudentMsg() {
// TODO Auto-generated method stub
return adminMapperImpl.getStudentMsg();
}
@Override
public void insertIntoPunchClockRecord(PunchClockRecord punchClockRecord) {
// TODO Auto-generated method stub
adminMapperImpl.insertIntoPunchClockRecord(punchClockRecord);
}
@Override
public void updateIntoPunchClockRecordById(PunchClock punchClock) {
// TODO Auto-generated method stub
adminMapperImpl.updateIntoPunchClockRecordById(punchClock);
}
@Override
public void deletePunchClockRecordById(String id) {
// TODO Auto-generated method stub
adminMapperImpl.deletePunchClockRecordById(id);
}
/*-------------------------打卡---------------------------*/
}

@ -0,0 +1,108 @@
package com.cya.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cya.entity.Admin;
import com.cya.entity.DormManage;
import com.cya.entity.Notice;
import com.cya.entity.PageResult;
import com.cya.entity.PunchClockRecord;
import com.cya.entity.Record;
import com.cya.entity.Student;
import com.cya.mapper.IDormManageMapper;
import com.cya.service.IDormManageService;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@Service
public class IDormManageServiceImpl implements IDormManageService{
@Autowired
private IDormManageMapper dormManageMapperImpl;
@Override
public PageResult getStudentMsgByBuildId(int pageNum, int pageSize, String filter, String key, Integer dormBuildId) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<Student>studentsManageList= dormManageMapperImpl.getStudentMsgByBuildId(filter, key, dormBuildId);
Page<Student> page=(Page<Student>) studentsManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public void studentMsgDeleteById(int studentId) {
// TODO Auto-generated method stub
dormManageMapperImpl.studentMsgDeleteById(studentId);
}
@Override
public PageResult getRecordMsg(int pageNum, int pageSize, String filter, String key, Integer dormBuildId) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<Record>recordMsgList= dormManageMapperImpl.getRecordMsg(filter, key, dormBuildId);
Page<Record> page=(Page<Record>) recordMsgList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public Record getRecordById(int recordId) {
// TODO Auto-generated method stub
return dormManageMapperImpl.getRecordById(recordId);
}
@Override
public void updataRecordMsg(Record record) {
// TODO Auto-generated method stub
dormManageMapperImpl.updataRecordMsg(record);
}
@Override
public void addRecordMsg(Record record) {
// TODO Auto-generated method stub
dormManageMapperImpl.addRecordMsg(record);
}
@Override
public void recordManagerDeleteById1(Integer recordId) {
// TODO Auto-generated method stub
dormManageMapperImpl.recordManagerDeleteById1(recordId);
}
@Override
public DormManage dorm_getMyMsgById(Integer dormManId) {
// TODO Auto-generated method stub
return dormManageMapperImpl.dorm_getMyMsgById(dormManId);
}
@Override
public void dorm_updateMyMsgById(DormManage dormManage) {
// TODO Auto-generated method stub
dormManageMapperImpl.dorm_updateMyMsgById(dormManage);
}
@Override
public void dorm_updatePsd(DormManage dormManage) {
// TODO Auto-generated method stub
dormManageMapperImpl.dorm_updatePsd(dormManage);
}
@Override
public List<Notice> getNoticeAll() {
// TODO Auto-generated method stub
return dormManageMapperImpl.getNoticeAll();
}
@Override
public PageResult getPunchClockRecordMsgByDormBuildId(int pageNum, int pageSize, String filter, String key,
Integer dormBuildId) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<PunchClockRecord>punchClockRecordManageList= dormManageMapperImpl.getPunchClockRecordMsgByDormBuildId(filter, key, dormBuildId);
Page<PunchClockRecord> page=(Page<PunchClockRecord>) punchClockRecordManageList;
return new PageResult(page.getTotal(), page.getResult());
}
}

@ -0,0 +1,75 @@
package com.cya.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cya.entity.PageResult;
import com.cya.entity.PunchClockRecord;
import com.cya.entity.Record;
import com.cya.entity.Student;
import com.cya.mapper.IStudentMapper;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@Service
public class IStudentServiceImpl implements com.cya.service.IStudentService {
@Autowired
private IStudentMapper studentMapperImpl;
@Override
public Student student_getMyMsgById(Integer studentId) {
// TODO Auto-generated method stub
return studentMapperImpl.student_getMyMsgById(studentId);
}
@Override
public void student_updateMyMsgById(Student student) {
// TODO Auto-generated method stub
studentMapperImpl.student_updateMyMsgById(student);
}
@Override
public void student_updatePsd(Student student) {
// TODO Auto-generated method stub
studentMapperImpl.student_updatePsd(student);
}
@Override
public PageResult getRecordMMsgByStuNum(Integer pageNum, Integer pageSize, String filter, String key,
String studentNumber) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<Record>studentsManageList= studentMapperImpl.getRecordMsgByStuNum(filter, key, studentNumber);
Page<Record> page=(Page<Record>) studentsManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public PageResult getPunchClockRecordMsgByStuNum(Integer pageNum, Integer pageSize, String filter, String key,
String studentNumber) {
// TODO Auto-generated method stub
PageHelper.startPage(pageNum, pageSize);
List<PunchClockRecord>punchClockRecordManageList= studentMapperImpl.getPunchClockRecordMsgByStuNum(filter, key, studentNumber);
Page<PunchClockRecord> page=(Page<PunchClockRecord>) punchClockRecordManageList;
return new PageResult(page.getTotal(), page.getResult());
}
@Override
public PunchClockRecord getPunckColcokRecordById(Integer id) {
// TODO Auto-generated method stub
return studentMapperImpl.getPunckColcokRecordById(id);
}
@Override
public void updataPunchClockRecordMsg(PunchClockRecord punchClockRecord) {
// TODO Auto-generated method stub
studentMapperImpl.updataPunchClockRecordMsg(punchClockRecord);
}
}

@ -0,0 +1,34 @@
package com.cya.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cya.entity.Login;
import com.cya.mapper.ILoginMapper;
import com.cya.service.ILoginService;
@Service
public class LoginServiceImpl implements ILoginService {
@Autowired
private ILoginMapper loginMapperImpl;
@Override
public List login(Login login) {
List list=null;
// TODO Auto-generated method stub
if(login.getRole().trim().equals("admin")) {
list= loginMapperImpl.loginToAdmin(login);
}
if(login.getRole().trim().equals("dormManager")) {
list= loginMapperImpl.loginToDormManage(login);
}
if(login.getRole().trim().equals("student")) {
list= loginMapperImpl.loginToStudent(login);
}
return list;
}
}
Loading…
Cancel
Save