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); }