raojiaolong@163.com 2 лет назад
Родитель
Сommit
b7fc884b88

+ 13 - 0
mhotel/src/com/happy/Model/Hotel.java

@@ -47,6 +47,11 @@ public class Hotel {
 	private String htype;
 	private String htype;
 
 
 	/**
 	/**
+	 * 酒店类型名称
+	 */
+	private String hTypeName;
+
+	/**
 	 * 酒店状态(1 营业 2.休息)
 	 * 酒店状态(1 营业 2.休息)
 	 */
 	 */
 	private Integer hstatus;
 	private Integer hstatus;
@@ -198,6 +203,14 @@ public class Hotel {
 		this.htype = htype;
 		this.htype = htype;
 	}
 	}
 
 
+	public String gethTypeName() {
+		return hTypeName;
+	}
+
+	public void sethTypeName(String hTypeName) {
+		this.hTypeName = hTypeName;
+	}
+
 	public Integer getHstatus() {
 	public Integer getHstatus() {
 		return hstatus;
 		return hstatus;
 	}
 	}

+ 1 - 1
mhotel/src/com/happy/action/bookAction.java

@@ -72,7 +72,7 @@ public class bookAction extends ActionSupport implements ServletRequestAware {
     }
     }
 
 
     /**
     /**
-     * 描述:修改订单状态接单、入住、退房、退单、退款
+     * 描述:修改订单状态接单、入住、退房
      * @return
      * @return
      */
      */
     public String updateBookStatus(){
     public String updateBookStatus(){

+ 1 - 0
mhotel/src/com/happy/action/hotelAction.java

@@ -176,6 +176,7 @@ public class hotelAction extends ActionSupport implements ServletRequestAware {
             if(hotel.getHconfig() != null && !"".equals(hotel.getHconfig())){
             if(hotel.getHconfig() != null && !"".equals(hotel.getHconfig())){
                 hotel.setHconfig(hotelDictService.setConfig(hotel.getHconfig()));
                 hotel.setHconfig(hotelDictService.setConfig(hotel.getHconfig()));
             }
             }
+            hotel.sethTypeName(hotelDictService.getDictNameById(Integer.parseInt(hotel.getHtype())));
             BeanUtils.copyProperties(hotel,hotelEto);
             BeanUtils.copyProperties(hotel,hotelEto);
             hotelEto.setHotelTownshipName(adminManager.getHotelTownshipName());
             hotelEto.setHotelTownshipName(adminManager.getHotelTownshipName());
             StringBuilder fileSqlx = new StringBuilder("");
             StringBuilder fileSqlx = new StringBuilder("");

+ 7 - 0
mhotel/src/com/happy/service/HotelDictService.java

@@ -36,6 +36,13 @@ public interface HotelDictService {
     HotelDict getById(int id);
     HotelDict getById(int id);
 
 
     /**
     /**
+     * 描述:根据Id查询详细名称
+     * @param id
+     * @return
+     */
+    String getDictNameById(int id);
+
+    /**
      * 描述:分页查询
      * 描述:分页查询
      * @param sqlx
      * @param sqlx
      * @param page
      * @param page

+ 7 - 0
mhotel/src/com/happy/service/impl/HotelDictImplService.java

@@ -37,6 +37,13 @@ public class HotelDictImplService implements HotelDictService {
     }
     }
 
 
     @Override
     @Override
+    public String getDictNameById(int id) {
+        HotelDict hotelDict = hotelDictDao.getById(id);
+        if(hotelDict!=null) return hotelDict.getName();
+        return null;
+    }
+
+    @Override
     public IPage<HotelDict> queryPage(String sqlx, int page, int rows) {
     public IPage<HotelDict> queryPage(String sqlx, int page, int rows) {
         IPage<HotelDict> iPage = new IPage();
         IPage<HotelDict> iPage = new IPage();
         List<HotelDict> hotelDictList = hotelDictDao.queryPage(sqlx,page,rows);
         List<HotelDict> hotelDictList = hotelDictDao.queryPage(sqlx,page,rows);