|
|
@@ -1914,35 +1914,43 @@ namespace Dongke.IBOSS.PRD.Service.SAPHegiiDataService
|
|
|
// 登录
|
|
|
UserNamePasswordClientCredential credential =
|
|
|
sapClient.ClientCredentials.UserName;
|
|
|
- //credential.UserName = "hgsapdk";
|
|
|
- //credential.Password = "Sapdk#240";
|
|
|
- INIUtility ini = INIUtility.Instance(INIUtility.IniFile.SAP_HEGII);
|
|
|
- credential.UserName = ini.ReadIniData("SAP_HEGII", "UserName");
|
|
|
- credential.Password = ini.ReadIniData("SAP_HEGII", "Password");
|
|
|
- // 参数
|
|
|
- sapParameter.ZSUMSpecified = true;
|
|
|
+ //credential.UserName = "hgsapdk";
|
|
|
+ //credential.Password = "Sapdk#240";
|
|
|
+ INIUtility ini = INIUtility.Instance(INIUtility.IniFile.SAP_HEGII);
|
|
|
+ credential.UserName = ini.ReadIniData("SAP_HEGII", "UserName");
|
|
|
+ credential.Password = ini.ReadIniData("SAP_HEGII", "Password");
|
|
|
+ // 参数
|
|
|
+ sapParameter.ZSUMSpecified = true;
|
|
|
sapParameter.TABLE_OUT = new ZSPP100[0];
|
|
|
// 接口
|
|
|
sapResult = sapClient.ZPPFM008(sapParameter);
|
|
|
|
|
|
- if (sapResult.ZTYPE == "S")
|
|
|
- {
|
|
|
- // 结果
|
|
|
- OutputLog.TraceLog(LogPriority.Information,
|
|
|
- "HGSAPDK_ZPPFM008",
|
|
|
- "yyyymmdd:" + yyyymmdd + " datacode:" + datacode + " Zsum:" + sapParameter.ZSUM,
|
|
|
- " Ztype:" + sapResult.ZTYPE + " Zmsg:" + sapResult.ZMSG,
|
|
|
- LocalPath.LogExePath + "SAP_HEGII\\Info_");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- // 结果
|
|
|
- OutputLog.TraceLog(LogPriority.Information,
|
|
|
- "HGSAPDK_ZPPFM008",
|
|
|
- "yyyymmdd:" + yyyymmdd + " datacode:" + datacode + " Zsum:" + sapParameter.ZSUM + " Ztype:" + sapResult.ZTYPE + " Zmsg:" + sapResult.ZMSG,
|
|
|
- JsonHelper.ToJson(sapResult),
|
|
|
- LocalPath.LogExePath + "SAP_HEGII\\Error_");
|
|
|
- }
|
|
|
+ if (sapResult.ZTYPE == "S")
|
|
|
+ {
|
|
|
+ // 结果
|
|
|
+ OutputLog.TraceLog(LogPriority.Information,
|
|
|
+ "HGSAPDK_ZPPFM008",
|
|
|
+ "yyyymmdd:" + yyyymmdd + " datacode:" + datacode + " Zsum:" + sapParameter.ZSUM,
|
|
|
+ " Ztype:" + sapResult.ZTYPE + " Zmsg:" + sapResult.ZMSG,
|
|
|
+ LocalPath.LogExePath + "SAP_HEGII\\Info_");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ foreach (ZSPP100 item in sapResult.TABLE_OUT)
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrWhiteSpace(item.ZMSG))
|
|
|
+ {
|
|
|
+ sapResult.ZMSG += $"[{item.ZMSG}]";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 结果
|
|
|
+ OutputLog.TraceLog(LogPriority.Information,
|
|
|
+ "HGSAPDK_ZPPFM008",
|
|
|
+ "yyyymmdd:" + yyyymmdd + " datacode:" + datacode + " Zsum:" + sapParameter.ZSUM + " Ztype:" + sapResult.ZTYPE + " Zmsg:" + sapResult.ZMSG,
|
|
|
+ JsonHelper.ToJson(sapResult),
|
|
|
+ LocalPath.LogExePath + "SAP_HEGII\\Error_");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
@@ -2002,6 +2010,15 @@ namespace Dongke.IBOSS.PRD.Service.SAPHegiiDataService
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ foreach (ZSPP110 item in sapResult.TABLE_OUT)
|
|
|
+ {
|
|
|
+ if (!string.IsNullOrWhiteSpace(item.ZMSG))
|
|
|
+ {
|
|
|
+ sapResult.ZMSG += $"[{item.ZMSG}]";
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 结果
|
|
|
OutputLog.TraceLog(LogPriority.Information,
|
|
|
"HGSAPDK_ZPPFM010",
|