DS7_JingHan
hanxuntao 2 years ago
parent 029353c5d1
commit 5f41c7e721

@ -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,381 +469,112 @@ 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 FEEMANGERMUSTBE = MsSysParamSetDAL.GetData("PARAMNAME='FEEMANGERMUSTBE'");
bool checkRst = MsOpSeaeDAL.CheckHasZeroFeeWithBsno("'" + bsno + "'", FEEMANGERMUSTBE.PARAMVALUE, out mblnotemp);
if (checkRst)
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<ClientPS>();
if (optype == "op_seae")
{
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 };
var MsOpSeae = MsOpSeaeDAL.GetData("BSNO='" + bsno + "'");
error = MsOpSeaeDAL.IsSubmitOpSeae(MsOpSeae);
customername = MsOpSeae.CUSTOMERNAME;
psclientlist = MsInfoClientDAL.GetPSDataList("CUSTNAME IN ('"+ MsOpSeae.CUSTOMERNAME+ "','" + MsOpSeae.CARRIER + "')");
}
}
var SUBMITFEEBLFEELOCK = MsSysParamSetDAL.GetData("PARAMNAME='SUBMITFEEBLFEELOCK'");
var BLAUDITISSEFT = MsSysParamSetDAL.GetData("PARAMNAME='BLAUDITISSEFT'");
if (BLAUDITISSEFT.PARAMVALUE == "1")
if (optype == "op_seai")
{
var billlist = Chfee_AuditDAL.GetBillDataList("MASTERNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), null, true);
foreach (var bill in billlist) {
if (bill.BillFeeStatus == "2" || bill.BillFeeStatus == "1") {
DBResult result2 = new DBResult();
result2.Success = false;
result2.Message = "当前状态无法提交整票审核!";
var json2 = JsonConvert.Serialize(result2);
return new ContentResult() { Content = json2 };
}
}
DBResult resultbl = Chfee_AuditDAL.SubmitAuditBL(Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), billlist, true, "", "", Convert.ToString(Session["COMPANYID"]), SUBMITFEEBLFEELOCK.PARAMVALUE);
var jsonbl = JsonConvert.Serialize(resultbl);
return new ContentResult() { Content = jsonbl };
if (optype == "op_aire")
{
}
if (optype == "op_airi")
{
#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
if (optype == "op_apply")
{
//DBResult result1 = new DBResult();
//result1.Success = bl;
//result1.Message = bl?"业务提交成功":"业务提交失败";
//var json1 = JsonConvert.Serialize(result1);
//return new ContentResult() { Content = json1 };
}
else
if (optype == "op_bulk")
{
//整票提交锁定费用参数为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)
if (optype == "op_other" || optype == "tmswlpchead" || optype == "opctnbscard" || optype == "import_main")
{
}
#endregion
var billData = JsonConvert.Deserialize<List<MsChFee>>(feebody);
var USEBLFeeAudit = MsSysParamSetDAL.GetData("PARAMNAME='USEBLFeeAudit'");
var WorkFlowName = "";
if (USEBLFeeAudit.PARAMVALUE == "1")
if (optype == "op_railway")
{
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
if (optype.ToLower() == "wms" || optype.ToLower() == "wms_in" || optype.ToLower() == "wms_out")
{
MsOpStatusNewDAL mdal = new MsOpStatusNewDAL();
string uname = CookieConfig.GetCookie_UserName(Request);
mdal.UpdateMainStatus(billData[0].BsNo, 5, uname);
}
catch (Exception)
{
}
#endregion
var cust = MsInfoClientDAL.GetData("SHORTNAME='"+customername+"'");
var SUBMITFEEBLBSLOCK = MsSysParamSetDAL.GetData("PARAMNAME='SUBMITFEEBLBSLOCK'");
if (SUBMITFEEBLFEELOCK.PARAMVALUE == "1" || SUBMITFEEBLBSLOCK.PARAMVALUE == "1")
var feeCurrlist = MsChFeeDAL.GetFeeDateCurrList(optype, bsno, Convert.ToString(Session["USERID"]), Convert.ToString(Session["COMPANYID"]));
foreach (var crfee in CrChfeeList)
{
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);
if (feeCurrlist.Find(x => x.CURR == crfee.Currency && crfee.ExChangerate != x.CRDEFRATE) != null) {
error = error + "|应付汇率与默认汇率不一致";
}
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 (crfee.FeeName == "PS" || crfee.FeeName == "HP/S") {
}
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)
foreach (var crfee in DrChfeeList)
{
if (dsFenDan.Tables[0].Rows.Count > 0)
if (feeCurrlist.Find(x => x.CURR == crfee.Currency && crfee.ExChangerate != x.CRDEFRATE) != null)
{
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";
error = error + "|应收汇率与默认汇率不一致";
}
}
Msgdata.DbOperationType = DbOperationType.DbotIns;
Msgdata.ModelUIStatus = "I";
if (!cust.ISNOTPR) {
foreach (var crfee in CrChfeeList) {
DrChfeeList.Find(x => x.FeeName == crfee.FeeName){
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";
var SUBMITFEEBLFEELOCK = MsSysParamSetDAL.GetData("PARAMNAME='SUBMITFEEBLFEELOCK'");
var BLAUDITISSEFT = MsSysParamSetDAL.GetData("PARAMNAME='BLAUDITISSEFT'");
if (BLAUDITISSEFT.PARAMVALUE == "1")
{
var billlist = Chfee_AuditDAL.GetBillDataList("MASTERNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), null, true);
foreach (var bill in billlist) {
if (bill.BillFeeStatus == "2" || bill.BillFeeStatus == "1") {
DBResult result2 = new DBResult();
result2.Success = false;
result2.Message = "当前状态无法提交整票审核!";
var json2 = JsonConvert.Serialize(result2);
return new ContentResult() { Content = json2 };
Msgmodb.Save(Msgdata);
}
}
}
DBResult resultbl = Chfee_AuditDAL.SubmitAuditBL(Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), billlist, true, "", "", Convert.ToString(Session["COMPANYID"]), SUBMITFEEBLFEELOCK.PARAMVALUE);
var jsonbl = JsonConvert.Serialize(resultbl);
return new ContentResult() { Content = jsonbl };
}
#endregion
//解决整票状态更新成功,但引无提交数据的报错
DBResult result = new DBResult();
result.Success = true;
result.Message = "提交数据处理异常!";
var json = JsonConvert.Serialize(result);

@ -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);

@ -230,6 +230,8 @@ namespace DSWeb.Areas.CommMng.Models
public string CUSTSERVICE { get; set; }
public bool ISNOTPR { get; set; }
#endregion
public CustomRefModel()

@ -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

@ -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));

@ -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";

@ -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,

@ -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' },

@ -299,3 +299,4 @@ Zi.LAN.ISNOTPR = "不核算利润";
Zi.LAN.SALEDEPT = "核算部门";
Zi.LAN.OFFICEADDR = "办公地点";
Zi.LAN.PS = "PS比例";
Zi.LAN.PSCUST = " PS所属客户";

@ -300,4 +300,5 @@ Zi.LAN.ISNOTPR = "不核算利润";
Zi.LAN.SALEDEPT = "核算部门";
Zi.LAN.OFFICEADDR = "办公地点";
Zi.LAN.PS = "PS比例";
Zi.LAN.PSCUST = " PS所属客户";

Loading…
Cancel
Save