package com.ruoyi.hv.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
        import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.hv.mapper.DHeightValuePatentCompareMapper;
import com.ruoyi.hv.domain.DHeightValuePatentCompare;
import com.ruoyi.hv.service.IDHeightValuePatentCompareService;

/**
 * 高价值专利对照Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-02
 */
@Service
public class DHeightValuePatentCompareServiceImpl extends ServiceImpl<DHeightValuePatentCompareMapper, DHeightValuePatentCompare> implements IDHeightValuePatentCompareService {

    /**
     * 查询高价值专利对照列表
     *
     * @param dHeightValuePatentCompare 高价值专利对照
     * @return 高价值专利对照集合
     * @date 2023-04-02
     */
    @Override
    public List<DHeightValuePatentCompare> queryList(DHeightValuePatentCompare dHeightValuePatentCompare) {
        QueryWrapper<DHeightValuePatentCompare> queryWrapper = Wrappers.query();
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getPubId())  ){
                    queryWrapper.eq("pub_id", dHeightValuePatentCompare.getPubId());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getDataType())  ){
                    queryWrapper.eq("data_type", dHeightValuePatentCompare.getDataType());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppNumber())  ){
                    queryWrapper.eq("app_number", dHeightValuePatentCompare.getAppNumber());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppDate())  ){
                    queryWrapper.eq("app_date", dHeightValuePatentCompare.getAppDate());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppli())  ){
                    queryWrapper.eq("appli", dHeightValuePatentCompare.getAppli());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppliAddress())  ){
                    queryWrapper.eq("appli_address", dHeightValuePatentCompare.getAppliAddress());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getPreCounts())  ){
                    queryWrapper.eq("pre_counts", dHeightValuePatentCompare.getPreCounts());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getHighValue())  ){
                    queryWrapper.eq("high_value", dHeightValuePatentCompare.getHighValue());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppliProvince())  ){
                    queryWrapper.eq("appli_province", dHeightValuePatentCompare.getAppliProvince());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppliCity())  ){
                    queryWrapper.eq("appli_city", dHeightValuePatentCompare.getAppliCity());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppliCounty())  ){
                    queryWrapper.eq("appli_county", dHeightValuePatentCompare.getAppliCounty());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getModifyAppliProvince())  ){
                    queryWrapper.eq("modify_appli_province", dHeightValuePatentCompare.getModifyAppliProvince());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getModifyAppliCity())  ){
                    queryWrapper.eq("modify_appli_city", dHeightValuePatentCompare.getModifyAppliCity());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getModifyAppliCounty())  ){
                    queryWrapper.eq("modify_appli_county", dHeightValuePatentCompare.getModifyAppliCounty());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getStatus())  ){
                    queryWrapper.eq("status", dHeightValuePatentCompare.getStatus());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getHeightValuePress())  ){
                    queryWrapper.eq("height_value_press", dHeightValuePatentCompare.getHeightValuePress());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getHvSeisPress())  ){
                    queryWrapper.eq("hv_seis_press", dHeightValuePatentCompare.getHvSeisPress());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getHvHaveOverseasPress())  ){
                    queryWrapper.eq("hv_have_overseas_press", dHeightValuePatentCompare.getHvHaveOverseasPress());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getHvKeep10Press())  ){
                    queryWrapper.eq("hv_keep10_press", dHeightValuePatentCompare.getHvKeep10Press());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getHvHighPledgePress())  ){
                    queryWrapper.eq("hv_high_pledge_press", dHeightValuePatentCompare.getHvHighPledgePress());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getHvTechnologyAwardPress())  ){
                    queryWrapper.eq("hv_technology_award_press", dHeightValuePatentCompare.getHvTechnologyAwardPress());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getTitle())  ){
                    queryWrapper.eq("title", dHeightValuePatentCompare.getTitle());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getPubNumber())  ){
                    queryWrapper.eq("pub_number", dHeightValuePatentCompare.getPubNumber());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getPatentType())  ){
                    queryWrapper.eq("patent_type", dHeightValuePatentCompare.getPatentType());
                }
                if ( StringUtils.isNotEmpty(dHeightValuePatentCompare.getAppliType())  ){
                    queryWrapper.eq("appli_type", dHeightValuePatentCompare.getAppliType());
                }
        queryWrapper.orderByDesc("id");
        return this.list(queryWrapper);
    }
}
