• ABP +VUE Elment 通用高级查询(右键菜单)设计+LINQ通用类Expression<Func<TFields, bool>>方法


    ABP +VUE Elment 通用高级查询(右键菜单)设计+LINQ通用类Expression

    1、 目前需要用VUE实现源cs系统报表的右键菜单所有和自定义查询功能。

    1.1 CS端的右键菜单效果如下图

    在这里插入图片描述
    经分析得知, 当用户鼠标选择不同类型的列下拉框中关系操作符不同, 如下所示:
    在这里插入图片描述

    1.2 高级查询根据选择的字段在关系操作符显示不同的关系操作

    1. 时间日期格式类型:

    在这里插入图片描述

    1. 金额数字类型:

    在这里插入图片描述

    1. 字符串类型:

    在这里插入图片描述

    2、vue下实现右键菜单效果

    在这里插入图片描述

    2.1、安装v-contextmenu

    # npm install v-contextmenu --save-dev
    
    • 1

    2.2、简单示例

    // main.js
    
    import contentmenu from 'v-contextmenu'
    import 'v-contextmenu/dist/index.css'
    Vue.use(contentmenu)
    
    • 1
    • 2
    • 3
    • 4
    • 5
     <div ref="box" :class="['box', theme]">
                <v-contextmenu ref="contextmenu" :theme="theme">
                  <v-contextmenu-item @click="selectRecordhandleClick">按选定内容筛选</v-contextmenu-item>
                  <v-contextmenu-item @click="uSelectRecordhandleClick">排除当前选定内容</v-contextmenu-item>
                  <v-contextmenu-item @click="uselectRowhandleClick">排除当前行</v-contextmenu-item>
                  <v-contextmenu-item divider />
                  <v-contextmenu-item @click="showAdvanceForm">自定义筛选条件</v-contextmenu-item>
                  <div class="flag">
                    <span><i class="fa fa-star" /></span>
                  </div>
                </v-contextmenu>
              </div>
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12

    2.3、在表格中右击事件关联

     <el-table
                ref="elTable"
                v-contextmenu:contextmenu
                v-loading="listLoading"
                :data="list"
                border
                fit
                stripe
                highlight-current-row
                :header-cell-style="{background:'#eef1f6',color:'#606266'}"
                @row-contextmenu="rightClick"
                @cell-click="cellclick"
              >
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13

    2.4 右键点击事件实现

     右键点击事件
        rightClick(row, column, event) {
          console.log('000000000000000rightClicky000000');
    
          this.selectForm.captionID = column.property;
          this.selectForm.caption = column.label;
          this.selectForm.currentfildCaption = column.label;
          this.selectForm.fieldNameValue = row[column.property];
          this.selectForm.fieldName = column.property;
          this.selectForm.field_cvoucH_IDValue = row['cvoucH_ID'];
    
          var str = this.selectForm.fieldName;
          if (str.indexOf('NUM') >= 0 || str.indexOf('Rate') >= 0 || str.indexOf('Amount') >= 0 || str.indexOf('Quantity') >= 0) {
            this.selectForm.dataType = 1;
          } else if (str.indexOf('Date') >= 0 || str.indexOf('time') >= 0) {
            this.selectForm.dataType = 2;
          } else {
            this.selectForm.dataType = 0;
          }
          console.log('column.property==' + str + ' this.selectForm.dataType=');
          console.log(this.selectForm.dataType);
          console.log(column.label);
          console.log(column.property);
          console.log(row[column.property]);
          this.setCurrent(row);
        },
    
        setCurrent(row) {
          console.log('高亮' + row);
          this.$refs.elTable.setCurrentRow(row);
        }
    
      }
    
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35

    2.5 加载不同关系表达式和操作符

      <div v-if="searchForm.dataType == '0'"> 字符串类型
      <div v-if="searchForm.dataType == '1'"> 数字、金额类型
      <div v-if="searchForm.dataType == '2'"> 日期类型
       // 查询条件
          queryFilterOptions: {
            fields: [
              { label: '单据号', value: 'cvoucH_ID' },
              { label: '摘要', value: 'cdigest' }
    
            ],
            operators: [
              { label: ' ', value: ' ' },
              { label: '等于', value: 'eq' },
              { label: '不等于', value: 'neq' },
              { label: '包含', value: 'con' },
              { label: '不包含', value: 'ncon' }
    
            ],
            operatorsNUM: [
              { label: ' ', value: ' ' },
              { label: '等于', value: 'eq' },
              { label: '不等于', value: 'neq' },
              { label: '>', value: 'greater' },
              { label: '<', value: 'less' },
              { label: '>=', value: 'greaterEqual' },
              { label: '<=', value: 'lessEqual' }
    
            ],
            operatorsDate: [
              { label: ' ', value: ' ' },
              { label: '等于', value: 'eq' },
              { label: '不等于', value: 'neq' },
              { label: '始于', value: 'greaterEqual' },
              { label: '止于', value: 'lessEqual' }
    
            ],
            logics: [
              { label: '且', value: 'and' },
              { label: '或', value: 'or' }
            ]
          }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41

    2.6 效果图

    在这里插入图片描述

    2.5、 完整的前端代码

    <!-- 独立弹出式的高级查询界面,不建议使用,建议使用折叠条件方式处理复杂条件  -->
    <template>
    
      <el-dialog
        id="hy-three-query"
        v-el-drag-dialog
        v-dialogDrag
        title="高级查询"
        :visible.sync="isVisible"
        :append-to-body="true"
        :before-close="handleClose"
        :close-on-click-modal="false"
      >
        <el-form ref="searchForm" :rules="rules" :model="searchForm" size="small" :inline="true" label-width="50px" label-position="top">
          <el-row :gutter="50" class="el-row">
            <el-form-item :label="reciveData.caption" />
          </el-row>
          <el-row :gutter="50" class="el-row">
            <el-col :span="50">
              <el-form-item prop="relationalOperator1">
                <div v-if="searchForm.dataType == '0'">
                  <el-select v-model="searchForm.relationalOperator1" placeholder="请选择">
                    <!-- this.reciveData.currentfildCaption -->
                    <el-option
                      v-for="item in queryFilterOptions.operators"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>
                <div v-else-if="searchForm.dataType == '1'">
                  <el-select v-model="searchForm.relationalOperator1" placeholder="请选择">
                    <!-- this.reciveData.currentfildCaption -->
                    <el-option
                      v-for="item in queryFilterOptions.operatorsNUM"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>
                <div v-else-if="searchForm.dataType == '2'">
                  <el-select v-model="searchForm.relationalOperator1" placeholder="请选择">
                    <!-- this.reciveData.currentfildCaption -->
                    <el-option
                      v-for="item in queryFilterOptions.operatorsDate"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="50">
              <el-form-item prop="value1">
                <el-input v-model="searchForm.value1" placeholder="请输入内容" style="width: 138px" />
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50" class="el-row">
            <el-col :span="100">
              <el-form-item prop="logicOperator">
                <div class="block">
                  <el-radio v-model="searchForm.logicOperator" label="AND">并且(AND)</el-radio>
                  <el-radio v-model="searchForm.logicOperator" label="OR">或者(OR)</el-radio>
                </div></el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="50" class="el-row">
            <el-col :span="50">
              <el-form-item prop="relationalOperator2">
                <div v-if="searchForm.dataType == '0'">
                  <el-select v-model="searchForm.relationalOperator2" placeholder="请选择">
    
                    <!-- this.reciveData.currentfildCaption -->
                    <el-option
                      v-for="item in queryFilterOptions.operators"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
    
                </div>
                <div v-if="searchForm.dataType == '1'">
                  <el-select v-model="searchForm.relationalOperator2" placeholder="请选择">
    
                    <!-- this.reciveData.currentfildCaption -->
                    <el-option
                      v-for="item in queryFilterOptions.operatorsNUM"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
    
                </div>
                <div v-if="searchForm.dataType == '2'">
                  <el-select v-model="searchForm.relationalOperator2" placeholder="请选择">
                    <!-- this.reciveData.currentfildCaption -->
                    <el-option
                      v-for="item in queryFilterOptions.operatorsDate"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    />
                  </el-select>
                </div>
              </el-form-item>
            </el-col>
            <el-col :span="50">
              <el-form-item prop="value2">
                <el-input v-model="searchForm.value2" placeholder="请输入内容" style="width: 138px" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" size="mini" @click="handleSearch()">查询</el-button>
          <el-button icon="el-icon-refresh" size="mini" @click="resetSeachForm('searchForm')">重置</el-button>
          <el-button size="mini" @click="handleClose()">关闭</el-button>
        </div>
      </el-dialog>
    
    </template>
    
    <script>
    
    import { pickerOptions } from '@/utils/constantOptions.js' // 导入快速时间选择设置
    import { string } from 'clipboard';
    
    export default {
      props: {
        reciveData: {
          type: Object,
          default: () => ({
            caption: [string],
            captionID: [string],
            currentfildCaption: [string], // 用于设置默认选中项,
            dataType: [string]// 过滤条件中的操作的字段的类型
          })
        }
    
      },
      data() {
        return {
          listLoading: true, // 列表加载状态
          searchForm: { // 查询表单
            fieldName: '',
            relationalOperator1: '',
            relationalOperator2: '',
            value1: '',
            value2: '',
            logicOperator: 'AND',
            dataType: ''// 过滤条件中的操作的字段的类型
          },
    
          isVisible: false,
    
          pickerOptions: pickerOptions,	 // 日期快速选择项目
          radio: '1',
          value1: '',
          value2: '',
          userinput1: '',
          userinput2: '',
          rules: {// 数据校验规则
            value1: [
              { required: true, message: '不能为空', trigger: 'blur' }
            ],
            relationalOperator1: [
              { required: true, message: '关系不能为空', trigger: 'blur' }
            ]
          },
    
          // 查询条件
          queryFilterOptions: {
            fields: [
              { label: '单据号', value: 'cvoucH_ID' },
              { label: '摘要', value: 'cdigest' }
    
            ],
            operators: [
              { label: ' ', value: ' ' },
              { label: '等于', value: 'eq' },
              { label: '不等于', value: 'neq' },
              { label: '包含', value: 'con' },
              { label: '不包含', value: 'ncon' }
    
            ],
            operatorsNUM: [
              { label: ' ', value: ' ' },
              { label: '等于', value: 'eq' },
              { label: '不等于', value: 'neq' },
              { label: '>', value: 'greater' },
              { label: '<', value: 'less' },
              { label: '>=', value: 'greaterEqual' },
              { label: '<=', value: 'lessEqual' }
    
            ],
            operatorsDate: [
              { label: ' ', value: ' ' },
              { label: '等于', value: 'eq' },
              { label: '不等于', value: 'neq' },
              { label: '始于', value: 'greaterEqual' },
              { label: '止于', value: 'lessEqual' }
    
            ],
            logics: [
              { label: '且', value: 'and' },
              { label: '或', value: 'or' }
            ]
          }
    
        }
      },
      watch: { // 监听
        isVisible(newValue, oldValue) {
          this.isVisible = newValue;
        }
      },
      created() { // 页面加载后,加载树列表+列表数据
      },
    
      methods: {
        show() { /* 打开对话框 */
          this.isVisible = true
          console.log('打开对话框@@')
          console.log(this.reciveData);
          console.log(this.reciveData);
          this.currentfildCaption = this.reciveData.caption;
          this.searchForm.fieldName = this.reciveData.captionID;
          this.searchForm.dataType = this.reciveData.dataType;
          console.log('打开对话框' + this.reciveData.currentfildCaption);
          console.log('打开对话框' + this.reciveData.dataType);
        },
        handleClose() { // 关闭页面
          this.isVisible = false;
          this.$emit('close')
        },
        async handleSearch() { // 表单提交
          this.$refs['searchForm'].validate(valid => {
            if (valid) {
              this.isVisible = false;
              console.log(this.searchForm);
              this.$emit('search', this.searchForm);
            }
          })
        },
    
        resetSeachForm(formName) { // 重置查询条件处理
          this.$refs[formName].resetFields();
          console.log(this.$refs[formName]);
        }
      }
    }
    </script>
    
    <!--界面样式 -->
    <style>
    .ele-upload-file-uploader {
      margin-bottom: 5px;
    }
      .el-tag + .el-tag {
        margin-left: 10px;margin-bottom: 10px;
      }
    input[disabled],input:disabled,input.disabled{
        color: #333;
        -webkit-text-fill-color:#333;
        -webkit-opacity:1;
        opacity: 1;
    }
    textarea[disabled],textarea:disabled,textarea.disabled{
        color: #333;
        -webkit-text-fill-color:#333;
        -webkit-opacity:1;
        opacity: 1;
    }
    .border-radius{
      border-radius:4px 4px 0 0;border:1px solid hsla(0,0%,100%,.6);box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
    }
    
    .el-dialog{
      margin:0!important;
      display:flex;
      flex-direction:column;
    
    }
    .el-dialog__body{
      transform: translate3d(0,0,0);
      overflow:auto;
    }
    .el-dialog__header {
      padding: 20px 20px 20px 20px!important;
      border-bottom: 1px solid #f4f4f4;
    }
    .el-dialog__footer {
      text-align: center!important;
      padding: 12px 20px 12px 20px!important;
      border-top: 1px solid #f4f4f4;
    }
    .el-dialog__headerbtn {
      position: absolute;
      top: 20px;
      right: 20px;
      padding: 0;
      background: 0 0;
      border: none;
      outline: 0;
      cursor: pointer;
      font-size: 24px!important;
    }
    .el-dialog__wrapper {
      display:flex;
      justify-content: center;
      align-items:center;
    }
    .dialog-footer{
      float: right;
    }
    </style>
    
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324

    3、API实现

    3.1、 要点概述

    • 因为需要做出一个通用查询功能,用户选择任意一张报表只要把报表信息给到你就能实现上述查询功能。
    • 还有一点就是我们使用linq表达式查询, 主要就是获取条件表达式,故使用泛型,然后通过反射取获取用户选择的查询列,然后去构造Expression表达式。
     Expression<Func<TFields, bool>> GetAdvanceQueryCondition<TFields, TParaInput>(TFields tableFields, TParaInput paraInput)
    
    • 1
    • 专门设计一个方法取将传入的参数结构化到一个字典中
     Dictionary<string, object> GetInputPara<TParaInput>(TParaInput paraInput)
    
    • 1
    public Class FilterMode
    {
          /// 
            /// 上下文菜单前三个查询条件选中列对应的字段值
            /// 1-按选定内容筛选
            /// 2-排除当前选定内容
            /// 3-排除当前行
            /// 
            public string fieldNameValue { get; set; }
            public string field_cvoucH_IDValue { get; set; }
    
            //以下是高级查询的信息结构
    
            /// 
            /// 过滤条件中使用的数据列
            /// 
            public string fieldName { get; set; }
            /// 
            /// 过滤条件中的关系操作符:==、!=等
            /// 
            public string relationalOperator1 { get; set; }
            /// 
            /// 过滤条件中的关系操作符:==、!=等
            /// 
            public string relationalOperator2 { get; set; }
            /// 
            /// 过滤条件中的操作的值
            /// 
            public string value1 { get; set; }
            /// 
            /// 过滤条件中的操作的值
            /// 
            public string value2 { get; set; }
            /// 
            /// 过滤条件之间的逻辑关系:AND和OR
            /// 
            public string logicOperator { get; set; }
    
            /// 
            /// 过滤条件中的操作的字段的类型
            /// 0-字符,1-数字,2-日期
            /// 
            public string dataType { get; set; }
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44

    3.2、 完整代码

    • 完整代码如下:
       /// 
        /// 报表通用高级查询(右键菜单)通用类
        /// 遍历对象属性构造查询条件
        /// 1.输入的参数
        /// 2,返回表格的属性信息集合
        /// 
        /// 
        public class ReportAdvanceQueryUtility//
        {
            /// 
            /// 遍历对象属性构造查询条件
            /// 
            /// 表格的属性列
            /// 输入的参数
            /// 表格的属性列对象
            /// 
            public static Expression<Func<TFields, bool>> GetAdvanceQueryCondition<TFields, TParaInput>(TFields tableFields, TParaInput paraInput)
            {
                string[] relationalOperator = new string[2];
                string logicOperator = "";
                Expression<Func<TFields, bool>> linqFilterExpressionLeft = null;   
    
                Dictionary<string, object> dicFieldValue = GetInputPara(paraInput);
    
                Type t = tableFields.GetType();
                PropertyInfo[] PropertyList = t.GetProperties();
                foreach (PropertyInfo item in PropertyList)
                {
                    string name = item.Name;
                    object value = item.GetValue(tableFields, null);
                    string usetSelectedFieldName = dicFieldValue["fieldName"].ToString();
                    if (item.Name == usetSelectedFieldName)
                    {
                        if ("0" == dicFieldValue["dataType"].ToString())//0 - 字符,1 - 数字,2 - 日期
                        {
                            if ("eq" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "=";
                            }
                            else if ("neq" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "!=";
                            }
                            else if ("con" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "%";
                            }
                            else if ("ncon" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "!=";
                            }
                            if (!string.IsNullOrEmpty(dicFieldValue["value2"].ToString()))
                            {
                                if ("eq" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "=";
                                }
                                else if ("neq" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "!=";
                                }
                                else if ("con" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "%";
                                }
                                else if ("ncon" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "!=";
                                }
    
                                logicOperator = dicFieldValue["logicOperator"].ToString();
                                linqFilterExpressionLeft = GetAndLambdaExpression_0<TFields>(new string[] { item.Name, item.Name }, new string[] { dicFieldValue["value1"].ToString(), dicFieldValue["value2"].ToString() }, relationalOperator, logicOperator);
                            }
                            else
                            {
                                linqFilterExpressionLeft = GetAndLambdaExpression_0<TFields>(new string[] { item.Name }, new string[] { dicFieldValue["value1"].ToString() }, relationalOperator, logicOperator);
                            }
                        }
                        else if ("1" == dicFieldValue["dataType"].ToString())//0 - 字符,1 - 数字,2 - 日期
                        {
                            if ("eq" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "=";
                            }
                            else if ("neq" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "!=";
                            }
                            else if ("greater" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = ">";
                            }
                            else if ("less" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "<";
                            }
                            else if ("greaterEqual" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = ">=";
                            }
                            else if ("lessEqual" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "<=";
                            }
                            if (!string.IsNullOrEmpty(dicFieldValue["value2"].ToString()))
                            {
                                logicOperator = dicFieldValue["logicOperator"].ToString();
    
                                if ("eq" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "=";
                                }
                                else if ("neq" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "!=";
                                }
                                else if ("greater" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = ">";
                                }
                                else if ("less" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "<";
                                }
                                else if ("greaterEqual" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = ">=";
                                }
                                else if ("lessEqual" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "<=";
                                }
                                linqFilterExpressionLeft = GetAndLambdaExpression_1<TFields>(new string[] { item.Name, item.Name }, new string[] { dicFieldValue["value1"].ToString(), dicFieldValue["value2"].ToString() }, relationalOperator, logicOperator);
                            }
                            else
                            {
                                linqFilterExpressionLeft = GetAndLambdaExpression_1<TFields>(new string[] { item.Name }, new string[] { dicFieldValue["value1"].ToString() }, relationalOperator, logicOperator);
                            }
                        }
                        else if ("2" == dicFieldValue["dataType"].ToString())//0 - 字符,1 - 数字,2 - 日期
                        {
                            if ("eq" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "=";
                            }
                            else if ("neq" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "!=";
                            }
                            else if ("greater" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = ">";
                            }
                            else if ("less" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "<";
                            }
                            else if ("greaterEqual" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = ">=";
                            }
                            else if ("lessEqual" == dicFieldValue["relationalOperator1"].ToString())
                            {
                                relationalOperator[0] = "<=";
                            }
    
                            if (!string.IsNullOrEmpty(dicFieldValue["value2"].ToString()))
                            {
                                logicOperator = dicFieldValue["logicOperator"].ToString();
    
                                if ("eq" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "=";
                                }
                                else if ("neq" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "!=";
                                }
                                else if ("greater" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = ">";
                                }
                                else if ("less" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "<";
                                }
                                else if ("greaterEqual" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = ">=";
                                }
                                else if ("lessEqual" == dicFieldValue["relationalOperator2"].ToString())
                                {
                                    relationalOperator[1] = "<=";
                                }
                                linqFilterExpressionLeft = GetAndLambdaExpression_2<TFields>(new string[] { item.Name, item.Name }, new string[] { dicFieldValue["value1"].ToString(), dicFieldValue["value2"].ToString() }, relationalOperator, logicOperator);
                            }
                            else
                            {
                                linqFilterExpressionLeft = GetAndLambdaExpression_2<TFields>(new string[] { item.Name }, new string[] { dicFieldValue["value1"].ToString() }, relationalOperator, logicOperator);
                            }
                        }
    
                        break;
                    }
                }
    
    
                return linqFilterExpressionLeft;
            }
    
            /// 
            /// 遍历对象属性构造查询条件适用于上下文菜单的前两项(按选定内容筛选 ==1,排除当前选定内容==2)
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            public static Expression<Func<TFields, bool>> GetAdvanceQueryCondition2<TFields, TParaInput>(TFields tableFields, TParaInput paraInput)
            {
                string[] relationalOperator = new string[2];
                string logicOperator = "";
    
                Expression<Func<TFields, bool>> linqFilterExpression = null;
                Expression<Func<TFields, bool>> linqFilterExpressionLeft = null;
                Expression<Func<TFields, bool>> linqFilterExpressionRight = null;
    
                Dictionary<string, object> dicFieldValue = GetInputPara(paraInput);
    
                Type t = tableFields.GetType();
                PropertyInfo[] PropertyList = t.GetProperties();
                foreach (PropertyInfo item in PropertyList)
                {
                    string name = item.Name;
                    object value = item.GetValue(tableFields, null);
                    string usetSelectedFieldName = dicFieldValue["fieldName"].ToString();
                    if (item.Name == usetSelectedFieldName)
                    {
                        if ("0" == dicFieldValue["dataType"].ToString())//0 - 字符,1 - 数字,2 - 日期
                        {
                            if ("1" == dicFieldValue["QueryTypContextmenu"].ToString())//按选定内容筛选 ==1
                            {
                                relationalOperator[0] = "=";
                            }
                            else if ("2" == dicFieldValue["QueryTypContextmenu"].ToString())//排除当前选定内容 ==2
                            {
                                relationalOperator[0] = "!=";
                            }
                            if (dicFieldValue["fieldNameValue"]==null)
                            {
                                linqFilterExpressionLeft = GetAndLambdaExpression_0<TFields>(new string[] { item.Name }, new string[] {"" }, relationalOperator, logicOperator);
    
                            }
                            else
                                linqFilterExpressionLeft = GetAndLambdaExpression_0<TFields>(new string[] { item.Name }, new string[] { dicFieldValue["fieldNameValue"].ToString()}, relationalOperator, logicOperator);
    
                        }
                        else if ("1" == dicFieldValue["dataType"].ToString())//0 - 字符,1 - 数字,2 - 日期
                        {
                            if ("1" == dicFieldValue["QueryTypContextmenu"].ToString())//按选定内容筛选 ==1
                            {
                                relationalOperator[0] = "=";
                            }
                            else if ("2" == dicFieldValue["QueryTypContextmenu"].ToString())//排除当前选定内容 ==2
                            {
                                relationalOperator[0] = "!=";
                            }
                            linqFilterExpressionLeft = GetAndLambdaExpression_1<TFields>(new string[] { item.Name }, new string[] { dicFieldValue["fieldNameValue"].ToString() }, relationalOperator, logicOperator);
    
                        }
                        else if ("2" == dicFieldValue["dataType"].ToString())//0 - 字符,1 - 数字,2 - 日期
                        {
                            if ("1" == dicFieldValue["QueryTypContextmenu"].ToString())//按选定内容筛选 ==1
                            {
                                relationalOperator[0] = "=";
                            }
                            else if ("2" == dicFieldValue["QueryTypContextmenu"].ToString())//排除当前选定内容 ==2
                            {
                                relationalOperator[0] = "!=";
                            }
                            linqFilterExpressionLeft = GetAndLambdaExpression_2<TFields>(new string[] { item.Name }, new string[] { dicFieldValue["fieldNameValue"].ToString() }, relationalOperator, logicOperator);
    
                        }
    
                        break;
                    }
                }
    
                return linqFilterExpressionLeft;
            }
    
            /// 
            /// 获取输入参数和值
            /// 
            /// 
            /// 
            /// 
            private static Dictionary<string, object> GetInputPara<TParaInput>(TParaInput paraInput)
            {
                Dictionary<string, object> dic = new Dictionary<string, object>();
                Type t = paraInput.GetType();
                PropertyInfo[] PropertyList1 = t.GetProperties();
                foreach (PropertyInfo item in PropertyList1)
                {
                    string name = item.Name;
                    object value = item.GetValue(paraInput, null);
    
                    if (item.PropertyType.IsGenericType && item.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>))
                    {
                        // If it is NULLABLE, then get the underlying type. eg if "Nullable" then this will return just "int"
                        var columnType = item.PropertyType.GetGenericArguments()[0];
                    }
                    else
                    {
                        //前端传过来的查询字段
                        if (item.Name == "fieldName")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "relationalOperator1")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "relationalOperator2")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "logicOperator")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "value1")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "value2")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "dataType")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "QueryTypContextmenu")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "fieldNameValue")
                        {
                            dic.Add(name, value);
    
                        }
                        if (item.Name == "field_cvoucH_IDValue")
                        {
                            dic.Add(name, value);
                        }
                        
                        Console.WriteLine(item.PropertyType.Name);
                    }
                }
    
                return dic;
            }
    
    
            /// 
            ///  0 - 字符条件拼接
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            private static Expression<Func<T, bool>> GetAndLambdaExpression_0<T>(string[] keys, object[] values, string[]? methons,string? logicOperator)
            {
                Expression expression_return = Expression.Constant(true);
                Type TType = typeof(T);
                ParameterExpression expression_param = Expression.Parameter(TType, "p");
                Expression temp;
                for (int i = 0; i < keys.Length; i++)
                {
                    switch (methons[i])
                    {
                        case "=":
                            temp = Expression.Equal(Expression.Call(Expression.Property(expression_param, TType.GetProperty(keys[i])),
                                TType.GetMethod("ToString")),
                             Expression.Constant(values[i]));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else
                            expression_return = Expression.And(expression_return, temp);
                            break;
                        case "!=":
                            temp = Expression.NotEqual(Expression.Call(Expression.Property(expression_param, TType.GetProperty(keys[i])),
                                TType.GetMethod("ToString")),
                             Expression.Constant(values[i]));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else
                                expression_return = Expression.And(expression_return, temp);                   
                            break;
                        case "%":
                            temp = Expression.Call(Expression.Property(expression_param, TType.GetProperty(keys[i])),
                                typeof(string).GetMethod("Contains", new[] { typeof(string) }),
                                Expression.Constant(values[i], typeof(string)));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else
                                expression_return = Expression.And(expression_return, temp);
                            break;
                        case "in":
                            string[] strarr = values[i].ToString().Split(',');
                            Expression or_return = Expression.Constant(false);
                            for (int k = 0; k < strarr.Length; k++)
                            {
                                temp = Expression.Equal(Expression.Call(Expression.Property(expression_param, TType.GetProperty(keys[i])),
                                    TType.GetMethod("ToString")),
                                 Expression.Constant(strarr[k]));
                                or_return = Expression.Or(or_return, temp);
                            }
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, or_return);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, or_return);
                                }
                            }
                            else                           
                            expression_return = Expression.And(expression_return, or_return);
                            break;
                    }            
    
    
                }
    
                return (Expression<Func<T, bool>>)Expression.Lambda<Func<T, bool>>(expression_return, new ParameterExpression[] { expression_param });
            }
            /// 
            /// 1 - 数字(金额 统一设置成decimal)条件拼接
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            private static Expression<Func<T, bool>> GetAndLambdaExpression_1<T>(string[] keys, object[] values, string[] methons,string logicOperator)
            {
                Expression expression_return = Expression.Constant(true);
                Type TType = typeof(T);
                ParameterExpression expression_param = Expression.Parameter(TType, "p");
                Expression temp;
                for (int i = 0; i < keys.Length; i++)
                {
                    switch (methons[i])
                    {
                        case "=":                    
                            temp = Expression.Equal(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDecimal(values[i])));
    
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else expression_return = Expression.And(expression_return, temp);
                            break;
                      
                        case "!=":
                            temp = Expression.NotEqual(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDecimal(values[i])));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else expression_return = Expression.And(expression_return, temp);                   
                            break;
                        case "%":
                            temp = Expression.Call(Expression.Property(expression_param, TType.GetProperty(keys[i])),
                                 typeof(string).GetMethod("Contains", new[] { typeof(string) }),
                                Expression.Constant(values[i], typeof(string)));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else expression_return = Expression.And(expression_return, temp);
                            break;
                        case ">":
                            temp = Expression.GreaterThan(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDecimal(values[i])));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else expression_return = Expression.And(expression_return, temp);
                            break;
                        case "<":
    
                            temp = Expression.LessThan(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDecimal(values[i])));                       
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else expression_return = Expression.And(expression_return, temp);
                            break;
                        case ">=":
    
                            temp = Expression.GreaterThanOrEqual(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDecimal(values[i])));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else expression_return = Expression.And(expression_return, temp);
                            break;
                        case "<=":
    
                            temp = Expression.LessThanOrEqual(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDecimal(values[i])));
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, temp);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, temp);
                                }
                            }
                            else  expression_return = Expression.And(expression_return, temp);
                            break;
                            
                        case "in":
                            string[] strarr = values[i].ToString().Split(',');
                            Expression or_return = Expression.Constant(false);
                            for (int k = 0; k < strarr.Length; k++)
                            {
                                temp = Expression.Equal(Expression.Call(Expression.Property(expression_param, TType.GetProperty(keys[i])),
                                    TType.GetMethod("ToString")),
                                 Expression.Constant(strarr[k]));
                                or_return = Expression.Or(or_return, temp);
                            }
    
                            if (!string.IsNullOrEmpty(logicOperator) && i == 1)
                            {
                                if ("OR" == logicOperator)
                                {
                                    expression_return = Expression.Or(expression_return, or_return);
                                }
                                else if ("AND" == logicOperator)
                                {
                                    expression_return = Expression.Add(expression_return, or_return);
                                }
                            }
                            else expression_return = Expression.And(expression_return, or_return);
                            break;
                    }
                }
    
                return (Expression<Func<T, bool>>)Expression.Lambda<Func<T, bool>>(expression_return, new ParameterExpression[] { expression_param });
            }
    
    
            /// 
            ///  2 - 日期条件拼接
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            /// 
            private static Expression<Func<T, bool>> GetAndLambdaExpression_2<T>(string[] keys, object[] values, string[] methons, string logicOperator)
            {
                Expression expression_return = Expression.Constant(true);
                Type TType = typeof(T);
                ParameterExpression expression_param = Expression.Parameter(TType, "p");
                Expression temp;
                for (int i = 0; i < keys.Length; i++)
                {
                    string dt = values[i].ToString();
                    if (string.IsNullOrEmpty(dt))
                    {
                        values[i] = DateTime.MinValue.ToString();
                    }
    
    
                    switch (methons[i])
                    {
    
                        case "=":
                            temp = Expression.Equal(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDateTime(values[i])));
                            expression_return = Expression.And(expression_return, temp);
                            break;
                        case "!=":
                            temp = Expression.NotEqual(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDateTime(values[i])));
                            expression_return = Expression.And(expression_return, temp);
                            break;
                        case ">=":
                            temp = Expression.GreaterThanOrEqual(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDateTime(values[i])));
                            expression_return = Expression.And(expression_return, temp);
                            break;
                        case "<=":
                            temp = Expression.LessThanOrEqual(Expression.Property(expression_param, TType.GetProperty(keys[i])), Expression.Constant(Convert.ToDateTime(values[i])));
                            expression_return = Expression.And(expression_return, temp);
                            break;
                    }
    
                }
    
                return (Expression<Func<T, bool>>)Expression.Lambda<Func<T, bool>>(expression_return, new ParameterExpression[] { expression_param });
            }
    
    
    
    
    
    
    
    
    
            /// 
            /// 通过Linq表达式获取成员属性
            /// 
            /// 
            /// 
            /// 
            /// 
            public static Tuple<string, string> GetPropertyValue<T>(T instance, Expression<Func<T, string>> expression)
            {
                MemberExpression memberExpression = expression.Body as MemberExpression;
    
                string propertyName = memberExpression.Member.Name;
    
                string attributeName = (memberExpression.Member.GetCustomAttributes(false)[0] as DescriptionAttribute).Description;
    
                var property = typeof(T).GetProperties().Where(l => l.Name == propertyName).First();
    
                return new Tuple<string, string>(attributeName, property.GetValue(instance).ToString());
    
            }
    
            //public static Expression> ContainsExp(string propertyName, string contains)
            //{
    
            //    //first, get the type of your property
            //    var propertyType = typeof(T).GetProperty(propertyName).PropertyType;
            //    //no change
            //    var parameterExp = Expression.Parameter(typeof(T), "type");
            //    Expression propertyExp = Expression.Property(parameterExp, propertyName);
            //    //if property's type is int
            //    if (propertyType == typeof(int))
            //    {
            //        //convert your Expression to a nullable double (or nullable decimal),
            //        //so that you can use SqlFunctions.StringConvert
            //        propertyExp = Expression.Convert(propertyExp, typeof(double?));
            //        //get the SqlFunctions.StringConvert method for nullable double
            //        var stringConvertMethod = typeof(Functions).GetMethod("StringConvert", new[] { typeof(double?) });
            //        //call StringConvert on your converted expression
            //        propertyExp = Expression.Call(stringConvertMethod, propertyExp);
            //    }
            //    //no change
            //    var method = typeof(string).GetMethod("Contains", new[] { typeof(string) });
    
    
            //    var someValue = Expression.Constant(contains, typeof(string));
            //    var containsMethodExp = Expression.Call(propertyExp, method, someValue);
    
            //    return Expression.Lambda>(containsMethodExp, parameterExp);
    
            //}
            public static bool IsSameProperty<TSourceA, TSourceB, TPropertyA, TPropertyB>(
             Expression<Func<TSourceA, TPropertyA>> expA,
             Expression<Func<TSourceB, TPropertyB>> expB)
            {
                MemberExpression memExpA = expA.Body as MemberExpression;
                MemberExpression memExpB = expB.Body as MemberExpression;
    
                if (memExpA == null || memExpB == null)
                    return false;
    
                PropertyInfo propA = memExpA.Member as PropertyInfo;
                PropertyInfo propB = memExpB.Member as PropertyInfo;
    
                if (propA == null || propB == null)
                    return false;
    
                return propA.Equals(propB);
            }
    
    
        }
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341
    • 342
    • 343
    • 344
    • 345
    • 346
    • 347
    • 348
    • 349
    • 350
    • 351
    • 352
    • 353
    • 354
    • 355
    • 356
    • 357
    • 358
    • 359
    • 360
    • 361
    • 362
    • 363
    • 364
    • 365
    • 366
    • 367
    • 368
    • 369
    • 370
    • 371
    • 372
    • 373
    • 374
    • 375
    • 376
    • 377
    • 378
    • 379
    • 380
    • 381
    • 382
    • 383
    • 384
    • 385
    • 386
    • 387
    • 388
    • 389
    • 390
    • 391
    • 392
    • 393
    • 394
    • 395
    • 396
    • 397
    • 398
    • 399
    • 400
    • 401
    • 402
    • 403
    • 404
    • 405
    • 406
    • 407
    • 408
    • 409
    • 410
    • 411
    • 412
    • 413
    • 414
    • 415
    • 416
    • 417
    • 418
    • 419
    • 420
    • 421
    • 422
    • 423
    • 424
    • 425
    • 426
    • 427
    • 428
    • 429
    • 430
    • 431
    • 432
    • 433
    • 434
    • 435
    • 436
    • 437
    • 438
    • 439
    • 440
    • 441
    • 442
    • 443
    • 444
    • 445
    • 446
    • 447
    • 448
    • 449
    • 450
    • 451
    • 452
    • 453
    • 454
    • 455
    • 456
    • 457
    • 458
    • 459
    • 460
    • 461
    • 462
    • 463
    • 464
    • 465
    • 466
    • 467
    • 468
    • 469
    • 470
    • 471
    • 472
    • 473
    • 474
    • 475
    • 476
    • 477
    • 478
    • 479
    • 480
    • 481
    • 482
    • 483
    • 484
    • 485
    • 486
    • 487
    • 488
    • 489
    • 490
    • 491
    • 492
    • 493
    • 494
    • 495
    • 496
    • 497
    • 498
    • 499
    • 500
    • 501
    • 502
    • 503
    • 504
    • 505
    • 506
    • 507
    • 508
    • 509
    • 510
    • 511
    • 512
    • 513
    • 514
    • 515
    • 516
    • 517
    • 518
    • 519
    • 520
    • 521
    • 522
    • 523
    • 524
    • 525
    • 526
    • 527
    • 528
    • 529
    • 530
    • 531
    • 532
    • 533
    • 534
    • 535
    • 536
    • 537
    • 538
    • 539
    • 540
    • 541
    • 542
    • 543
    • 544
    • 545
    • 546
    • 547
    • 548
    • 549
    • 550
    • 551
    • 552
    • 553
    • 554
    • 555
    • 556
    • 557
    • 558
    • 559
    • 560
    • 561
    • 562
    • 563
    • 564
    • 565
    • 566
    • 567
    • 568
    • 569
    • 570
    • 571
    • 572
    • 573
    • 574
    • 575
    • 576
    • 577
    • 578
    • 579
    • 580
    • 581
    • 582
    • 583
    • 584
    • 585
    • 586
    • 587
    • 588
    • 589
    • 590
    • 591
    • 592
    • 593
    • 594
    • 595
    • 596
    • 597
    • 598
    • 599
    • 600
    • 601
    • 602
    • 603
    • 604
    • 605
    • 606
    • 607
    • 608
    • 609
    • 610
    • 611
    • 612
    • 613
    • 614
    • 615
    • 616
    • 617
    • 618
    • 619
    • 620
    • 621
    • 622
    • 623
    • 624
    • 625
    • 626
    • 627
    • 628
    • 629
    • 630
    • 631
    • 632
    • 633
    • 634
    • 635
    • 636
    • 637
    • 638
    • 639
    • 640
    • 641
    • 642
    • 643
    • 644
    • 645
    • 646
    • 647
    • 648
    • 649
    • 650
    • 651
    • 652
    • 653
    • 654
    • 655
    • 656
    • 657
    • 658
    • 659
    • 660
    • 661
    • 662
    • 663
    • 664
    • 665
    • 666
    • 667
    • 668
    • 669
    • 670
    • 671
    • 672
    • 673
    • 674
    • 675
    • 676
    • 677
    • 678
    • 679
    • 680
    • 681
    • 682
    • 683
    • 684
    • 685
    • 686
    • 687
    • 688
    • 689
    • 690
    • 691
    • 692
    • 693
    • 694
    • 695
    • 696
    • 697
    • 698
    • 699
    • 700
    • 701
    • 702
    • 703
    • 704
    • 705
    • 706
    • 707
    • 708
    • 709
    • 710
    • 711
    • 712
    • 713
    • 714
    • 715
    • 716
    • 717
    • 718
    • 719
    • 720
    • 721
    • 722
    • 723
    • 724
    • 725
    • 726
    • 727
    • 728
    • 729
    • 730
    • 731
    • 732
    • 733
    • 734
    • 735
    • 736
    • 737
    • 738
    • 739
    • 740
    • 741
    • 742
    • 743
    • 744
    • 745
    • 746
    • 747
    • 748
    • 749
    • 750
    • 751
    • 752
    • 753
    • 754
    • 755
    • 756
    • 757
    • 758
    • 759
    • 760
    • 761
    • 762
    • 763
    • 764
    • 765
    • 766
    • 767
    • 768
    • 769
    • 770
  • 相关阅读:
    RS232通讯转485通讯接线心得
    轻松玩转树莓派Pico之三、Windows+Ubuntu虚拟机模式下VSCode C语言开发环境搭建
    MacOS Anaconda 安装教程及虚拟环境创建
    Linux C/C++下抓包分析mysql流量(协议解析)
    学习笔记:吴恩达ChatGPT提示工程
    LIRA: Learnable, Imperceptible and Robust Backdoor Attacks 论文笔记
    排队返利模式:开启消费者与商家的共赢新篇章
    C. Array Elimination-- Codeforces Round #751 (Div. 2)
    Day56——视图层,模板层
    【大咖说Ⅱ】中科院信工所研究员林政:大规模预训练语言模型压缩技术
  • 原文地址:https://blog.csdn.net/kalvin_y_liu/article/details/126268369