hanxuntao 8 months ago
parent 665da05413
commit 3033e827d9

@ -473,7 +473,7 @@ namespace DSWeb.Areas.Account.Controllers
var INVGETNOWEXCHANGE = MsSysParamSetDAL.GetData("PARAMNAME='INVGETNOWEXCHANGE'").PARAMVALUE; var INVGETNOWEXCHANGE = MsSysParamSetDAL.GetData("PARAMNAME='INVGETNOWEXCHANGE'").PARAMVALUE;
if (INVGETNOWEXCHANGE == "1") if (INVGETNOWEXCHANGE == "1")
{ {
var invratelist = MsChFeeDAL.GetFeeNowInvCurrList(headData.APPLYTIME); var invratelist = MsChFeeDAL.GetFeeNowInvCurrList(headData.APPLYTIME, Convert.ToString(Session["COMPANYID"]).ToString().Trim());
if (invratelist != null) if (invratelist != null)
{ {
foreach (var exrate in exrateList) foreach (var exrate in exrateList)

@ -4138,7 +4138,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice
var INVGETNOWEXCHANGE = MsSysParamSetDAL.GetData("PARAMNAME='INVGETNOWEXCHANGE'").PARAMVALUE; var INVGETNOWEXCHANGE = MsSysParamSetDAL.GetData("PARAMNAME='INVGETNOWEXCHANGE'").PARAMVALUE;
if (INVGETNOWEXCHANGE == "1") if (INVGETNOWEXCHANGE == "1")
{ {
var invratelist = MsChFeeDAL.GetFeeNowInvCurrList(invdate); var invratelist = MsChFeeDAL.GetFeeNowInvCurrList(invdate,companyid);
if (invratelist != null) if (invratelist != null)
{ {
foreach (var invrate in invratelist) foreach (var invrate in invratelist)

@ -1401,7 +1401,7 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult GetFeeNowInvCurrList() public ContentResult GetFeeNowInvCurrList()
{ {
var COMPANYID = Convert.ToString(Session["COMPANYID"]); var COMPANYID = Convert.ToString(Session["COMPANYID"]);
var list = MsChFeeDAL.GetFeeNowInvCurrList(); var list = MsChFeeDAL.GetFeeNowInvCurrList("",COMPANYID);
var json = JsonConvert.Serialize( var json = JsonConvert.Serialize(
new { Success = true, Message = "查询成功", data = list.ToList() }); new { Success = true, Message = "查询成功", data = list.ToList() });

@ -3847,7 +3847,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
} }
public static List<MsFeeCurr> GetFeeNowInvCurrList(string invdate="") public static List<MsFeeCurr> GetFeeNowInvCurrList(string invdate="",string companyid="")
{ {
var currdate = DateTime.Now; var currdate = DateTime.Now;
var evList = new List<MsFeeCurr>(); var evList = new List<MsFeeCurr>();
@ -3856,14 +3856,16 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("Select CURRENCYID,VALUE,"); strSql.Append("Select CURRENCYID,VALUE,");
strSql.Append("(select CodeName from code_currency where GID=currency_exchange_inv.CURRENCYID) as CODENAME"); strSql.Append("(select CodeName from code_currency where GID=currency_exchange_inv.CURRENCYID) as CODENAME");
strSql.Append(" from currency_exchange_inv "); strSql.Append(" from currency_exchange_inv where 1=1 ");
if (!string.IsNullOrEmpty(companyid))
strSql.Append(" and COMPANYID='" + companyid + "' ");
if (string.IsNullOrEmpty(invdate)) if (string.IsNullOrEmpty(invdate))
{ {
strSql.Append(" where STARTTIME<='" + currdate.ToShortDateString().ToString() + "' and ENDTIME>="); strSql.Append(" and STARTTIME<='" + currdate.ToShortDateString().ToString() + "' and ENDTIME>=");
strSql.Append(" '" + currdate.ToShortDateString().ToString() + "' "); strSql.Append(" '" + currdate.ToShortDateString().ToString() + "' ");
} }
else { else {
strSql.Append(" where STARTTIME<='" + invdate + "' and ENDTIME>="); strSql.Append(" and STARTTIME<='" + invdate + "' and ENDTIME>=");
strSql.Append(" '" + invdate + "' "); strSql.Append(" '" + invdate + "' ");
} }

@ -38,7 +38,7 @@ namespace DSWeb.MvcShipping.DAL.MsCodeFeeTemplate
strSql.Append("GID,OPTYPE,FEETYPE,NAME,[DESCRIPTION],CREATEUSER,CREATETIME"); strSql.Append("GID,OPTYPE,FEETYPE,NAME,[DESCRIPTION],CREATEUSER,CREATETIME");
strSql.Append(",MODIFIEDUSER,MODIFIEDTIME,REMARK,CORPID"); strSql.Append(",MODIFIEDUSER,MODIFIEDTIME,REMARK,CORPID");
strSql.Append(",(CASE FEETYPE WHEN 1 THEN '收' ELSE '付' END) AS FEETYPEREF"); strSql.Append(",(CASE FEETYPE WHEN 1 THEN '收' ELSE '付' END) AS FEETYPEREF");
strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=96002 and EnumValueID=code_fee_template.OPTYPE) as OPTYPEREF"); strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=96004 and EnumValueID=code_fee_template.OPTYPE) as OPTYPEREF");
strSql.Append(",(select ShowName from [user] where GID=code_fee_template.CREATEUSER) as CREATEUSERREF"); strSql.Append(",(select ShowName from [user] where GID=code_fee_template.CREATEUSER) as CREATEUSERREF");
strSql.Append(",ISPUBLIC"); strSql.Append(",ISPUBLIC");
strSql.Append(" from code_fee_template "); strSql.Append(" from code_fee_template ");

@ -146,13 +146,13 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsRptNoTotalDAL
if (NORPTSTLDATETYPE.PARAMVALUE == "1") if (NORPTSTLDATETYPE.PARAMVALUE == "1")
{ {
strSql.Append(",[dbo].[GetCustOplbStlDay](A.OPDATE,F.CUSTOMERNAME,A.SALE,A.OPLBNAME) AS STLDATE"); strSql.Append(",[dbo].[GetCustOplbStlDay](A.OPDATE,F.CUSTOMERNAME,A.SALE,A.OPLBNAME) AS STLDATE");
strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=A.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =F.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY "); strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 WHEN '半月结' then 15 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=A.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =F.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY ");
} }
else else
{ {
strSql.Append(",CASE WHEN A.STLDATE IS NULL THEN dbo.trimdate( A.OPDATE) ELSE dbo.trimdate(A.STLDATE) END STLDATE"); strSql.Append(",CASE WHEN A.STLDATE IS NULL THEN dbo.trimdate( A.OPDATE) ELSE dbo.trimdate(A.STLDATE) END STLDATE");
strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=A.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =A.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY "); strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 WHEN '半月结' then 15 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=A.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =A.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY ");
} }
@ -259,13 +259,13 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsRptNoTotalDAL
if (NORPTSTLDATETYPE.PARAMVALUE == "1") if (NORPTSTLDATETYPE.PARAMVALUE == "1")
{ {
strSql.Append(",[dbo].[GetCustOplbStlDay](B.OPDATE,F.CUSTOMERNAME,B.SALE,B.OPLBNAME) AS STLDATE"); strSql.Append(",[dbo].[GetCustOplbStlDay](B.OPDATE,F.CUSTOMERNAME,B.SALE,B.OPLBNAME) AS STLDATE");
strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=B.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =F.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY "); strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 WHEN '半月结' then 15 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=B.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =F.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY ");
} }
else else
{ {
strSql.Append(",CASE WHEN B.STLDATE IS NULL THEN dbo.trimdate( B.OPDATE) ELSE dbo.trimdate(B.STLDATE) END STLDATE"); strSql.Append(",CASE WHEN B.STLDATE IS NULL THEN dbo.trimdate( B.OPDATE) ELSE dbo.trimdate(B.STLDATE) END STLDATE");
strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=B.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =B.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY "); strSql.Append(",isnull((select top 1 case ACCTYPE WHEN '月结' then accmonth*30 + accdays WHEN '季结' then accmonth*90 + accdays WHEN '旬结' then 10 WHEN '半月结' then 15 else accdays end from Info_Client_ACCDATE where (OPLBNAME='' or OPLBNAME=B.OPLBNAME) AND LINKGID = (select top 1 GID from info_client where shortname =B.CUSTOMERNAME ) AND ((ISNULL(SALE,'')='') or (ISNULL(SALE,'')=B.SALE)) and BGNDATE<=B.OPDATE AND ENDDATE>=B.OPDATE),0) CONTRACTDAY ");
} }

@ -27,24 +27,27 @@ Ext.extend(Shipping.MsCodeFeeTemplateEdit, Ext.Panel, {
//枚举参照相关(编辑form) //枚举参照相关(编辑form)
this.StoreOpLb = Ext.create('Ext.data.Store', { //this.StoreOpLb = Ext.create('Ext.data.Store', {
fields: ['OPLB', 'OPLBNAME'] // fields: ['OPLB', 'OPLBNAME']
}); //});
this.StoreOpLb.add({ "OPLB": 1, "OPLBNAME": "海运出口" }); //this.StoreOpLb.add({ "OPLB": 1, "OPLBNAME": "海运出口" });
this.StoreOpLb.add({ "OPLB": 2, "OPLBNAME": "海运进口" }); //this.StoreOpLb.add({ "OPLB": 2, "OPLBNAME": "海运进口" });
this.StoreOpLb.add({ "OPLB": 3, "OPLBNAME": "空运出口" }); //this.StoreOpLb.add({ "OPLB": 3, "OPLBNAME": "空运出口" });
this.StoreOpLb.add({ "OPLB": 7, "OPLBNAME": "空运进口" }); //this.StoreOpLb.add({ "OPLB": 7, "OPLBNAME": "空运进口" });
this.StoreOpLb.add({ "OPLB": 4, "OPLBNAME": "报关业务" }); //this.StoreOpLb.add({ "OPLB": 4, "OPLBNAME": "报关业务" });
this.StoreOpLb.add({ "OPLB": 5, "OPLBNAME": "大宗散货" }); //this.StoreOpLb.add({ "OPLB": 5, "OPLBNAME": "大宗散货" });
this.StoreOpLb.add({ "OPLB": 6, "OPLBNAME": "综合业务" }); //this.StoreOpLb.add({ "OPLB": 6, "OPLBNAME": "综合业务" });
this.StoreOpLb.add({ "OPLB": 8, "OPLBNAME": "陆运业务" }); //this.StoreOpLb.add({ "OPLB": 8, "OPLBNAME": "陆运业务" });
this.StoreOpLb.add({ "OPLB": 9, "OPLBNAME": "铁路运输" }); //this.StoreOpLb.add({ "OPLB": 9, "OPLBNAME": "铁路运输" });
this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {});
this.StoreOpLb.load({ params: { enumTypeId: 96005 } });
this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', { this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: Zi.LAN.OPTYPE, //'业务类别', fieldLabel: Zi.LAN.OPTYPE, //'业务类别',
store: this.StoreOpLb, store: this.StoreOpLb,
valueField: 'OPLB', valueField: 'EnumValueName',
displayField: 'OPLBNAME', displayField: 'EnumValueName',
forceSelection: true, forceSelection: true,
name: 'OPTYPE' name: 'OPTYPE'
}); });

@ -486,17 +486,17 @@ Ext.extend(Shipping.FeeTemplateAdd, Ext.Panel, {
} else if (this.stroplb == 'op_Aire') { } else if (this.stroplb == 'op_Aire') {
sql = ' OpType=3 and FeeType=' + this.feeType; sql = ' OpType=3 and FeeType=' + this.feeType;
} else if (this.stroplb == 'op_Airi') { } else if (this.stroplb == 'op_Airi') {
sql = ' OpType=7 and FeeType=' + this.feeType;
} else if (this.stroplb == 'op_Apply') {
sql = ' OpType=4 and FeeType=' + this.feeType; sql = ' OpType=4 and FeeType=' + this.feeType;
} else if (this.stroplb == 'op_Apply') {
sql = ' OpType=5 and FeeType=' + this.feeType;
} else if (this.stroplb == 'op_Bulk') { } else if (this.stroplb == 'op_Bulk') {
sql = ' OpType=5 and FeeType=' + this.feeType; sql = ' OpType=5 and FeeType=' + this.feeType;
} else if (this.stroplb == 'op_other') { } else if (this.stroplb == 'op_other') {
sql = ' OpType=6 and FeeType=' + this.feeType; sql = ' OpType=7 and FeeType=' + this.feeType;
} else if (this.stroplb == 'op_truck') { } else if (this.stroplb == 'op_truck') {
sql = ' OpType=8 '; sql = ' OpType=8 ';
} else if (this.stroplb == 'op_railway') { } else if (this.stroplb == 'op_railway') {
sql = ' OpType=9 and FeeType=' + this.feeType; sql = ' OpType=5 and FeeType=' + this.feeType;
} else { } else {
sql = ' FeeType=' + this.feeType; sql = ' FeeType=' + this.feeType;
} }

@ -136,7 +136,7 @@ namespace JobCreateFee
price = AMOUNT; price = AMOUNT;
} }
} }
exrate = GetUsdExrate(dbcon, curr); exrate = GetUsdExrate(dbcon, curr,BS.ETD);
} }
price = price.Replace(",", ""); price = price.Replace(",", "");
@ -230,7 +230,7 @@ namespace JobCreateFee
var OPSEAE = new D7OPSEAE(); var OPSEAE = new D7OPSEAE();
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("SELECT BSNO,BSSTATUS,FEESTATUS from op_seae where MBLNO='" + MBLNO + "'"); strSql.Append("SELECT BSNO,BSSTATUS,FEESTATUS,ETD from op_seae where MBLNO='" + MBLNO + "'");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon); SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable(); DataTable table = new DataTable();
adapter.Fill(table); adapter.Fill(table);
@ -242,11 +242,12 @@ namespace JobCreateFee
OPSEAE.BSNO = row["BSNO"].ToString(); OPSEAE.BSNO = row["BSNO"].ToString();
OPSEAE.FEESTATUS = Convert.ToBoolean(row["FEESTATUS"].ToString()); OPSEAE.FEESTATUS = Convert.ToBoolean(row["FEESTATUS"].ToString());
OPSEAE.BSSTATUS = Convert.ToBoolean(row["BSSTATUS"].ToString()); OPSEAE.BSSTATUS = Convert.ToBoolean(row["BSSTATUS"].ToString());
OPSEAE.ETD = Convert.ToString(row["BSSTATUS"].ToString());
}
} }
}
return OPSEAE; return OPSEAE;
} }
@ -407,13 +408,16 @@ namespace JobCreateFee
} }
static public decimal GetUsdExrate(SqlConnection dbcon,string curr) static public decimal GetUsdExrate(SqlConnection dbcon,string curr,string ETD)
{ {
decimal usdexrate = 0; decimal usdexrate = 0;
var startdate = ETD;
if (string.IsNullOrEmpty(startdate)) startdate = DateTime.Now.ToString("yyyy-MM-dd");
if (curr == "USD") if (curr == "USD")
{ {
var strSql = new StringBuilder(); var strSql = new StringBuilder();
strSql.Append("select VALUE from currency_exchange where STARTTIME<=GETDATE() and ENDTIME>=GETDATE()"); strSql.Append("select VALUE from currency_exchange where STARTTIME<='"+ startdate + "' and ENDTIME>='"+ startdate + "'");
strSql.Append(" and CURRENCYID in (select GID from code_currency where CODENAME='"+curr+"') "); strSql.Append(" and CURRENCYID in (select GID from code_currency where CODENAME='"+curr+"') ");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon); SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable(); DataTable table = new DataTable();
@ -525,6 +529,7 @@ namespace JobCreateFee
public string BSNO { get; set; } public string BSNO { get; set; }
public bool FEESTATUS { get; set; } public bool FEESTATUS { get; set; }
public bool BSSTATUS { get; set; } public bool BSSTATUS { get; set; }
public string ETD { get; set; }
} }
//public class feeback //public class feeback

@ -163,7 +163,7 @@ namespace JobSendAgentMail
if (!string.IsNullOrEmpty(HBLNO) && !string.IsNullOrEmpty(STATUS)) if (!string.IsNullOrEmpty(HBLNO) && !string.IsNullOrEmpty(STATUS))
{ {
var tastStr = $" update op_seae_edi set MANIFESTSTATUS=MANIFESTSTATUS+' '+'{STATUS}' where HBLNO='{HBLNO}' AND MANIFESTSTATUS not like '%{STATUS}%' "; var tastStr = $" update op_seae_edi set MANIFESTSTATUS=ISNULL(MANIFESTSTATUS,'')+' '+'{STATUS}' where HBLNO='{HBLNO}' AND ISNULL(MANIFESTSTATUS,'') not like '%{STATUS}%' ";
SqlCommand cmdtast = new SqlCommand(tastStr, dbcon); SqlCommand cmdtast = new SqlCommand(tastStr, dbcon);
cmdtast.ExecuteNonQuery(); cmdtast.ExecuteNonQuery();
log.Debug($"更新舱单状态:" + HBLNO + " " + STATUS); log.Debug($"更新舱单状态:" + HBLNO + " " + STATUS);
@ -172,12 +172,13 @@ namespace JobSendAgentMail
if (!string.IsNullOrEmpty(AGENTMAIL.AGENTMAIL)) if (!string.IsNullOrEmpty(AGENTMAIL.AGENTMAIL))
{ {
log.Debug($"生成转发:" + HBLNO + " " + STATUS); log.Debug($"生成转发:" + HBLNO + " " + STATUS);
MAILTITLE = MAILTITLE.Replace("$MBLNO$", AGENTMAIL.MBLNO); var tmpmailtitle = MAILTITLE;
MAILTITLE = MAILTITLE.Replace("$INVNO$",AGENTMAIL.INVNO); tmpmailtitle = tmpmailtitle.Replace("$MBLNO$", AGENTMAIL.MBLNO);
MAILTITLE = MAILTITLE.Replace("$MAILTITLE$", recInfo.Subject); tmpmailtitle = tmpmailtitle.Replace("$INVNO$",AGENTMAIL.INVNO);
tmpmailtitle = tmpmailtitle.Replace("$MAILTITLE$", recInfo.Subject);
var sendmail = new MailSend(); var sendmail = new MailSend();
sendmail.GID = Guid.NewGuid().ToString(); sendmail.GID = Guid.NewGuid().ToString();
sendmail.Title = MAILTITLE; sendmail.Title = tmpmailtitle;
sendmail.Body = recInfo.Body; sendmail.Body = recInfo.Body;
sendmail.SendTo = AGENTMAIL.AGENTMAIL; sendmail.SendTo = AGENTMAIL.AGENTMAIL;
sendmail.CCTo= AGENTMAIL.OPEMAIL; sendmail.CCTo= AGENTMAIL.OPEMAIL;

Loading…
Cancel
Save