|
@@ -7,7 +7,7 @@ import com.care.common.util.PageResult;
|
|
|
import com.care.common.util.Result;
|
|
|
import com.care.common.vo.PageReqVO;
|
|
|
import com.care.common.vo.order.*;
|
|
|
-import com.care.keeper.service.KeeperApiService;
|
|
|
+import com.care.keeper.service.KeeperOrderApiService;
|
|
|
import com.care.keeper.service.KeeperPassportService;
|
|
|
import com.care.keeper.vo.HouseContactVO;
|
|
|
import com.care.keeper.vo.KeeperInfoVO;
|
|
@@ -34,7 +34,7 @@ import java.util.Map;
|
|
|
public class KeeperEventApiController {
|
|
|
|
|
|
@Resource
|
|
|
- private KeeperApiService keeperApiService;
|
|
|
+ private KeeperOrderApiService keeperOrderApiService;
|
|
|
|
|
|
@Resource
|
|
|
private KeeperPassportService keeperPassportService;
|
|
@@ -49,7 +49,7 @@ public class KeeperEventApiController {
|
|
|
try {
|
|
|
KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
|
|
|
- IPage<ChambEventOrderVO> pageResponse = this.keeperApiService.queryTodoEventByChambId(pageReqVo,current.getId());
|
|
|
+ IPage<ChambEventOrderVO> pageResponse = this.keeperOrderApiService.queryTodoEventByChambId(pageReqVo,current.getId());
|
|
|
return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
}catch (BDException e) {
|
|
|
log.error("我的未处理事件 分页列表出现异常",e);
|
|
@@ -65,7 +65,7 @@ public class KeeperEventApiController {
|
|
|
try {
|
|
|
KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
|
|
|
- IPage<ChambEventOrderVO> pageResponse = this.keeperApiService.queryDoingEventByChambId(pageReqVo,current.getId());
|
|
|
+ IPage<ChambEventOrderVO> pageResponse = this.keeperOrderApiService.queryDoingEventByChambId(pageReqVo,current.getId());
|
|
|
return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
}catch (BDException e) {
|
|
|
log.error("我的处理中事件 分页列表出现异常",e);
|
|
@@ -82,7 +82,7 @@ public class KeeperEventApiController {
|
|
|
try {
|
|
|
KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
|
|
|
- IPage<ChambEventOrderVO> pageResponse = this.keeperApiService.queryDoneEventByChambId(pageReqVo,current.getId());
|
|
|
+ IPage<ChambEventOrderVO> pageResponse = this.keeperOrderApiService.queryDoneEventByChambId(pageReqVo,current.getId());
|
|
|
return PageResult.success(pageResponse.getRecords(),pageResponse.getCurrent(),pageResponse.getSize(),pageResponse.getTotal());
|
|
|
}catch (BDException e) {
|
|
|
log.error("我的已完成事件 分页列表出现异常",e);
|
|
@@ -96,10 +96,10 @@ public class KeeperEventApiController {
|
|
|
@GetMapping("/getEventInfo")
|
|
|
@ApiOperation(tags = {"事件处理"},value = "事件处理或者详情 --二期修改")
|
|
|
public Result<Map<String,Object>> getEventInfo(@RequestParam("orderId") Long orderId){
|
|
|
- EventOrderVO eventOrderVO = this.keeperApiService.getEventInfo(orderId);
|
|
|
- List<ChamberlainVO> chambList = this.keeperApiService.queryChambList(orderId);
|
|
|
- List<OrderOlderVO> olderVOList = this.keeperApiService.queryOrderOlderList(orderId);
|
|
|
- List<HouseContactVO> houseContactVOList = this.keeperApiService.queryContactByOrderId(orderId);
|
|
|
+ EventOrderVO eventOrderVO = this.keeperOrderApiService.getEventInfo(orderId);
|
|
|
+ List<ChamberlainVO> chambList = this.keeperOrderApiService.queryChambList(orderId);
|
|
|
+ List<OrderOlderVO> olderVOList = this.keeperOrderApiService.queryOrderOlderList(orderId);
|
|
|
+ List<HouseContactVO> houseContactVOList = this.keeperOrderApiService.queryContactByOrderId(orderId);
|
|
|
Map<String,Object> data = new HashMap<>(4);
|
|
|
//订单信息
|
|
|
data.put("info",eventOrderVO);
|
|
@@ -117,7 +117,7 @@ public class KeeperEventApiController {
|
|
|
@ApiOperation(tags = {"事件处理"},value = "获取钥匙信息,data如果为NULL,需要进行申请")
|
|
|
public Result<OrderKeyApplyVO> getApplyKeyInfo(@RequestHeader("token") String token, @RequestParam("orderId") Long orderId){
|
|
|
KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
- OrderKeyApplyVO orderKeyApplyVO = this.keeperApiService.getApplyKeyInfo(orderId,current.getId());
|
|
|
+ OrderKeyApplyVO orderKeyApplyVO = this.keeperOrderApiService.getApplyKeyInfo(orderId,current.getId());
|
|
|
return Result.success("查询成功!",orderKeyApplyVO);
|
|
|
}
|
|
|
|
|
@@ -125,14 +125,14 @@ public class KeeperEventApiController {
|
|
|
@ApiOperation(tags = {"事件处理"},value = "申请钥匙")
|
|
|
public Result<Map<String,Object>> toApplyKey(@RequestHeader("token") String token, @RequestParam("orderId") Long orderId){
|
|
|
KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
- this.keeperApiService.applyKey(orderId,current);
|
|
|
+ this.keeperOrderApiService.applyKey(orderId,current);
|
|
|
return Result.success("申请成功!");
|
|
|
}
|
|
|
|
|
|
@PostMapping("/daoda")
|
|
|
@ApiOperation(tags = {"事件处理"},value = "到达确认")
|
|
|
public Result<Object> daoDaConfirm(@RequestParam("chambOrderId") Long chambOrderId){
|
|
|
- if (this.keeperApiService.daoDaConfirm(chambOrderId)){
|
|
|
+ if (this.keeperOrderApiService.daoDaConfirm(chambOrderId)){
|
|
|
return Result.success("到达确认成功!");
|
|
|
}else{
|
|
|
return Result.error("操作失败!");
|
|
@@ -143,7 +143,7 @@ public class KeeperEventApiController {
|
|
|
@PostMapping("/likai")
|
|
|
@ApiOperation(tags = {"事件处理"},value = "离开确认")
|
|
|
public Result<Object> liKaiConfirm(@RequestBody LikaiConfimVO likaiConfimVO){
|
|
|
- if (this.keeperApiService.liKaiConfirm(likaiConfimVO.getChambOrderId(),likaiConfimVO.getRemark(),likaiConfimVO.getUrls())){
|
|
|
+ if (this.keeperOrderApiService.liKaiConfirm(likaiConfimVO.getChambOrderId(),likaiConfimVO.getRemark(),likaiConfimVO.getUrls())){
|
|
|
return Result.success("离开确认成功!");
|
|
|
}else{
|
|
|
return Result.error("操作失败!");
|
|
@@ -153,7 +153,7 @@ public class KeeperEventApiController {
|
|
|
@GetMapping("/queryDoHis")
|
|
|
@ApiOperation(tags = {"事件处理"},value = "处理日志")
|
|
|
public Result<List<OrderHandleHisVO>> queryDoHis(@RequestParam("orderId") Long orderId){
|
|
|
- return Result.success("查询成功!",this.keeperApiService.queryOrderHandleHis(orderId));
|
|
|
+ return Result.success("查询成功!",this.keeperOrderApiService.queryOrderHandleHis(orderId));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(tags = {"APP-图片上传"},value = "图片上传接口", notes = "图片上传接口")
|
|
@@ -175,7 +175,7 @@ public class KeeperEventApiController {
|
|
|
@ApiOperation(tags = {"事件处理"},value = "获取管家当前的状态 0:未到达 1 到达、服务中 2 离开")
|
|
|
public Result<Integer> getKeeperStatus(@RequestParam("chambOrderId") Long chambOrderId){
|
|
|
Integer status = 0;
|
|
|
- ChambEventOrderVO orderVO = this.keeperApiService.getChambOrder(chambOrderId);
|
|
|
+ ChambEventOrderVO orderVO = this.keeperOrderApiService.getChambOrder(chambOrderId);
|
|
|
if (orderVO!=null ){
|
|
|
if (orderVO.getDaodaTime()!=null && orderVO.getLikaiTime()==null){
|
|
|
status = 1;
|
|
@@ -191,13 +191,13 @@ public class KeeperEventApiController {
|
|
|
@ApiOperation(tags = {"首页"},value = "获取管家的服务人数")
|
|
|
public Result<Integer> getFuwuCount( @RequestHeader(name = "token") String token){
|
|
|
KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
- return Result.success("查询成功!",this.keeperApiService.queryOlderCount(current));
|
|
|
+ return Result.success("查询成功!",this.keeperOrderApiService.queryOlderCount(current));
|
|
|
}
|
|
|
|
|
|
@GetMapping("/myOrderStat")
|
|
|
@ApiOperation(tags = {"我的"},value = "工单统计")
|
|
|
public Result<ChambEventOrderCountVO> myOrderStat( @RequestHeader(name = "token") String token){
|
|
|
KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
- return Result.success("查询成功!",this.keeperApiService.getOrderCountByChambId(current.getId()));
|
|
|
+ return Result.success("查询成功!",this.keeperOrderApiService.getOrderCountByChambId(current.getId()));
|
|
|
}
|
|
|
}
|