| | |
| | | import com.fgkj.dao.BaseDAO;
|
| | | import com.fgkj.dao.BaseDAOFactory;
|
| | | import com.fgkj.dao.impl.User_infImpl;
|
| | | import com.fgkj.dto.Batt_User_Permit;
|
| | | import com.fgkj.dto.Page;
|
| | | import com.fgkj.dto.ServiceModel;
|
| | | import com.fgkj.dto.UserClient;
|
| | | import com.fgkj.dto.User_battgroup_baojigroup;
|
| | | import com.fgkj.dto.User_battgroup_baojigroup_battgroup;
|
| | | import com.fgkj.dto.User_inf;
|
| | | import com.fgkj.dto.User_permitgroup;
|
| | |
|
| | | public class User_infService extends ActionUtil {
|
| | | private ServiceModel model;
|
| | | private User_permitgroupService upservice;
|
| | | private BaseDAO dao;
|
| | |
|
| | | public User_infService() {
|
| | | model = new ServiceModel();
|
| | | dao = BaseDAOFactory.getBaseDAO(BaseDAO.USER_INF);
|
| | | upservice = new User_permitgroupService();
|
| | | }
|
| | |
|
| | | //5.1用户管理(添加)
|
| | |
| | | return model;
|
| | | }
|
| | |
|
| | | // 根据battgroupid查对应的包机人
|
| | | /*// 根据battgroupid查对应的包机人
|
| | | public ServiceModel searchByBattGroupId(Object obj) {
|
| | | model = new ServiceModel();
|
| | | List<User_inf> list = ((User_infImpl) dao).searchByBattGroupId(obj);
|
| | | // System.out.println(list.size());
|
| | | /*
|
| | | |
| | | * for(User_inf u:list){ System.out.println(u); }
|
| | | */
|
| | | |
| | | if (list != null && list.size() > 0) {
|
| | | model.setCode(1);
|
| | | model.setData(list);
|
| | |
| | | // System.out.println(model);
|
| | | return model;
|
| | | }
|
| | |
|
| | | */
|
| | | // 3.1根据uid查用户信息(uname)
|
| | | public ServiceModel serchuName(Object obj) {
|
| | | model = new ServiceModel();
|
| | |
| | | return model;
|
| | | }
|
| | |
|
| | | // 5.1查询员工的所有信息
|
| | | /*// 5.1查询员工的所有信息
|
| | | public ServiceModel searchAll(Object obj) {
|
| | | // System.out.println((Batt_User_Permit)obj);
|
| | | model = new ServiceModel();
|
| | |
| | | }
|
| | | // System.out.println(model);
|
| | | return model;
|
| | | }
|
| | | }*/
|
| | |
|
| | | // 用户登录
|
| | | /*// 用户登录
|
| | | public ServiceModel login(Object obj) {
|
| | | User_inf uinf = (User_inf) obj;
|
| | | //String usnId64 = (String) ActionUtil.DecryptionBase64(uinf.getUpassword());
|
| | |
| | | }
|
| | | }
|
| | | return model;
|
| | | }
|
| | | }*/
|
| | |
|
| | | // 将所有登陆的用户的信息存到application中
|
| | | public void setApplication(User_inf user) {
|
| | |
| | | return model;
|
| | | }
|
| | |
|
| | | //根据员工信息和员工编号去匹配合适的员工
|
| | | /*//根据员工信息和员工编号去匹配合适的员工
|
| | | public ServiceModel searchByNameOrId(Object obj){
|
| | | List<User_inf> list=((User_infImpl)dao).searchByNameOrId(obj);
|
| | |
|
| | |
| | | model.setMsg("查询失败!");
|
| | | }
|
| | | return model;
|
| | | }
|
| | | }*/
|
| | |
|
| | | //重置用户密码
|
| | | public ServiceModel resetPassword(Object obj){
|
| | |
| | | return model;
|
| | | }
|
| | | public static void main(String[] args) {
|
| | | User_infService us = new User_infService();
|
| | | User_inf u = new User_inf();
|
| | | u.setUName("a");
|
| | | u.setUEmployeeId("a");
|
| | | u.setUId(1003);
|
| | | Batt_User_Permit bup = new Batt_User_Permit();
|
| | | Page page = new Page();
|
| | | page.setPageSize(10);
|
| | | page.setPageCurr(1);
|
| | | bup.setPage(page);
|
| | | bup.setUinf(u);
|
| | | |
| | | }
|
| | |
|
| | | //User_battgroup_baojigroup_battgroup ub = new User_battgroup_baojigroup_battgroup();
|
| | | // ub.setBattGroupId(1000012);
|
| | | // us.searchByBattGroupId(ub);
|
| | | // us.serchByInfo(u);
|
| | | // System.out.println(us.searchAll(bup).getData());
|
| | | us.searchByNameOrId(bup);
|
| | | public ServiceModel login(User_inf uinf) {
|
| | | // TODO Auto-generated method stub
|
| | | return null;
|
| | | }
|
| | | }
|