📄 inspectionservice.java
字号:
package cn.kmp.accommodation.service;
import com.littleQworks.commons.dao.ibatis.spring.CommonDaoGenericImpl;
import java.util.*;
import cn.kmp.accommodation.domain.*;
public class InspectionService {
private CommonDaoGenericImpl commonDao;
public CommonDaoGenericImpl getCommonDao() {
return commonDao;
}
public void setCommonDao(CommonDaoGenericImpl commonDao) {
this.commonDao = commonDao;
}
//添加检查表
public boolean insertInspection(Inspection inspection){
return commonDao.insertByParameter(inspection, "insertInspection");
}
//更新表
public boolean updateInspection(Inspection inspection){
return commonDao.updateByParameter(inspection, "updateInspection");
}
//删除表
public boolean deleteInspection(int staffNum,int departmentNum,int roomNum,String checkDate){
HashMap<String,Object> hashmap=new HashMap<String,Object>();
hashmap.put("departmentNum", departmentNum);
hashmap.put("roomNum", roomNum);
hashmap.put("checkDate", checkDate);
hashmap.put("staffNum", staffNum);
return commonDao.deleteByParameter(hashmap, "deleteInspection");
}
//查询某一时间段内的检查表
public List<Inspection> getInspectionByTime(String startTime,String endTime){
HashMap<String,Object> hashmap=new HashMap<String,Object>();
hashmap.put("startTime", startTime);
hashmap.put("endTime", endTime);
return commonDao.getListByParameter(hashmap, "getInspectionByTime");
}
public List<Inspection> getAllInspections(){
return commonDao.getList("getAllInspections");
}
public List<Inspection> getBadInspections(){
return commonDao.getList("getBadInspections");
}
//多条件动态搜索
public List<Inspection> searchInspection(String startTime,String endTime,int roomNum,int departmentNum,int isSatisfied){
HashMap<String,Object> hashmap=new HashMap<String,Object>();
hashmap.put("startTime", startTime);
hashmap.put("endTime", endTime);
hashmap.put("roomNum", roomNum);
hashmap.put("departmentNum", departmentNum);
hashmap.put("isSatisfied", isSatisfied);
return commonDao.getListByParameter(hashmap, "searchInspection");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -