diff --git a/.gitignore b/.gitignore
index ab6c5d63..041cceaf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -55,3 +55,5 @@ BookingJieFeng/BookingJieFeng.csproj.user
DispatchWeb/DispatchWeb.csproj.user
DSWeb/Properties/PublishProfiles/FolderProfile.pubxml
/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs
+/DS7GIT.rar
+/WebSqlHelper/Fakes/Microsoft.Practices.EnterpriseLibrary.Common.fakes
diff --git a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs
index 27d8b1c7..9d8118f5 100644
--- a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs
+++ b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs
@@ -518,7 +518,10 @@ namespace DSWeb.Areas.Account.Controllers
var headdata = ChpayapplicationDAL.GetData(" BILLNO='" + bill + "'", Convert.ToString(Session["USERID"]), CookieConfig.GetCookie_UserCode(Request), Convert.ToString(Session["COMPANYID"]));
-
+ //var _rr= ChpayapplicationDAL.FanWeiOA_Submit(bill, Convert.ToString(Session["USERID"]), Convert.ToString(Session["CODENAME"]), Convert.ToString(Session["COMPANYID"]));
+
+ //var json2 = JsonConvert.Serialize(_rr);
+ //return new ContentResult() { Content = json2 };
if (headdata.BILLSTATUS == 1||headdata.BILLSTATUS == 6)
diff --git a/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs b/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs
index 50ce1b7b..67468a58 100644
--- a/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs
+++ b/DSWeb/Areas/CommMng/DAL/PublicAPIDAL.cs
@@ -519,7 +519,7 @@ namespace DSWeb.Areas.CommMng.DAL
///
///
///
- public DateTime ETD { get; set; }
+ public DateTime? ETD { get; set; }
///
/// 海运托书
///
@@ -620,15 +620,18 @@ namespace DSWeb.Areas.CommMng.DAL
{ //将识别数据与现有数据合并
//如识别数据有内容 则用其代替现有字段内容
- var _result = data.commitResult;
-
- if (!string.IsNullOrWhiteSpace(_result.发货人))
+ if (data != null && data.commitResult != null)
{
- //headdata.
- }
- //发货人 SHIPPER
- PropNameList = new Dictionary
+ var _result = data.commitResult;
+
+ if (!string.IsNullOrWhiteSpace(_result.发货人))
+ {
+ //headdata.
+ }
+
+ //发货人 SHIPPER
+ PropNameList = new Dictionary
{
@@ -671,42 +674,43 @@ namespace DSWeb.Areas.CommMng.DAL
{ "HSCODE", "HSCODE" }
};
- foreach (var item in PropNameList)
- {
- //var value = _result.GetType().GetProperty("发货人").GetValue(_result, null);
+ foreach (var item in PropNameList)
+ {
+ //var value = _result.GetType().GetProperty("发货人").GetValue(_result, null);
- //headdata.SetPropertyValue("")
- var value = _result.GetType().GetProperty(item.Key).GetValue(_result, null);
+ //headdata.SetPropertyValue("")
+ var value = _result.GetType().GetProperty(item.Key).GetValue(_result, null);
- if (value != null && !string.IsNullOrWhiteSpace(value.ToString()))
- {
- headdata.SetPropertyValue(item.Value, value.ToString());
+ if (value != null && !string.IsNullOrWhiteSpace(value.ToString()))
+ {
+ headdata.SetPropertyValue(item.Value, value.ToString());
+ }
}
- }
- //不规则的数据
+ //不规则的数据
- var cdc = new CommonDataContext();
+ var cdc = new CommonDataContext();
- headdata.CNTRTOTAL = _result.GetCntrtotal();
+ headdata.CNTRTOTAL = _result.GetCntrtotal();
- var _customername = headdata.CUSTOMERNAME;
+ var _customername = headdata.CUSTOMERNAME;
- //如果CUSTOMERNAME在info_client.SHORTNAME当中不存在 则尝试用info_client.FULLNAME对应后修改之
+ //如果CUSTOMERNAME在info_client.SHORTNAME当中不存在 则尝试用info_client.FULLNAME对应后修改之
- var _infoclient = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == _customername);
-
- if (_infoclient == null || string.IsNullOrWhiteSpace(_infoclient.SHORTNAME))
- {
- var _tempinfoclient = cdc.info_client.FirstOrDefault(x => x.EnFullName == _customername || x.DESCRIPTION == _customername);
+ var _infoclient = cdc.info_client.FirstOrDefault(x => x.SHORTNAME == _customername);
- if (_tempinfoclient == null || string.IsNullOrWhiteSpace(_tempinfoclient.SHORTNAME))
+ if (_infoclient == null || string.IsNullOrWhiteSpace(_infoclient.SHORTNAME))
{
- headdata.CUSTOMERNAME = _tempinfoclient.SHORTNAME;
+ var _tempinfoclient = cdc.info_client.FirstOrDefault(x => x.EnFullName == _customername || x.DESCRIPTION == _customername);
+
+ if (_tempinfoclient == null || string.IsNullOrWhiteSpace(_tempinfoclient.SHORTNAME))
+ {
+ headdata.CUSTOMERNAME = _tempinfoclient.SHORTNAME;
+ }
}
+
}
}
-
private Dictionary PropNameList { get; set; } = new Dictionary();
@@ -1180,20 +1184,28 @@ namespace DSWeb.Areas.CommMng.DAL
var detaildata = GetDetailData(headdata);
- var sendobj = new
- {
- detailData = detaildata,
- mainData = maindata,
- otherParams = new { isnextflow = "1" },
- remark = "",
- requestLevel = "",
- requestName = "业务类供应商付款申请-票结",
- workflowId = "117"
+ //var sendobj = new
+ //{
+ // detailData = detaildata,
+ // mainData = maindata,
+ // otherParams = new { isnextflow = "1" },
+ // remark = "",
+ // requestLevel = "",
+ // requestName = "业务类供应商付款申请-票结",
+ // workflowId = "117"
+ //};
+
+ var valuedic = new Dictionary {
+ { "mainData", JsonConvert.Serialize(maindata) },
+ { "detailData", JsonConvert.Serialize(detaildata)},
+ { "otherParams", JsonConvert.Serialize(new { isnextflow = "1" }) },
+ { "requestName", "业务类供应商付款申请-票结" },
+ { "workflowId", "117" }
};
- var jsonstr=JsonConvert.Serialize(sendobj);
+ //var jsonstr=JsonConvert.Serialize(sendobj).Replace("\r\n","");
- var rtn = WebRequestHelper.DoPost_Header(Url, dic, jsonstr);
+ var rtn = WebRequestHelper.DoPost_Header(Url, dic, valuedic);
_res = JsonConvert.Deserialize(rtn);
diff --git a/DSWeb/Areas/Dispatch/Helper/WebRequestHelper.cs b/DSWeb/Areas/Dispatch/Helper/WebRequestHelper.cs
index d4aa2d80..7aaab75d 100644
--- a/DSWeb/Areas/Dispatch/Helper/WebRequestHelper.cs
+++ b/DSWeb/Areas/Dispatch/Helper/WebRequestHelper.cs
@@ -1,4 +1,5 @@
-using System;
+using Quartz.Util;
+using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
@@ -155,7 +156,9 @@ namespace DSWeb.Areas.Dispatch.Helper
return e.Message;
}
}
- public static string DoPost_Header(string url, Dictionary dic, string json)
+
+ //目前仅用于荣圣达泛微OA对接,用application/x-www-form-urlencoded传递
+ public static string DoPost_Header(string url, Dictionary dic, Dictionary valuedic)
{
try
{
@@ -165,14 +168,8 @@ namespace DSWeb.Areas.Dispatch.Helper
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url);
req.Method = "POST";
- if (!string.IsNullOrWhiteSpace(json))
+ if (valuedic!=null)
{
- byte[] postBytes = Encoding.UTF8.GetBytes(json);
- req.ContentType = "application/json; charset=utf-8";
- req.ContentLength = Encoding.UTF8.GetByteCount(json);
- Stream stream = req.GetRequestStream();
- stream.Write(postBytes, 0, postBytes.Length);
- req.Timeout = 10000;
if (dic.Count > 0)
{
foreach (var item in dic)
@@ -181,7 +178,30 @@ namespace DSWeb.Areas.Dispatch.Helper
}
}
- stream.Close();
+ req.ContentType = "application/x-www-form-urlencoded";
+
+ StringBuilder paraStrBuilder = new StringBuilder();
+ foreach (string key in valuedic.Keys)
+ {
+ paraStrBuilder.AppendFormat("{0}={1}&", key, valuedic[key]);
+ }
+ string para = paraStrBuilder.ToString();
+ if (para.EndsWith("&"))
+ para = para.Remove(para.Length - 1, 1);
+
+ byte[] bt = Encoding.UTF8.GetBytes(para);
+ string responseData = String.Empty;
+ req.ContentLength = bt.Length;
+ //GetRequestStream 输入流数据
+ using (Stream reqStream = req.GetRequestStream())
+ {
+ reqStream.Write(bt, 0, bt.Length);
+ reqStream.Close();
+ }
+
+
+ req.Timeout = 10000;
+
}
else
{
diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsRptSaleBalProfitShareController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsRptSaleBalProfitShareController.cs
index 50a96991..20378cab 100644
--- a/DSWeb/Areas/MvcShipping/Controllers/MsRptSaleBalProfitShareController.cs
+++ b/DSWeb/Areas/MvcShipping/Controllers/MsRptSaleBalProfitShareController.cs
@@ -265,6 +265,13 @@ namespace DSWeb.MvcShipping.Controllers
}
+ public ContentResult GetTBDataListStr(int start, int limit, string condition, string TEU, string PROFITBOUNDS, string sort, string printstr, string sortstr)
+ {
+ var data = MsRptSaleBalProfitShareDAL.GetTBDataListStr(condition, TEU, PROFITBOUNDS, Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]), sort);
+
+ var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", data = data.ToString() });
+ return new ContentResult() { Content = json };
+ }
public ContentResult SaveFee(string data)
{
diff --git a/DSWeb/Areas/MvcShipping/DAL/MsCodeOpStatus/MsCodeOpStatusDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsCodeOpStatus/MsCodeOpStatusDAL.cs
index acb67c1f..0dfd6553 100644
--- a/DSWeb/Areas/MvcShipping/DAL/MsCodeOpStatus/MsCodeOpStatusDAL.cs
+++ b/DSWeb/Areas/MvcShipping/DAL/MsCodeOpStatus/MsCodeOpStatusDAL.cs
@@ -83,7 +83,7 @@ namespace DSWeb.MvcShipping.DAL.MsCodeOpStatusDAL
strSql.Append("SELECT ");
strSql.Append("GID,SerialNo,OPTYPE,OPSTATUS,STTYPE,CORPID,REMARKS,COLOR");
strSql.Append(" from code_op_status_detail ");
- if (strCondition.Trim() != String.Empty)
+ if (!string.IsNullOrWhiteSpace(strCondition))
{
strSql.Append(" where " + strCondition);
}
diff --git a/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs
index 3f1ec7b5..3b0666d2 100644
--- a/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs
+++ b/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs
@@ -2252,9 +2252,120 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL
#region 泰邦 提成计算
+
static public List GetTBDataList(string strCondition, string TEU, string PROFITBOUNDS, string userid, string usercode, string companyid, string sort = null)
{
+ //var rangstr = GetRangDAStr("index", userid, usercode, companyid);
+ //var strConditionAll = strCondition;
+ //if (!string.IsNullOrEmpty(rangstr))
+ //{
+ // if (!string.IsNullOrEmpty(strCondition))
+ // {
+ // strConditionAll = strCondition + " and " + rangstr;
+ // }
+ // else
+ // {
+ // strConditionAll = rangstr;
+ // }
+ //}
+
+
+ //var strSql = new StringBuilder();
+ //strSql.Append(" if object_id('tempdb..##SALEPROFITSHARE') is not null Begin DROP TABLE ##SALEPROFITSHARE End ");
+
+ //strSql.Append("SELECT * into ##SALEPROFITSHARE FROM (SELECT B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,");
+ //strSql.Append("B.ETD,B.OPDATE,B.CUSTOMDATE,B.FEESTATUSREF,B.BLFRT,B.BSSOURCEDETAIL,B.STLNAME");
+ //strSql.Append(",B.STLDATE ");
+
+ //strSql.Append(",B.CUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.NETWEIGHT,B.KGS,B.TEU,B.CNTRTOTAL,B.CORPID");
+ //strSql.Append(",B.CNTR1,B.CNTR2,B.CNTR3,B.CNTR4,B.CNTR5,B.CNTR6,B.CNTR7,B.CNTR8,B.CNTR9,B.CNTR10,B.OTCNTR,B.TRADETYPE,B.GOODSNAME,B.FEESTATUS");
+ //strSql.Append(",B.RMBDR,B.RMBCR,B.STLRMBDR,B.STLRMBCR,B.USDDR,B.USDCR,B.STLUSDDR,B.STLUSDCR,B.OTDR,B.OTCR,B.STLOTDR,B.STLOTCR,B.TTLDR,B.TTLCR,B.STLTTLDR,B.STLTTLCR");
+ //strSql.Append(",B.USDPROFIT,B.RMBPROFIT,B.OTPROFIT,B.TTLPROFIT,B.PROFITRATE,B.TAXPROFIT,B.RMBNODR,B.USDNODR,B.OTNODR,B.TTLNODR,B.RMBNOCR,B.USDNOCR,B.OTNOCR,B.TTLNOCR ");
+ //strSql.Append(",T.SETTLETIME,f.ISFEE,T.STLTTLDR MONTHSTLTTLDR");
+
+ ////该客户的 Info_Client_ACCDATE.BGNDATE (生效日期) 减 每票货的开船日期得出是否超过一年以内
+ ////一年以内则提成30% 一年之外为15%
+ ////此处ACTUALDAY为ETD-帐期生效日期。大于1年则ACTUALDAY小于-365
+ //strSql.Append(",DATEDIFF([day],b.ETD,(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME)))+1 ACTUALDAY");
+
+ //strSql.Append(",DATEDIFF([day],ISNULL(T.SETTLETIME,GETDATE()),(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME))) NODAY");
+
+ //strSql.Append(",B.ACCDATE ETDMONTH,(CASE f.ISFEE WHEN 1 THEN '已发放' else '未发放' end) as ISFEEREF,CASE WHEN (B.TTLDR-B.STLTTLDR)<0 THEN 0 ELSE (dbo.GetZHZYTTL(B.STLDATE,B.BSNO)+TTLNODR*ZYRATE*DATEDIFF([day],B.STLDATE,GETDATE())) END ZYTTL ");
+
+ //strSql.Append(" FROM v_op_bill_gain_zh B ");
+ //strSql.Append("LEFT JOIN V_MAX_SETTLEMENTTIME_BSDR T ON (T.BSNO=B.BSNO) ");
+ //strSql.Append("LEFT JOIN op_sale_proftfee f ON (f.BSNO=B.BSNO) where B.TTLDR<>0 ");
+ //strSql.Append(" AND B.TTLDR=B.STLTTLDR ");
+
+
+ //if (!string.IsNullOrEmpty(strConditionAll))
+ //{
+ // strSql.Append(" and " + strConditionAll);
+ //}
+
+ ////if (isalldr == "1")
+ ////{
+ // strSql.Append(" union SELECT B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,");
+ // strSql.Append("B.ETD,B.OPDATE,B.CUSTOMDATE,B.FEESTATUSREF,B.BLFRT,B.BSSOURCEDETAIL,B.STLNAME");
+ // strSql.Append(",B.STLDATE ");
+ // strSql.Append(",B.CUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.NETWEIGHT,B.KGS,B.TEU,B.CNTRTOTAL,B.CORPID");
+ // strSql.Append(",B.CNTR1,B.CNTR2,B.CNTR3,B.CNTR4,B.CNTR5,B.CNTR6,B.CNTR7,B.CNTR8,B.CNTR9,B.CNTR10,B.OTCNTR,B.TRADETYPE,B.GOODSNAME,B.FEESTATUS");
+ // strSql.Append(",B.RMBDR,B.RMBCR,B.STLRMBDR,B.STLRMBCR,B.USDDR,B.USDCR,B.STLUSDDR,B.STLUSDCR,B.OTDR,B.OTCR,B.STLOTDR,B.STLOTCR,B.TTLDR,B.TTLCR,B.STLTTLDR,B.STLTTLCR");
+ // strSql.Append(",B.USDPROFIT,B.RMBPROFIT,B.OTPROFIT,B.TTLPROFIT,B.PROFITRATE,B.TAXPROFIT,B.RMBNODR,B.USDNODR,B.OTNODR,B.TTLNODR,B.RMBNOCR,B.USDNOCR,B.OTNOCR,B.TTLNOCR ");
+ // strSql.Append(",T.SETTLETIME,f.ISFEE,0 MONTHSTLTTLDR");
+
+ // //该客户的 Info_Client_ACCDATE.BGNDATE (生效日期) 减 每票货的开船日期得出是否超过一年以内
+ // //一年以内则提成30% 一年之外为15%
+ // //此处NODAY为ETD-帐期生效日期。大于1年则noday小于-365
+ // strSql.Append(",DATEDIFF([day],b.ETD,(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME)))+1 ACTUALDAY");
+
+ // strSql.Append(",DATEDIFF([day],ISNULL(T.SETTLETIME,GETDATE()),(select min(bgndate) from Info_Client_ACCDATE where LINKGID=(select gid from Info_Client where SHORTNAME=b.CUSTOMERNAME))) NODAY");
+
+ // strSql.Append(",B.ACCDATE ETDMONTH,(CASE f.ISFEE WHEN 1 THEN '已发放' else '未发放' end) as ISFEEREF,0 ZYTTL ");
+
+ // strSql.Append(" FROM v_op_bill_gain_zh B ");
+ // strSql.Append("LEFT JOIN V_MAX_SETTLEMENTTIME_CR T ON (T.BSNO=B.BSNO) ");
+ // strSql.Append("LEFT JOIN op_sale_proftfee f ON (f.BSNO=B.BSNO) where B.TTLDR=0 ");
+
+ // //strSql.Append("AND (T.SETTLETIME>='" + CurDateBegin.ToString("yyyy-MM-dd") + "' AND T.SETTLETIME<='" + CurDateEnd.ToString("yyyy-MM-dd 23:59:59") + "' ");
+ // //strSql.Append(" AND B.ACCDATE<='" + CurDateBegin.ToString("yyyy-MM") + "') ");
+
+ // if (!string.IsNullOrEmpty(strConditionAll))
+ // {
+ // strSql.Append(" and " + strConditionAll);
+ // }
+
+
+
+ ////}
+ //strSql.Append(" ) AS V ");
+ ////
+ //var sortstring = DatasetSort.Getsortstring(sort);
+ //if (!string.IsNullOrEmpty(sortstring))
+ //{
+ // strSql.Append(" order by " + sortstring);
+ //}
+ //else
+ //{
+ // strSql.Append(" order by SALE,(CASE WHEN TTLPROFIT<0 THEN convert(datetime,convert(varchar(7),ACCDATE)+'-01') ELSE convert(datetime,convert(varchar(7),ACCDATE)+'-02') END),SETTLETIME,CREATETIME DESC");
+ // // strSql.Append(" order by SALE,SETTLETIME,ETD,CREATETIME DESC");
+ //}
+
+ //strSql.Append(" SELECT * FROM ##SALEPROFITSHARE ");
+
+ var strSql = GetTBDataListStr(strCondition, TEU, PROFITBOUNDS, userid, usercode, companyid, sort);
+
+ return SetTBData(strCondition, strSql, TEU, PROFITBOUNDS);
+ }
+
+
+
+
+ static public StringBuilder GetTBDataListStr(string strCondition, string TEU, string PROFITBOUNDS, string userid, string usercode, string companyid, string sort = null)
+ {
+
+
var rangstr = GetRangDAStr("index", userid, usercode, companyid);
var strConditionAll = strCondition;
if (!string.IsNullOrEmpty(rangstr))
@@ -2353,7 +2464,9 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL
strSql.Append(" SELECT * FROM ##SALEPROFITSHARE ");
- return SetTBData(strCondition, strSql, TEU, PROFITBOUNDS);
+ //return SetTBData(strCondition, strSql, TEU, PROFITBOUNDS);
+
+ return strSql;
}
diff --git a/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs b/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs
index fb4c3b53..00bd9c16 100644
--- a/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs
+++ b/DSWeb/Areas/MvcShipping/Helper/DingTalkHelper.cs
@@ -1,4 +1,5 @@
-using DSWeb.Areas.Dispatch.Helper;
+using AlibabaCloud.SDK.Dingtalkh5package_1_0.Models;
+using DSWeb.Areas.Dispatch.Helper;
using DSWeb.Areas.MvcShipping.DB;
using DSWeb.Areas.MvcShipping.Job;
using log4net;
@@ -9,6 +10,7 @@ using System.Configuration;
using System.Linq;
using System.Runtime.Caching;
using System.Web;
+using Tea;
namespace DSWeb.Areas.MvcShipping.Helper
{
@@ -64,4 +66,48 @@ namespace DSWeb.Areas.MvcShipping.Helper
return false;
}
}
+
+
+ public class DingTalkAuditHelper {
+ public static AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client CreateClient()
+ {
+ AlibabaCloud.OpenApiClient.Models.Config config = new AlibabaCloud.OpenApiClient.Models.Config();
+ config.Protocol = "https";
+ config.RegionId = "central";
+ return new AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client(config);
+ }
+
+ public static void GetToken() {
+ AlibabaCloud.SDK.Dingtalkoauth2_1_0.Client client = CreateClient();
+ AlibabaCloud.SDK.Dingtalkoauth2_1_0.Models.GetSsoAccessTokenRequest getSsoAccessTokenRequest = new AlibabaCloud.SDK.Dingtalkoauth2_1_0.Models.GetSsoAccessTokenRequest
+ {
+ Corpid = "ding7f22510fcf025d5424f2f5cc6abecb85",
+ SsoSecret = "LPHtv90gkqmq-fzQ3i36vUNaOtSS39SmtdpsUgQaQbJStHoaWey2na9Pu6_SmCCp",
+ };
+ try
+ {
+ client.GetSsoAccessToken(getSsoAccessTokenRequest);
+ var _rstr=client.ToString();
+
+ }
+ catch (TeaException err)
+ {
+ if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message))
+ {
+ // err 中含有 code 和 message 属性,可帮助开发定位问题
+ }
+ }
+ catch (Exception _err)
+ {
+ TeaException err = new TeaException(new Dictionary
+ {
+ { "message", _err.Message }
+ });
+ if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message))
+ {
+ // err 中含有 code 和 message 属性,可帮助开发定位问题
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs
index 24bbe0fc..c2ee3860 100644
--- a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs
+++ b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.cs
@@ -28,7 +28,7 @@ namespace Job_Get_FanWeiDeE9
public class Job_Get_FanWeiDeE9 : IJob
{
- private ILog log = LogManager.GetLogger(typeof(Job_Bosch_FTP));
+ private ILog log = LogManager.GetLogger(typeof(Job_Get_FanWeiDeE9));
//private string connStr { get; set; }
private const string admin_userid = "1BEC90E1-9780-472F-90C2-0C6390C044A4";
diff --git a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj
index e20ed193..6ba69797 100644
--- a/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj
+++ b/Job_Get_FanWeiDeE9/Job_Get_FanWeiDeE9.csproj
@@ -79,8 +79,9 @@
..\packages\MimeKit.2.9.2\lib\net45\MimeKit.dll
-
- ..\packages\Newtonsoft.Json.12.0.2\lib\net40\Newtonsoft.Json.dll
+
+ False
+ ..\DSWeb\bin\Newtonsoft.Json.dll
..\packages\Quartz.2.6.2\lib\net40\Quartz.dll