using GenerateCode_WeiBen_WMS.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GenerateCode_GEBrilliantFactory
{
///
/// 生成查询实体类
///
public class EntityModeQueryDrawer_Generate : BaseGenerate
{
public static string CreateText(GenerateCodeParam param)
{
var str = TextHelper.ReadText(@"Templete\Web\Controllers\EntityModeQueryDrawer模板.txt");
CommonReplace(ref str);
CommonHelper.CommonReplaceStr(param, ref str);
//替换新增form列表属性
string attrString = "";
List newColumnNameList = ListHelper.RemoveForPageTableListQueryAttributes(param.ColumnNameList);
attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributes_Query(newColumnNameList, param);
str = str.Replace("$PageAddFormAttributes_Query$", attrString);
attrString = "";
attrString += StructStrHelper.GetVueFormOptionsStrForSave_PageAddFormAttributes_Query(newColumnNameList, param);
str = str.Replace("$Save_PageAddFormAttributes_Query$", attrString);
attrString = "";
attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributes_Query_Clear(newColumnNameList, param);
str = str.Replace("$Save_PageAddFormAttributes_Query_Clear$", attrString);
//高级查询过滤优化了,不再用这种方式了
//attrString = "";
//attrString += StructStrHelper.GetVueFormOptionsStrForPageAddFormAttributes_Query_Clear_HighSelect(newColumnNameList, param);
//str = str.Replace("$Save_PageAddFormAttributes_Query_Clear_HighSelect$", attrString);
attrString = "";
attrString += StructStrHelper.GetVueFormOptionsStrForCommonQueryEnumForFrom(param.ColumnNameList, param);
str = str.Replace("$CommonQueryEnumForFrom$", attrString);
return str;
}
}
}