User_task_changeController User_permitgroupController 等接口更新
| | |
| | | //5.1根据uid查对应的所有权限组 |
| | | @GetMapping("permitNameByUid") |
| | | public ServiceModel serchPermitName(@RequestBody User_inf uinf){ |
| | | System.out.println("uinf = " + uinf);//TODO ==> Parameters: null |
| | | ServiceModel model=service.serchPermitName(uinf); |
| | | |
| | | |
| | | return model; |
| | | } |
| | | |
| | |
| | | |
| | | public static String UidsToUnames(String uids){ |
| | | String unames=""; |
| | | List list = userInfMapper.searchUnams(uids); |
| | | //System.out.println(uids+"****"); |
| | | //System.out.println(list.size()+"****"); |
| | | if(list != null && list.size()>0){ |
| | | unames = list.get(0).toString(); |
| | | //System.out.println(unames); |
| | | } |
| | | // List list = userInfMapper.searchUnams(uids); |
| | | // //System.out.println(uids+"****"); |
| | | // //System.out.println(list.size()+"****"); |
| | | // if(list != null && list.size()>0){ |
| | | // unames = list.get(0).toString(); |
| | | // //System.out.println(unames); |
| | | // } |
| | | return unames; |
| | | } |
| | | |
| | |
| | | public List<User_inf> serchUname(User_inf uinf); |
| | | |
| | | //查询所有uid在字符串objs中的所有用户名,并且用,连接多个用户名 |
| | | public List searchUnams(Object objs); |
| | | @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 searchAll2(Batt_User_Permit obj) ; |
| | |
| | | //包机组重做(穿梭框)查询所有的用户 |
| | | public List searchCS_All() ; |
| | | |
| | | @Select("select count(*) from db_user.tb_user_inf ") |
| | | @Select("SELECT FOUND_ROWS()") |
| | | int getLimtitNumber(); |
| | | |
| | | /*public static void main(String[] args) { |
| | |
| | | |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.dto.User_permitgroup; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | public boolean updatePro(Object obj); |
| | | |
| | | //5.2重命名(修改权限名) |
| | | public boolean updateName(Object obj); |
| | | @Update("update db_user.tb_user_permitgroup set permit_group_name=#{permit_group_name} where permit_group_id=#{permit_group_id}") |
| | | public int updateName(Object obj); |
| | | |
| | | //5.2删除(删除所有该权限组) |
| | | public boolean del(Object obj) ; |
| | | @Delete("delete from db_user.tb_user_permitgroup where tb_user_permitgroup.permit_group_id=#{permit_group_id}") |
| | | public int del(User_permitgroup obj) ; |
| | | |
| | | //5.1根据uid查权限 |
| | | @Select("select distinct(permit_group_name),tb_user_permitgroup.permit_group_id from db_user.tb_user_permitgroup,db_user.tb_user_permitgroup_data " + |
| | |
| | | public List<User_permitgroup> serchByCondition(User_inf obj); |
| | | |
| | | //5.2查所有的权限id和权限名称 |
| | | public List searchAll() ; |
| | | @Select("select distinct(permit_group_id),permit_group_name from db_user.tb_user_permitgroup") |
| | | public List<User_permitgroup> searchAll() ; |
| | | |
| | | |
| | | //5.2根据权限id查用户 |
| | | public List serchByPermit(Object obj); |
| | | @Select("select distinct(uname),tb_user_inf.uid,tb_user_permitgroup_data.num as uBaojiusr from db_user.tb_user_inf,db_user.tb_user_permitgroup,db_user.tb_user_permitgroup_data " + |
| | | "where tb_user_permitgroup.permit_group_id=tb_user_permitgroup_data.permit_group_id " + |
| | | "and tb_user_inf.uid=tb_user_permitgroup_data.uid " + |
| | | "and tb_user_permitgroup.permit_group_id=#{permit_group_id}") |
| | | public List<User_inf> serchByPermit(User_permitgroup obj); |
| | | |
| | | //5.2根据权限组id查对应的所有权限 |
| | | public List serchByInfo(Object obj) ; |
| | | @Select("select num,permit_group_id,permit_group_name,permit_item_name,permit_item_value from db_user.tb_user_permitgroup " + |
| | | "where permit_group_id=#{permit_group_id} order by permit_group_id") |
| | | public List<User_permitgroup> serchByInfo(User_permitgroup obj) ; |
| | | |
| | | //5.2查所有具体的权限 |
| | | public List serchRole(); |
| | | @Select("select distinct(permit_item_name) from db_user.tb_user_permitgroup ") |
| | | public List<String> serchRole(); |
| | | |
| | | //5.2查最大的权限Id |
| | | public List serchMaxRoleId(); |
| | |
| | | import java.util.List; |
| | | |
| | | import com.fgkj.dto.User_inf; |
| | | import com.fgkj.dto.User_permitgroup; |
| | | import com.fgkj.dto.User_permitgroup_data; |
| | | import org.apache.ibatis.annotations.Delete; |
| | | import org.apache.ibatis.annotations.Insert; |
| | |
| | | @Delete("delete from db_user.tb_user_permitgroup_data where num=#{num}") |
| | | public int del(User_permitgroup_data obj) ; |
| | | //5.2删除(删除权限组时将在tb_user_permitgroup_data表中所有permit_group_id删除) |
| | | public boolean delPermitId(Object obj) ; |
| | | @Delete("delete from db_user.tb_user_permitgroup_data where permit_group_id=#{permit_group_id}") |
| | | public int delPermitId(User_permitgroup obj) ; |
| | | |
| | | public List searchAll() ; |
| | | |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.fgkj.dto.User_sms; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | public interface User_smsMapper{ |
| | | public interface User_smsMapper { |
| | | |
| | | public boolean add(Object obj) ; |
| | | public boolean add(Object obj); |
| | | |
| | | public boolean update(Object obj) ; |
| | | public boolean update(Object obj); |
| | | |
| | | public boolean del(Object obj) ; |
| | | public boolean del(Object obj); |
| | | |
| | | public List searchAll() ; |
| | | public List searchAll(); |
| | | |
| | | //4.9短信息查询 |
| | | public List serchByCondition1(Object obj) ; |
| | | //4.9短信息查询 |
| | | @SuppressWarnings("unchecked") |
| | | public List serchByCondition(Object obj) ; |
| | | //4.9短信息查询 |
| | | public List serchByCondition1(Object obj); |
| | | |
| | | //4.9短信息查询 |
| | | public List serchByCondition(User_sms obj); |
| | | |
| | | @Select("SELECT FOUND_ROWS()") |
| | | int getLimtitNumber(); |
| | | } |
| | |
| | | public List serchByCondition1(Object obj) ; |
| | | //4.5作业变更查询 |
| | | public List serchByCondition(Task_Batt_Test obj) ; |
| | | |
| | | @Select("SELECT FOUND_ROWS()") |
| | | int getLimtitNumber(); |
| | | } |
| | |
| | | |
| | | //5.2查询所有的权限 |
| | | public ServiceModel serchRole(){ |
| | | List<User_permitgroup> list=mapper.serchRole(); |
| | | /** |
| | | * 存一个参数 |
| | | * { |
| | | * "num": null, |
| | | * "permit_group_id": null, |
| | | * "permit_group_name": null, |
| | | * "permit_item_name": "battmant_report_query_permit", |
| | | * "permit_item_value": null |
| | | * } |
| | | */ |
| | | List<String> list=mapper.serchRole(); |
| | | model=new ServiceModel(); |
| | | if(list!=null && list.size()>0){ |
| | | model.setCode(1); |
| | |
| | | } |
| | | |
| | | //5.2重命名(修改权限名) |
| | | public ServiceModel updateName(Object obj){ |
| | | boolean bl=mapper.updateName(obj); |
| | | public ServiceModel updateName(User_permitgroup obj){ |
| | | ServiceModel model = new ServiceModel(); |
| | | boolean bl=mapper.updateName(obj)>0; |
| | | if(bl){ |
| | | model.setCode(1); |
| | | model.setMsg("修改权限组成功!"); |
| | |
| | | } |
| | | |
| | | //5.2删除(删除所有该权限组) |
| | | public ServiceModel delete(Object obj) { |
| | | Boolean bl=mapper.del(obj); |
| | | Boolean bl_data=dataMapper.delPermitId(obj); |
| | | public ServiceModel delete(User_permitgroup obj) { |
| | | Boolean bl=mapper.del(obj)>0; |
| | | Boolean bl_data=dataMapper.delPermitId(obj)>0; |
| | | if(bl||bl_data){ |
| | | model.setCode(1); |
| | | model.setMsg("删除成功!"); |
| | |
| | | |
| | | |
| | | //5.1根据uid查permit_group_name |
| | | public ServiceModelImpl serchByCondition(User_inf obj){ |
| | | ServiceModelImpl model= new ServiceModelImpl(); |
| | | List list=mapper.serchByCondition(obj); |
| | | if(list!=null && list.size()>0){ |
| | | model.setCode(1); |
| | | String StrN=""; |
| | | for(int i=0;i<list.size();i++){ |
| | | StrN+=","; |
| | | StrN+=((User_permitgroup)list.get(i)).getPermit_group_name(); |
| | | } |
| | | //TODO perry |
| | | model.setMsgN(StrN.substring(1,StrN.length())); |
| | | }else{ |
| | | model.setCode(0); |
| | | } |
| | | return model; |
| | | } |
| | | public ServiceModelImpl serchByCondition(User_inf obj) { |
| | | ServiceModelImpl model = new ServiceModelImpl(); |
| | | List list = mapper.serchByCondition(obj); |
| | | if (list != null && list.size() > 0) { |
| | | model.setCode(1); |
| | | String StrN = ""; |
| | | for (int i = 0; i < list.size(); i++) { |
| | | StrN += ","; |
| | | StrN += ((User_permitgroup) list.get(i)).getPermit_group_name(); |
| | | } |
| | | //TODO perry |
| | | model.setMsgN(StrN.substring(1, StrN.length())); |
| | | } else { |
| | | model.setCode(0); |
| | | } |
| | | return model; |
| | | } |
| | | //5.2根据权限id查用户 |
| | | public ServiceModel serchByPermit(Object obj){ |
| | | public ServiceModel serchByPermit(User_permitgroup obj){ |
| | | ServiceModel model = new ServiceModel(); |
| | | List list=mapper.serchByPermit(obj); |
| | | if(list.size()>0&&list!=null){ |
| | | model.setCode(1); |
| | |
| | | |
| | | //5.1根据uid查对应的所有权限组 |
| | | public ServiceModel serchPermitName(User_inf obj){ |
| | | ServiceModel model = new ServiceModel(); |
| | | List<User_permitgroup> list=mapper.serchByCondition(obj); |
| | | if(list!=null&&list.size()>0){ |
| | | model.setCode(1); |
| | |
| | | |
| | | //5.2查所有的权限组 |
| | | public ServiceModel searchAll(){ |
| | | ServiceModel model=new ServiceModel(); |
| | | List list=mapper.searchAll(); |
| | | model=new ServiceModel(); |
| | | // for (Object object : list) { |
| | | // System.out.println(object); |
| | | // } |
| | |
| | | } |
| | | |
| | | //5.2根据权限组id查对应的所有权限 |
| | | public ServiceModel serchByInfo(Object obj){ |
| | | public ServiceModel serchByInfo(User_permitgroup obj){ |
| | | ServiceModel model = new ServiceModel(); |
| | | List list=mapper.serchByInfo(obj); |
| | | if(list!=null && list.size()>0){ |
| | | model.setCode(1); |
| | |
| | | package com.fgkj.services; |
| | | |
| | | import com.fgkj.dto.PageBean; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.User_sms; |
| | | import com.fgkj.mapper.impl.User_smsMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | return model; |
| | | } |
| | | //4.9短信息查询 |
| | | public ServiceModel serchByCondition(Object obj){ |
| | | public ServiceModel serchByCondition(User_sms obj){ |
| | | ServiceModel model = new ServiceModel(); |
| | | List list=mapper.serchByCondition(obj); |
| | | PageBean pageBean = obj.getPageBean(); |
| | | int curr = (pageBean.getPageCurr() - 1) * pageBean.getPageSize(); |
| | | obj.getPageBean().setPageCurr(curr); |
| | | List<User_sms> list=mapper.serchByCondition(obj); |
| | | // for (Object object : list) { |
| | | // System.out.println(object); |
| | | // } |
| | | |
| | | if(list!=null && list.size()>0){ |
| | | //去掉limit条件后的总数 |
| | | int number=mapper.getLimtitNumber(); |
| | | list.get(list.size()-1).setPageBean(new PageBean()); |
| | | System.out.println("number: "+number); |
| | | list.get(list.size()-1).getPageBean().setPageAll(number); |
| | | model.setCode(1); |
| | | model.setData(list); |
| | | } |
| | |
| | | package com.fgkj.services; |
| | | |
| | | import com.fgkj.dto.PageBean; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.Task_Batt_Test; |
| | | import com.fgkj.dto.User_task_change; |
| | | import com.fgkj.mapper.TestDaoFactory; |
| | | import com.fgkj.mapper.UtilityFactory; |
| | | import com.fgkj.mapper.impl.User_infMapper; |
| | | import com.fgkj.mapper.impl.User_task_changeMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | } |
| | | return model; |
| | | } |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private User_infMapper userInfMapper; |
| | | //4.5作业变更查询 |
| | | public ServiceModel serchByCondition(Task_Batt_Test obj) { |
| | | ServiceModel model = new ServiceModel(); |
| | | List<Task_Batt_Test> list = mapper.serchByCondition(obj); |
| | | PageBean pageBean = obj.getPageBean(); |
| | | int curr = (pageBean.getPageCurr() - 1) * pageBean.getPageSize(); |
| | | pageBean.setPageCurr(curr); |
| | | List<Task_Batt_Test> list = mapper.serchByCondition(obj); //TODO 待测试,数据不足 |
| | | if (list != null && list.size() > 0) { |
| | | //去掉limit条件后的总数 |
| | | int number=mapper.getLimtitNumber(); |
| | | if(list!=null&&list.size()>0){ |
| | | list.get(list.size()-1).setPageBean(new PageBean()); |
| | | list.get(list.size()-1).getPageBean().setPageAll(number); |
| | | } |
| | | for (int i = 0; i < list.size(); i++) { |
| | | System.out.println("list = " + list.get(i)); |
| | | /*** |
| | | * { |
| | | * utask=null, |
| | | * utest=null, |
| | | * ulist=null, |
| | | * binf=BattInf{ |
| | | * num=null, |
| | | * stationId='null', |
| | | * stationName='山西省-太原市-迎泽区-局机房119-局机房站-1', |
| | | * stationName1='null', |
| | | * stationName2='null', |
| | | * stationName3='null', |
| | | * stationName4='null', |
| | | * stationName5='null', |
| | | * stationName6='null', |
| | | * stationName7='null', |
| | | * stationName8='null', |
| | | * stationName9='null', |
| | | * stationIp='null', |
| | | * fbsDeviceId=null, |
| | | * fbsDeviceIp='null', |
| | | * fbsDeviceIp_YM='null', |
| | | * fbsDeviceIp_WG='null', |
| | | * fbsDeviceIp_old='null', |
| | | * fbsDeviceIp_YM_old='null', |
| | | * fbsDeviceIp_WG_old='null', |
| | | * fbsDeviceName='null', |
| | | * groupIndexInFBSDevice=null, |
| | | * battModel='null', |
| | | * battGroupId=1000001, |
| | | * battGroupNum=null, |
| | | * battGroupName='电池组1', |
| | | * battGroupName1='null', |
| | | * battGroupName2='null', |
| | | * battGroupName3='null', |
| | | * battGroupName4='null', |
| | | * battGroupName5='null', |
| | | * battGroupName6='null', |
| | | * floatVolLevel=null, |
| | | * offlineVolLevel=null, |
| | | * battFloatCurrent=null, |
| | | * deviceId='null', |
| | | * deviceName='null', |
| | | * monCount=null, |
| | | * monCapStd=null, |
| | | * monResStd=null, |
| | | * monSerStd=null, |
| | | * monTmpStd=null, |
| | | * monVolStd=null, |
| | | * monVolLowToAvg=null, |
| | | * monNum=null, |
| | | * battProducer='null', |
| | | * battProductDate=null, |
| | | * battProductDate1=null, |
| | | * battInUseDate=null, |
| | | * battInUseDate1=null, |
| | | * battGuarantDayCount=null, |
| | | * signalId='null', |
| | | * cInterFaceId=null, |
| | | * load_curr=null, |
| | | * disCurrMax=null, |
| | | * signalName='null', |
| | | * startNum=null, |
| | | * size=null, |
| | | * station_phone='null', |
| | | * install_user='null', |
| | | * station_install=null, |
| | | * stationId_ex='null', |
| | | * videoOrImage='null', |
| | | * vol_grade=null, |
| | | * manufacturers='null', |
| | | * assetequipment='null', |
| | | * deviceclasspath='null', |
| | | * deviceoperationdepartment='null', |
| | | * propertyRightUnit='null', |
| | | * propertyAttribute='null', |
| | | * factoryNumber='null', |
| | | * operationTeam='null', |
| | | * deviceIdentityCode='null', |
| | | * projectType='null', |
| | | * batteryApplicationType='null', |
| | | * singleRatedVoltage=null, |
| | | * remoteMonitor='null', |
| | | * batttIndependentPlaced='null', |
| | | * junChargeVoltageValue=null |
| | | * }, |
| | | * ucheck=null, |
| | | * mcheck=null, |
| | | * uchange=User_task_change[ |
| | | * num=1, |
| | | * usr_id=1001, |
| | | * master_id=0, |
| | | * appoint_uid=1001, |
| | | * copy_uids=1001, |
| | | * change_type_id=0, |
| | | * task_type_id=0, |
| | | * task_rc_num=10580, |
| | | * BattgroupId=1000001, |
| | | * change_reason=有新的任务, |
| | | * old_executor_ids=1001, |
| | | * old_task_exe_time=ThuSep0800: 00: 00CST2016, |
| | | * new_executor_ids=0, |
| | | * new_task_exe_time=TueSep0600: 00: 00CST2016, |
| | | * change_ask_time=ThuSep0811: 32: 02CST2016, |
| | | * change_ask_time1=null, |
| | | * change_ask_time_limit=ThuSep0811: 32: 02CST2016, |
| | | * task_change_approve_time=SatOct2217: 13: 55CST2016, |
| | | * task_change_approve_time1=null, |
| | | * task_change_approve_res=1, |
| | | * remark=通过 |
| | | * ], |
| | | * uinf=null, |
| | | * pageBean=null |
| | | * } |
| | | */ |
| | | String Uname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getUsr_id().toString());//TODO 待完成 |
| | | System.out.println("getUsr_id = " + list.get(i).getUchange().getUsr_id()); |
| | | /*** |
| | | * { |
| | | * binf=BattInf{ |
| | | * stationName='山西省-太原市-迎泽区-局机房119-局机房站-1', |
| | | * battGroupName='电池组1', |
| | | * }, |
| | | * uchange=User_task_change[ |
| | | * num=1, |
| | | * usr_id=1001, |
| | | * master_id=0, |
| | | * appoint_uid=1001, |
| | | * copy_uids=1001, |
| | | * change_type_id=0, |
| | | * task_type_id=0, |
| | | * task_rc_num=10580, |
| | | * BattgroupId=1000001, |
| | | * change_reason=有新的任务, |
| | | * old_executor_ids=1001, |
| | | * old_task_exe_time=ThuSep0800: 00: 00CST2016, |
| | | * new_executor_ids=0, |
| | | * new_task_exe_time=TueSep0600: 00: 00CST2016, |
| | | * change_ask_time=ThuSep0811: 32: 02CST2016, |
| | | * change_ask_time1=null, |
| | | * change_ask_time_limit=ThuSep0811: 32: 02CST2016, |
| | | * task_change_approve_time=SatOct2217: 13: 55CST2016, |
| | | * task_change_approve_time1=null, |
| | | * task_change_approve_res=1, |
| | | * remark=通过 |
| | | * ], |
| | | * uinf=null, |
| | | * pageBean=null |
| | | * } |
| | | */ |
| | | |
| | | //SELECT GROUP_CONCAT(DISTINCT(uname))as unames from db_user.tb_user_inf where locate(uid,?); |
| | | String Uname = userInfMapper.searchUnams(list.get(i).getUchange().getUsr_id().toString()); |
| | | // String Uname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getUsr_id().toString()); |
| | | list.get(i).getBinf().setStationName2(Uname); |
| | | |
| | | String Cname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getCopy_uids()); |
| | | // String Cname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getCopy_uids()); |
| | | String Cname = userInfMapper.searchUnams(list.get(i).getUchange().getCopy_uids()); |
| | | list.get(i).getBinf().setStationName3(Cname); |
| | | |
| | | String Aname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getAppoint_uid().toString()); |
| | | // String Aname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getAppoint_uid().toString()); |
| | | String Aname = userInfMapper.searchUnams(list.get(i).getUchange().getAppoint_uid().toString()); |
| | | list.get(i).getBinf().setStationName4(Aname); |
| | | // System.out.println(Uname+" "+Cname+" "+Aname); |
| | | // String task_type = TestDaoFactory.getTaskType(list.get(i).getUchange().getTask_type_id()); |
| | | String task_type = TestDaoFactory.getTaskType(list.get(i).getUchange().getTask_type_id()); |
| | | list.get(i).getBinf().setStationName5(task_type); |
| | | |
| | | // String change_type = TestDaoFactory.getChangeType(list.get(i).getUchange().getChange_type_id()); |
| | | String change_type = TestDaoFactory.getChangeType(list.get(i).getUchange().getChange_type_id()); |
| | | list.get(i).getBinf().setStationName6(change_type); |
| | | |
| | | String Oname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getOld_executor_ids()); |
| | | // String Oname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getOld_executor_ids()); |
| | | String Oname = userInfMapper.searchUnams(list.get(i).getUchange().getOld_executor_ids()); |
| | | list.get(i).getBinf().setStationName7(Oname); |
| | | |
| | | String Nname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getNew_executor_ids()); |
| | | // String Nname = UtilityFactory.UidsToUnames(list.get(i).getUchange().getNew_executor_ids()); |
| | | String Nname = userInfMapper.searchUnams(list.get(i).getUchange().getNew_executor_ids()); |
| | | list.get(i).getBinf().setStationName8(Nname); |
| | | |
| | | String approve_res = TestDaoFactory.getApprove_res(list.get(i).getUchange().getTask_change_approve_res()); |
| | |
| | | <select id="serchinfoUname" resultType="java.util.List"></select> |
| | | <!-- <select id="serchByInfo" resultType="java.util.List"></select>--> |
| | | <select id="searchByBattGroupId" resultType="java.util.List"></select> |
| | | <select id="searchUnams" resultType="java.util.List"></select> |
| | | <!-- <select id="searchUnams" resultType="java.util.List"></select>--> |
| | | <!--方法重载了,有问题,更新方法名--> |
| | | <!-- <select id="searchAll" resultType="java.util.List"></select>--> |
| | | <select id="searchAll2" resultMap="BaseResultMap"> |
| | |
| | | <insert id="add"></insert> |
| | | <!-- <insert id="addPro"></insert>--> |
| | | <update id="update"></update> |
| | | <delete id="delPermitId"></delete> |
| | | <!-- <delete id="delPermitId"></delete>--> |
| | | <!-- <delete id="del"></delete>--> |
| | | <select id="searchAll" resultType="java.util.List"></select> |
| | | <select id="serchByCondition" resultType="java.util.List"></select> |
| | |
| | | <insert id="addPro"></insert> |
| | | <update id="update"></update> |
| | | <update id="updatePro"></update> |
| | | <update id="updateName"></update> |
| | | <delete id="del"></delete> |
| | | <!-- <update id="updateName"></update>--> |
| | | <!-- <delete id="del"></delete>--> |
| | | <!-- <select id="serchByCondition" resultType="java.util.List"></select>--> |
| | | <select id="searchAll" resultType="java.util.List"></select> |
| | | <select id="serchByPermit" resultType="java.util.List"></select> |
| | | <select id="serchByInfo" resultType="java.util.List"></select> |
| | | <select id="serchRole" resultType="java.util.List"></select> |
| | | <!-- <select id="searchAll" resultType="java.util.List"></select>--> |
| | | <!-- <select id="serchByPermit" resultType="java.util.List"></select>--> |
| | | <!-- <select id="serchByInfo" resultType="java.util.List"></select>--> |
| | | <!-- <select id="serchRole" resultType="java.util.List"></select>--> |
| | | <select id="serchMaxRoleId" resultType="java.util.List"></select> |
| | | <select id="serchItem" resultType="java.util.List"></select> |
| | | </mapper> |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.fgkj.mapper.impl.User_smsMapper" > |
| | | |
| | | <resultMap id="BaseResultMap" type="User_sms"> |
| | | <result column="num" property="num"></result> |
| | | <result column="task_id" property="task_id"></result> |
| | | <result column="priority_level" property="priority_level"></result> |
| | | <result column="uId" property="UId"></result> |
| | | <result column="phone_num" property="phone_num"></result> |
| | | <result column="sms" property="sms"></result> |
| | | <result column="sms_add_date" property="sms_add_date"></result> |
| | | <result column="sms_send_date" property="sms_send_date"></result> |
| | | <result column="sms_send_err_count" property="sms_send_err_count"></result> |
| | | <result column="sms_state" property="sms_state"></result> |
| | | <association property="pageBean" javaType="Page"></association> |
| | | </resultMap> |
| | | <!-- |
| | | public List getResults(ResultSet rs) { |
| | | List list = new ArrayList(); |
| | |
| | | <delete id="del"></delete> |
| | | <select id="searchAll" resultType="java.util.List"></select> |
| | | <select id="serchByCondition1" resultType="java.util.List"></select> |
| | | <select id="serchByCondition" resultType="java.util.List"></select> |
| | | <select id="serchByCondition" resultMap="BaseResultMap"> |
| | | select SQL_CALC_FOUND_ROWS |
| | | num,task_id,priority_level,uId,phone_num,sms,sms_add_date,sms_send_date,sms_send_err_count,sms_state from |
| | | db_user.tb_user_sms where (sms_send_date)<![CDATA[>=]]>(#{sms_send_date}) and (sms_send_date)<![CDATA[<=]]>(#{sms_send_date1}) |
| | | <if test="UId==0">and uid!=#{UId} </if> |
| | | <if test="UId!=0">and uid=#{UId} </if> |
| | | <if test="sms_state==100">and sms_state!=#{sms_state} </if> |
| | | <if test="sms_state!=100">and sms_state=#{sms_state} </if> |
| | | order by uId asc,sms_add_date asc limit #{pageBean.pageCurr},#{pageBean.pageSize} |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="serchByCondition" resultMap="BaseResultMap"> |
| | | select SQL_CALC_FOUND_ROWS distinct(tb_user_task_change.battgroupid),battgroupname,stationname,tb_user_task_change.num,usr_id,master_id,appoint_uid,copy_uids,change_type_id,task_type_id,task_rc_num,change_reason,old_executor_ids,old_task_exe_time,new_executor_ids,new_task_exe_time,change_ask_time,change_ask_time_limit,task_change_approve_time,task_change_approve_res,remark |
| | | from db_user.tb_user_task_change, db_battinf.tb_battinf |
| | | where |
| | | tb_user_task_change.BattGroupId=db_battinf.tb_battinf.BattGroupId |
| | | and (change_ask_time)<![CDATA[>=]]>(#{uchange.change_ask_time}) |
| | | and |
| | | (change_ask_time)<![CDATA[<=]]>(#{uchange.change_ask_time1}) |
| | | <!-- <choose> |
| | | <when test="binf.tationname1==‘’"> |
| | | and stationname1!=#{binf.stationname1} |
| | | </when> |
| | | <otherwise> |
| | | and stationname1=#{binf.stationname1} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.stationname==‘’"> |
| | | and stationname!=#{binf.stationname} |
| | | </when> |
| | | <otherwise> |
| | | and stationname=#{binf.stationname} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.BattProducer==‘’"> |
| | | and battproducer!=#{binf.battproducer} |
| | | </when> |
| | | <otherwise> |
| | | and battproducer=#{binf.battproducer} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.BattGroupId==0"> |
| | | and db_battinf.tb_battinf.battgroupid!=#{binf.battgroupid} |
| | | </when> |
| | | <otherwise> |
| | | and db_battinf.tb_battinf.battgroupid=#{binf.battgroupid} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="BattGroupName1==‘其他’"> |
| | | and BattGroupName1 like #{binf.BattGroupName1} |
| | | </when> |
| | | <otherwise> |
| | | and BattGroupName1 not like '%开关电源系统%' and BattGroupName1 not like '%UPS系统%' and BattGroupName1 not like #{binf.BattGroupName1} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="monVolStd==0"> |
| | | and monVolStd!=#{binf.monVolStd} |
| | | </when> |
| | | <otherwise> |
| | | and monVolStd=#{binf.monVolStd} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="monCapStd==0"> |
| | | and monCapStd!=#{binf.monCapStd} |
| | | </when> |
| | | <otherwise> |
| | | and monCapStd=#{binf.monCapStd} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="task_type_id==100"> |
| | | and task_type_id!=#{uchange.task_type_id} |
| | | </when> |
| | | <otherwise> |
| | | and task_type_id=#{uchange.task_type_id} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="usr_id==0"> |
| | | and usr_id!=#{uchange.usr_id} |
| | | </when> |
| | | <otherwise> |
| | | and usr_id=#{uchange.usr_id} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="change_type_id==100"> |
| | | and change_type_id!=#{uchange.change_type_id} |
| | | </when> |
| | | <otherwise> |
| | | and change_type_id=#{uchange.change_type_id} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="change_type_id==100"> |
| | | and task_change_approve_res!=#{uchange.task_change_approve_res} |
| | | </when> |
| | | <otherwise> |
| | | <if test="change_type_id==2">and task_change_approve_res=#{uchange.task_change_approve_res}</if> |
| | | <if test="change_type_id!=2">and task_change_approve_res in (0,#{uchange.task_change_approve_res})</if> |
| | | </otherwise> |
| | | </choose> |
| | | order by tb_user_task_change.battgroupid limit (#{pageCurr}-1)*#{pageSize},#{pageSize}--> |
| | | where tb_user_task_change.BattGroupId=db_battinf.tb_battinf.BattGroupId |
| | | and (change_ask_time)<![CDATA[>=]]>(#{uchange.change_ask_time}) |
| | | and (change_ask_time)<![CDATA[<=]]>(#{uchange.change_ask_time1}) |
| | | <choose> |
| | | <when test="binf.stationName1==''"> |
| | | and stationname1!=#{binf.stationName1} |
| | | </when> |
| | | <otherwise> |
| | | and stationname1=#{binf.stationName1} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.stationName==''"> |
| | | and stationname!=#{binf.stationName} |
| | | </when> |
| | | <otherwise> |
| | | and stationname=#{binf.stationName} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.battProducer==''"> |
| | | and battproducer!=#{binf.battProducer} |
| | | </when> |
| | | <otherwise> |
| | | and battproducer=#{binf.battProducer} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.BattGroupId==0"> |
| | | and db_battinf.tb_battinf.battgroupid!=#{binf.battGroupId} |
| | | </when> |
| | | <otherwise> |
| | | and db_battinf.tb_battinf.battgroupid=#{binf.battGroupId} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.BattGroupName1=='其他'"> |
| | | and BattGroupName1 like '%${binf.BattGroupName1}%' |
| | | </when> |
| | | <otherwise> |
| | | and BattGroupName1 not like '%开关电源系统%' and BattGroupName1 not like '%UPS系统%' and BattGroupName1 not like '%${binf.BattGroupName1}%' |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.monVolStd==0"> |
| | | and monVolStd!=#{binf.monVolStd} |
| | | </when> |
| | | <otherwise> |
| | | and monVolStd=#{binf.monVolStd} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="binf.monCapStd==0"> |
| | | and monCapStd!=#{binf.monCapStd} |
| | | </when> |
| | | <otherwise> |
| | | and monCapStd=#{binf.monCapStd} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="uchange.task_type_id==100"> |
| | | and task_type_id!=#{uchange.task_type_id} |
| | | </when> |
| | | <otherwise> |
| | | and task_type_id=#{uchange.task_type_id} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="uchange.usr_id==0"> |
| | | and usr_id!=#{uchange.usr_id} |
| | | </when> |
| | | <otherwise> |
| | | and usr_id=#{uchange.usr_id} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="uchange.change_type_id==100"> |
| | | and change_type_id!=#{uchange.change_type_id} |
| | | </when> |
| | | <otherwise> |
| | | and change_type_id=#{uchange.change_type_id} |
| | | </otherwise> |
| | | </choose> |
| | | <choose> |
| | | <when test="uchange.change_type_id==100"> |
| | | and task_change_approve_res!=#{uchange.task_change_approve_res} |
| | | </when> |
| | | <otherwise> |
| | | <if test="uchange.change_type_id==2">and task_change_approve_res=#{uchange.task_change_approve_res}</if> |
| | | <if test="uchange.change_type_id!=2">and task_change_approve_res in (0,#{uchange.task_change_approve_res})</if> |
| | | </otherwise> |
| | | </choose> |
| | | order by tb_user_task_change.battgroupid limit #{pageBean.pageCurr},#{pageBean.pageSize} |
| | | </select> |
| | | |
| | | </mapper> |