raojiaolong@163.com преди 2 години
родител
ревизия
f61f93c6d5
променени са 1 файла, в които са добавени 10 реда и са изтрити 3 реда
  1. 10 3
      mhotel/src/com/happy/action/houseAction.java

+ 10 - 3
mhotel/src/com/happy/action/houseAction.java

@@ -37,6 +37,7 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
     public HotelDictService hotelDictService;
 
     public Integer id;
+    public Integer managerId;
     public String hName;//房型名称
     public int page; // 当前页
     public int rows;// 每页显示的行数rows
@@ -112,8 +113,8 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
             int m = houseService.insertHouse(house);
             if (m > 0) {
                 for(FileInfo file : fileList){
-                    file.setLinkId(hotelId);
-                    if(fileInfo==null){
+                    file.setLinkId(house.getId());
+                    if(file==null){
                         fileService.insertFile(file);
                     }else{
                         fileService.updateFile(file);
@@ -291,7 +292,10 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
         JSONObject resultJson = new JSONObject();
         StringBuilder s1 = new StringBuilder("");
         if (hName!=null){
-            s1.append(" and h_name like '%").append(hName).append("'");
+            s1.append(" and h_name like '%").append(hName).append("%'");
+        }
+        if (hName!=null){
+            s1.append(" and manager_id = '").append(managerId).append("'");
         }
         IPage<House> houseIPage = houseService.queryPage(s1.toString(),page,rows);
         if(houseIPage!=null && !"".equals(houseIPage)){
@@ -320,6 +324,9 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
         if (hName!=null){
             s1.append("  and house_name like '%").append(hName).append("%'");
         }
+        if (managerId!=null){
+            s1.append("  and manager_id = '").append(managerId).append("'");
+        }
         IPage<HouseSumEto> houseIPage = houseService.queryPageHouseSum(s1.toString(),page,rows);
         if(houseIPage!=null && !"".equals(houseIPage)){
             resultJson.put("message", "查询分页成功");