酒店管理系统---部分代码(徐傲,王志宏)

package com.gx.dao;

import java.sql.Timestamp;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.gx.po.StayRegisterPo;


public interface StayRegisterDao {

    public int deleteById(Integer id);
    
    
    public int insertAll(StayRegisterPo stayRegisterPo);
    
    //精确查询
    public    StayRegisterPo selectById(Integer id);  //请注意查询出的结果可能不是一条,会报错 
    public int updateById(StayRegisterPo stayRegisterPo); 
    //新增住宿明细
    public int insertStayregisterdetails(@Param("stayRegisterID")int stayRegisterID, @Param("passengerID")int passengerID);
package com.gx.po;

public class PassengerPo {
    
    private Integer id;
    
    private Integer papersID;              //证件ID
    
    private Integer educationDegreeID;     //文化程度ID
    
    private Integer genderID;              //性别ID
    
    private Integer passengerLevelID;      //旅客级别ID
    
    private Integer nationID;              //民族ID
    
    private Integer thingReasonID;         //事由

    private String name;                   //姓名
    
    private String papersNumber;           //证件号码
    
    private String birthDate;              //出生日期
    
    private String licenceIssuingAuthorty; //发证机关
    
    private String unitsOrAddress;         //单位或住址
    
    private String papersValidity;         //证件有效期
    
    private String profession;             //职业
    
    private String whereAreFrom;           //从何处来
    
    private String whereToGo;              //到哪里去
    
    private String contactPhoneNumber;     //联系电话
    
    private String remarks;                //备注
    
    
    //扩展字段
    
    private String papersName;             //证件名称
    
    private String educationDegreeName;    //文化程度名称
    
    private String genderName;             //姓别
    
    private String passengerLevelName;     //旅客级别名称
    
    private String nationName;             //民族名称
    
    private String thingReasonName;        //民族名称
    
    
    //额外传参数需要
    private Integer lvKeID;        //旅客id
    
    private Integer stayRegisterID;        //住宿登记id
    

    public Integer getId() {
        return id;
    }
    
    public void setId(Integer id) {
        this.id = id;
    }
    
    public Integer getPapersID() {
        return papersID;
    }
    
    public void setPapersID(Integer papersID) {
        this.papersID = papersID;
    }
    
    public Integer getEducationDegreeID() {
        return educationDegreeID;
    }
    
    public void setEducationDegreeID(Integer educationDegreeID) {
        this.educationDegreeID = educationDegreeID;
    }
    
    public Integer getGenderID() {
        return genderID;
    }
    
    public void setGenderID(Integer genderID) {
        this.genderID = genderID;
    }
    
    public Integer getPassengerLevelID() {
        return passengerLevelID;
    }
    
    public void setPassengerLevelID(Integer passengerLevelID) {
        this.passengerLevelID = passengerLevelID;
    }
    
    public Integer getNationID() {
        return nationID;
    }
    
    public void setNationID(Integer nationID) {
        this.nationID = nationID;
    }
    
    public Integer getThingReasonID() {
        return thingReasonID;
    }
    
    public void setThingReasonID(Integer thingReasonID) {
        this.thingReasonID = thingReasonID;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getPapersNumber() {
        return papersNumber;
    }
    
    public void setPapersNumber(String papersNumber) {
        this.papersNumber = papersNumber;
    }
    
    public String getBirthDate() {
        return birthDate;
    }
    
    public void setBirthDate(String birthDate) {
        this.birthDate = birthDate;
    }
    
    public String getLicenceIssuingAuthorty() {
        return licenceIssuingAuthorty;
    }
    
    public void setLicenceIssuingAuthorty(String licenceIssuingAuthorty) {
        this.licenceIssuingAuthorty = licenceIssuingAuthorty;
    }
    
    public String getUnitsOrAddress() {
        return unitsOrAddress;
    }
    
    public void setUnitsOrAddress(String unitsOrAddress) {
        this.unitsOrAddress = unitsOrAddress;
    }
    
    public String getPapersValidity() {
        return papersValidity;
    }
    
    public void setPapersValidity(String papersValidity) {
        this.papersValidity = papersValidity;
    }
    
    public String getProfession() {
        return profession;
    }

    public void setProfession(String profession) {
        this.profession = profession;
    }

    public String getWhereAreFrom() {
        return whereAreFrom;
    }
    
    public void setWhereAreFrom(String whereAreFrom) {
        this.whereAreFrom = whereAreFrom;
    }
    
    public String getWhereToGo() {
        return whereToGo;
    }
    
    public void setWhereToGo(String whereToGo) {
        this.whereToGo = whereToGo;
    }
    
    public String getContactPhoneNumber() {
        return contactPhoneNumber;
    }
    
    public void setContactPhoneNumber(String contactPhoneNumber) {
        this.contactPhoneNumber = contactPhoneNumber;
    }
    
    public String getRemarks() {
        return remarks;
    }
    
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }
    
    public String getPapersName() {
        return papersName;
    }
    
    public void setPapersName(String papersName) {
        this.papersName = papersName;
    }
    
    public String getEducationDegreeName() {
        return educationDegreeName;
    }
    
