diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js
index 5b931cd6..84071392 100644
--- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js
+++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js
@@ -426,7 +426,7 @@ Ext.extend(Shipping.MsChDuiIndex, Ext.Panel, {
fields: ['DC', 'NAME']
});
this.storeBILLSTATUS.add({ "DC": "", "NAME": Zi.LAN.FEERANGALL });
- this.storeBILLSTATUS.add({ "DC": "1", "NAME": Zi.LAN.SubmitAudi });
+ this.storeBILLSTATUS.add({ "DC": "1", "NAME": Zi.LAN.SubmitAudit });
this.storeBILLSTATUS.add({ "DC": "2", "NAME": Zi.LAN.NotSubmitAudit });
this.comboxBILLSTATUS = Ext.create('DsExt.ux.RefTableCombox', {
diff --git a/JobAutoCreateFee/JobAutoCreateFee.csproj b/JobAutoCreateFee/JobAutoCreateFee.csproj
index 449e1939..21837181 100644
--- a/JobAutoCreateFee/JobAutoCreateFee.csproj
+++ b/JobAutoCreateFee/JobAutoCreateFee.csproj
@@ -40,6 +40,10 @@
..\packages\Common.Logging.Core.3.3.1\lib\net40\Common.Logging.Core.dll
+
+ False
+ bin\Debug\JobAutoCreateFee.dll
+
..\packages\log4net.2.0.8\lib\net40-full\log4net.dll
diff --git a/JobAutoCreateFee/JobDjyD6Xf.cs b/JobAutoCreateFee/JobDjyD6Xf.cs
index 56a5336c..25fbf2e3 100644
--- a/JobAutoCreateFee/JobDjyD6Xf.cs
+++ b/JobAutoCreateFee/JobDjyD6Xf.cs
@@ -31,7 +31,6 @@ namespace JobCreateFee
string CustName = context.JobDetail.JobDataMap.GetString("CustName");
string companySecret = context.JobDetail.JobDataMap.GetString("DjyCompanySecret");
string bsType = context.JobDetail.JobDataMap.GetString("DjybsType");
- string carrier = context.JobDetail.JobDataMap.GetString("DjyCarrier");
int reqTimeout = Convert.ToInt32(context.JobDetail.JobDataMap.GetString("RequestTimeout"));
long ts = DataTableToJsonHelper.ConvertDateTimeToInt(DateTime.Now);
@@ -80,35 +79,38 @@ namespace JobCreateFee
dbcon.Open();
foreach (var returndata in returnlist)
{
- var bsno = GETD6BSNO(returndata.mblno, dbcon);
+ var BS = GETBSNO(returndata.mblno, dbcon);
if (returndata.price == "" || returndata.price == null) returndata.price = "0";
if (returndata.ctnrCount == "" || returndata.ctnrCount == null) returndata.ctnrCount = "0";
string sql = " if (select GID from t_op_txxp_log where GID='" + returndata.gid + "') is null INSERT INTO t_op_txxp_log([编号],[GID],[beizhu],[mblno],[bsstatus],[bstype],[createtime]";
- sql = sql + ",[price],[sendtype],[ctnrCount],[ctnrInfo]) values ('" + bsno + "','" + returndata.gid + "'";
+ sql = sql + ",[price],[sendtype],[ctnrCount],[ctnrInfo]) values ('" + BS.BSNO + "','" + returndata.gid + "'";
sql = sql + ",'" + returndata.beizhu + "','" + returndata.mblno + "','" + returndata.bsstatus + "','" + returndata.bstype + "','" + returndata.createtime + "'";
sql = sql + "," + returndata.price + ",'" + returndata.sendtype + "'," + returndata.ctnrCount + ",'" + returndata.ctnrInfo + "')";
SqlCommand cmd = new SqlCommand(sql, dbcon);
cmd.ExecuteNonQuery();
- if (Convert.ToDecimal(returndata.price)!= 0 &&!string.IsNullOrEmpty(CustName) && !string.IsNullOrEmpty(FeeName))
+ if (BS.BSNO != "" && BS.FEESTATUS != "提交财务" && BS.FEESTATUS != "费用封帐" && BS.BSSTATUS != "应付完毕")
{
- sql = "INSERT INTO [t_ch_fee] ([类型],[费用状态],[编号],[费用名称],[结算单位],[客户名称],[标准]";
- sql = sql + ",[单价],[数量],[金额],[币别],[汇率],[备注],[结算金额],[开票金额]";
- sql = sql + ",[录入人],[录入日期],[是否对帐],[顺序],[冲抵金额]";
- sql = sql + ",[机密],[是否垫付],[申请金额],[不开发票],[费用英文名称]";
- sql = sql + ",[申请开票],[提交],[不含税价],[税率],[税额],PROJECTFEEID) VALUES ";
- sql = sql + "('付','审核通过','" + bsno + "','" + FeeName + "','','" + CustName + "','票'";
- sql = sql + "," + returndata.price + ",1," + returndata.price + ",'RMB',1,'',0,0";
- sql = sql + ",'DEMO-SA',GETDATE(),0,0,0";
- sql = sql + ",0,0,0,0,'" + FeeName + "'";
- sql = sql + ",0,0," + returndata.price + ",0,0,'" + returndata.gid + "')";
-
- log.Debug($"{returndata.mblno},-费用语句-{sql}");
- dbcon.Open();
- SqlCommand cmd2 = new SqlCommand(sql, dbcon);
- cmd2.ExecuteNonQuery();
- dbcon.Close();
-
+ if (Convert.ToDecimal(returndata.price) != 0 && !string.IsNullOrEmpty(CustName) && !string.IsNullOrEmpty(FeeName))
+ {
+ sql = "INSERT INTO [t_ch_fee] ([类型],[费用状态],[编号],[费用名称],[结算单位],[客户名称],[标准]";
+ sql = sql + ",[单价],[数量],[金额],[币别],[汇率],[备注],[结算金额],[开票金额]";
+ sql = sql + ",[录入人],[录入日期],[是否对帐],[顺序],[冲抵金额]";
+ sql = sql + ",[机密],[是否垫付],[申请金额],[不开发票],[费用英文名称]";
+ sql = sql + ",[申请开票],[提交],[不含税价],[税率],[税额],PROJECTFEEID) VALUES ";
+ sql = sql + "('付','审核通过','" + BS.BSNO + "','" + FeeName + "','','" + CustName + "','票'";
+ sql = sql + "," + returndata.price + ",1," + returndata.price + ",'RMB',1,'',0,0";
+ sql = sql + ",'DEMO-SA',GETDATE(),0,0,0";
+ sql = sql + ",0,0,0,0,'" + FeeName + "'";
+ sql = sql + ",0,0," + returndata.price + ",0,0,'" + returndata.gid + "')";
+
+ log.Debug($"{returndata.mblno},-费用语句-{sql}");
+ dbcon.Open();
+ SqlCommand cmd2 = new SqlCommand(sql, dbcon);
+ cmd2.ExecuteNonQuery();
+ dbcon.Close();
+
+ }
}
@@ -144,11 +146,12 @@ namespace JobCreateFee
return cmd.ExecuteNonQuery();
}
- static public string GETD6BSNO(string MBLNO, SqlConnection dbcon)
+ static public OPSEAE GETBSNO(string MBLNO, SqlConnection dbcon)
{
+ var OPSEAE = new OPSEAE();
var strSql = new StringBuilder();
- strSql.Append("SELECT TOP 1 编号 BSNO from t_op_seae where 主提单号='" + MBLNO + "'");
+ strSql.Append("SELECT 编号,费用状态,业务状态 from t_op_seae where 主提单号='" + MBLNO + "'");
SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon);
DataTable table = new DataTable();
adapter.Fill(table);
@@ -157,13 +160,16 @@ namespace JobCreateFee
{
foreach (DataRow row in table.Rows)
{
- BSNO = row["BSNO"].ToString();
+ OPSEAE.BSNO = row["编号"].ToString();
+ OPSEAE.FEESTATUS = row["费用状态"].ToString();
+ OPSEAE.BSSTATUS = row["业务状态"].ToString();
+
}
}
- return BSNO;
+ return OPSEAE;
}
}
diff --git a/JobScheduler/bin/Release/quartz_jobs.xml b/JobScheduler/bin/Release/quartz_jobs.xml
index 5b684a35..8e623f98 100644
--- a/JobScheduler/bin/Release/quartz_jobs.xml
+++ b/JobScheduler/bin/Release/quartz_jobs.xml
@@ -6,98 +6,77 @@
+
- JobSendBooking
+ Jobdowloaddjy
Job
订阅数据
- JobSendAgentMail.JobSendBooking,JobSendAgentMail
+ JobCreateFee.JobDjyD6Xf,JobAutoCreateFee
true
false
ConnectString
- Data Source=www.perways.net,18866;Initial Catalog=ShippingWeb_SZYT;Persist Security Info=True;User ID=sa;Password=Ds20040201
+ Data Source=223.223.95.213;Initial Catalog=DONGSHENG;Persist Security Info=True;User ID=sa;Password=Smart*DATA_80120
-
+
- QuerySql
-
- select BSNO,MBLNO,ORDERNO,OPERATORFAX AS BLREMARK,AGENTID,BLFRT,PORTLOAD,PORTDISCHARGE,DESTINATION,CONVERT(varchar(100), ETD, 23) AS ETD,ATD,HBLNO,CONVERT(varchar(100), ETA, 23) ETA,CNTRTOTAL,(
- SELECT CODENAME FROM info_client WHERE SHORTNAME=OP_SEAE.CARRIER) CARRIERID,(CASE WHEN ISSUETYPE='电放' then 'Telex release'else case when ISSUETYPE='正本' then 'Original Bill' else case when ISSUETYPE='SWB' then 'Seaway Bill' else case when issuetype='云提单'then'INTELLIGENT BL'else '' end end end end) ISSUETYPE,(SELECT TOP 1 USERNAME FROM [user] where SHOWNAME=op_seae.OP) OPNAME,(SELECT TOP 1 email1 FROM [VW_user] where SHOWNAME=op_seae.OP) OPEMAIL, (((SELECT TOP 1 EMAIL FROM info_client where SHORTNAME=op_seae.AGENTID ))+';'+( SELECT TOP 1 email1 FROM [VW_userquan] where SHOWNAME=op_seae.SALE )) AGENTEMAIL from op_seae WHERE custno like 'CXE22050397'
-
+ DjyReqUrl
+ http://djypaas.myshipping.net/api/open/finance/expendlist
+
- HblQuerySql
-
- select HBLNO,(CASE WHEN ISSUETYPE='电放' then 'Telex release'else
- case when ISSUETYPE='正本' then 'Original Bill' else case when ISSUETYPE='SWB' then 'Seaway Bill' else case when issuetype='云提单'then'INTELLIGENT BL'else '' end end end end ) ISSUETYPE
- from op_seae_billmanage
-
+ DjyCompanyCode
+ 4fb53bc0-8901-4f0d-a34f-c8a7aeb6692e
-
-
- DocType
- PA
-
-
-
- D7FilePath
- D:\东胜\DONGSHENGWEB\
+
+ DjyCompanyName
+ 青岛益道信国际货运代理有限公司
-
+
+ FeeName
+ 舱单费
+
+
+ CustName
+ 东胜软件
+
+
- MAILSENDACCOUNT
- szytcus@perways.com
+ DjyCompanySecret
+ Lily8256
-
+
- MAILSENDPASSWORD
- PER202100558YT12
+ DjybsType
+ 0
-
+
- MAILSENDSERVICE
- smtp.263.net
+ DjyCarrier
+ ONE
-
+
- MAILSENDPORT
- 25
+ RequestTimeout
+ 30
-
-
- MAILISSSL
- false
-
-
- MAILTEMPLATE
- MailTemplate.html
-
-
-
-
+
+
+
- TriggerBooking
+ Triggerdownloaddjy
Job
- 订阅数据触发器
- JobSendBooking
+ 下载大简云账单数据触发器
+ Jobdowloaddjy
Job
- 0 34 14 * * ?
+ 0 0 12,17 * * ?
-
+
\ No newline at end of file