schangxiang@126.com
2025-05-11 f12cbfe9cba26c1a0e3abf1fe09a3c9cd9586a81
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
 
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace GenerateCode_GEBrilliantFactory
{
    /// <summary>
    /// 输出参数- 生成查询实体类
    /// </summary>
    public class OutputModel_Generate : BaseGenerate
    {
        public static string CreateQueryModelLText(string Modulelogo,
            string ChinaComment, List<ColumnModel> columnNameList, string entityName)
        {
            var str = TextHelper.ReadText(@"Templete\Entity\OutputModel模板.txt");
            CommonReplace(ref str);
 
            str = str.Replace("$ChinaComment$", ChinaComment);//中文注释
            str = str.Replace("$EntityName$", entityName);
 
            str = str.Replace("$Modulelogo$", Modulelogo);//模块简写
 
            //处理 分页查询返回部分
            string attrString = "";
            List<ColumnModel> newColumnNameList = ListHelper.RemoveCreatedTimeUpdatedTimeCreatedUserIdCreatedUserNameUpdatedUserIdUpdatedUserName(columnNameList);
            for (int i = 0; i < newColumnNameList.Count; ++i)
            {
                attrString += StructStrHelper.GenerateAttribute(i, newColumnNameList[i]);
            }
            str = str.Replace("$QueryOutputAttributes$", attrString);
 
            //处理 导出返回部分
            attrString = "";
            newColumnNameList = ListHelper.RemoveIdCreateIdModifyIdDelFlag(columnNameList);
            for (int i = 0; i < newColumnNameList.Count; ++i)
            {
                attrString += StructStrHelper.GenerateAttribute(i, newColumnNameList[i], true);
            }
            str = str.Replace("$ExportOutputAttributes$", attrString);
 
            return str;
        }
    }
}