From 5f41c7e72120a7418b044b4c5f5aef4685300017 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Mon, 7 Nov 2022 14:50:16 +0800 Subject: [PATCH] 1 --- .../Controllers/Chfee_AuditController.cs | 417 ++++-------------- .../CommMng/Controllers/PrintController.cs | 2 +- DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs | 6 +- DSWeb/Areas/CommMng/Models/CustomRefModel.cs | 2 + .../DAL/MsInfoClient/MsInfoClientDAL.cs | 9 +- .../MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs | 45 +- .../Models/MsInfoClient/MsInfoClient.cs | 3 + .../Viewsjs/MsInfoClient/MsInfoClientEdit.js | 23 +- .../Viewsjs/MsInfoClient/MsInfoClientModel.js | 1 + .../Viewsjs/MsInfoClient/Zi_en-us.js | 3 +- .../Viewsjs/MsInfoClient/Zi_zh-cn.js | 1 + 11 files changed, 157 insertions(+), 355 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs b/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs index c570b10a..bbd8c114 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs @@ -19,6 +19,8 @@ using DSWeb.Areas.CommMng.Models; using DSWeb.MvcShipping.DAL.MsOpSeaeDAL; using DSWeb.MvcShipping.DAL.MsChFeeDAL; using DSWeb.MvcShipping.DAL.ChMonthCloseDAL; +using DSWeb.MvcShipping.DAL.MsInfoClient; +using DSWeb.MvcShipping.Models.MsInfoClient; namespace DSWeb.Areas.Account.Controllers { @@ -467,23 +469,81 @@ namespace DSWeb.Areas.Account.Controllers #region 2018年5月24日14:26:34 李进举 存在为0的费用弹出提示不允许提交 string mblnotemp = ""; - var SUBMITBILLFEEISNOTZERO = MsSysParamSetDAL.GetData("PARAMNAME='SUBMITBILLFEEISNOTZERO'"); - if (SUBMITBILLFEEISNOTZERO.PARAMVALUE == "1") + var DrChfeeList = MsChFeeDAL.GetAllDataList("BSNO='"+bsno+"' AND FEETYPE=1 "); + var CrChfeeList = MsChFeeDAL.GetAllDataList("BSNO='" + bsno + "' AND FEETYPE=2 AND FEENAME NOT IN (SELECT [NAME] FROM code_fee WHERE ISNULL(ISNOTPR,0)=1) "); + optype = optype.ToLower(); + var customername = ""; + var error = ""; + var psclientlist = new List(); + if (optype == "op_seae") { - var FEEMANGERMUSTBE = MsSysParamSetDAL.GetData("PARAMNAME='FEEMANGERMUSTBE'"); - bool checkRst = MsOpSeaeDAL.CheckHasZeroFeeWithBsno("'" + bsno + "'", FEEMANGERMUSTBE.PARAMVALUE, out mblnotemp); - if (checkRst) + var MsOpSeae = MsOpSeaeDAL.GetData("BSNO='" + bsno + "'"); + error = MsOpSeaeDAL.IsSubmitOpSeae(MsOpSeae); + customername = MsOpSeae.CUSTOMERNAME; + psclientlist = MsInfoClientDAL.GetPSDataList("CUSTNAME IN ('"+ MsOpSeae.CUSTOMERNAME+ "','" + MsOpSeae.CARRIER + "')"); + } + if (optype == "op_seai") + { + + } + if (optype == "op_aire") + { + + } + if (optype == "op_airi") + { + + } + if (optype == "op_apply") + { + + } + if (optype == "op_bulk") + { + } + if (optype == "op_other" || optype == "tmswlpchead" || optype == "opctnbscard" || optype == "import_main") + { + } + if (optype == "op_railway") + { + } + if (optype.ToLower() == "wms" || optype.ToLower() == "wms_in" || optype.ToLower() == "wms_out") + { + + } + var cust = MsInfoClientDAL.GetData("SHORTNAME='"+customername+"'"); + + var feeCurrlist = MsChFeeDAL.GetFeeDateCurrList(optype, bsno, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"])); + foreach (var crfee in CrChfeeList) + { + if (feeCurrlist.Find(x => x.CURR == crfee.Currency && crfee.ExChangerate != x.CRDEFRATE) != null) { + error = error + "|应付汇率与默认汇率不一致"; + } + if (crfee.FeeName == "PS" || crfee.FeeName == "HP/S") { + + } + + } + foreach (var crfee in DrChfeeList) + { + if (feeCurrlist.Find(x => x.CURR == crfee.Currency && crfee.ExChangerate != x.CRDEFRATE) != null) { - DBResult resultC = new DBResult(); - resultC.Success = false; - if (FEEMANGERMUSTBE.PARAMVALUE=="1") - resultC.Message = "存在未审核或金额为0的或责任人为空的费用,无法整票提交"; - else - resultC.Message = "存在未审核或金额为0的费用,无法整票提交"; - var jsonC = JsonConvert.Serialize(resultC); - return new ContentResult() { Content = jsonC }; + error = error + "|应收汇率与默认汇率不一致"; } } + + if (!cust.ISNOTPR) { + foreach (var crfee in CrChfeeList) { + DrChfeeList.Find(x => x.FeeName == crfee.FeeName){ + + } + } + } + + + + + var SUBMITFEEBLFEELOCK = MsSysParamSetDAL.GetData("PARAMNAME='SUBMITFEEBLFEELOCK'"); var BLAUDITISSEFT = MsSysParamSetDAL.GetData("PARAMNAME='BLAUDITISSEFT'"); if (BLAUDITISSEFT.PARAMVALUE == "1") @@ -509,339 +569,12 @@ namespace DSWeb.Areas.Account.Controllers } - #endregion - - var ISSALEWORK = CookieConfig.GetCookie_ISSALEWORK(Request); - #region 2018年2月5日 李进举 鼎世 - T_ALL_DA T_ALL_DA = new T_ALL_DA(); - //费用未更改的时候点击整票提交时触发以下操作(2018年2月28日17:50:58李进举 不加此限制) - //①根据系统参数判断是否进行费用锁定(2018年3月1日15:35:45 李进举 该参数不影响整票状态的操作) - //②发送消息 - //③op_seae新增字段BillFeeStatus(整票状态)的值设置为1(整票提交) - try - { - if (bsno!=null&&bsno!="") - { - //if (feebody == "" || feebody == null) - if (true) - { - //更新【BillFeeStatus整票提交】的状态 - string blUpSQL0 = "UPDATE " + optype + " SET BillFeeStatus=1 WHERE BSNO='" + bsno + "'"; - bool bl0 = T_ALL_DA.GetExecuteSqlCommand(blUpSQL0); - - //根据参数判断是否执行【锁定】操作 - - var SUBMITFEEBLBSLOCK = MsSysParamSetDAL.GetData("PARAMNAME='SUBMITFEEBLBSLOCK'"); - if (SUBMITFEEBLFEELOCK.PARAMVALUE == "1"|| SUBMITFEEBLBSLOCK.PARAMVALUE == "1") - { - if (SUBMITFEEBLFEELOCK.PARAMVALUE == "1" && SUBMITFEEBLBSLOCK.PARAMVALUE == "1") { - string blUpSQL = "UPDATE " + optype + " SET BSSTATUS=1,FEESTATUS=1 WHERE BSNO='" + bsno + "'"; - bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); - } else if ( SUBMITFEEBLBSLOCK.PARAMVALUE == "1") - { - string blUpSQL = "UPDATE " + optype + " SET BSSTATUS=1 WHERE BSNO='" + bsno + "'"; - bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); - } - if (SUBMITFEEBLFEELOCK.PARAMVALUE == "1") - { - string blUpSQL = "UPDATE " + optype + " SET FEESTATUS=1 WHERE BSNO='" + bsno + "'"; - bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); - - } - - #region 发送消息 - DataSet dsFenDan = T_ALL_DA.GetAllSQL("select top 1 MBLNO,(select top 1 GID from [user] where SHOWNAME=b.SALE) SALEID,(select top 1 GID from [user] where SHOWNAME=b.CUSTSERVICE) CUSTSERVICEID from v_op_bill b where bsno='" + bsno+ "'"); - if (dsFenDan != null) - { - if (dsFenDan.Tables[0].Rows.Count > 0) - { - var mblno = dsFenDan.Tables[0].Rows[0]["MBLNO"].ToString(); - var SALEID = dsFenDan.Tables[0].Rows[0]["SALEID"].ToString(); - var CUSTSERVICEID = dsFenDan.Tables[0].Rows[0]["CUSTSERVICEID"].ToString(); - string uname = CookieConfig.GetCookie_UserName(Request); - - var Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno; - Msgdata.RECEIVER = SALEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID =bsno; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - var Msgmodb = new ModelObjectRepository(); - Msgmodb.Save(Msgdata); - Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno; - Msgdata.RECEIVER = CUSTSERVICEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID = bsno; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - Msgmodb.Save(Msgdata); - } - } - #endregion - - //DBResult result1 = new DBResult(); - //result1.Success = bl; - //result1.Message = bl?"业务提交成功":"业务提交失败"; - //var json1 = JsonConvert.Serialize(result1); - //return new ContentResult() { Content = json1 }; - } - else - { - //整票提交锁定费用参数为0时,只发送消息 - #region 发送消息 - DataSet dsFenDan = T_ALL_DA.GetAllSQL("select top 1 MBLNO,(select top 1 GID from [user] where SHOWNAME=b.SALE) SALEID,(select top 1 GID from [user] where SHOWNAME=b.CUSTSERVICE) CUSTSERVICEID from v_op_bill b where bsno='" + bsno + "'"); - if (dsFenDan != null) - { - if (dsFenDan.Tables[0].Rows.Count > 0) - { - var mblno = dsFenDan.Tables[0].Rows[0]["MBLNO"].ToString(); - var SALEID = dsFenDan.Tables[0].Rows[0]["SALEID"].ToString(); - var CUSTSERVICEID = dsFenDan.Tables[0].Rows[0]["CUSTSERVICEID"].ToString(); - string uname = CookieConfig.GetCookie_UserName(Request); - - var Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno; - Msgdata.RECEIVER = SALEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID = bsno; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - var Msgmodb = new ModelObjectRepository(); - Msgmodb.Save(Msgdata); - Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno; - Msgdata.RECEIVER = CUSTSERVICEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID = bsno; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - Msgmodb.Save(Msgdata); - } - } - //DBResult result1 = new DBResult(); - //result1.Success = true; - //result1.Message = "业务提交成功"; - //var json1 = JsonConvert.Serialize(result1); - //return new ContentResult() { Content = json1 }; - #endregion - } - } - } - } - catch (Exception) - { - - } #endregion - var billData = JsonConvert.Deserialize>(feebody); - var USEBLFeeAudit = MsSysParamSetDAL.GetData("PARAMNAME='USEBLFeeAudit'"); - var WorkFlowName = ""; - if (USEBLFeeAudit.PARAMVALUE == "1") - { - WorkFlowName = "BLFeeAudit"; - } - DBResult result = Chfee_AuditDAL.SubmitAuditNew(optype, Convert.ToString(Session["USERID"]), billData, true, WorkFlowName, ISSALEWORK, Convert.ToString(Session["COMPANYID"])); - - if (result.Success) - { - #region 运踪相关 - try - { - - MsOpStatusNewDAL mdal = new MsOpStatusNewDAL(); - string uname = CookieConfig.GetCookie_UserName(Request); - mdal.UpdateMainStatus(billData[0].BsNo, 5, uname); - } - catch (Exception) - { - } - #endregion - - var SUBMITFEEBLBSLOCK = MsSysParamSetDAL.GetData("PARAMNAME='SUBMITFEEBLBSLOCK'"); - if (SUBMITFEEBLFEELOCK.PARAMVALUE == "1" || SUBMITFEEBLBSLOCK.PARAMVALUE == "1") - { - if (SUBMITFEEBLFEELOCK.PARAMVALUE == "1" && SUBMITFEEBLBSLOCK.PARAMVALUE == "1") - { - string blUpSQL = "UPDATE " + optype + " SET BSSTATUS=1,FEESTATUS=1,BillFeeStatus=1 WHERE BSNO='" + bsno + "'"; - bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); - } - else if (SUBMITFEEBLBSLOCK.PARAMVALUE == "1") - { - string blUpSQL = "UPDATE " + optype + " SET BSSTATUS=1,BillFeeStatus=1 WHERE BSNO='" + bsno + "'"; - bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); - } - if (SUBMITFEEBLFEELOCK.PARAMVALUE == "1") - { - string blUpSQL = "UPDATE " + optype + " SET FEESTATUS=1,BillFeeStatus=1 WHERE BSNO='" + bsno + "'"; - bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); - } - //2018年2月7日 李进举 鼎世 增加 BillFeeStatus字段更新 - //string blUpSQL = "UPDATE " + optype + " SET FEESTATUS=1 WHERE BSNO='" + billData[0].BsNo + "'"; - //string blUpSQL = "UPDATE " + optype + " SET FEESTATUS=1,BillFeeStatus=1 WHERE BSNO='" + billData[0].BsNo + "'"; - //bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); - DataSet dsFenDan = T_ALL_DA.GetAllSQL("select top 1 MBLNO,(select top 1 GID from [user] where SHOWNAME=b.SALE) SALEID,(select top 1 GID from [user] where SHOWNAME=b.CUSTSERVICE) CUSTSERVICEID,CUSTOMERNAME,BSSOURCE from v_op_bill b where bsno='" + billData[0].BsNo + "'"); - if (dsFenDan != null) - { - if (dsFenDan.Tables[0].Rows.Count > 0) - { - var mblno = dsFenDan.Tables[0].Rows[0]["MBLNO"].ToString(); - var SALEID = dsFenDan.Tables[0].Rows[0]["SALEID"].ToString(); - var CUSTSERVICEID = dsFenDan.Tables[0].Rows[0]["CUSTSERVICEID"].ToString(); - string uname = CookieConfig.GetCookie_UserName(Request); - - var Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno + " 客户:" + dsFenDan.Tables[0].Rows[0]["CUSTOMERNAME"].ToString() + " 业务来源:" + dsFenDan.Tables[0].Rows[0]["BSSOURCE"].ToString(); - Msgdata.RECEIVER = SALEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID = billData[0].BsNo; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.ISSEND = "0"; - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - var Msgmodb = new ModelObjectRepository(); - Msgmodb.Save(Msgdata); - Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno + " 客户:" + dsFenDan.Tables[0].Rows[0]["CUSTOMERNAME"].ToString() + " 业务来源:" + dsFenDan.Tables[0].Rows[0]["BSSOURCE"].ToString(); - Msgdata.RECEIVER = CUSTSERVICEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID = billData[0].BsNo; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.ISSEND = "0"; - - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - Msgmodb.Save(Msgdata); - } - } - - } - else - { - //2018年2月5日11:20:26 李进举 鼎世 整票提交锁定参数为0时也发送消息 - //2018年2月7日09:30:56 李进举 鼎世 整条提交锁定参数为0时,仍然修改BillFeeStatus - - string blUpSQL2 = "UPDATE " + optype + " SET BillFeeStatus=1 WHERE BSNO='" + bsno + "'"; - bool bl2 = T_ALL_DA.GetExecuteSqlCommand(blUpSQL2); - - DataSet dsFenDan = T_ALL_DA.GetAllSQL("select top 1 MBLNO,(select top 1 GID from [user] where SHOWNAME=b.SALE) SALEID,(select top 1 GID from [user] where SHOWNAME=b.CUSTSERVICE) CUSTSERVICEID,CUSTOMERNAME,BSSOURCE from v_op_bill b where bsno='" + billData[0].BsNo + "'"); - if (dsFenDan != null) - { - if (dsFenDan.Tables[0].Rows.Count > 0) - { - var mblno = dsFenDan.Tables[0].Rows[0]["MBLNO"].ToString(); - var SALEID = dsFenDan.Tables[0].Rows[0]["SALEID"].ToString(); - var CUSTSERVICEID = dsFenDan.Tables[0].Rows[0]["CUSTSERVICEID"].ToString(); - string uname = CookieConfig.GetCookie_UserName(Request); - - var Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno+" 客户:"+ dsFenDan.Tables[0].Rows[0]["CUSTOMERNAME"].ToString()+" 业务来源:"+ dsFenDan.Tables[0].Rows[0]["BSSOURCE"].ToString(); - Msgdata.RECEIVER = SALEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID = billData[0].BsNo; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.ISSEND = "0"; - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - var Msgmodb = new ModelObjectRepository(); - Msgmodb.Save(Msgdata); - Msgdata = new SYSMessagemb(); - Msgdata.GID = Guid.NewGuid().ToString(); - Msgdata.NAME = "SubmitAudit"; - Msgdata.DESCRIPTION = uname + "提交费用审核"; - Msgdata.MESSAGECONTENT = uname + "提交费用审核," + " 提单号:" + mblno + " 客户:" + dsFenDan.Tables[0].Rows[0]["CUSTOMERNAME"].ToString() + " 业务来源:" + dsFenDan.Tables[0].Rows[0]["BSSOURCE"].ToString(); - Msgdata.RECEIVER = CUSTSERVICEID; - Msgdata.CREATETIME = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - Msgdata.ISREAD = "0"; - Msgdata.READCOUNT = "0"; - Msgdata.TYPE = "0"; - Msgdata.TASKURL = ""; - Msgdata.TASKID = billData[0].BsNo; - Msgdata.NUMBER = "0"; - Msgdata.RECVTYPE = "2"; - Msgdata.ISSEND = "0"; - - Msgdata.DbOperationType = DbOperationType.DbotIns; - Msgdata.ModelUIStatus = "I"; - - Msgmodb.Save(Msgdata); - } - } - } - - - } //解决整票状态更新成功,但引无提交数据的报错 + + DBResult result = new DBResult(); result.Success = true; result.Message = "提交数据处理异常!"; var json = JsonConvert.Serialize(result); diff --git a/DSWeb/Areas/CommMng/Controllers/PrintController.cs b/DSWeb/Areas/CommMng/Controllers/PrintController.cs index ffe1bb31..5b2a0328 100644 --- a/DSWeb/Areas/CommMng/Controllers/PrintController.cs +++ b/DSWeb/Areas/CommMng/Controllers/PrintController.cs @@ -18,7 +18,7 @@ namespace DSWeb.Areas.CommMng.Controllers { // // GET: /CommMng/Print/ - + public ActionResult Index() { return View(); diff --git a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs index 04cdb694..e8c9f682 100644 --- a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs @@ -326,7 +326,7 @@ namespace DSWeb.Areas.CommMng.DAL strSql.Append("SELECT "); strSql.Append("Gid,CODENAME AS CustCode, SHORTNAME AS CustName,CODENAME + '-' + SHORTNAME AS CodeAndName,CODENAME + '-' + description AS CodeAndFull,BillRises1"); strSql.Append(",UNITPRICE,description,SHORTNAME+'_'+description KFCodename,SALE,OP,DOC,CUSTSERVICE,FEEFRT,BSSOURCE,[EMAIL],[TEL],SALECORPID "); - strSql.Append(",(select top 1 CONTRACTNO from info_client_contract WHERE LINKID=info_Client.GID order by STARTDATE desc) CONTRACTNO "); + strSql.Append(",(select top 1 CONTRACTNO from info_client_contract WHERE LINKID=info_Client.GID order by STARTDATE desc) CONTRACTNO,ISNOTPR "); strSql.Append(" from info_Client where 1=1 "); // BLSTATUS=0 @@ -360,7 +360,7 @@ namespace DSWeb.Areas.CommMng.DAL strSql.Append("SELECT "); strSql.Append("Gid,CODENAME AS CustCode, SHORTNAME AS CustName,CODENAME + '-' + SHORTNAME AS CodeAndName,BillRises1"); strSql.Append(",UNITPRICE,description,SHORTNAME+'_'+description KFCodename,SALE,OP,DOC,CUSTSERVICE,FEEFRT,BSSOURCE,[EMAIL],[TEL],SALECORPID "); - strSql.Append(",'' CONTRACTNO "); + strSql.Append(",'' CONTRACTNO,ISNOTPR "); strSql.Append(" from info_Client where 1=1 AND ISWAREHOUSE = '1' "); // BLSTATUS=0 var InfoClintBlstatus = MsSysParamSetDAL.GetData("PARAMNAME='InfoClintBlstatus'"); @@ -407,6 +407,8 @@ namespace DSWeb.Areas.CommMng.DAL data.DOC = Convert.ToString(reader["DOC"]); data.CUSTSERVICE = Convert.ToString(reader["CUSTSERVICE"]); data.CONTRACTNO = Convert.ToString(reader["CONTRACTNO"]); + if (reader["ISNOTPR"] != DBNull.Value) + data.ISNOTPR = Convert.ToBoolean(reader["ISNOTPR"]);//状态1 #endregion headList.Add(data); diff --git a/DSWeb/Areas/CommMng/Models/CustomRefModel.cs b/DSWeb/Areas/CommMng/Models/CustomRefModel.cs index ed9de55a..33f47d42 100644 --- a/DSWeb/Areas/CommMng/Models/CustomRefModel.cs +++ b/DSWeb/Areas/CommMng/Models/CustomRefModel.cs @@ -230,6 +230,8 @@ namespace DSWeb.Areas.CommMng.Models public string CUSTSERVICE { get; set; } + public bool ISNOTPR { get; set; } + #endregion public CustomRefModel() diff --git a/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs index bdf6dfb8..0d6950a7 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs @@ -81,7 +81,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient strSql.Append(",(SELECT TOP 1 REMARK FROM Info_Client_ACCDATE WHERE ENDDATE>=GETDATE() AND LINKGID=info_client.GID order by BGNDATE DESC) ACCREMARK"); strSql.Append(",(SELECT TOP 1 ACCMONTH FROM Info_Client_ACCDATE WHERE ENDDATE>=GETDATE() AND LINKGID=info_client.GID ORDER BY MODIFIEDTIME DESC) ACCMONTH"); strSql.Append(",(SELECT TOP 1 ALLOWAMOUNT FROM Info_Client_ACCDATE WHERE ENDDATE>=GETDATE() AND LINKGID=info_client.GID ORDER BY MODIFIEDTIME DESC) ALLOWAMOUNT"); - strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR"); + strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR,PSCUST"); strSql.Append(",(select showname from [user] where gid=info_client.MODIFIEDUSER) MODIFIEDUSERREF "); strSql.Append(" from info_client where 1=1 "); @@ -168,7 +168,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient strSql.Append(",(SELECT TOP 1 REMARK FROM Info_Client_ACCDATE WHERE LINKGID=info_client.GID order by BGNDATE DESC) ACCREMARK"); strSql.Append(",(SELECT TOP 1 ACCMONTH FROM Info_Client_ACCDATE WHERE LINKGID=info_client.GID ORDER BY MODIFIEDTIME DESC) ACCMONTH"); strSql.Append(",(SELECT TOP 1 ALLOWAMOUNT FROM Info_Client_ACCDATE WHERE LINKGID=info_client.GID ORDER BY MODIFIEDTIME DESC) ALLOWAMOUNT"); - strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR"); + strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR,PSCUST"); strSql.Append(",(select showname from [user] where gid=info_client.MODIFIEDUSER) MODIFIEDUSERREF "); strSql.Append(" from info_client where 1=1 "); @@ -260,7 +260,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient strSql.Append(",(SELECT TOP 1 REMARK FROM Info_Client_ACCDATE WHERE LINKGID=info_client.GID order by BGNDATE DESC) ACCREMARK"); strSql.Append(",(SELECT TOP 1 ACCMONTH FROM Info_Client_ACCDATE WHERE LINKGID=info_client.GID ORDER BY MODIFIEDTIME DESC) ACCMONTH"); strSql.Append(",(SELECT TOP 1 ALLOWAMOUNT FROM Info_Client_ACCDATE WHERE LINKGID=info_client.GID ORDER BY MODIFIEDTIME DESC) ALLOWAMOUNT"); - strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR"); + strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR,PSCUST"); strSql.Append(",(select showname from [user] where gid=info_client.MODIFIEDUSER) MODIFIEDUSERREF "); strSql.Append(" from info_client where 1=1 "); @@ -299,7 +299,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient strSql.Append(",(select EnumValueName from tSysEnumValue where enumtypeid=99024 and enumvalueid=blstatus) BLSTATUSREF"); strSql.Append(",RCVMode,'' ACCREMARK,'' ACCMONTH,'' ALLOWAMOUNT"); strSql.Append(",[CUSTTYPE],[CUSTGUIMO],[CUSTCLASS],[QUALIFICATION],[REGDATE],[CARGOL],[PRODUCT],[EXPREGION],[CARRIERLIST],[CTNTYPE],[CUSTNUM],[NATURE]"); - strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR"); + strSql.Append(",case WHEN BLSTATUS=0 THEN '合作客户' else '潜在客户' end CUSTPROP,SALEDEPT,OFFICEADDR,ISNOTPR,PSCUST"); strSql.Append(",(select showname from [user] where gid=info_client.MODIFIEDUSER) MODIFIEDUSERREF "); strSql.Append(" from info_client where 1=1 "); @@ -480,6 +480,7 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient data.ISNOTPR = Convert.ToBoolean(reader["ISNOTPR"]);//不核算利润 data.SALEDEPT = Convert.ToString(reader["SALEDEPT"]);//核算部门 data.OFFICEADDR = Convert.ToString(reader["OFFICEADDR"]);//办公地点 + data.PSCUST = Convert.ToString(reader["PSCUST"]);//办公地点 #endregion diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index ec2ffa44..00f3a54a 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -2246,7 +2246,48 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL #endregion + public static string IsSubmitOpSeae(MsOpSeae bill) + { + var error = ""; + if (bill.MBLNO == null || bill.MBLNO == "") + { error = error + "|主提单号不能为空"; } + if (bill.ETD == "" || bill.ETD == null) + { + { error = error + "|开船日期不能为空"; } + } + + if (bill.VESSEL == null || bill.VESSEL == "") + { error = error + "|提单号:" + bill.MBLNO + "船名不能为空"; } + + if (bill.VOYNO == null || bill.VOYNO == "") + { error = error + "|提单号:" + bill.MBLNO + "航次不能为空"; } + + if ((bill.BLFRT == null || bill.BLFRT == "")) + { error = error + "|提单号:" + bill.MBLNO + "付费方式不能为空"; } + + if ((bill.MBLFRT == null || bill.MBLFRT == "")) + { error = error + "|提单号:" + bill.MBLNO + "主单付费方式不能为空"; } + if (string.IsNullOrEmpty(bill.BSSOURCE)) + { error = error + "|提单号:" + bill.MBLNO + "业务来源不能为空"; } + + if (bill.PORTLOAD == null || bill.PORTLOAD == "") + { error = error + "|提单号:" + bill.MBLNO + "装货港不能为空"; } + if (string.IsNullOrEmpty(bill.PORTDISCHARGE)) + { error = error + "|提单号:" + bill.MBLNO + "卸货港不能为空"; } + if (string.IsNullOrEmpty(bill.SERVICE)) + { error = error + "|提单号:" + bill.MBLNO + "装运方式不能为空"; } + if (string.IsNullOrEmpty(bill.CARRIER)) + { error = error + "|提单号:" + bill.MBLNO + "船公司不能为空"; } + if (string.IsNullOrEmpty(bill.YARD)) + { error = error + "|提单号:" + bill.MBLNO + "场站不能为空"; } + if (string.IsNullOrEmpty(bill.SALEDEPT)) + { error = error + "|提单号:" + bill.MBLNO + "所属部门不能为空"; } + var ctnlist = MsOpSeaeDAL.GetBodyList("BSNO='" + bill.BSNO + "'"); + if (ctnlist.Count == 0) { error = error + "|提单号:" + bill.MBLNO + "集装箱信息不能为空"; } + + return error; + } #endregion @@ -7441,10 +7482,6 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL Database db = DatabaseFactory.CreateDatabase(); int rst = 0; string sql = "select count(*) from ch_fee where bsno = " + bsno + " and (amount = 0 OR FEESTATUS=3 OR FEESTATUS=4) "; - if (mustmanage=="1") sql = "select count(*) from ch_fee where bsno = " + bsno + " and (amount = 0 OR FEESTATUS=3 OR FEESTATUS=4 or isnull(MANAGER,'')='')"; - - - rst = Convert.ToInt32( db.ExecuteScalar(CommandType.Text,sql)); diff --git a/DSWeb/Areas/MvcShipping/Models/MsInfoClient/MsInfoClient.cs b/DSWeb/Areas/MvcShipping/Models/MsInfoClient/MsInfoClient.cs index 8329cc5f..45e4761a 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsInfoClient/MsInfoClient.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsInfoClient/MsInfoClient.cs @@ -1084,6 +1084,9 @@ namespace DSWeb.MvcShipping.Models.MsInfoClient [ModelDB] public string OFFICEADDR { get; set; } + [ModelDB] + public string PSCUST { get; set; } + public MsClient() { TableName = "info_client"; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js index 06db9316..2cd534fa 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js @@ -188,6 +188,27 @@ Ext.extend(Shipping.MsInfoClientEdit, Ext.Panel, { displayField: 'EnumValueName' }); + //客户加载_委托单位 + this.storePSCUST = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsShipping.ux.CustomRefModel', + proxy: { url: '/CommMng/BasicDataRef/GetCustomRefListRm' } + }); + // this.storeCustCode.loadData(this.mainWin.GetPubStore("OPSEAE_CUST_ISCONTROLLER").data.items); + + this.comboxPSCUST = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: Zi.LAN.PSCUST, //'委托单位', + store: this.storePSCUST, + forceSelection: true, + queryMode: 'remote', + minChars: 1, + queryParam: 'CODENAME', + autoSelect: true, + name: 'PSCUST', + valueField: 'CustName', + displayField: 'CodeAndName', + allowBlank: false + }); + //#endregion @@ -587,7 +608,7 @@ Ext.extend(Shipping.MsInfoClientEdit, Ext.Panel, { xtype: 'container', layout: 'hbox', defaultType: 'textfield', - items: [this.comboxSALEDEPT, this.comboxOFFICEADDR, this.comboxTC, this.comboxFeeFrt] + items: [this.comboxSALEDEPT, this.comboxOFFICEADDR, this.comboxPSCUST, this.comboxFeeFrt] }, this.myCheckboxService, { xtype: 'textareafield', grow: true, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientModel.js index ae441522..4802f569 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientModel.js @@ -87,6 +87,7 @@ { name: 'ISNOTPR', type: 'boolean' }, { name: 'SALEDEPT', type: 'string' }, { name: 'OFFICEADDR', type: 'string' }, + { name: 'PSCUST', type: 'string' }, { name: 'ORDERNO', type: 'string' }, { name: 'BLSTATUSREF', type: 'string' }, { name: 'ISSP', type: 'string' }, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js index 785a15cd..db6bba22 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js @@ -298,4 +298,5 @@ Zi.LAN.CUSTSERVICE = 'CustService'; Zi.LAN.ISNOTPR = "不核算利润"; Zi.LAN.SALEDEPT = "核算部门"; Zi.LAN.OFFICEADDR = "办公地点"; -Zi.LAN.PS = "PS比例"; \ No newline at end of file +Zi.LAN.PS = "PS比例"; +Zi.LAN.PSCUST = " PS所属客户"; \ No newline at end of file diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js index e2fcc4da..ce18a0b7 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js @@ -300,4 +300,5 @@ Zi.LAN.ISNOTPR = "不核算利润"; Zi.LAN.SALEDEPT = "核算部门"; Zi.LAN.OFFICEADDR = "办公地点"; Zi.LAN.PS = "PS比例"; +Zi.LAN.PSCUST = " PS所属客户";