|
@@ -6,7 +6,7 @@ import com.care.common.service.FileUploadService;
|
|
import com.care.common.util.PageResult;
|
|
import com.care.common.util.PageResult;
|
|
import com.care.common.util.Result;
|
|
import com.care.common.util.Result;
|
|
import com.care.common.vo.PageReqVO;
|
|
import com.care.common.vo.PageReqVO;
|
|
-import com.care.common.vo.event.*;
|
|
|
|
|
|
+import com.care.common.vo.order.*;
|
|
import com.care.keeper.service.KeeperApiService;
|
|
import com.care.keeper.service.KeeperApiService;
|
|
import com.care.keeper.service.KeeperPassportService;
|
|
import com.care.keeper.service.KeeperPassportService;
|
|
import com.care.keeper.vo.HouseContactVO;
|
|
import com.care.keeper.vo.HouseContactVO;
|
|
@@ -17,7 +17,6 @@ import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
-import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
@@ -126,36 +125,6 @@ public class KeeperEventApiController {
|
|
return Result.success("申请成功!");
|
|
return Result.success("申请成功!");
|
|
}
|
|
}
|
|
|
|
|
|
- @GetMapping("/getKeeperStatus")
|
|
|
|
- @ApiOperation(tags = {"事件处理"},value = "获取管家当前的状态进度条")
|
|
|
|
- public Result<List<Map<String,Object>>> getKeeperStatus(@RequestParam("chambOrderId") Long chambOrderId){
|
|
|
|
- List<Map<String,Object>> datas = new ArrayList<>();
|
|
|
|
- Map<String,Object> map1 = new HashMap<>();
|
|
|
|
- map1.put("code",1);
|
|
|
|
- map1.put("color","blue");
|
|
|
|
- datas.add(map1);
|
|
|
|
- Map<String,Object> map2 = new HashMap<>();
|
|
|
|
- map2.put("code",2);
|
|
|
|
- map2.put("color","blue");
|
|
|
|
- datas.add(map2);
|
|
|
|
- Map<String,Object> map3 = new HashMap<>();
|
|
|
|
- map3.put("code",3);
|
|
|
|
- map3.put("color","blue");
|
|
|
|
- datas.add(map3);
|
|
|
|
- ChambEventOrderVO orderVO = this.keeperApiService.getChambOrder(chambOrderId);
|
|
|
|
- if (orderVO!=null ){
|
|
|
|
- if (orderVO.getDaodaTime()!=null && orderVO.getLikaiTime()==null){
|
|
|
|
- datas.get(0).put("color","red");
|
|
|
|
- datas.get(1).put("color","red");
|
|
|
|
- }else if (orderVO.getDaodaTime()!=null && orderVO.getLikaiTime()!=null){
|
|
|
|
- datas.get(0).put("color","red");
|
|
|
|
- datas.get(1).put("color","red");
|
|
|
|
- datas.get(2).put("color","red");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- return Result.success("查询成功!",datas);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@PostMapping("/daoda")
|
|
@PostMapping("/daoda")
|
|
@ApiOperation(tags = {"事件处理"},value = "到达确认")
|
|
@ApiOperation(tags = {"事件处理"},value = "到达确认")
|
|
public Result<Object> daoDaConfirm(@RequestParam("chambOrderId") Long chambOrderId){
|
|
public Result<Object> daoDaConfirm(@RequestParam("chambOrderId") Long chambOrderId){
|
|
@@ -169,7 +138,7 @@ public class KeeperEventApiController {
|
|
|
|
|
|
@PostMapping("/likai")
|
|
@PostMapping("/likai")
|
|
@ApiOperation(tags = {"事件处理"},value = "离开确认")
|
|
@ApiOperation(tags = {"事件处理"},value = "离开确认")
|
|
- public Result<Object> liKaiConfirm(@RequestParam("chambOrderId") Long chambOrderId,@RequestParam("remark") String remark,@RequestParam("chambOrderId") String scenePic){
|
|
|
|
|
|
+ public Result<Object> liKaiConfirm(@RequestParam("chambOrderId") Long chambOrderId,@RequestParam("remark") String remark,@RequestParam("scenePic") String scenePic){
|
|
if (this.keeperApiService.liKaiConfirm(chambOrderId,remark,scenePic)){
|
|
if (this.keeperApiService.liKaiConfirm(chambOrderId,remark,scenePic)){
|
|
return Result.success("离开确认成功!");
|
|
return Result.success("离开确认成功!");
|
|
}else{
|
|
}else{
|
|
@@ -193,8 +162,38 @@ public class KeeperEventApiController {
|
|
@PostMapping(value = "/img/upload", headers="content-type=multipart/form-data",produces = "application/json;charset=UTF-8")
|
|
@PostMapping(value = "/img/upload", headers="content-type=multipart/form-data",produces = "application/json;charset=UTF-8")
|
|
public Result<String> imgUpload( @ApiParam(value="图片",required=true) MultipartFile file,
|
|
public Result<String> imgUpload( @ApiParam(value="图片",required=true) MultipartFile file,
|
|
@RequestHeader(name = "token") String token) {
|
|
@RequestHeader(name = "token") String token) {
|
|
- KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
|
|
|
|
+ KeeperInfoVO current = this.keeperPassportService.checkToken(token);
|
|
String url = fileUploadService.upload(file,"order");
|
|
String url = fileUploadService.upload(file,"order");
|
|
return Result.success("上传成功!",url);
|
|
return Result.success("上传成功!",url);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @GetMapping("/getKeeperStatus")
|
|
|
|
+ @ApiOperation(tags = {"事件处理"},value = "获取管家当前的状态 0:未到达 1 到达、服务中 2 离开")
|
|
|
|
+ public Result<Integer> getKeeperStatus(@RequestParam("chambOrderId") Long chambOrderId){
|
|
|
|
+ Integer status = 0;
|
|
|
|
+ ChambEventOrderVO orderVO = this.keeperApiService.getChambOrder(chambOrderId);
|
|
|
|
+ if (orderVO!=null ){
|
|
|
|
+ if (orderVO.getDaodaTime()!=null && orderVO.getLikaiTime()==null){
|
|
|
|
+ status = 1;
|
|
|
|
+ }else if (orderVO.getDaodaTime()!=null && orderVO.getLikaiTime()!=null){
|
|
|
|
+ status = 2 ;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return Result.success("查询成功!",status);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @GetMapping("/getFuwuCount")
|
|
|
|
+ @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));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @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()));
|
|
|
|
+ }
|
|
}
|
|
}
|