¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | |
| | | using GenerateCode_WeiBen_WMS.Model; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Linq; |
| | | using System.Text; |
| | | |
| | | namespace GenerateCode_GEBrilliantFactory |
| | | { |
| | | /// <summary> |
| | | /// çææ¥è¯¢å®ä½ç±» |
| | | /// </summary> |
| | | public class ImportModel_Generate : BaseGenerate |
| | | { |
| | | public static string CreateText(GenerateCodeParam param) |
| | | { |
| | | var str = TextHelper.ReadText(@"Templete\Entity\ImportModel模æ¿.txt"); |
| | | CommonReplace(ref str); |
| | | |
| | | CommonHelper.CommonReplaceStr(param, ref str); |
| | | |
| | | |
| | | return str; |
| | | } |
| | | } |
| | | } |
| | |
| | | <Compile Include="Generate\BaseGenerate.cs" /> |
| | | <Compile Include="Generate\Controller\Controller_Generate.cs" /> |
| | | <Compile Include="Generate\Entity\AddModel_Generate.cs" /> |
| | | <Compile Include="Generate\Entity\ImportModel_Generate.cs" /> |
| | | <Compile Include="Generate\Entity\ExportModel_Generate.cs" /> |
| | | <Compile Include="Generate\Entity\Dto_Generate.cs" /> |
| | | <Compile Include="Generate\Entity\UpdateDto_Generate.cs" /> |
| | |
| | | <Content Include="Templete\Entity\AddModel模æ¿.txt"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | | <Content Include="Templete\Entity\ImportModel模æ¿.txt"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | | <Content Include="Templete\Entity\ExportModel模æ¿.txt"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | |
| | | <Content Include="Templete\InitSQL模æ¿.txt"> |
| | | <CopyToOutputDirectory>Always</CopyToOutputDirectory> |
| | | </Content> |
| | | <Content Include="常ç¨.txt" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Folder Include="Generate\AppService\" /> |
| | |
| | | str_generate = ExportModel_Generate.CreateText(param); |
| | | tf = TextHelper.Export2File_V2(entityFilePath, $"{param.EntityName}ExportModel.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); |
| | | |
| | | //7ãçæ Import æä»¶ |
| | | str_generate = ImportModel_Generate.CreateText(param); |
| | | tf = TextHelper.Export2File_V2(entityFilePath, $"{param.EntityName}sImportModel.cs", tableName, str_generate, FileType.InputModel, filePrefixName, entityName, modulelogo); |
| | | |
| | | #endregion |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | namespace CMS.Plugin.$NameSpacePath$.Application.Contracts.Dtos.$EntityName$ |
| | | { |
| | | /// <summary> |
| | | /// $ChinaComment$导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class $EntityName$sImportModel |
| | | { |
| | | private List<$EntityName$ImportModel> _$EntityName$s = new(); |
| | | |
| | | public List<$EntityName$ImportModel> $EntityName$s |
| | | { |
| | | get => _$EntityName$s; |
| | | set |
| | | { |
| | | _$EntityName$s = value; |
| | | var rowIndex = 2; |
| | | _$EntityName$s?.ForEach(x => x.RowIndex = rowIndex++); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// $ChinaComment$导å
¥æ¨¡å |
| | | /// </summary> |
| | | public class $EntityName$ImportModel : MaterialExportModel |
| | | { |
| | | /// <summary> |
| | | /// è¡å· |
| | | /// </summary> |
| | | public int RowIndex { get; set; } |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | |  |
| | | $ChinaComment$ |
| | | |
| | | $EntityName$ |
| | | |
| | | $NameSpacePath$ |