package com.tofly.feesapi.sfgl.controller;

import cn.hutool.core.util.ObjUtil;
import cn.hutool.core.util.StrUtil;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.tofly.common.core.util.StringUtil;
import com.tofly.feesapi.bmgl.entity.BmFffs;
import com.tofly.feesapi.bmgl.service.IBmFffsService;
import com.tofly.feesapi.common.Excel.ExcleFileUtil;
import com.tofly.feesapi.common.core.ResultRespone;
import com.tofly.feesapi.common.core.dto.PageDto;
import com.tofly.feesapi.common.core.vo.PageResult;
import com.tofly.feesapi.common.exception.FeesErrorCode;
import com.tofly.feesapi.common.exception.FeesException;
import com.tofly.feesapi.common.model.CollectionData;
import com.tofly.feesapi.common.util.GuidGenerator;
import com.tofly.feesapi.sfgl.entity.YySspjxx;
import com.tofly.feesapi.sfgl.entity.dto.*;
import com.tofly.feesapi.sfgl.entity.vo.*;
import com.tofly.feesapi.sfgl.service.YySspjxxService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/yysspjxx")
@Api(tags = "收费明细")
public class YySspjxxController {

    @Autowired
    private YySspjxxService yySspjxxService;

    @Autowired
    private IBmFffsService bmFffsService;

