package cn.huge.module.bycase.controller;
|
|
import cn.huge.base.common.utils.ReturnFailUtils;
|
import cn.huge.base.common.utils.ReturnSucUtils;
|
import cn.huge.module.bycase.domain.dto.GZCaseDTO;
|
import cn.huge.module.bycase.service.CaseInfoService;
|
import cn.huge.module.ctuser.service.*;
|
import com.google.common.collect.Maps;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import javax.servlet.http.HttpServletRequest;
|
import java.util.List;
|
import java.util.Map;
|
|
/**
|
* @title: 数据割接-案件相关
|
* @description: 数据割接-案件相关
|
* @company: hugeinfo
|
* @author: liyj
|
* @time: 2024-10-18 15:14:06
|
* @version: 1.0.0
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/api/client/syncCase")
|
public class SyncCaseController {
|
|
@Autowired(required = false)
|
private HttpServletRequest request;
|
|
@Autowired
|
private CaseInfoService caseInfoService;
|
|
/**
|
* 数据割接-统计已结束的纠纷案件信息
|
* @url {ctx}/api/client/syncCase/countEndCase
|
* @return
|
*/
|
@GetMapping("/countEndCase")
|
public Object countEndCase() {
|
try {
|
Map<String, Object> terms = Maps.newHashMap();
|
terms.put("endProcess", "endProcess");
|
return ReturnSucUtils.getRepInfo(caseInfoService.countTerms(terms));
|
} catch (Exception e) {
|
log.error("[SyncCustController.countEndCase]请求失败,异常信息:"+e, e);
|
return ReturnFailUtils.getRepInfo(e.getMessage());
|
}
|
}
|
|
/**
|
* 数据割接-已结束的纠纷案件信息
|
* @url {ctx}/api/client/syncCase/byToGzEndCase
|
* @param page
|
* @param size
|
* @return
|
*/
|
@GetMapping("/byToGzEndCase")
|
public Object byToGzEndCase(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
|
try {
|
List<GZCaseDTO> gzCaseDTOList = caseInfoService.byToGzEndCase(page, size);
|
return ReturnSucUtils.getRepInfo(gzCaseDTOList);
|
} catch (Exception e) {
|
log.error("[SyncCustController.byToGzEndCase]请求失败,异常信息:"+e, e);
|
return ReturnFailUtils.getRepInfo(e.getMessage());
|
}
|
}
|
|
/**
|
* 数据割接-统计进行中的纠纷案件信息
|
* @url {ctx}/api/client/syncCase/countTodoCase
|
* @return
|
*/
|
@GetMapping("/countTodoCase")
|
public Object countTodoCase() {
|
try {
|
Map<String, Object> terms = Maps.newHashMap();
|
terms.put("todoProcess", "todoProcess");
|
return ReturnSucUtils.getRepInfo(caseInfoService.countTerms(terms));
|
} catch (Exception e) {
|
log.error("[SyncCustController.countTodoCase]请求失败,异常信息:"+e, e);
|
return ReturnFailUtils.getRepInfo(e.getMessage());
|
}
|
}
|
|
/**
|
* 数据割接-进行中的纠纷案件信息
|
* @url {ctx}/api/client/syncCase/byToGzTodoCase
|
* @param page
|
* @param size
|
* @return
|
*/
|
@GetMapping("/byToGzTodoCase")
|
public Object byToGzTodoCase(@RequestParam(value = "page") int page, @RequestParam(value = "size") int size) {
|
try {
|
List<GZCaseDTO> gzCaseDTOList = caseInfoService.byToGzTodoCase(page, size);
|
return ReturnSucUtils.getRepInfo(gzCaseDTOList);
|
} catch (Exception e) {
|
log.error("[SyncCustController.byToGzTodoCase]请求失败,异常信息:"+e, e);
|
return ReturnFailUtils.getRepInfo(e.getMessage());
|
}
|
}
|
|
}
|