using GenerateCode_WeiBen_WMS.Model; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace GenerateCode_GEBrilliantFactory { /// /// 生成查询实体类 /// 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 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; } } }