增加供dswms调用的费用提交审核接口

DS7_JinGang
dengyu 1 year ago
parent ae942ec77c
commit f443d0fc6a

@ -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,13 +218,20 @@ 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!="")
if (billData != null && bsno != "")
{
T_ALL_DA T_ALL_DA = new T_ALL_DA();
var custstr = "";
@ -233,14 +243,18 @@ namespace DSWeb.Areas.Account.Controllers
if (custstr == "") custstr = enumValue.CustomerName;
else custstr = custstr + "," + enumValue.CustomerName;
}
if (FEESUBMITSYNCEXCHANGE.PARAMVALUE == "1") {
if (enumValue.Currency != "RMB") {
var MsFeeCurr = MsFeeCurrList.Find(x=>x.CURR== enumValue.Currency);
if (MsFeeCurr != null) {
if (FEESUBMITSYNCEXCHANGE.PARAMVALUE == "1")
{
if (enumValue.Currency != "RMB")
{
var MsFeeCurr = MsFeeCurrList.Find(x => x.CURR == enumValue.Currency);
if (MsFeeCurr != null)
{
if (enumValue.FeeType == 1)
enumValue.ExChangerate = MsFeeCurr.DEFRATE;
else {
if (MsFeeCurr.CRDEFRATE!=0) enumValue.ExChangerate = MsFeeCurr.CRDEFRATE;
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);

@ -1542,7 +1542,10 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL
var value = WMSNewDAL.WMSNewDAL.GetSysFeeConfig("");
if (value == "1") WorkFlowName = "FeeSeaiRecvPayAudit";
}
if (optype == "op_wms")
{
WorkFlowName = "OPWMSFeeAudit";
}
if (WorkFlowstr != "") WorkFlowName = WorkFlowstr;
@ -2091,7 +2094,10 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL
var value = WMSNewDAL.WMSNewDAL.GetSysFeeConfig("");
if (value=="1") WorkFlowName = "FeeSeaiRecvPayAudit";
}
if (optype == "op_wms")
{
WorkFlowName = "OPWMSFeeAudit";
}
if (WorkFlowstr != "") WorkFlowName = WorkFlowstr;

@ -50,6 +50,15 @@ namespace DSWeb.Areas.CommMng.Controllers
public string companyid { get; set; }
}
public class FeeAutidParam
{
public string USERID { get; set; }
public string COMPANYID { get; set; }
public string optype { get; set; }
public string IDs { get; set; }
public string ISSALEWORK { get; set; } = "0";
}
/// <summary>
/// 付费申请审批

@ -229,19 +229,24 @@ namespace DSWeb.Areas.CommMng.DAL
}
var cookies = new Cookies();
var WorkflowMsg = cookies.getCookie(CookieConstant.WorkflowMsg);//启用消息提示
if (WorkflowMsg == "1")
try
{
var WorkflowMsg = cookies.getCookie(CookieConstant.WorkflowMsg);//启用消息提示
if (WorkflowMsg == "1")
{
var RECEIVER = GetAuditor(WORKFLOWID, "1");
var RECEIVER = GetAuditor(WORKFLOWID, "1");
//向每个审核人发送消息
foreach (var _RC in RECEIVER)
{
//var _Message =
StartMessage(WORKFLOWID, OP, _RC.GID, BSNO, BILLNO, GID, URL, MSG);
//SaveMessage(_Message);
//向每个审核人发送消息
foreach (var _RC in RECEIVER)
{
//var _Message =
StartMessage(WORKFLOWID, OP, _RC.GID, BSNO, BILLNO, GID, URL, MSG);
//SaveMessage(_Message);
}
}
}catch (Exception e) {
}
APP(OP, WORKFLOWID);

Loading…
Cancel
Save