| | |
| | |  |
| | | |
| | | using GenerateCode_WeiBen_WMS.Model; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | |
| | | /// </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);//模åç®å |
| | | |
| | | |
| | | //å¤ç å页æ¥è¯¢é¨å |
| | | 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]); |
| | |
| | | |
| | | //å¤ç æ°å¢é¨å |
| | | 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); |
| | | |