package com.ruoyi.operations.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.operations.mapper.CPatentOperationsMapper;
import com.ruoyi.operations.domain.CPatentOperations;
import com.ruoyi.operations.service.ICPatentOperationsService;

/**
 * 中国专利运营Service业务层处理
 *
 * @author ruoyi
 * @date 2023-04-28
 */
@Service
public class CPatentOperationsServiceImpl extends ServiceImpl<CPatentOperationsMapper, CPatentOperations> implements ICPatentOperationsService {

    /**
     * 查询中国专利运营列表
     *
     * @param cPatentOperations 中国专利运营
     * @return 中国专利运营集合
     * @date 2023-04-28
     */
    @Override
    public List<CPatentOperations> queryList(CPatentOperations cPatentOperations) {
        QueryWrapper<CPatentOperations> queryWrapper = Wrappers.query();
                if ( StringUtils.isNotEmpty(cPatentOperations.getAppNumber())  ){
                    queryWrapper.eq("app_number", cPatentOperations.getAppNumber());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getAppDate())){
                    queryWrapper.eq("app_date", cPatentOperations.getAppDate());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getAppYear())){
                    queryWrapper.eq("app_year", cPatentOperations.getAppYear());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getPatentType())){
                    queryWrapper.eq("patent_type", cPatentOperations.getPatentType());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getLegalPubDate())  ){
                    queryWrapper.eq("legal_pub_date", cPatentOperations.getLegalPubDate());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getLegalPubYear())  ){
                    queryWrapper.eq("legal_pub_year", cPatentOperations.getLegalPubYear());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getLegalCode())  ){
                    queryWrapper.eq("legal_code", cPatentOperations.getLegalCode());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getLegalInfo())  ){
                    queryWrapper.eq("legal_info", cPatentOperations.getLegalInfo());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getLegalDetail())  ){
                    queryWrapper.eq("legal_detail", cPatentOperations.getLegalDetail());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getOperType())){
                    queryWrapper.eq("oper_type", cPatentOperations.getOperType());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getEventDate())  ){
                    queryWrapper.eq("event_date", cPatentOperations.getEventDate());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getEffectiveDate())  ){
                    queryWrapper.eq("effective_date", cPatentOperations.getEffectiveDate());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getChangeDate())  ){
                    queryWrapper.eq("change_date", cPatentOperations.getChangeDate());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getExemptionDate())  ){
                    queryWrapper.eq("exemption_date", cPatentOperations.getExemptionDate());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCowners())  ){
                    queryWrapper.eq("cowners", cPatentOperations.getCowners());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCownersType())  ){
                    queryWrapper.eq("cowners_type", cPatentOperations.getCownersType());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCownersAddress())  ){
                    queryWrapper.eq("cowners_address", cPatentOperations.getCownersAddress());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCownersAreacode())  ){
                    queryWrapper.eq("cowners_areacode", cPatentOperations.getCownersAreacode());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCownersCountry())  ){
                    queryWrapper.eq("cowners_country", cPatentOperations.getCownersCountry());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCownersProvince())  ){
                    queryWrapper.eq("cowners_province", cPatentOperations.getCownersProvince());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCownersCity())  ){
                    queryWrapper.eq("cowners_city", cPatentOperations.getCownersCity());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCownersCounty())  ){
                    queryWrapper.eq("cowners_county", cPatentOperations.getCownersCounty());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgees())  ){
                    queryWrapper.eq("cpledgees", cPatentOperations.getCpledgees());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgeesType())  ){
                    queryWrapper.eq("cpledgees_type", cPatentOperations.getCpledgeesType());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgeesAddress())  ){
                    queryWrapper.eq("cpledgees_address", cPatentOperations.getCpledgeesAddress());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgeesAreacode())  ){
                    queryWrapper.eq("cpledgees_areacode", cPatentOperations.getCpledgeesAreacode());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgeesCountry())  ){
                    queryWrapper.eq("cpledgees_country", cPatentOperations.getCpledgeesCountry());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgeesProvince())  ){
                    queryWrapper.eq("cpledgees_province", cPatentOperations.getCpledgeesProvince());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgeesCity())  ){
                    queryWrapper.eq("cpledgees_city", cPatentOperations.getCpledgeesCity());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getCpledgeesCounty())  ){
                    queryWrapper.eq("cpledgees_county", cPatentOperations.getCpledgeesCounty());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getAssignmentType())){
                    queryWrapper.eq("assignment_type", cPatentOperations.getAssignmentType());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getAssignmentKind())){
                    queryWrapper.eq("assignment_kind", cPatentOperations.getAssignmentKind());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getPledgeType())){
                    queryWrapper.eq("pledge_type", cPatentOperations.getPledgeType());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getPledgeStatus())){
                    queryWrapper.eq("pledge_status", cPatentOperations.getPledgeStatus());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getPledgeNum())  ){
                    queryWrapper.eq("pledge_num", cPatentOperations.getPledgeNum());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getLicenseeKind())){
                    queryWrapper.eq("licensee_kind", cPatentOperations.getLicenseeKind());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getLicenseeStatus())){
                    queryWrapper.eq("licensee_status", cPatentOperations.getLicenseeStatus());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getLicenseeNum())){
                    queryWrapper.eq("licensee_num", cPatentOperations.getLicenseeNum());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getLicenseeDeadline())  ){
                    queryWrapper.eq("licensee_deadline", cPatentOperations.getLicenseeDeadline());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferor())  ){
                    queryWrapper.eq("transferor", cPatentOperations.getTransferor());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferorType())  ){
                    queryWrapper.eq("transferor_type", cPatentOperations.getTransferorType());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferorAddress())  ){
                    queryWrapper.eq("transferor_address", cPatentOperations.getTransferorAddress());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferorAreacode())  ){
                    queryWrapper.eq("transferor_areacode", cPatentOperations.getTransferorAreacode());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferorCountry())  ){
                    queryWrapper.eq("transferor_country", cPatentOperations.getTransferorCountry());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferorProvince())  ){
                    queryWrapper.eq("transferor_province", cPatentOperations.getTransferorProvince());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferorCity())  ){
                    queryWrapper.eq("transferor_city", cPatentOperations.getTransferorCity());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTransferorCounty())  ){
                    queryWrapper.eq("transferor_county", cPatentOperations.getTransferorCounty());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssignee())  ){
                    queryWrapper.eq("assignee", cPatentOperations.getAssignee());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssigneeType())  ){
                    queryWrapper.eq("assignee_type", cPatentOperations.getAssigneeType());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssigneeAddress())  ){
                    queryWrapper.eq("assignee_address", cPatentOperations.getAssigneeAddress());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssigneeAreacode())  ){
                    queryWrapper.eq("assignee_areacode", cPatentOperations.getAssigneeAreacode());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssigneeCountry())  ){
                    queryWrapper.eq("assignee_country", cPatentOperations.getAssigneeCountry());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssigneeProvince())  ){
                    queryWrapper.eq("assignee_province", cPatentOperations.getAssigneeProvince());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssigneeCity())  ){
                    queryWrapper.eq("assignee_city", cPatentOperations.getAssigneeCity());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getAssigneeCounty())  ){
                    queryWrapper.eq("assignee_county", cPatentOperations.getAssigneeCounty());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getModifyTranProvince())  ){
                    queryWrapper.eq("modify_tran_province", cPatentOperations.getModifyTranProvince());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getModifyTranCity())  ){
                    queryWrapper.eq("modify_tran_city", cPatentOperations.getModifyTranCity());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getModifyTranCounty())  ){
                    queryWrapper.eq("modify_tran_county", cPatentOperations.getModifyTranCounty());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getModifyAssProvince())  ){
                    queryWrapper.eq("modify_ass_province", cPatentOperations.getModifyAssProvince());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getModifyAssCity())  ){
                    queryWrapper.eq("modify_ass_city", cPatentOperations.getModifyAssCity());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getModifyAssCounty())  ){
                    queryWrapper.eq("modify_ass_county", cPatentOperations.getModifyAssCounty());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getIndustry())  ){
                    queryWrapper.eq("industry", cPatentOperations.getIndustry());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getPark())  ){
                    queryWrapper.eq("park", cPatentOperations.getPark());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getIsDel())){
                    queryWrapper.eq("is_del", cPatentOperations.getIsDel());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTimeUpdate())  ){
                    queryWrapper.eq("time_update", cPatentOperations.getTimeUpdate());
                }
                if ( StringUtils.isNotEmpty(cPatentOperations.getTimeCreate())  ){
                    queryWrapper.eq("time_create", cPatentOperations.getTimeCreate());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getStatus())){
                    queryWrapper.eq("status", cPatentOperations.getStatus());
                }
                if (  StringUtils.isNotNull(cPatentOperations.getSysFileId())){
                    queryWrapper.eq("sys_file_id", cPatentOperations.getSysFileId());
                }
        queryWrapper.orderByDesc("id");
        return this.list(queryWrapper);
    }
}
