|
|
|
@ -56,6 +56,37 @@ namespace djy.Service.Isf
|
|
|
|
|
result.data = list;
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取计费规则
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="bstype">业务类型</param>
|
|
|
|
|
/// <param name="user">登录人信息</param>
|
|
|
|
|
/// <returns>计费规则</returns>
|
|
|
|
|
public async Task<Response<CustPriceDto>> GetPrice(string bstype, User user)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
if (!int.TryParse(bstype, out int _bstype))
|
|
|
|
|
{
|
|
|
|
|
return CreateResponse<CustPriceDto>(400, "参数[bstype:业务类型]为空或格式错误");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CustPrice custPrice = await DbBus.Get(DbList.djydb).Select<CustPrice>().Where(w => w.BSTYPE == _bstype && w.SENDTYPE == 0 && w.COMNAME == user.COMNAME).ToOneAsync();
|
|
|
|
|
if (custPrice == null)
|
|
|
|
|
{
|
|
|
|
|
return CreateResponse<CustPriceDto>(201, "没有找到此业务的计费规则");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CustPriceDto custPriceDto = custPrice.MapTo<CustPriceDto>();
|
|
|
|
|
return new Response<CustPriceDto>() { Code = 200, Message = "查询成功", Result = custPriceDto };
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
_LogsAdd("GetPrice", "post", $"ISF_GetPrice接口:{ex.Message}");
|
|
|
|
|
return CreateResponse<CustPriceDto>(500, ex.Message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 新增编辑
|
|
|
|
@ -280,7 +311,7 @@ namespace djy.Service.Isf
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 第三方接口
|
|
|
|
|
|
|
|
|
|
/// <param name="msgType">类型(1.原始 2.修改 3.删除 4.重发)</param>
|
|
|
|
|
public async Task<Response> SendDE(string Gid, User user, string msgType)
|
|
|
|
|
{
|
|
|
|
|
Response req = new Response();
|
|
|
|
@ -368,7 +399,7 @@ namespace djy.Service.Isf
|
|
|
|
|
provinceCode = item.ProvinceCode,
|
|
|
|
|
countryCode = item.CountryCode,
|
|
|
|
|
postcode = item.PostCode,
|
|
|
|
|
hstCode = item.CompanyType!="MF"?item.HstCode: master.HstCode,
|
|
|
|
|
hstCode = item.CompanyType != "MF" ? item.HstCode : master.HstCode,
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -466,7 +497,7 @@ namespace djy.Service.Isf
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
history.Operator = user.SHOWNAME;
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送单据失败,失败原因:" + msg+ " ";
|
|
|
|
|
history.Remark = user.SHOWNAME + "于" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "发送单据失败,失败原因:" + msg + " ";
|
|
|
|
|
DbBus.Get(DbList.AMSCenter).Insert(history).ExecuteAffrows();
|
|
|
|
|
req.Code = 201;
|
|
|
|
|
req.Message = "操作失败," + msg;
|
|
|
|
@ -597,7 +628,7 @@ namespace djy.Service.Isf
|
|
|
|
|
{
|
|
|
|
|
req.Code = 500;
|
|
|
|
|
req.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
_LogsAdd("SendDE", "post", $"ISF_SendDE接口:{req.Message }");
|
|
|
|
|
_LogsAdd("SendDE", "post", $"ISF_SendDE接口:{req.Message}");
|
|
|
|
|
|
|
|
|
|
return req;
|
|
|
|
|
}
|
|
|
|
@ -686,7 +717,7 @@ namespace djy.Service.Isf
|
|
|
|
|
{
|
|
|
|
|
req.Code = 500;
|
|
|
|
|
req.Message = ex.InnerException?.Message ?? ex.Message;
|
|
|
|
|
_LogsAdd("SendDE", "post", $"AMS_SaveReceipt接口:{req.Message }");
|
|
|
|
|
_LogsAdd("SendDE", "post", $"AMS_SaveReceipt接口:{req.Message}");
|
|
|
|
|
return req;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|