457d0972cf47502d5268406dd240cfaf2c69b05e.svn-base 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package cn.com.goldenwater.dcproj.controller.anze;
  2. import cn.com.goldenwater.core.web.BaseController;
  3. import cn.com.goldenwater.core.web.BaseResponse;
  4. import cn.com.goldenwater.dcproj.service.BisInspAnzeStaticsService;
  5. import cn.com.goldenwater.dcproj.utils.DateUtils;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import io.swagger.annotations.ApiParam;
  9. import org.slf4j.Logger;
  10. import org.slf4j.LoggerFactory;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.web.bind.annotation.GetMapping;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RestController;
  15. import java.util.Date;
  16. import java.util.List;
  17. import java.util.Map;
  18. import java.util.Optional;
  19. /**
  20. * @author lql
  21. * @date 2026-4-21
  22. */
  23. @Api(value = "安责险管理", tags = "安责险管理")
  24. @RestController
  25. @RequestMapping("/bis/insp")
  26. public class BisInspAnzeStaticsController extends BaseController {
  27. private Logger logger = LoggerFactory.getLogger(getClass());
  28. @Autowired
  29. private BisInspAnzeStaticsService anzeStaticsService;
  30. @ApiOperation(value = "安责险统计")
  31. @GetMapping("/anze/statistics/insurer/underwritingCount")
  32. public BaseResponse<List<Map<String, Object>>> insurerUnderwritingCount(@ApiParam(name = "year", value = "year", required = true) Integer year) {
  33. Integer y = Optional.ofNullable(year).orElse(Integer.parseInt(DateUtils.Date2Str(new Date(), "yyyy")));
  34. return buildSuccessResponse(anzeStaticsService.insurerUnderwritingCount(y));
  35. }
  36. @ApiOperation(value = "根据ID获取安责险(单表)")
  37. @GetMapping("/anze/statistics/completion")
  38. public BaseResponse<List<Map<String, Object>>> anzeCompletion(@ApiParam(name = "year", value = "year", required = true) Integer year) {
  39. Integer y = Optional.ofNullable(year).orElse(Integer.parseInt(DateUtils.Date2Str(new Date(), "yyyy")));
  40. return buildSuccessResponse(anzeStaticsService.anzeCompletion(y));
  41. }
  42. @ApiOperation(value = "根据ID获取安责险(单表)")
  43. @GetMapping("/sixme/statistics/completion")
  44. public BaseResponse<List<Map<String, Object>>> sixmeCompletion(@ApiParam(name = "year", value = "year", required = true) Integer year) {
  45. Integer y = Optional.ofNullable(year).orElse(Integer.parseInt(DateUtils.Date2Str(new Date(), "yyyy")));
  46. return buildSuccessResponse(anzeStaticsService.sixmeCompletion(y));
  47. }
  48. }