    public void setEducationDegreeName(String educationDegreeName) {
        this.educationDegreeName = educationDegreeName;
    }
    
    public String getGenderName() {
        return genderName;
    }
    
    public void setGenderName(String genderName) {
        this.genderName = genderName;
    }
    
    public String getPassengerLevelName() {
        return passengerLevelName;
    }
    
    public void setPassengerLevelName(String passengerLevelName) {
        this.passengerLevelName = passengerLevelName;
    }
    
    public String getNationName() {
        return nationName;
    }
    
    public void setNationName(String nationName) {
        this.nationName = nationName;
    }

    public String getThingReasonName() {
        return thingReasonName;
    }

    public void setThingReasonName(String thingReasonName) {
        this.thingReasonName = thingReasonName;
    }

    public Integer getLvKeID() {
        return lvKeID;
    }

    public void setLvKeID(Integer lvKeID) {
        this.lvKeID = lvKeID;
    }

    public Integer getStayRegisterID() {
        return stayRegisterID;
    }

    public void setStayRegisterID(Integer stayRegisterID) {
        this.stayRegisterID = stayRegisterID;
    }
    
    
    
}

package com.gx.po;

import java.sql.Timestamp;

public class ReceiveTargetPo {
    
    private Integer id;
    
    private Integer targetTypeID;
    
    private String principal;
    
    private String teamName;

    private String teamCode;
    
    private Timestamp registerTime;
    
    private String contactPhoneNUmber;
    

    //扩展字段
    private String targetTypeName;
    
    
    

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getTargetTypeID() {
        return targetTypeID;
    }

    public void setTargetTypeID(Integer targetTypeID) {
        this.targetTypeID = targetTypeID;
    }

    public String getPrincipal() {
        return principal;
    }

    public void setPrincipal(String principal) {
        this.principal = principal;
    }
    
    public String getTeamName() {
        return teamName;
    }
    
    public void setTeamName(String teamName) {
        this.teamName = teamName;
    }

    public String getTeamCode() {
        return teamCode;
    }

    public void setTeamCode(String teamCode) {
        this.teamCode = teamCode;
    }

    public Timestamp getRegisterTime() {
        return registerTime;
    }

    public void setRegisterTime(Timestamp registerTime) {
        this.registerTime = registerTime;
    }

    public String getTargetTypeName() {
        return targetTypeName;
    }

    public void setTargetTypeName(String targetTypeName) {
        this.targetTypeName = targetTypeName;
    }
    
    public String getContactPhoneNUmber() {
        return contactPhoneNUmber;
    }
    
    public void setContactPhoneNUmber(String contactPhoneNUmber) {
        this.contactPhoneNUmber = contactPhoneNUmber;
    }
    

}

 

//新增押金明细
    public int insertDeposit(StayRegisterPo stayRegisterPo);
    
    //查询押金明细
    public List<StayRegisterPo> selectDepositById(int id);
    
    //新增消费明细
    public int insertConsumptiondetails(StayRegisterPo stayRegisterPo);
    //消费明细分页
    public List<StayRegisterPo> pageConsumption(@Param("consumptionStayRegisterID")int consumptionStayRegisterID,
            @Param("start")int start,@Param("pageSize")int pageSize);
    //消费明细分页总条数
    public int countConsumption(int consumptionStayRegisterID);
    //消费明细的删除
    public int deleteConsumption(Integer id);
    //修改总费用
    public int updateSumConst(@Param("id")int id,@Param("sumConst")Double sumConst);
    //查询用于计算房间加商品消费
    public List<StayRegisterPo> selectMoney(int id);
    //换房 修改原信息
    public int updateChangRoom(StayRegisterPo stayRegisterPo);
    //换房 查看原信息
    public List<StayRegisterPo> selectChangRoom(int id);
    public List<StayRegisterPo> selectAll();
    //数据统计
    public List<StayRegisterPo> selectShuJuTongJi(@Param("min")Timestamp min, @Param("max")Timestamp max);
    //修改提示
    public int updateRemind(@Param("id")int id,@Param("remind")int remind);
    //结账 修改原信息
    public int pay(@Param("id")int id,@Param("remarks")String remarks,
            @Param("payTime")Timestamp payTime,@Param("payWay")int payWay);
    //根据 团队id来查询 总费用,
    public List<StayRegisterPo> selectFormTeamId(
            @Param("receiveTargetID")int receiveTargetID,@Param("isBillID")int isBillID);
    public List<StayRegisterPo> selectFormTeamIdTwo(int isBillID);
    //根据 团队id 来查询 押金
    public List<StayRegisterPo> selectTeamDeposit(int receiveTargetID);
    //根据团队id 来查询 旅客消费
    public List<StayRegisterPo> selectTeamConsumption(int receiveTargetID);
    // Ajax 根据 团队id 和 房间号来查询
    public List<StayRegisterPo> ajaxSelectTeamRoom(@Param("receiveTargetID")int receiveTargetID,
            @Param("roomNumber")String roomNumber);
    // Ajax 根据团队 id 和时间段来查询
    public List<StayRegisterPo> ajaxSelectTeamFormTime(@Param("receiveTargetID")int receiveTargetID,
            @Param("min")Timestamp min, @Param("max")Timestamp max);
    //根据 团队id 时间段来查询 押金
    public List<StayRegisterPo> ajaxSelectTeamDeposit(@Param("receiveTargetID")int receiveTargetID,
            @Param("min")Timestamp min, @Param("max")Timestamp max);
    //根据团队id 时间段来查询 旅客消费
    public List<StayRegisterPo> ajaxSelectTeamConsumption(@Param("receiveTargetID")int receiveTargetID,
            @Param("min")Timestamp min, @Param("max")Timestamp max);
    
