|
|
@@ -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
|
|
|
@@ -113,7 +114,11 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
|
|
|
if (m > 0) {
|
|
|
for(FileInfo file : fileList){
|
|
|
file.setLinkId(house.getId());
|
|
|
- fileService.updateFile(file);
|
|
|
+ if(file==null){
|
|
|
+ fileService.insertFile(file);
|
|
|
+ }else{
|
|
|
+ fileService.updateFile(file);
|
|
|
+ }
|
|
|
}
|
|
|
resultJson.put("message", "新增成功");
|
|
|
resultJson.put("code", 200);
|
|
|
@@ -192,10 +197,10 @@ public class houseAction extends ActionSupport implements ServletRequestAware {
|
|
|
}
|
|
|
for(FileInfo file : fileList){
|
|
|
FileInfo fileInfo = fileService.getById(file.getId());
|
|
|
+ file.setLinkId(house.getId());
|
|
|
if(fileInfo==null){
|
|
|
fileService.insertFile(file);
|
|
|
}else{
|
|
|
- file.setLinkId(house.getId());
|
|
|
fileService.updateFile(file);
|
|
|
}
|
|
|
}
|
|
|
@@ -287,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)){
|
|
|
@@ -316,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", "查询分页成功");
|