You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
2.9 KiB
105 lines
2.9 KiB
package com.cjy.back.ybsjHandset.controller;
|
|
|
|
import com.cjy.back.ybsjHandset.controller.vo.HandsetVo;
|
|
import com.cjy.back.ybsjHandset.controller.vo.WriteOffVo;
|
|
import com.cjy.back.ybsjHandset.service.YbsjHandsetService;
|
|
import com.cjy.util.ServerResponse;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
* 手持机相关代码
|
|
*/
|
|
@RequestMapping("/mobile/handset")
|
|
@RestController
|
|
public class YbsjHandsetController {
|
|
|
|
@Autowired
|
|
private YbsjHandsetService ybsjHandsetService;
|
|
|
|
|
|
/**
|
|
* 手持机-核销
|
|
*
|
|
* @param writeOffVo
|
|
* @return
|
|
*/
|
|
@RequestMapping("requestForWriteOff")
|
|
public ServerResponse requestForWriteOff(WriteOffVo writeOffVo) {
|
|
return ybsjHandsetService.writeOff(writeOffVo);
|
|
}
|
|
|
|
/**
|
|
* 手持机-查询检票记录
|
|
*
|
|
* @param handsetVo
|
|
* @return
|
|
*/
|
|
@RequestMapping("getHaveTicketsChecked")
|
|
public ServerResponse getHaveTicketsCheckedPage(HandsetVo handsetVo) {
|
|
return ybsjHandsetService.getHaveTicketsCheckedPage(handsetVo);
|
|
}
|
|
|
|
/**
|
|
* 手持机-查询预约记录
|
|
*
|
|
* @param handsetVo
|
|
* @return
|
|
*/
|
|
@RequestMapping("getAppointmentRecord")
|
|
public ServerResponse getAppointmentRecordPage(HandsetVo handsetVo) {
|
|
return ybsjHandsetService.getAppointmentRecordPage(handsetVo);
|
|
}
|
|
|
|
/**
|
|
* 手持机-查询今日总检票人数和今日总预约人数
|
|
*
|
|
* @param scenicId
|
|
* @return
|
|
*/
|
|
@RequestMapping("getPeopleCounting")
|
|
public ServerResponse getPeopleCounting(@RequestParam("scenicId") Integer scenicId) {
|
|
return ybsjHandsetService.getPeopleCounting(scenicId);
|
|
}
|
|
|
|
/**
|
|
* 手持机-查询检票记录详情
|
|
*
|
|
* @param id
|
|
* @return
|
|
*/
|
|
@RequestMapping("getHaveTicketsDetails")
|
|
public ServerResponse getHaveTicketsDetails(@RequestParam("id") String id) {
|
|
return ybsjHandsetService.getHaveTicketsDetails(id);
|
|
}
|
|
|
|
/**
|
|
* 手持机-查询预约记录详情
|
|
*
|
|
* @param id
|
|
* @return
|
|
*/
|
|
@RequestMapping("getAppointmentRecordDetails")
|
|
public ServerResponse getAppointmentRecordDetails(@RequestParam("id") String id) {
|
|
return ybsjHandsetService.getAppointmentRecordDetails(id);
|
|
}
|
|
|
|
@RequestMapping("selectScjCount")
|
|
public ServerResponse selectScjCount(@RequestParam("dateType") Integer dateType) {
|
|
List<Map<String, Object>> list = ybsjHandsetService.selectScjCount(dateType);
|
|
Map<String, Object> param = new HashMap<>();
|
|
param.put("list",list);
|
|
int total = list.stream()
|
|
.filter(map -> map.containsKey("total_data"))
|
|
.mapToInt(map -> Integer.parseInt(map.get("total_data").toString()) )
|
|
.sum();
|
|
param.put("total",total);
|
|
return ServerResponse.createBySuccess(param);
|
|
}
|
|
|
|
}
|
|
|