zs
2025-05-20 b5b206551db9d0b3089b3e76732d25ea6219a5f3
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
 
 
using GenerateCode_WeiBen_WMS.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace GenerateCode_GEBrilliantFactory
{
    /// <summary>
    /// 生成查询实体类
    /// </summary>
    public class EntityModeDrawer_Generate : BaseGenerate
    {
        public static string CreateText(GenerateCodeParam param)
        {
            var str = TextHelper.ReadText(@"Templete\Web\Controllers\EntityModeDrawer模板.txt");
            CommonReplace(ref str);
 
            CommonHelper.CommonReplaceStr(param, ref str);
 
            //替换新增form列表属性
            string attrString = "";
            List<ColumnModel> newColumnNameList = ListHelper.RemoveAttrForUpdateMode(param.ColumnNameList);
            attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributes_formItems(newColumnNameList, param);
            str = str.Replace("$PageAddFormAttributes_formItems$", attrString);
 
            //优化了代码,这地方不用了
            //attrString = "";
            //attrString += StructStrHelper.GetVueFormOptionsStrForSave_PageAddFormAttributes(newColumnNameList, param);
            //str = str.Replace("$Save_PageAddFormAttributes$", attrString);
 
            attrString = "";
            attrString += StructStrHelper.GetVueFormOptionsStrForCommonQueryEnumForFrom(param.ColumnNameList, param);
            str = str.Replace("$CommonQueryEnumForFrom$", attrString);
 
            //优化了代码,这地方不用了
            //attrString = "";
            //attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributesByOpen(newColumnNameList, param);
            //str = str.Replace("$PageAddFormAttributesByOpen$", attrString);
 
 
 
            return str;
        }
    }
}