    private final static String SFFL_DESC = "收费分类: 1-预存抵扣; 2-欠费收取(含预存抵扣); 3-预付费收取; 4-余额转存; 5-.费用录入; 7-预存转入(含预付费收取、余额转存转入); 8-预存转出（含预存抵扣、余额转存转出）;";

    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "收费", tags = {"微信公众号收费"})
    @PostMapping("/wxgzhsf")
    public ResultRespone wxgzhsf(@RequestBody YySspjxxInsert insert) {

        if (yySspjxxService.wxgzhsfxkhc(insert)) {
            return ResultRespone.success("收费成功");
        }

        return ResultRespone.failed("微信端收费失败");
    }

    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "营业厅小户收费", tags = {"收费管理"})
    @PostMapping
    public ResultRespone save(@RequestBody YySspjxxInsert insert) throws Exception {
        return ResultRespone.success(yySspjxxService.payByReduceFirst(insert));
    }

    @ApiOperation(value = "大户收费", tags = {"收费管理"})
    @PostMapping("/dhsf")
    public ResultRespone keyAccountCharge(@RequestBody YySspjxxInsert insert) throws Exception {
        return ResultRespone.success(yySspjxxService.keyAccountCharge(insert));
    }

    @ApiOperation(value = "小区批量收费", tags = {"收费管理"})
    @PostMapping("/ldhplsf")
    public ResultRespone<List<String>> batchCharge(@RequestBody PlsfReq plsfReq) {
        return ResultRespone.success(yySspjxxService.batchCharge(plsfReq));
    }

    @ApiOperation(value = "其他费用收费", tags = {"收费管理"})
    @PostMapping("/qtfysf")
    public ResultRespone<List<String>> qtfysf(@RequestBody YySspjxxInsertQtfy insert) throws Exception {
        return ResultRespone.success(yySspjxxService.qtfysf(insert));
    }

    @Deprecated
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "批量收费", tags = {"收费管理"})
    @PostMapping("/plsf")
    public ResultRespone plsfsave(@RequestBody YySspjxxInsert insert) {
        return ResultRespone.success(yySspjxxService.plsfsave(insert));
    }

    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "预存退费", tags = {"收费管理"})
    @PostMapping("/yctf")
    public ResultRespone yctf(@RequestBody YySspjxxyctj yySspjxxyctj) {
        return ResultRespone.success(yySspjxxService.yctf(yySspjxxyctj));
    }

    @ApiOperationSupport(order = 4)
    @GetMapping("/{id}")
    @ApiOperation(value = "通过ID查询收费明细")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "实时ID", required = true, dataType = "String")})
    public ResultRespone<YySspjxx> getById(@PathVariable("id") String id) {
        return ResultRespone.success(yySspjxxService.getById(id));
    }

    @ApiOperationSupport(order = 5)
    @GetMapping(value = "/page")
    @ApiOperation(value = "查询收费明细(分页)-营业厅收费")
    @ApiImplicitParams({@ApiImplicitParam(name = "sffl", value = SFFL_DESC, dataType = "String", defaultValue = "1,2,3"),})
    public ResultRespone<PageResult<YySspjxxSelect>> getPage(PageDto pageDto, @ModelAttribute YySspjxxFilter filter, @RequestParam(value = "sffl", required = false, defaultValue = "1,2,3") String sffl, @RequestParam Map<String, String> params) {
        if (params.containsKey("chbz")) {//参数适配
            String sflx = params.get("sflx");
            String chbz = params.get("chbz");
            return getPageWithCh(pageDto, filter, sflx, StringUtils.isNotBlank(chbz) ? chbz : null);//收费票据管理
        }
        return ResultRespone.success(yySspjxxService.getPage(pageDto, filter, sffl, "0"));
    }

    @GetMapping(value = "/zhcxpage")
    @ApiOperation(value = "查询收费明细(分页)-综合查询", tags = {"综合查询"})
    @ApiImplicitParams({@ApiImplicitParam(name = "sffl", value = SFFL_DESC, dataType = "String", defaultValue = "2"),})
    public ResultRespone getzhcxpage(PageDto pageDto, @ModelAttribute YySspjxxFilter filter, @RequestParam(value = "sffl", required = false, defaultValue = "2") String sffl, @RequestParam Map<String, String> params) {
        if (params.containsKey("chbz")) {//参数适配
            String sflx = params.get("sflx");
            String chbz = params.get("chbz");
            return getPageWithCh(pageDto, filter, sflx, StringUtils.isNotBlank(chbz) ? chbz : null);//收费票据管理
        }
        return ResultRespone.success(yySspjxxService.getZhcxPage(pageDto, filter, sffl, "0"));
    }

    @ApiOperationSupport(order = 6)
    @GetMapping
    @ApiOperation(value = "查询收费明细", tags = {"收费明细报表"})
    @ApiImplicitParams({@ApiImplicitParam(name = "sffl", value = SFFL_DESC, dataType = "String"),})
    public ResultRespone<CollectionData<YySspjxxSelect>> getList(@ModelAttribute YySspjxxFilter filter, @RequestParam(value = "sffl", required = false) String sffl) {
        List<YySspjxxSelect> list = yySspjxxService.getList(filter, sffl, null);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 6)
    @GetMapping("/getPageList")
    @ApiOperation(value = "查询收费明细", tags = {"实收明细报表 ", "收费员对账明细", "预存明细查询", "扣减明细查询"})
    @ApiImplicitParams({@ApiImplicitParam(name = "sffl", value = SFFL_DESC, dataType = "String"),})
    public ResultRespone<YySspjxxSelectCount> getPageList(@ModelAttribute PageDto page,
                                                          @ModelAttribute YySspjxxFilter filter,
                                                          @RequestParam(value = "sffl", required = false) String sffl,
                                                          @RequestParam(value = "chbz", required = false) String chbz) {


        return ResultRespone.success(yySspjxxService.getPageList(page, filter, sffl, chbz));
    }

    @ApiOperationSupport(order = 7)
    @GetMapping("/export")
    @ApiOperation(value = "导出收费明细", tags = {"实收明细报表 ", "收费员对账明细", "预存明细查询", "扣减明细查询"})
    public void export(HttpServletResponse response, @ModelAttribute YySspjxxFilter filter,
                       @RequestParam(value = "sffl", required = false) String sffl,
                       @RequestParam(value = "chbz", required = false) String chbz
    ) throws IOException {
        List<YySspjxxSelect> list = yySspjxxService.getList(filter, sffl, chbz);
        if (!list.isEmpty()) {
            YySspjxxSelect yySspjxxSelect = new YySspjxxSelect();
            yySspjxxSelect.setYhbh("合计");
            yySspjxxSelect.setYssf(list.stream().map(YySspjxxSelect::getYssf).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setYssl(list.stream().map(YySspjxxSelect::getYssl).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setYswsf(list.stream().map(YySspjxxSelect::getYswsf).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setYsljf(list.stream().map(YySspjxxSelect::getYsljf).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setYsszyf(list.stream().map(YySspjxxSelect::getYsszyf).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setZnj(list.stream().map(YySspjxxSelect::getZnj).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setYsje(list.stream().map(YySspjxxSelect::getYsje).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setBcyc(list.stream().map(YySspjxxSelect::getBcyc).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setBckj(list.stream().map(YySspjxxSelect::getBckj).reduce(BigDecimal.ZERO, BigDecimal::add));
            yySspjxxSelect.setSszje(list.stream().map(YySspjxxSelect::getSszje).reduce(BigDecimal.ZERO, BigDecimal::add));
            list.add(yySspjxxSelect);
            String fileName = GuidGenerator.getGuid();
            ExcleFileUtil.exportExcel(response, list, YySspjxxSelect.class, String.format("%s.xlsx", fileName), filter.getExportFields());
        }
    }

    @ApiOperationSupport(order = 8)
    @GetMapping(value = "/page2")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "sffl", value = SFFL_DESC, dataType = "String"),
            @ApiImplicitParam(name = "chbz", value = "票据状态（冲红标志）：0未冲红(正常)，1已冲红，2红票（被冲红）", dataType = "String")
    })
    @ApiOperation(value = "收费票据管理", tags = {"收费票据管理"})
    public ResultRespone<PageResult<YySspjxxSelect>> getPageWithCh(PageDto pageDto,
                                                                   @ModelAttribute YySspjxxFilter filter,
                                                                   @RequestParam(value = "sffl", required = false) String sffl,
                                                                   @RequestParam(value = "chbz", required = false) String chbz) {
        return ResultRespone.success(yySspjxxService.getPage(pageDto, filter, sffl, chbz));
    }

    @ApiOperationSupport(order = 10)
    @GetMapping("/dailyStat2")
    @ApiOperation(value = "按日汇总报表", tags = {"按日汇总报表", "第三方按日统计报表"})
    public ResultRespone<CollectionData<YySspjxxDailyStat2>> dailyStat2(@ModelAttribute YySspjxxStatFilter filter) {
        List<YySspjxxDailyStat2> list = yySspjxxService.dailyStat2(filter);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @PostMapping("/dailySummary")
    @ApiOperation(value = "报表管理-日汇总报表")
    public ResultRespone<List<YySspjxxDailyStat2>> dailySummary(@RequestBody YySspjxxFilter filter) {
        return ResultRespone.success(yySspjxxService.getDailySummary(filter));
    }

    @PostMapping("/dailySummary1")
    @ApiOperation(value = "报表管理-日汇总报表(原系统)")
    public ResultRespone<List<YySspjxxDailyStat1>> dailySummary1(@RequestBody YySspjxxFilter filter) {
        return ResultRespone.success(yySspjxxService.getDailySummary1(filter));
    }

    @ApiOperationSupport(order = 11)
    @ApiOperation(value = "今日统计", tags = {"营业厅收费"})
    @GetMapping("/jrtj/{sfrybm}")
    @ApiImplicitParams({@ApiImplicitParam(name = "sfrybm", value = "收费人员编码", required = true, dataType = "String")})
    public ResultRespone<CollectionData<JrtjSelect>> jrtj(@PathVariable("sfrybm") String sfrybm) {
        if (StringUtil.isEmpty(sfrybm)) {
            throw new FeesException("收费人员编码不能为空！", FeesErrorCode.BUSINESS_ERROR);
        }
        List<JrtjSelect> list = yySspjxxService.jrtj(sfrybm);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 12)
    @ApiOperation(value = "上笔金额", tags = {"营业厅收费"})
    @GetMapping("/sbje/{yhbh}")
    @ApiImplicitParams({@ApiImplicitParam(name = "yhbh", value = "用户编号", required = true, dataType = "String")})
    public ResultRespone<BigDecimal> sbje(@PathVariable("yhbh") String yhbh) {
        return ResultRespone.success(yySspjxxService.sbje(yhbh));
    }

    @ApiOperationSupport(order = 13)
    @ApiOperation(value = "票据冲红", tags = {"收费票据管理"}, notes = "--***0（失败）;1（成功）\n" + "    --***2（收费金额不匹配）;\n" + "    --***3（不是最新缴费记录）;\n" + "    --***4（预付费余额已发生变化或剩余预付费不够退费）;\n" + "    --***5（收费转存的预付费不能单独退费）\n" + "    --***9（没有收费记录）\n" + "    --***-6生成电子发票（红票错误）")
    @PostMapping("/pjch")
    public ResultRespone<Integer> pjCh(@RequestBody PjCh pjch) {
        Integer result = yySspjxxService.pjCh(pjch);
        if (ObjUtil.isNull(result)) {
            return ResultRespone.failed("冲红失败");
        }
        if (result == 1) {
            return ResultRespone.success(result, "冲红成功");
        }
        String msg = "";
        switch (result) {
            case 0:
                msg = "失败";
                break;
            case 2:
                msg = "收费金额不匹配";
                break;
            case 3:
                msg = "不是最新缴费记录";
                break;
            case 4:
                msg = "预付费余额已发生变化或剩余预付费不够退费";
                break;
            case 5:
                msg = "收费转存的预付费不能单独退费";
                break;
            case 9:
                msg = "没有收费记录";
                break;
            case -6:
                msg = "生成电子发票（红票错误）";
                break;
        }
        return ResultRespone.failed(result, String.format("冲红失败，错误代码:%s%s", result, msg));

    }

    @ApiOperationSupport(order = 14)
    @GetMapping("/dailyStat")
    @ApiOperation(value = "报表管理-[莱阳]收费日结报表")
    public ResultRespone<YySspjxxDailyStat> dailyStat(@ModelAttribute YySspjxxDailyStatFilter filter) {
        return ResultRespone.success(yySspjxxService.dailyStat(filter));
    }

    @ApiOperationSupport(order = 15)
    @GetMapping("/monthlyStat")
    @ApiOperation(value = "实收月报表", tags = {"实收月报表"})
    public ResultRespone<CollectionData<YySspjxxMonthlyStat>> monthlyStat(@ModelAttribute YySspjxxStatFilter filter) {
        List<YySspjxxMonthlyStat> list = yySspjxxService.monthlyStat(filter);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 15)
    @GetMapping("/monthlyStatSummary")
    @ApiOperation(value = "实收月报表（汇总版）", tags = {"实收月报表（汇总版）"})
    public ResultRespone<CollectionData<YySspjxxMonthlyStat>> monthlyStatSummary(@ModelAttribute YySspjxxStatFilter filter) {
        List<YySspjxxMonthlyStat> list = yySspjxxService.monthlyStatSummary(filter);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 20)
    @GetMapping("/zhSfStat")
    @ApiOperation(value = "综合收费报表", tags = {"综合收费报表"})
    public ResultRespone<CollectionData<YySspjxxZhSfStat>> zhSfStat(@ModelAttribute YySspjxxStatFilter filter) {
        List<YySspjxxZhSfStat> list = yySspjxxService.zhSfStat(filter);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 22)
    @GetMapping("/zhSfStat/export")
    @ApiOperation(value = "导出综合收费报表", tags = {"综合收费报表"})
    public void zhSfStatExport(HttpServletResponse response, @ModelAttribute YySspjxxStatFilter filter) throws IOException {
        List<YySspjxxZhSfStat> list = yySspjxxService.zhSfStat(filter);
        if (!list.isEmpty()) {
            ExcleFileUtil.exportExcel(response, list, YySspjxxZhSfStat.class, "综合收费报表.xlsx", filter.getExportFields());
        }
    }

    @ApiOperationSupport(order = 23)
    @GetMapping("/stat")
    @ApiOperation(value = "实收信息统计", tags = {"综合查询"})
    public ResultRespone<YyStat> stat(@ModelAttribute YySspjxxStatFilter filter) {
        YyStat stat = yySspjxxService.stat(filter);
        return ResultRespone.success(stat);
    }

    @ApiOperationSupport(order = 24)
    @GetMapping("/yffyeseach")
    @ApiOperation(value = "预付费余额查询", tags = {"明细查询"})
    public ResultRespone<YffYeSeachSelectCount> yffyeseach(PageDto pageDto, @ModelAttribute YffYeSeachFilter filter) {
        YffYeSeachSelectCount yffYeSeachSelectPageDto = yySspjxxService.yffyeseach(pageDto, filter);
        return ResultRespone.success(yffYeSeachSelectPageDto);
    }


    @ApiOperationSupport(order = 25)
    @GetMapping("/exportyffye")
    @ApiOperation(value = "导出预付费余额明细", tags = {"明细查询"})
    public void export(HttpServletResponse response, @ModelAttribute YffYeSeachFilter filter) throws IOException {
        List<YffYeSeachSelect> list = yySspjxxService.yffyeseachList(filter);
        if (!list.isEmpty()) {
            YffYeSeachSelect yffYeSeachSelect = new YffYeSeachSelect();
            yffYeSeachSelect.setYhbh("合计");
            yffYeSeachSelect.setKjje(list.stream().filter(o -> ObjUtil.isNotNull(o.getKjje()))
                    .map(YffYeSeachSelect::getKjje).reduce(BigDecimal.ZERO, BigDecimal::add));
            yffYeSeachSelect.setYfje(list.stream().filter(o -> ObjUtil.isNotNull(o.getYfje()))
                    .map(YffYeSeachSelect::getYfje).reduce(BigDecimal.ZERO, BigDecimal::add));
            yffYeSeachSelect.setZsye(list.stream().filter(o -> ObjUtil.isNotNull(o.getZsye()))
                    .map(YffYeSeachSelect::getZsye).reduce(BigDecimal.ZERO, BigDecimal::add));
            yffYeSeachSelect.setKyye(list.stream().filter(o -> ObjUtil.isNotNull(o.getKyye()))
                    .map(YffYeSeachSelect::getKyye).reduce(BigDecimal.ZERO, BigDecimal::add));
            list.add(yffYeSeachSelect);
            ExcleFileUtil.exportExcel(response, list, YffYeSeachSelect.class, "预付费余额列表.xlsx", filter.getExportFields());
        }
    }

    @ApiOperationSupport(order = 26)
    @GetMapping("/printpj")
    @ApiOperation(value = "票据打印", tags = "实收票据补打")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "ssid", value = "实收ID或收费流水编号", required = true, dataType = "String"),
            @ApiImplicitParam(name = "dyfs", value = "打印方式3为单笔打印，4为合并打印", required = true, dataType = "String")
    })
    public ResultRespone PrintPj(String ssid, String dyfs) {
        return ResultRespone.success(yySspjxxService.printPj(ssid, dyfs), StrUtil.EMPTY);
    }


    @ApiOperationSupport(order = 27)
    @GetMapping("/report/getRymxReport")
    @ApiOperation(value = "收费日结报表", tags = "统计报表", response = RyYySspjxxSelect.class, responseContainer = "List")
    public ResultRespone<List<RyYySspjxxSelect>> getRymxReport(@ModelAttribute YySspjxxDailyStatFilter filter) {
        return ResultRespone.success(yySspjxxService.getRymxReport(filter));
    }

    @ApiOperationSupport(order = 28)
    @GetMapping("/dsfDsfmxReport")
    @ApiOperation(value = "第三方代收明细", tags = {"第三方代收"})
    public ResultRespone getDsfmx(@ModelAttribute YySspjxxFilter filter) {
        List<YySspjxxSelect> list = yySspjxxService.getDsftj(filter);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 29)
    @GetMapping("/dsfDsfHzReport")
    @ApiOperation(value = "第三方代收", tags = {"第三方代收"})
    public ResultRespone getDsfHz(@ModelAttribute YySspjxxFilter filter) {
        List<DsfhzSelect> list = yySspjxxService.getDsfHztj(filter);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 30)
    @GetMapping("/ssybbReport")
    @ApiOperation(value = "实收月报表NEW", tags = {"实收月报表NEW"})
    public ResultRespone getSsybb(@ModelAttribute YySspjxxFilter filter) {
        List<SsybbSelect> list = yySspjxxService.getSssf(filter);
        return ResultRespone.success(new CollectionData<>(list, list.size()));
    }

    @ApiOperationSupport(order = 31)
    @GetMapping("/getPjmxPage")
    @ApiOperation(value = "查询票据明细统计（分页）", tags = {"查询票据明细统计（分页）"})
    public ResultRespone<PageResult<PjmxSelectVo>> getPjmxPage(@ModelAttribute PageDto page, @ModelAttribute YySspjxxFilter filter) {
        return ResultRespone.success(yySspjxxService.getPjmxPage(page, filter));
    }

    @ApiOperationSupport(order = 32)
    @PostMapping("/fpbk")
    @ApiOperation(value = "发票申请", tags = {"收费票据管理"})
    public ResultRespone fpbk(@RequestBody FpbkInsert insert) {
        if (yySspjxxService.fpbk(insert)) {
            return ResultRespone.success("发票申请成功");
        }
        return ResultRespone.failed("发票申请失败");
    }

    @ApiOperationSupport(order = 33)
    @GetMapping("/getQzhpjglPage")
    @ApiOperation(value = "群主户票据管理", tags = {"收费管理"})
    public ResultRespone<YySspjxxSelect1Count> getQzhpjglPage(@ModelAttribute PageDto page, @ModelAttribute YySspjxxFilter filter) {
        return ResultRespone.success(yySspjxxService.getQzhpjglPage(page, filter));
    }

    @ApiOperationSupport(order = 34)
    @PostMapping("/updateSffs")
    @ApiOperation(value = "修改付费方式", tags = {"报表管理"})
    public ResultRespone updateSflx(String id, String fffsbm) {
        BmFffs bmFffs = bmFffsService.getById(fffsbm);
        if (StringUtil.isNull(bmFffs)) {
            return ResultRespone.failed("修改失败,付费方式编码不存在！");
        }
        if (yySspjxxService.lambdaUpdate()
                .set(YySspjxx::getFffs, fffsbm)
                .eq(YySspjxx::getId, id)
                .update()) {
            return ResultRespone.success("修改成功");
        }
        return ResultRespone.failed("修改失败");
    }

    @ApiOperationSupport(order = 35)
    @GetMapping("/getYsSsbb")
    @ApiOperation(value = "查询应收实收报表", tags = {"报表管理"})
    public ResultRespone<YysSsbbSelectCount> getYsSsbb(@ModelAttribute YysSsbbFilter filter) {
        return ResultRespone.success(yySspjxxService.getYsSsbb(filter));
    }
}
