|
@@ -1,6 +1,7 @@
|
|
|
package org.jeecg.modules.fw.controller;
|
|
package org.jeecg.modules.fw.controller;
|
|
|
|
|
|
|
|
import java.util.Arrays;
|
|
import java.util.Arrays;
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
@@ -10,15 +11,20 @@ import java.net.URLDecoder;
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
+
|
|
|
|
|
+import cn.hutool.core.date.DateTime;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
import org.jeecg.common.system.query.QueryGenerator;
|
|
|
|
|
+import org.jeecg.common.util.TokenUtils;
|
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
import org.jeecg.common.util.oConvertUtils;
|
|
|
import org.jeecg.modules.business.entity.BusCustomer;
|
|
import org.jeecg.modules.business.entity.BusCustomer;
|
|
|
import org.jeecg.modules.business.entity.BusLivingCustomer;
|
|
import org.jeecg.modules.business.entity.BusLivingCustomer;
|
|
|
import org.jeecg.modules.business.entity.BusRoomsLivingOrder;
|
|
import org.jeecg.modules.business.entity.BusRoomsLivingOrder;
|
|
|
|
|
+import org.jeecg.modules.business.entity.BusWaiter;
|
|
|
import org.jeecg.modules.business.service.IBusCustomerService;
|
|
import org.jeecg.modules.business.service.IBusCustomerService;
|
|
|
import org.jeecg.modules.business.service.IBusLivingCustomerService;
|
|
import org.jeecg.modules.business.service.IBusLivingCustomerService;
|
|
|
import org.jeecg.modules.business.service.IBusRoomsLivingOrderService;
|
|
import org.jeecg.modules.business.service.IBusRoomsLivingOrderService;
|
|
|
|
|
+import org.jeecg.modules.business.service.IBusWaiterService;
|
|
|
import org.jeecg.modules.fw.entity.FwRoomExamine;
|
|
import org.jeecg.modules.fw.entity.FwRoomExamine;
|
|
|
import org.jeecg.modules.fw.service.IFwRoomExamineService;
|
|
import org.jeecg.modules.fw.service.IFwRoomExamineService;
|
|
|
|
|
|
|
@@ -68,6 +74,8 @@ public class FwRoomExamineController extends JeecgController<FwRoomExamine, IFwR
|
|
|
private IBusLivingCustomerService busLivingCustomerService;
|
|
private IBusLivingCustomerService busLivingCustomerService;
|
|
|
@Resource
|
|
@Resource
|
|
|
private IBusCustomerService busCustomerService;
|
|
private IBusCustomerService busCustomerService;
|
|
|
|
|
+ @Resource
|
|
|
|
|
+ private IBusWaiterService busWaiterService;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 分页列表查询
|
|
* 分页列表查询
|
|
@@ -103,6 +111,10 @@ public class FwRoomExamineController extends JeecgController<FwRoomExamine, IFwR
|
|
|
t.setContactName(busCustomer.getName());
|
|
t.setContactName(busCustomer.getName());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ BusWaiter busWaiter=busWaiterService.getById(t.getWaiterId());
|
|
|
|
|
+ if (busWaiter != null) {
|
|
|
|
|
+ t.setCfWaiterName(busWaiter.getName());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
return Result.OK(pageList);
|
|
return Result.OK(pageList);
|
|
@@ -139,6 +151,24 @@ public class FwRoomExamineController extends JeecgController<FwRoomExamine, IFwR
|
|
|
return Result.OK("编辑成功!");
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @AutoLog(value = "查房操作")
|
|
|
|
|
+ @ApiOperation(value="查房操作", notes="查房操作")
|
|
|
|
|
+ @RequestMapping(value = "/checkRoom", method = {RequestMethod.PUT,RequestMethod.POST})
|
|
|
|
|
+ public Result<String> checkRoom(@RequestBody FwRoomExamine fwRoomExamine) {
|
|
|
|
|
+ switch (fwRoomExamine.getState()) {
|
|
|
|
|
+ case 1:
|
|
|
|
|
+ fwRoomExamine.setPromoterTime(DateTime.now());
|
|
|
|
|
+ fwRoomExamine.setPromoterBy(TokenUtils.getAuthUser().getRealname());
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 3:
|
|
|
|
|
+ fwRoomExamine.setCompletedTime(DateTime.now());
|
|
|
|
|
+ fwRoomExamine.setCompletedBy(TokenUtils.getAuthUser().getRealname());
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ fwRoomExamineService.updateById(fwRoomExamine);
|
|
|
|
|
+ return Result.OK("查房操作成功!");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 通过id删除
|
|
* 通过id删除
|
|
|
*
|
|
*
|