a
This commit is contained in:
@@ -23,20 +23,22 @@ namespace EastChanger
|
||||
protected readonly string _appKey;
|
||||
protected readonly string _appKeySecret;
|
||||
protected readonly string _moduleCnName;
|
||||
protected readonly string _moduleName;
|
||||
|
||||
public BaseService(Context context, string apiName, string moduleCnName = "海关信息同步")
|
||||
public BaseService(Context context, int apiNoId)
|
||||
{
|
||||
_context = context;
|
||||
var sql = "SELECT * FROM V_CUSTOMS_API_REQUEST_PARAMETE ";
|
||||
var sql = $"SELECT * FROM V_CUSTOMS_API_REQUEST_PARAMETE WHERE Id = {apiNoId}";
|
||||
var data = DBUtils.ExecuteDynamicObject(context, $"/*dialect*/{sql}");
|
||||
var info = data[0];
|
||||
|
||||
_moduleCnName = info["ModuleCnName"].ToString();
|
||||
_moduleName = info["ModuleName"].ToString();
|
||||
_apiVersion = info["apiVersion"].ToString();
|
||||
_apiName = info["apiName"].ToString();
|
||||
_apiUrl = info["appUrl"].ToString();
|
||||
_appKey = info["appKey"].ToString();
|
||||
_appKeySecret = info["appKeySecret"].ToString();
|
||||
_apiName = apiName;
|
||||
_apiVersion = "";
|
||||
_moduleCnName = moduleCnName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -70,7 +72,7 @@ namespace EastChanger
|
||||
/// 根据账册分类后设置申报信息表头
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected Dictionary<string, Dictionary<string, object>> GetDeclInfos()
|
||||
protected virtual Dictionary<string, Dictionary<string, object>> GetDeclInfos()
|
||||
{
|
||||
var newDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
@@ -111,7 +113,7 @@ namespace EastChanger
|
||||
{
|
||||
opResult.OperateResult.Add(new OperateResult
|
||||
{
|
||||
Name = "同步编号:" + itemNo,
|
||||
Name = itemNo,
|
||||
Message = msg,
|
||||
SuccessStatus = IsSuccessStatus
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user