zs
2025-05-05 25750ab29ce4e243f4e4e17a796167f3a0f0697b
Weben_CMSרÓôúÂëÉú³ÉÆ÷/Code/Generate/Entity/InputModel_Generate.cs
@@ -1,5 +1,6 @@

using GenerateCode_WeiBen_WMS.Model;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -12,21 +13,17 @@
    /// </summary>
    public class InputModel_Generate : BaseGenerate
    {
        public static string CreateQueryModelLText(string Modulelogo,
            string ChinaComment, List<ColumnModel> columnNameList, string entityName)
        public static string CreateQueryModelLText(GenerateCodeParam param)
        {
            var str = TextHelper.ReadText(@"Templete\Entity\InputModel模板.txt");
            var str = TextHelper.ReadText(@"Templete\Entity\InputQueryModel模板.txt");
            CommonReplace(ref str);
            str = str.Replace("$ChinaComment$", ChinaComment);//中文注释
            str = str.Replace("$EntityName$", entityName);
            str = str.Replace("$Modulelogo$", Modulelogo);//模块简写
            CommonHelper.CommonReplaceStr(param, ref str);
            //处理 åˆ†é¡µæŸ¥è¯¢éƒ¨åˆ†
            string attrString = "";
            List<ColumnModel> newColumnNameList = ListHelper.OnlyRemoveId(columnNameList);
            List<ColumnModel> newColumnNameList = ListHelper.OnlyRemoveId(param.ColumnNameList);
            for (int i = 0; i < newColumnNameList.Count; ++i)
            {
                attrString += StructStrHelper.GenerateAttributeForQueryModel(newColumnNameList[i]);
@@ -36,10 +33,10 @@
            //处理 æ–°å¢žéƒ¨åˆ†
            attrString = "";
            newColumnNameList = ListHelper.RemoveIdCreatorModifier(columnNameList);
            newColumnNameList = ListHelper.RemoveIdCreatorModifier(param.ColumnNameList);
            for (int i = 0; i < newColumnNameList.Count; ++i)
            {
                attrString += StructStrHelper.GenerateAttribute(i,newColumnNameList[i]);
                attrString += StructStrHelper.GenerateAttribute(i, newColumnNameList[i]);
            }
            str = str.Replace("$AddAttributes$", attrString);