|
@@ -0,0 +1,115 @@
|
|
|
+package com.gree.mall.manager.controller.policy;
|
|
|
+
|
|
|
+import cn.hutool.core.lang.TypeReference;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.gree.mall.manager.annotation.ZfireList;
|
|
|
+import com.gree.mall.manager.bean.policy.PolicyOrderEmVO;
|
|
|
+import com.gree.mall.manager.bean.policy.PolicyOrderInVO;
|
|
|
+import com.gree.mall.manager.bean.policy.PolicyOrderVO;
|
|
|
+import com.gree.mall.manager.exception.RemoteServiceException;
|
|
|
+import com.gree.mall.manager.helper.ResponseHelper;
|
|
|
+import com.gree.mall.manager.logic.policy.PolicyOrderLogic;
|
|
|
+import com.gree.mall.manager.zfire.bean.ZfireParamBean;
|
|
|
+import com.gree.mall.manager.zfire.util.FieldUtils;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@RestController
|
|
|
+@Api(value = "保险API", tags = {"保险API"})
|
|
|
+@RequestMapping(value = "/policyOrder", produces = "application/json; charset=utf-8")
|
|
|
+public class PolicyOrderController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private PolicyOrderLogic policyOrderLogic;
|
|
|
+
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "意外保险订单列表")
|
|
|
+ public ResponseHelper<IPage<PolicyOrderVO>> list(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ IPage<PolicyOrderVO> policyOrderVOIPage = policyOrderLogic.listPolicyOrder(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return ResponseHelper.success(policyOrderVOIPage, new TypeReference<PolicyOrderVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list/export")
|
|
|
+ @ApiOperation(value = "意外保险订单列表导出")
|
|
|
+ public void listExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //1.组装查询条件
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<PolicyOrderVO> policyOrderVOIPage = policyOrderLogic.listPolicyOrder(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(policyOrderVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "雇主险订单列表")
|
|
|
+ public ResponseHelper<IPage<PolicyOrderEmVO>> listEm(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ IPage<PolicyOrderEmVO> policyOrderVOIPage = policyOrderLogic.listEm(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return ResponseHelper.success(policyOrderVOIPage, new TypeReference<PolicyOrderEmVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list/export")
|
|
|
+ @ApiOperation(value = "雇主险订单列表导出")
|
|
|
+ public void listEmExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //1.组装查询条件
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<PolicyOrderEmVO> policyOrderVOIPage = policyOrderLogic.listEm(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(policyOrderVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ZfireList
|
|
|
+ @PostMapping("/list")
|
|
|
+ @ApiOperation(value = "工伤险列表")
|
|
|
+ public ResponseHelper<IPage<PolicyOrderInVO>> listIn(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean
|
|
|
+ ) throws RemoteServiceException {
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ IPage<PolicyOrderInVO> policyOrderVOIPage = policyOrderLogic.listIn(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ return ResponseHelper.success(policyOrderVOIPage, new TypeReference<PolicyOrderInVO>() {});
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/list/export")
|
|
|
+ @ApiOperation(value = "工伤险订单列表导出")
|
|
|
+ public void listInExport(
|
|
|
+ @RequestBody ZfireParamBean zfireParamBean,
|
|
|
+ HttpServletRequest request,
|
|
|
+ HttpServletResponse response
|
|
|
+ ) throws Exception {
|
|
|
+ //1.组装查询条件
|
|
|
+ ZfireParamBean zfireParam = FieldUtils.supplyParam(zfireParamBean);
|
|
|
+ //2.查询要导出的内容
|
|
|
+ IPage<PolicyOrderInVO> policyOrderVOIPage = policyOrderLogic.listIn(new Page(zfireParam.getPageNum(), zfireParam.getPageSize()), zfireParam);
|
|
|
+ //3.导出
|
|
|
+ FieldUtils.exportData(policyOrderVOIPage.getRecords(), zfireParam.getExportFields(), request, response);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+}
|