找回证券业报送的逻辑,仅支持Excel模板报送
This commit is contained in:
@@ -5,7 +5,7 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Common
|
||||
{
|
||||
class Sac_TranslateHelper
|
||||
{
|
||||
private static SacMap Map = null;
|
||||
private static SacMap? Map = null;
|
||||
|
||||
private static List<SacMap> GetSacInfo(PropertyInfo[] properties)
|
||||
{
|
||||
@@ -71,6 +71,44 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Common
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
public static string TranslateFieldName(string fieldName, string fileType = "")
|
||||
{
|
||||
if (Map == null)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
SacMap map = Map;
|
||||
return getFieldName_CN(map, fieldName, fileType);
|
||||
}
|
||||
private static string getFieldName_CN(SacMap map, string fieldName, string fileType = "")
|
||||
{
|
||||
if (map.FieldName == fieldName)
|
||||
{
|
||||
return map.FieldName_CN;
|
||||
}
|
||||
|
||||
if (map.SubMaps.Count > 0)
|
||||
{
|
||||
foreach (var m in map.SubMaps)
|
||||
{
|
||||
if (map.FieldName == "Body")
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(fileType) && m.FieldName != fileType)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
var ret = getFieldName_CN(m, fieldName, fileType);
|
||||
if (!string.IsNullOrWhiteSpace(ret))
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -197,9 +235,9 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Common
|
||||
FieldLength = info.FieldLength;
|
||||
FieldDescription = info.FieldDescription;
|
||||
Required = info.Required;
|
||||
if (SubMaps != null)
|
||||
if (this.SubMaps != null && this.SubMaps.Count > 0)
|
||||
{
|
||||
SubMaps.ForEach(O =>
|
||||
SubMaps?.ForEach(O =>
|
||||
{
|
||||
if (O == null)
|
||||
{
|
||||
@@ -210,4 +248,12 @@ namespace YLErp.Modules.SuperviseReportModule.SAC.Common
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ExceptionExtensionInfo
|
||||
{
|
||||
public List<SacInfo> Tag { get; set; }
|
||||
|
||||
public string ErrFilePath { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user