|
|
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;
|
}
|
}
|
}
|