|
|
|
@ -19,6 +19,9 @@ using DSWeb.Areas.CommMng.Models;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.MsOpSeaeDAL;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.MsChFeeDAL;
|
|
|
|
|
using DSWeb.MvcShipping.DAL.ChMonthCloseDAL;
|
|
|
|
|
using static DSWeb.Areas.CommMng.Controllers.DSWEBAPPInterfaceController;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
{
|
|
|
|
@ -215,11 +218,18 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
var ISSALEWORK = CookieConfig.GetCookie_ISSALEWORK(Request);
|
|
|
|
|
var billData = JsonConvert.Deserialize<List<MsChFee>>(feebody);
|
|
|
|
|
|
|
|
|
|
var USERID = Convert.ToString(Session["USERID"]);
|
|
|
|
|
var COMPANYID = Convert.ToString(Session["COMPANYID"]);
|
|
|
|
|
|
|
|
|
|
return Do_SubmitAuditNew(billData, optype, USERID, COMPANYID, ISSALEWORK, bsno);
|
|
|
|
|
}
|
|
|
|
|
public ContentResult Do_SubmitAuditNew(List<MsChFee> billData, string optype,string USERID,string COMPANYID,string ISSALEWORK, string bsno = "")
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var MsFeeCurrList = new List<MsFeeCurr>();
|
|
|
|
|
var FEESUBMITSYNCEXCHANGE = MsSysParamSetDAL.GetData("PARAMNAME='FEESUBMITSYNCEXCHANGE'");
|
|
|
|
|
if (FEESUBMITSYNCEXCHANGE.PARAMVALUE == "1")
|
|
|
|
|
MsFeeCurrList = MsChFeeDAL.GetFeeDateCurrList("",bsno, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]));
|
|
|
|
|
MsFeeCurrList = MsChFeeDAL.GetFeeDateCurrList("", bsno, USERID, COMPANYID);
|
|
|
|
|
|
|
|
|
|
if (billData != null && bsno != "")
|
|
|
|
|
{
|
|
|
|
@ -233,13 +243,17 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
if (custstr == "") custstr = enumValue.CustomerName;
|
|
|
|
|
else custstr = custstr + "," + enumValue.CustomerName;
|
|
|
|
|
}
|
|
|
|
|
if (FEESUBMITSYNCEXCHANGE.PARAMVALUE == "1") {
|
|
|
|
|
if (enumValue.Currency != "RMB") {
|
|
|
|
|
if (FEESUBMITSYNCEXCHANGE.PARAMVALUE == "1")
|
|
|
|
|
{
|
|
|
|
|
if (enumValue.Currency != "RMB")
|
|
|
|
|
{
|
|
|
|
|
var MsFeeCurr = MsFeeCurrList.Find(x => x.CURR == enumValue.Currency);
|
|
|
|
|
if (MsFeeCurr != null) {
|
|
|
|
|
if (MsFeeCurr != null)
|
|
|
|
|
{
|
|
|
|
|
if (enumValue.FeeType == 1)
|
|
|
|
|
enumValue.ExChangerate = MsFeeCurr.DEFRATE;
|
|
|
|
|
else {
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (MsFeeCurr.CRDEFRATE != 0) enumValue.ExChangerate = MsFeeCurr.CRDEFRATE;
|
|
|
|
|
else enumValue.ExChangerate = MsFeeCurr.DEFRATE;
|
|
|
|
|
|
|
|
|
@ -298,14 +312,63 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
var iResult = MsChFeeDAL.SaveUpdateFee(billData, bsno, CookieConfig.GetCookie_UserId(Request));
|
|
|
|
|
var iResult = MsChFeeDAL.SaveUpdateFee(billData, bsno, USERID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
DBResult result = Chfee_AuditDAL.SubmitAuditNew(optype, Convert.ToString(Session["USERID"]), billData, false, "", ISSALEWORK, Convert.ToString(Session["COMPANYID"]));
|
|
|
|
|
DBResult result = Chfee_AuditDAL.SubmitAuditNew(optype, USERID, billData, false, "", ISSALEWORK, COMPANYID);
|
|
|
|
|
|
|
|
|
|
var json = JsonConvert.Serialize(result);
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 20230828 用于提供给DSWMS调用的提交和撤销提交费用接口
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="IDs"></param>
|
|
|
|
|
/// <param name="optype"></param>
|
|
|
|
|
/// <param name="USERID"></param>
|
|
|
|
|
/// <param name="COMPANYID"></param>
|
|
|
|
|
/// <param name="ISSALEWORK"></param>
|
|
|
|
|
/// <param name="bsno"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public ContentResult SubmitAuditNew_BYID()
|
|
|
|
|
{
|
|
|
|
|
StreamReader sr = new StreamReader(Request.InputStream, Encoding.UTF8);
|
|
|
|
|
var strJson = new StringBuilder();
|
|
|
|
|
string line = null;
|
|
|
|
|
while (((line = sr.ReadLine())) != null)
|
|
|
|
|
{
|
|
|
|
|
strJson.Append(line);
|
|
|
|
|
}
|
|
|
|
|
var feeauditparam = JsonConvert.Deserialize<FeeAutidParam>(strJson.ToString());
|
|
|
|
|
//string IDs, string optype, string USERID, string COMPANYID, string ISSALEWORK = "0", string bsno = ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var idList = new List<string>();
|
|
|
|
|
var condition = "";
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(feeauditparam.IDs))
|
|
|
|
|
{
|
|
|
|
|
idList = feeauditparam.IDs.Split(',').ToList();
|
|
|
|
|
|
|
|
|
|
condition = $"GID in('{string.Join("','", idList)}')";
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
var jsonRespose2 = new JsonResponse
|
|
|
|
|
{
|
|
|
|
|
Success = false,
|
|
|
|
|
Message = "没有选择费用",
|
|
|
|
|
};
|
|
|
|
|
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var billData = MsChFeeDAL.GetAllDataList(condition);
|
|
|
|
|
|
|
|
|
|
return Do_SubmitAuditNew(billData, feeauditparam.optype, feeauditparam.USERID, feeauditparam.COMPANYID, feeauditparam.ISSALEWORK, "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ContentResult SubmitAuditOp(string feebody, string optype, string bsno = "")
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
@ -1042,6 +1105,25 @@ namespace DSWeb.Areas.Account.Controllers
|
|
|
|
|
var json = JsonConvert.Serialize(result);
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ContentResult CancelAudit_BYID()
|
|
|
|
|
{//string GidStr, string optype, string USERID, string ISSALEWORK="0"
|
|
|
|
|
StreamReader sr = new StreamReader(Request.InputStream, Encoding.UTF8);
|
|
|
|
|
var strJson = new StringBuilder();
|
|
|
|
|
string line = null;
|
|
|
|
|
while (((line = sr.ReadLine())) != null)
|
|
|
|
|
{
|
|
|
|
|
strJson.Append(line);
|
|
|
|
|
}
|
|
|
|
|
var feeauditparam = JsonConvert.Deserialize<FeeAutidParam>(strJson.ToString());
|
|
|
|
|
//string IDs, string optype, string USERID, string COMPANYID, string ISSALEWORK = "0", string bsno = ""
|
|
|
|
|
|
|
|
|
|
//DBResult result = Chfee_AuditDAL.CancelAudit(optype, Convert.ToString(Session["DEPTGID"]), Convert.ToString(Session["USERID"]), GidStr);
|
|
|
|
|
DBResult result = Chfee_AuditDAL.CancelAudit(feeauditparam.optype, feeauditparam.USERID, feeauditparam.IDs, "", feeauditparam.ISSALEWORK);
|
|
|
|
|
|
|
|
|
|
var json = JsonConvert.Serialize(result);
|
|
|
|
|
return new ContentResult() { Content = json };
|
|
|
|
|
}
|
|
|
|
|
public ContentResult CancelAuditAmend(string GidStr, string optype)
|
|
|
|
|
{
|
|
|
|
|
var ISSALEWORK = CookieConfig.GetCookie_ISSALEWORK(Request);
|
|
|
|
|