Browse Source

更新文件 AppHomePageAction.java

陈士柏 2 years ago
parent
commit
fe59afd828
1 changed files with 7 additions and 1 deletions
  1. 7 1
      mhotel/src/com/happy/action/AppHomePageAction.java

+ 7 - 1
mhotel/src/com/happy/action/AppHomePageAction.java

@@ -4,6 +4,7 @@ import com.baidubce.model.User;
 import com.happy.Model.AdminManager;
 import com.happy.Model.AdminManager;
 import com.happy.Model.Hotel;
 import com.happy.Model.Hotel;
 import com.happy.Model.House;
 import com.happy.Model.House;
+import com.happy.Model.Workflow;
 import com.happy.Model.weixin.Users;
 import com.happy.Model.weixin.Users;
 import com.happy.Until.*;
 import com.happy.Until.*;
 import com.happy.Until.Enum.B;
 import com.happy.Until.Enum.B;
@@ -55,6 +56,8 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
     public AdminManagerService adminManagerService;
     public AdminManagerService adminManagerService;
     @Resource(name = "housePriceService")
     @Resource(name = "housePriceService")
     private HousePriceService housePriceService;
     private HousePriceService housePriceService;
+    @Resource
+    public WorkflowService workflowService;
 
 
     public int page; // 当前页
     public int page; // 当前页
     public int rows;// 每页显示的行数rows
     public int rows;// 每页显示的行数rows
@@ -561,7 +564,10 @@ public class AppHomePageAction extends ActionSupport implements ServletRequestAw
         String endDate = DateUtil.parseDateToStr((Func.parseDate(queryEndTime)), DateUtil.Time_Formatter_Day);
         String endDate = DateUtil.parseDateToStr((Func.parseDate(queryEndTime)), DateUtil.Time_Formatter_Day);
 
 
         Hotel hotel = appHomePageService.getHotelAndHouseByHotelId(hotelId, startDate, endDate);
         Hotel hotel = appHomePageService.getHotelAndHouseByHotelId(hotelId, startDate, endDate);
-        hotel.setHotelFileInfoList(fileService.queryListByLinkId(hotel.getManagerId() + ""));
+        Workflow workflow = workflowService.queryById(hotel.getWorkflowId());
+        if (workflow==null || workflow.getStatus()==2){
+            hotel.setHotelFileInfoList(fileService.queryListByLinkId(hotel.getManagerId() + ""));
+        }
 
 
         AdminManager adminManager = adminManagerService.getById(hotel.getManagerId());
         AdminManager adminManager = adminManagerService.getById(hotel.getManagerId());
         hotel.setType(String.valueOf(adminManager.getType()));
         hotel.setType(String.valueOf(adminManager.getType()));