package com.shanghaichengdi.ghjgitem.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.shanghaichengdi.ghjgitem.domain.HyDangerPreDeclareNh;
import com.shanghaichengdi.ghjgitem.enums.DangerDeclareGoodsEnum;
import com.shanghaichengdi.ghjgitem.service.HyDangerPreDeclareNhService;
import com.shanghaichengdi.ghjgitem.mapper.HyDangerPreDeclareNhMapper;
import com.shanghaichengdi.ghjgitem.vo.HyDangerPreDeclareNhVo;
import com.shanghaichengdi.ghjgitem.vo.PollutantAcceptVo;
import com.shanghaichengdi.ghjgitem.vo.request.DangerDeclareGoodsReq;
import java.util.Collections;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;

/**
 * @author 14390
 * @description 针对表【HY_DANGER_PRE_DECLARE_NH(行业数据中心内河危险品申报)】的数据库操作Service实现
 * @createDate 2024-07-09 13:35:39
 */
@Service
public class HyDangerPreDeclareNhServiceImpl extends
    ServiceImpl<HyDangerPreDeclareNhMapper, HyDangerPreDeclareNh>
    implements HyDangerPreDeclareNhService {

  @Resource
  private HyDangerPreDeclareNhMapper dangerPreDeclareNhMapper;

  @Override
  public List<HyDangerPreDeclareNhVo> selectDeclareGoodsList(DangerDeclareGoodsReq params) {
    PageHelper.startPage(params.getPageIndex(), params.getPageSize());
    return dangerPreDeclareNhMapper.selectDeclareGoodsList(
        DangerDeclareGoodsEnum.getEnumByDistrict(params.getDistrict()).getCode());
  }

  @Override
  public List<PollutantAcceptVo> selectOutRecordRecent(String shipName) {
    return dangerPreDeclareNhMapper.selectOutRecordRecent(shipName);
  }
}




