| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545 |
- package com.ydtech.modules.scheme.controller;
- import com.alibaba.fastjson.JSONArray;
- import com.alibaba.fastjson.JSONObject;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
- import com.ydtech.aop.request.RequestSingleParam;
- import com.ydtech.constants.enums.dict.agreement.ProductsType;
- import com.ydtech.core.page.HttpResult;
- import com.ydtech.core.page.PageResult;
- import com.ydtech.exception.SystemException;
- import com.ydtech.modules.base.controller.BaseController;
- import com.ydtech.modules.order.constants.JqInsuranceType;
- import com.ydtech.modules.order.entity.*;
- import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceSonVo;
- import com.ydtech.modules.order.entity.vo.InsDrivingIntentionInsuranceVo;
- import com.ydtech.modules.order.service.InsBusinessInsuranceService;
- import com.ydtech.modules.order.service.InsDrivingIntentionInsuranceService;
- import com.ydtech.modules.order.service.InsDrivingIntentionInsuranceTypeService;
- import com.ydtech.modules.protocol.service.ITaxSourceService;
- import com.ydtech.modules.protocols.service.PtlAgreementUndwrtRulesAttrService;
- import com.ydtech.modules.scheme.aop.RuleTrajectory;
- import com.ydtech.modules.scheme.entity.po.*;
- import com.ydtech.modules.scheme.entity.vo.*;
- import com.ydtech.modules.scheme.service.*;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiModelProperty;
- import io.swagger.annotations.ApiOperation;
- import org.apache.poi.ss.formula.functions.T;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.validation.annotation.Validated;
- import org.springframework.web.bind.annotation.*;
- import java.util.*;
- /**
- *@author: tz
- *@description: 方案controller
- *@create: 2024-7-30 10:12:52
- */
- @Api(tags = "方案管理")
- @RequestMapping("/plt/scheme")
- @RestController
- public class PtlSchemeController extends BaseController {
- @Autowired
- private PtlSchemeRulesAttrService ptlSchemeRulesAttrService;
- @Autowired
- private PtlSchemeService ptlSchemeService;
- @Autowired
- private PtlSchemeRulesService ptlSchemeRulesService;
- @Autowired
- private PtlAgreementUndwrtRulesAttrService ptlAgreementUndwrtRulesAttrService;
- @Autowired
- private InsDrivingIntentionInsuranceService insDrivingIntentionInsuranceService;
- @Autowired
- private ITaxSourceService taxSourceService;
- @Autowired
- private InsDrivingIntentionInsuranceTypeService insDrivingIntentionInsuranceTypeService;
- @Autowired
- private InsBusinessInsuranceService insBusinessInsuranceService;
- @Autowired
- private PtlOptionalSchemeService ptlOptionalSchemeService;
- @ApiOperation(value = "获取保险公司")
- @PostMapping("/companyList")
- public HttpResult companyList(@RequestBody SchemeQueryVo schemeQueryVo) {
- Page page = buildPageRequest(schemeQueryVo.getPageDto());
- return HttpResult.ok(ptlSchemeService.getAllCompany(page,schemeQueryVo));
- }
- //region 规则方法
- @ApiOperation(value = "方案规则属性列表")
- @GetMapping("/attr/list")
- public HttpResult<List<PtlSchemeRulesAttr>> list() {
- List<PtlSchemeRulesAttr> undwrtRulesAttrList = ptlSchemeRulesAttrService.getRulesAttrList();
- return HttpResult.ok(undwrtRulesAttrList);
- }
- @ApiOperation(value = "根据保险公司id查询方案规则属性列表")
- @GetMapping("/attr/listByCompanyId")
- public HttpResult<List<PtlSchemeRulesAttr>> listByCompanyId(String companyId) {
- List<PtlSchemeRulesAttr> undwrtRulesAttrList = ptlSchemeRulesAttrService.getRulesAttrList(companyId);
- return HttpResult.ok(undwrtRulesAttrList);
- }
- @ApiOperation(value = "获取规则列表")
- @PostMapping("/ruleList")
- public HttpResult ruleList(@Validated @RequestBody RuleQueryVo ruleQueryVo) {
- Page page = buildPageRequest(ruleQueryVo.getPageDto());
- return HttpResult.ok(ptlSchemeRulesService.getRulesPage(page,ruleQueryVo));
- }
- @ApiOperation(value = "获取规则的详情信息")
- @GetMapping("/ruleInfo")
- public HttpResult ruleInfo(String ruleId){
- List<PtlSchemeRulesAttr> schemeRulesAttrs = ptlSchemeRulesAttrService.getRulesAttrList();
- RuleResultVo rulesInfoById = ptlSchemeRulesAttrService.getRulesInfoById(ruleId, schemeRulesAttrs);
- return HttpResult.ok(rulesInfoById);
- }
- @RuleTrajectory(type="C")
- @ApiOperation(value = "添加规则")
- @PostMapping("/ruleAdd")
- public HttpResult ruleAdd(@RequestBody RuleSaveVo ruleSaveVo){
- List<PtlSchemeRulesAttrLink> attrs = ruleSaveVo.getAttrs();
- List<PtlSchemeRulesAttrLink> newAttrs = new ArrayList<>();
- //过滤空的属性
- attrs.forEach(item->{
- if(item.getDictLabal().isEmpty()) {
- if (((!Objects.isNull(item.getMin()) && !item.getMin().equals("") && !item.getMin().equals("0")) ||
- (!Objects.isNull(item.getOperator()) && !item.getOperator().equals("") && !item.getOperator().equals("1")) ||
- (!Objects.isNull(item.getMax()) && !item.getMax().equals("") && !item.getMax().equals("0")))) {
- item.setId(null);
- newAttrs.add(item);
- }
- }else{
- if (((!Objects.isNull(item.getMin()) && !item.getMin().equals("")) ||
- (!Objects.isNull(item.getOperator()) && !item.getOperator().equals("")) ||
- (!Objects.isNull(item.getMax()) && !item.getMax().equals("")))) {
- item.setId(null);
- newAttrs.add(item);
- }
- }
- });
- //添加能源类型
- newAttrs.add(PtlSchemeRulesAttrLink.NewEnergy(ruleSaveVo.getRule().getEnergyType()));
- //添加车辆类型
- newAttrs.add(PtlSchemeRulesAttrLink.CarType(ruleSaveVo.getRule().getVehicleType()));
- //添加 使用性质 营业 非营业
- if(!Objects.isNull(ruleSaveVo.getRule().getCarnature())){
- newAttrs.add(PtlSchemeRulesAttrLink.carNature(ruleSaveVo.getRule().getCarnature()));
- }
- ruleSaveVo.setAttrs(newAttrs);
- int ruleId = ptlSchemeRulesService.addRules(ruleSaveVo);
- HttpResult<JSONObject> httpResult;
- JSONObject result = new JSONObject();
- if(ruleId > 0) {
- result.put("ruleId", ruleId);
- result.put("msg", "添加规则成功");
- httpResult = HttpResult.ok(result);
- }else{
- result.put("msg","添加规则失败");
- httpResult = HttpResult.error(result);
- }
- return httpResult;
- }
- @RuleTrajectory(type="U")
- @ApiOperation(value = "修改规则")
- @PostMapping("/ruleUpdate")
- public HttpResult ruleUpdate(@RequestBody RuleSaveVo ruleSaveVo){
- PtlSchemeRules ptlSchemeRules = ptlSchemeRulesService.getById(ruleSaveVo.getRule().getId());
- if(Objects.isNull(ptlSchemeRules)){
- throw new SystemException("规则不存在");
- }
- List<PtlSchemeRulesAttrLink> attrs = ruleSaveVo.getAttrs();
- List<PtlSchemeRulesAttrLink> newAttrs = new ArrayList<>();
- //过滤空的属性
- attrs.forEach(item->{
- if(item.getDictLabal().isEmpty()) {
- if (((!Objects.isNull(item.getMin()) && !item.getMin().equals("") && !item.getMin().equals("0")) ||
- (!Objects.isNull(item.getOperator()) && !item.getOperator().equals("") && !item.getOperator().equals("1")) ||
- (!Objects.isNull(item.getMax()) && !item.getMax().equals("") && !item.getMax().equals("0")))) {
- item.setId(null);
- newAttrs.add(item);
- }
- }else{
- if(!Objects.isNull(item.getMin())){
- if(item.getMin().equals("")) {
- item.setMin(String.join(",", item.getMinArray()));
- }
- }
- if (((!Objects.isNull(item.getMin()) && !item.getMin().equals("")) ||
- (!Objects.isNull(item.getOperator()) && !item.getOperator().equals("")) ||
- (!Objects.isNull(item.getMax()) && !item.getMax().equals("")))) {
- item.setId(null);
- newAttrs.add(item);
- }
- }
- });
- //添加能源类型
- newAttrs.add(PtlSchemeRulesAttrLink.NewEnergy(ruleSaveVo.getRule().getEnergyType()));
- //添加车辆类型
- newAttrs.add(PtlSchemeRulesAttrLink.CarType(ruleSaveVo.getRule().getVehicleType()));
- //添加 使用性质 营业 非营业
- if(!Objects.isNull(ruleSaveVo.getRule().getCarnature())){
- newAttrs.add(PtlSchemeRulesAttrLink.carNature(ruleSaveVo.getRule().getCarnature()));
- }
- ruleSaveVo.setAttrs(newAttrs);
- return ptlSchemeRulesService.updateRules(ruleSaveVo) ?
- HttpResult.ok("修改规则成功"):
- HttpResult.error("修改规则失败");
- }
- @RuleTrajectory(type="D")
- @ApiOperation(value = "删除规则")
- @PostMapping("/ruleDelete")
- public HttpResult ruleDelete(@RequestSingleParam("ruleId") String ruleId){
- return ptlSchemeRulesService.deleteRules(ruleId) ?
- HttpResult.ok("删除规则成功"):
- HttpResult.error("删除规则失败");
- }
- @ApiOperation(value = "规则过滤保险公司")
- // @Validated
- @PostMapping("/ruleFilterCompany")
- public HttpResult ruleFilterCompany(
- // @Validated
- @RequestBody RuleFilterVo ruleFilterVo){
- String userId = getUserId();
- if(!Objects.isNull(ruleFilterVo.getUserId()) && !ruleFilterVo.getUserId().equals("")){
- userId = ruleFilterVo.getUserId();
- }
- //如果没有传入险种 则显示用户所有的保险公司
- if(Objects.isNull(ruleFilterVo.getProductId()))
- {
- return HttpResult.ok(taxSourceService.getAllAgreement(getDeptId(), userId));
- }
- return HttpResult.ok(ptlSchemeRulesService.ruleFilterCompany(userId,ruleFilterVo));
- }
- //endregion
- //region 方案管理
- @PostMapping("/getSchemeList")
- @ApiOperation("查询方案规则列表")
- public PageResult getProduct(@RequestBody SchemeQueryVo schemeQueryVo) {
- Page<T> page = buildPageRequest(schemeQueryVo.getPageDto());
- Page<PtlScheme> schemeQueryDto = ptlSchemeService.getSchemeList(page,schemeQueryVo);
- return buildPageResponse(schemeQueryDto);
- }
- @ApiOperation(value = "方案添加")
- @PostMapping("/shcemeAdd")
- public HttpResult shcemeAdd(@RequestBody SchemeSaveVo schemeSaveVo){
- List<SchemeResultVo> schemeInfoByCompanyId = ptlSchemeService.getSchemeInfoByCompanyId(
- schemeSaveVo.getCompanyId(), schemeSaveVo.getProductId(),
- schemeSaveVo.getVehicleType(),schemeSaveVo.getEnergyType(),
- schemeSaveVo.getCarnature()
- );
- if(schemeInfoByCompanyId.size() > 0)
- {
- throw new SystemException("已存在方案");
- }
- return ptlSchemeService.addScheme(schemeSaveVo) ? HttpResult.ok("添加成功") : HttpResult.error("添加失败");
- }
- @ApiOperation(value = "方案列表")
- @PostMapping("/schemeList")
- public HttpResult schemeList(@Validated @RequestBody SchemeQueryVo schemeQueryVo){
- Page page = buildPageRequest(schemeQueryVo.getPageDto());
- return HttpResult.ok(ptlSchemeService.getSchemeList(page,schemeQueryVo));
- }
- @ApiOperation(value = "获取方案详情")
- @GetMapping("/schemeInfo")
- public HttpResult schemeInfo(String companyId,String productId,String vehicleType,String energyType,String carnature){
- return HttpResult.ok(ptlSchemeService.getSchemeInfo(companyId,productId,vehicleType,energyType,carnature));
- }
- @ApiOperation(value = "更新方案")
- @PostMapping("/schemeUpdate")
- public HttpResult schemeUpdate(@Validated @RequestBody SchemeSaveVo schemeSaveVo){
- return ptlSchemeService.updateScheme(schemeSaveVo) ? HttpResult.ok("修改成功") : HttpResult.error("修改失败");
- }
- @ApiOperation(value = "删除方案")
- @PostMapping("/schemeDelete")
- public HttpResult schemeDepete(@RequestBody SchemeQueryVo schemeQueryVo){
- return ptlSchemeService.deleteScheme(schemeQueryVo) ? HttpResult.ok("删除成功") : HttpResult.error("删除失败");
- }
- @ApiOperation(value = "获取方案详情")
- @PostMapping(value = "getScheneInfo")
- public HttpResult getScheneInfo(@RequestBody SchemeQueryVo schemeQueryVo) {
- return HttpResult.ok(ptlSchemeService.getSchemeInfoByCompanyId(
- schemeQueryVo.getCompanyId(),schemeQueryVo.getProductId(),
- schemeQueryVo.getVehicleType(),schemeQueryVo.getEnergyType(),
- schemeQueryVo.getCarnature()));
- }
- //endregion
- //region 驾意险方法
- @ApiOperation(value = "获取驾意险分类信息")
- @PostMapping(value = "/getDrivingType")
- public HttpResult getDrivingType(@RequestBody DrivingIntentionQueryVo drivingIntentionQueryVo) {
- return HttpResult.ok(insDrivingIntentionInsuranceTypeService.getDrivingIntentionInsuranceTypeByCompanyId(drivingIntentionQueryVo.getCompanyId()));
- }
- @ApiOperation(value = "获取驾意险信息")
- @PostMapping(value = "/getDriving")
- public HttpResult getDriving(@RequestBody DrivingIntentionQueryVo drivingIntentionQueryVo) {
- return HttpResult.ok(insDrivingIntentionInsuranceService.getSchemeDrivingIntentionInsurance(drivingIntentionQueryVo));
- }
- //endregion
- @ApiOperation(value = "获取商业险信息")
- @PostMapping(value = "getBusinessInsurance")
- public HttpResult getBusinessInsurance() {
- return HttpResult.ok(insBusinessInsuranceService.getBusinessInsurance());
- }
- //region 自选方案
- @ApiOperation(value = "自选方案添加")
- @PostMapping(value = "addOptionalScheme")
- public HttpResult addOptionalScheme(@RequestBody OptionalSchemeSaveVo optionalSchemeSaveVo) {
- LambdaQueryWrapper<PtlOptionalScheme> eq = new LambdaQueryWrapper<PtlOptionalScheme>()
- .eq(PtlOptionalScheme::getCompanyId, optionalSchemeSaveVo.getCompanyId())
- .eq(PtlOptionalScheme::getProductId, optionalSchemeSaveVo.getProductId())
- .eq(PtlOptionalScheme::getEnergyType, optionalSchemeSaveVo.getEnergyType())
- .eq(PtlOptionalScheme::getVehicleType, optionalSchemeSaveVo.getVehicleType())
- .eq(!Objects.isNull(optionalSchemeSaveVo.getCarnature()),PtlOptionalScheme::getCarnature,optionalSchemeSaveVo.getCarnature());
- List<PtlOptionalScheme> list = ptlOptionalSchemeService.list(eq);
- if(list.size() > 0)
- {
- return HttpResult.error("已存在方案");
- }
- return HttpResult.ok(ptlOptionalSchemeService.addOptionScheme(optionalSchemeSaveVo)?
- "添加成功" :
- "添加失败");
- }
- @ApiOperation(value = "自选方案查询")
- @GetMapping(value = "optionalSchemeInfo")
- public HttpResult optionalSchemeInfo(String companyId,String productId,String carnature, String vehicleType, String energyType) {
- return HttpResult.ok(
- ptlOptionalSchemeService.optionalSchemeInfo(companyId,productId,carnature,vehicleType,energyType));
- }
- @ApiOperation(value = "自选方案修改")
- @PostMapping(value = "updateOptionalScheme")
- public HttpResult updateOptionalScheme(@RequestBody OptionalSchemeSaveVo optionalSchemeSaveVo) {
- return HttpResult.ok(ptlOptionalSchemeService.updateOptionScheme(optionalSchemeSaveVo)?
- "修改成功" :
- "修改失败");
- }
- @ApiOperation(value = "自选方案列表")
- @PostMapping(value = "optionalShcemeList")
- public HttpResult optionalShcemeList( @RequestBody SchemeQueryVo schemeQueryVo) {
- List<PtlOptionalScheme> optionalSchemeList = ptlOptionalSchemeService.getOptionalSchemeList(schemeQueryVo);
- return HttpResult.ok(optionalSchemeList);
- }
- @ApiOperation(value = "自选方案删除")
- @PostMapping(value = "optionalSchemeDelete")
- public HttpResult optionalSchemeDelete(@RequestSingleParam("id") String id) {
- return HttpResult.ok(ptlOptionalSchemeService.deleteOptionScheme(id)?
- "删除成功" :
- "删除失败");
- }
- @ApiOperation(value = "获取自选方案驾意险信息")
- @GetMapping(value = "optionalSchemeDriving")
- public HttpResult optionalSchemeDriving(String schemeId , String seatNum){
- List<InsDrivingIntentionInsurance> optionalSchemeDrivingList = insDrivingIntentionInsuranceService.getOptionalSchemeDrivingList(schemeId, seatNum);
- return HttpResult.ok(optionalSchemeDrivingList);
- }
- //endregion
- //region 前端接口
- @ApiOperation(value = "获取保险公司的方案信息")
- @PostMapping(value = "getCompanySchemeInfo")
- public HttpResult getCompanySchemeInfo(@RequestBody SchemeQueryVo schemeQueryVo) {
- List<CompanySchemeVo> companySchemeInfo = ptlSchemeService.getCompanySchemeInfo(schemeQueryVo);
- return HttpResult.ok(companySchemeInfo);
- }
- @ApiOperation(value = "获取自选方案信息")
- @PostMapping(value = "getCompanyOptionalSchemeInfo")
- public HttpResult getCompanyOptionalSchemeInfo(@RequestBody SchemeQueryVo schemeQueryVo) {
- CompanyOptionalSchemeVo companySchemeInfo = ptlOptionalSchemeService.getSchemeInsuranceInfo(schemeQueryVo);
- JSONArray jqList = new JSONArray();
- Arrays.stream(JqInsuranceType.values()).forEach(item->{
- JSONObject tmp = new JSONObject();
- tmp.put("name",item.getName());
- tmp.put("amount",item.getAmount());
- jqList.add(tmp);
- });
- companySchemeInfo.setJqList(jqList);
- return HttpResult.ok(companySchemeInfo);
- }
- //endregion
- //region pc端
- @ApiModelProperty(value = "获取方案信息")
- @PostMapping(value = "getAllSchemeList")
- public HttpResult getAllSchemeList(@RequestBody SchemeQueryVo schemeQueryVo) {
- PcSchemeResultVo resultVo = new PcSchemeResultVo();
- List<CompanySchemeVo> companySchemeInfo = ptlSchemeService.getCompanySchemeInfo(schemeQueryVo);
- List<PcCompanySchemeVo> pcCompanySchemeVos = new ArrayList<>();
- //分组 主险 附加险 服务
- companySchemeInfo.forEach(item->{
- JSONArray main = new JSONArray();
- JSONArray additional = new JSONArray();
- JSONArray service = new JSONArray();
- for(int i=0;i<item.getKinds().size();i++){
- switch(InsBusinessInsurance.checkInsurance(item.getKinds().getJSONObject(i).getString("kindCode")))
- {
- case 1:
- main.add(item.getKinds().getJSONObject(i));
- break;
- case 2:
- additional.add(item.getKinds().getJSONObject(i));
- break;
- case 3:
- service.add(item.getKinds().getJSONObject(i));
- break;
- default:
- break;
- }
- }
- PcCompanySchemeVo pcCompanySchemeVo = item.toPc();
- JSONObject kinds = new JSONObject();
- kinds.put("main",main);
- kinds.put("additional",additional);
- kinds.put("service",service);
- pcCompanySchemeVo.setKinds(kinds);
- pcCompanySchemeVos.add(pcCompanySchemeVo);
- });
- CompanyOptionalSchemeVo pcSchemeInsuranceInfo = ptlOptionalSchemeService.getPcSchemeInsuranceInfo(schemeQueryVo);
- if(schemeQueryVo.getProductId().equals(ProductsType.PT_0330.getCode()) ||
- schemeQueryVo.getProductId().equals(ProductsType.PT_0330034001.getCode()) ||
- schemeQueryVo.getProductId().equals(ProductsType.PT_0330034002.getCode())){
- JSONObject jqx = new JSONObject();
- jqx.put("name","交通事故强制责任险");
- jqx.put("amount","");
- pcCompanySchemeVos.forEach(vo->{
- vo.setJqx(jqx);
- });
- if(!Objects.isNull(pcSchemeInsuranceInfo)) {
- pcSchemeInsuranceInfo.setJqx(jqx);
- }
- }
- resultVo.setSchemes(pcCompanySchemeVos);
- resultVo.setOptionalScheme(pcSchemeInsuranceInfo);
- return HttpResult.ok(resultVo);
- }
- @ApiModelProperty(value = "获取产品信息")
- @GetMapping(value = "getProductInfo")
- public HttpResult getProductInfo() {
- JSONArray array = new JSONArray();
- Arrays.stream(ProductsType.values()).forEach(item->{
- JSONObject obj = new JSONObject();
- obj.put("code",item.getCode());
- obj.put("desc",item.getDesc());
- array.add(obj);
- });
- return HttpResult.ok(array);
- }
- @ApiModelProperty(value = "获取驾意险信息Son")
- @GetMapping(value = "getDrivingSon")
- public HttpResult getDrivingSon(String companyId,String projectCode) {
- List<InsDrivingIntentionInsuranceSon> insDrivingIntentionInsuranceSon = insDrivingIntentionInsuranceService.getInsDrivingIntentionInsuranceSon(companyId, projectCode);
- return HttpResult.ok(insDrivingIntentionInsuranceSon);
- }
- //endregion
- //手动新增驾意险
- @ApiOperation(value = "手动新增驾意险")
- @PostMapping(value = "addDriving")
- public HttpResult addDriving(@RequestBody InsDrivingIntentionInsuranceVo insDrivingIntentionInsuranceVo){
- return insDrivingIntentionInsuranceService.add(insDrivingIntentionInsuranceVo);
- }
- @ApiOperation(value = "手动新增驾意险后代")
- @PostMapping(value = "addDrivingSon")
- public HttpResult addDrivingSon(@RequestBody InsDrivingIntentionInsuranceSonVo insDrivingIntentionInsuranceSonVo){
- return insDrivingIntentionInsuranceService.addSon(insDrivingIntentionInsuranceSonVo);
- }
- @ApiOperation(value = "手动删除驾意险")
- @PostMapping(value = "deleteDriving")
- public HttpResult deleteDriving(@RequestBody InsDrivingIntentionInsurance insDrivingIntentionInsurance){
- return insDrivingIntentionInsuranceService.delete(insDrivingIntentionInsurance);
- }
- @ApiOperation(value = "手动删除驾意险后代")
- @PostMapping(value = "deleteDrivingSon")
- public HttpResult deleteDrivingSon(@RequestBody InsDrivingIntentionInsuranceSon insDrivingIntentionInsuranceSon){
- return insDrivingIntentionInsuranceService.deleteSon(insDrivingIntentionInsuranceSon);
- }
- @ApiOperation(value = "手动更新驾意险")
- @PostMapping(value = "updateDriving")
- public HttpResult updateDriving(@RequestBody InsDrivingIntentionInsurance insDrivingIntentionInsurance){
- return insDrivingIntentionInsuranceService.update(insDrivingIntentionInsurance);
- }
- @ApiOperation(value = "手动更新驾意险后代")
- @PostMapping(value = "updateDrivingSon")
- public HttpResult updateDrivingSon(@RequestBody InsDrivingIntentionInsuranceSon insDrivingIntentionInsuranceSon){
- return insDrivingIntentionInsuranceService.updateSon(insDrivingIntentionInsuranceSon);
- }
- @ApiOperation(value = "获取驾意险信息")
- @PostMapping(value = "getDrivingInfo")
- public HttpResult getDrivingInfo(@RequestBody DrivingIntentionQueryVo drivingIntentionQueryVo){
- Page page = new Page(drivingIntentionQueryVo.getPageNum(), drivingIntentionQueryVo.getPageSize());
- return HttpResult.ok("",insDrivingIntentionInsuranceService.getSchemeDrivingIntentionInsuranceList(page,drivingIntentionQueryVo));
- }
- /**
- * @version
- * @author: hxl
- * @Date: 2024/10/15 11:27
- * @Description: 获取已承保保险公司列表
- */
- @ApiOperation(value = "获取已承保保险公司列表")
- @PostMapping("/allCompanyList")
- public HttpResult allCompanyList(@RequestBody SchemeQueryVo schemeQueryVo) {
- Page page = buildPageRequest(schemeQueryVo.getPageDto());
- return HttpResult.ok(ptlSchemeService.allCompanyList(page,schemeQueryVo));
- }
- }
|