| | |
| | | package com.fgkj.mapper.impl; |
| | | |
| | | import com.fgkj.dto.Batt_User_Permit; |
| | | import com.fgkj.dto.User_battgroup_baojigroup; |
| | | import com.fgkj.dto.User_battgroup_baojigroup_battgroup; |
| | | import com.fgkj.dto.User_inf; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Insert; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | |
| | | public interface User_infMapper { |
| | | |
| | | //5.1用户管理(添加) |
| | | public boolean add(Object obj); |
| | | @Insert("insert into db_user.tb_user_inf(uSnId,uPassword,uName,uShenFenId,uEmployeeId,uTelephone,uMobilephone,uEmail,uAddr,uBirthday,uAccessionDay," + |
| | | "uSex,uDepartment,uProTitle,uAuthority,uJobGroup,uDuties,uTasks,uBaojiusr,uNote,license) " + |
| | | "values(#{uSnId},#{upassword},#{uName},#{uShenFenId},#{uEmployeeId},#{uTelephone},#{uMobilephone},#{uEmail},#{uAddr},#{uBirthDay},#{uAccessionDay}," + |
| | | "#{uSex},#{uDepartment},#{uProTitle},#{uAuthority},#{uJobGroup},#{uDuties},#{uTasks},#{uBaojiusr},#{uNote},#{license})") |
| | | public int add(User_inf obj); |
| | | |
| | | //5.1用户管理(添加时判断用户名是否重复) |
| | | public int addJudge(Object obj); |
| | | @Select(" select count(uid) as nums from db_user.tb_user_inf where uname=#{uName} limit 1") |
| | | public int addJudge(User_inf obj); |
| | | |
| | | //5.1用户管理(编辑) |
| | | public boolean update(Object obj); |
| | | public boolean update(User_inf obj); |
| | | |
| | | //5.1用户管理(删除) |
| | | public boolean del(Object obj); |
| | | @Delete("delete from db_user.tb_user_inf where uId=#{uId} ") |
| | | public int del(User_inf obj); |
| | | |
| | | //首页会根据uname查询用户信息 |
| | | public List serchByCondition(Object obj); |
| | | @Select("select uid,uname,uSnId,upassword,unote from db_user.tb_user_inf where uname=#{uName}") |
| | | public List<User_inf> serchByCondition(User_inf obj); |
| | | |
| | | //查询当前库中存在的name名字的排序(模糊) |
| | | public List serchinfoUname() ; |
| | | @Select("select uid,uname from db_user.tb_user_inf where uname like '%name%' order by uname") |
| | | public List<User_inf> serchinfoUname() ; |
| | | |
| | | //5.3根据uid查包机组 |
| | | public List serchByInfo(Object obj); |
| | | @Select("select distinct(baoji_group_name) " + |
| | | "from db_user.tb_user_battgroup_baojigroup,db_user.tb_user_battgroup_baojigroup_usr " + |
| | | "where tb_user_battgroup_baojigroup_usr.baoji_group_id=tb_user_battgroup_baojigroup.baoji_group_id " + |
| | | "and tb_user_battgroup_baojigroup_usr.uId=#{uId}") |
| | | public List<User_battgroup_baojigroup> serchByInfo(User_inf obj); |
| | | |
| | | //根据battgroupid查对应的包机人 |
| | | public List searchByBattGroupId(Object obj); |
| | | @Select("select distinct(db_user.tb_user_inf.uid),db_user.tb_user_inf.uName,db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId " + |
| | | "from db_user.tb_user_inf ,db_user.tb_user_battgroup_baojigroup_battgroup,db_user.tb_user_battgroup_baojigroup_usr " + |
| | | "where db_user.tb_user_battgroup_baojigroup_battgroup.baoji_group_id=db_user.tb_user_battgroup_baojigroup_usr.baoji_group_id " + |
| | | "and db_user.tb_user_battgroup_baojigroup_usr.uId=db_user.tb_user_inf.uid " + |
| | | "and db_user.tb_user_battgroup_baojigroup_battgroup.BattGroupId=#{battGroupId} and db_user.tb_user_inf.uBaojiUsr=1 ") |
| | | public List<User_inf> searchByBattGroupId(User_battgroup_baojigroup_battgroup obj); |
| | | |
| | | //根据uId查用户姓名 |
| | | public List serchUname(Object obj); |
| | | @Select("select UName from db_user.tb_user_inf where uId=#{uId}") |
| | | public List<User_inf> serchUname(User_inf uinf); |
| | | |
| | | //查询所有uid在字符串objs中的所有用户名,并且用,连接多个用户名 |
| | | public List searchUnams(Object objs); |
| | | |
| | | //5.1查询所有员工信息 |
| | | public List searchAll(Object obj) ; |
| | | |
| | | @Select("SELECT GROUP_CONCAT(DISTINCT(uname))as unames from db_user.tb_user_inf where locate(uid,#{value});") |
| | | public String searchUnams(String value); |
| | | |
| | | //5.1查询所有员工信息 |
| | | public List searchAll() ; |
| | | public List searchAll2(Batt_User_Permit obj) ; |
| | | |
| | | //5.1查询所有员工信息 |
| | | @Select("select distinct(tb_user_inf.uid),uSnId,uName,uShenFenId,uEmployeeId,uTelephone,uMobilephone,uEmail,uAddr,uBirthday,uAccessionDay,uSex,uDepartment,uProTitle,uAuthority,uJobGroup,uDuties,uTasks,uBaojiusr,uNote" + |
| | | ",permit_group_name " + |
| | | "from db_user.tb_user_inf " + |
| | | "left outer join db_user.tb_user_permitgroup_data on db_user.tb_user_inf.uid=tb_user_permitgroup_data.uid " + |
| | | "left outer join db_user.tb_user_permitgroup on db_user.tb_user_permitgroup.permit_group_id=tb_user_permitgroup_data.permit_group_id " + |
| | | "where tb_user_inf.uid!=1002 " + |
| | | "order by uid") |
| | | public List<User_inf> searchAll() ; |
| | | |
| | | //4.1查询维护区对应的维护人员个数(由模板创建作业时) |
| | | public List serchDepNum(Object obj); |
| | | |
| | | //修改用户密码 |
| | | public boolean updatePassword(Object obj); |
| | | @Update("update db_user.tb_user_inf set usnid=#{uSnId} , upassword=#{upassword} where uid=#{uId}") |
| | | public boolean updatePassword(User_inf obj); |
| | | |
| | | //重置用户密码 |
| | | public boolean resetPassword(Object obj); |
| | | |
| | | @Update("update db_user.tb_user_inf set usnid='${@com.fgkj.mapper.UinfDaoFactory@MR_PWD}',upassword=#{upassword} where uid=#{uId}") |
| | | public boolean resetPassword(User_inf obj); |
| | | |
| | | //根据员工信息和员工编号去匹配合适的员工 |
| | | public List searchByNameOrId(Object obj); |
| | | @Select("select distinct(uid),uSnId,uName,uShenFenId,uEmployeeId,uTelephone,uMobilephone,uEmail,uAddr,uBirthday,uAccessionDay,uSex,uDepartment,uProTitle,uAuthority,uJobGroup,uDuties,uTasks,uBaojiusr,uNote" + |
| | | " from db_user.tb_user_inf " + |
| | | " where uName like '${uinf.uName}' or uEmployeeId like '${uinf.uEmployeeId}' " + |
| | | " order by uid ") |
| | | public List<User_inf> searchByNameOrId(Batt_User_Permit obj); |
| | | |
| | | //包机组重做(穿梭框)查询所有的用户 |
| | | public List searchCS_All() ; |
| | | @Select("select distinct(tb_user_inf.uid),uSnId,uName,uShenFenId,uEmployeeId,uTelephone,uMobilephone,uEmail,uAddr,uBirthday,uAccessionDay,uSex,uDepartment,uProTitle,uAuthority,uJobGroup,uDuties,uTasks,uBaojiusr,uNote "+ |
| | | " from db_user.tb_user_inf " + |
| | | " order by uid ") |
| | | public List<User_inf> searchCS_All() ; |
| | | |
| | | |
| | | /*public static void main(String[] args) { |
| | | User_infImpl ui= new User_infImpl(); |
| | |
| | | } |
| | | User_inf u=new User_inf(); |
| | | |
| | | u.setUId(1003); |
| | | u.setuId(1003); |
| | | // List<User_inf> list=ui.serchByCondition(u); |
| | | // for (User_inf uu : list) { |
| | | // System.out.println(uu); |