    //根据 住宿登记id 来查询 押金 精简版 用于 转入团队
    public List<StayRegisterPo> selectDepositJinJianBan(int id);
    
    
    //根据 住宿登记id 来查询 消费 精简版 用于 转入团队
    public List<StayRegisterPo> selectConsumptionJinJianBan(int id);
    
    //根据 住宿登记明细id 来查询 详情信息  详情版 用于 转入团队
    public StayRegisterPo selectInformationXiangQingBan(int id);
    
    //根据 住宿登记id 来 转入团队
    public int changOverTeam(@Param("id")int id,@Param("receiveTargetID")int receiveTargetID);
    
    //根据 住宿登记id 来查询 总费用
    public StayRegisterPo selectSumconst(int id);
    
    //分页模糊查询 one
    public List<StayRegisterPo> pageFuzzyselectOne(@Param("receiveTargeTypeID")int receiveTargeTypeID,
            @Param("isBillID")int isBillID, @Param("roomNumber")String roomNumber ,    
            @Param("start")int start,@Param("pageSize")int pageSize);
    
    //分页模糊查询 two
    public List<StayRegisterPo> pageFuzzyselectTwo(@Param("receiveTargetID")int receiveTargetID,
            @Param("isBillID")int isBillID,    @Param("roomNumber")String roomNumber,
            @Param("start")int start,@Param("pageSize")int pageSize);
    
    //分页模糊查询总条数one
    public int countFuzzyselectOne( @Param("receiveTargeTypeID")int receiveTargeTypeID,
            @Param("isBillID")int isBillID,@Param("roomNumber")String roomNumber);
  
    //分页模糊查询总条数two
    public int countFuzzyselectTwo(@Param("receiveTargetID")int receiveTargetID,
            @Param("isBillID")int isBillID,@Param("roomNumber")String roomNumber);
    
   //分页模糊查询 Three
    public List<StayRegisterPo> pageFuzzyselectThree(
            @Param("isBillID")int isBillID,    @Param("roomNumber")String roomNumber,
            @Param("start")int start,@Param("pageSize")int pageSize);
    
    //分页模糊查询总条数Three
    public int countFuzzyselectThree(
            @Param("isBillID")int isBillID,@Param("roomNumber")String roomNumber);
    
    //修改 预定id
    public int updateStayRegisterPredetermineID(
            @Param("predetermineID")Integer predetermineID,@Param("id")Integer id);
    
/*-------------------------------------FinancialStatistics--------------------------------------------------------*/
    
    
  //分页模糊查询 Four
    public List<StayRegisterPo> pageFuzzyselectFour(
            @Param("start")int start,@Param("pageSize")int pageSize);
    
  //分页模糊查询总条数Four
    public int countFuzzyselectFour();
    
  //分页模糊查询 Five
    public List<StayRegisterPo> pageFuzzyselectFive(@Param("min")Timestamp min,
            @Param("max")Timestamp max,    @Param("start")int start,@Param("pageSize")int pageSize);
    
   //分页模糊查询总条数 Five
    public int countFuzzyselectFive(@Param("min")Timestamp min, @Param("max")Timestamp max);
    
    //根据 已结账 来查询 总费用 精简版条件 无条件
    public List<StayRegisterPo> selectPayJingJianBanNot();
    
    //根据 已结账 来查询 住店人数。无条件
    public List<StayRegisterPo> selectPayStayNumberNot();
    
    //根据 已结账 来查询 旅客总消费。无条件
    public List<StayRegisterPo> selectPayXiaoFeiNot();
    
    //根据 已结账 来查询 总费用 精简版条件 结账区段
    public List<StayRegisterPo> selectPayJingJianBan(@Param("min")Timestamp min, @Param("max")Timestamp max);
    
    //根据 已结账 来查询 住店人数。条件 结账区段
    public List<StayRegisterPo> selectPayStayNumber(@Param("min")Timestamp min, @Param("max")Timestamp max);
    
    //根据 已结账 来查询 旅客总消费。条件 结账区段
    public List<StayRegisterPo> selectPayXiaoFei(@Param("min")Timestamp min, @Param("max")Timestamp max);
    
    
    //根据 id 查询 很多很多的信息
    public List<StayRegisterPo> selectAllInformation(int id);
    
    public List<StayRegisterPo> selectXiaoFeiMingXi(int id);
}

 

posted @ 2019-05-29 23:41  W-LQ  阅读(1749)  评论(0编辑  收藏  举报