diff --git a/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs b/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs index 75af3307..82eaf012 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs @@ -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>(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 billData, string optype,string USERID,string COMPANYID,string ISSALEWORK, string bsno = "") + { var MsFeeCurrList = new List(); 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 }; } + + /// + /// 20230828 用于提供给DSWMS调用的提交和撤销提交费用接口 + /// + /// + /// + /// + /// + /// + /// + /// + 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(strJson.ToString()); + //string IDs, string optype, string USERID, string COMPANYID, string ISSALEWORK = "0", string bsno = "" + + + + + var idList = new List(); + 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(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); diff --git a/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs index f8bb5fcd..0699b44d 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs @@ -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; diff --git a/DSWeb/Areas/CommMng/Controllers/DSWEBAPPInterfaceController.cs b/DSWeb/Areas/CommMng/Controllers/DSWEBAPPInterfaceController.cs index 0f30aa78..41af8391 100644 --- a/DSWeb/Areas/CommMng/Controllers/DSWEBAPPInterfaceController.cs +++ b/DSWeb/Areas/CommMng/Controllers/DSWEBAPPInterfaceController.cs @@ -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"; + } + /// /// 付费申请审批 diff --git a/DSWeb/Areas/CommMng/DAL/WorkFlowDAL.cs b/DSWeb/Areas/CommMng/DAL/WorkFlowDAL.cs index 516ecbe8..e246b4c8 100644 --- a/DSWeb/Areas/CommMng/DAL/WorkFlowDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/WorkFlowDAL.cs @@ -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);