|
|
|
@ -1166,6 +1166,49 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = dataList.ToList() });
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContentResult AddDui(string bill, string data, string curr, string storeCurrExrate, int billtype, string addcurr)
|
|
|
|
|
{
|
|
|
|
|
var exrateList = JsonConvert.Deserialize<List<ChFeeExrate>>(storeCurrExrate);
|
|
|
|
|
var bodyList = JsonConvert.Deserialize<List<ChPaySettlement>>(data);
|
|
|
|
|
|
|
|
|
|
if (((exrateList == null) || (exrateList.Count == 0)) && (addcurr != curr))
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
exrateList = ChsettlementDAL.GetAppCurrExrateData(bodyList, curr, addcurr);
|
|
|
|
|
if (exrateList.Count == 0)
|
|
|
|
|
{
|
|
|
|
|
var modb = new ModelObjectDB();
|
|
|
|
|
DBResult result = ChsettlementDAL.AddRecvAppDCDetail(bill, bodyList, curr, Convert.ToString(Session["COMPANYID"]), addcurr, exrateList);
|
|
|
|
|
if (result.Success) { ChsettlementDAL.p_update_Amount(bill, billtype); }
|
|
|
|
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = true, Message = "查询成功", Data = exrateList.ToList() };
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var modb = new ModelObjectDB();
|
|
|
|
|
DBResult result = ChsettlementDAL.AddRecvAppDCDetail(bill, bodyList, curr, Convert.ToString(Session["COMPANYID"]), addcurr, exrateList);
|
|
|
|
|
if (result.Success) { ChsettlementDAL.p_update_Amount(bill, billtype); }
|
|
|
|
|
|
|
|
|
|
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message };
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|