DS7_JinGang
hanxuntao 2 years ago
commit e3b2d4b0d9

2
.gitignore vendored

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

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

@ -519,7 +519,7 @@ namespace DSWeb.Areas.CommMng.DAL
/// <summary>
///
/// </summary>
public DateTime ETD { get; set; }
public DateTime? ETD { get; set; }
/// <summary>
/// 海运托书
/// </summary>
@ -620,6 +620,9 @@ namespace DSWeb.Areas.CommMng.DAL
{ //将识别数据与现有数据合并
//如识别数据有内容 则用其代替现有字段内容
if (data != null && data.commitResult != null)
{
var _result = data.commitResult;
if (!string.IsNullOrWhiteSpace(_result.))
@ -705,8 +708,9 @@ namespace DSWeb.Areas.CommMng.DAL
headdata.CUSTOMERNAME = _tempinfoclient.SHORTNAME;
}
}
}
}
}
private Dictionary<string, string> PropNameList { get; set; } = new Dictionary<string, string>();
@ -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<string, string> {
{ "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<ResultResponse>(rtn);

@ -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<string, string> dic, string json)
//目前仅用于荣圣达泛微OA对接用application/x-www-form-urlencoded传递
public static string DoPost_Header(string url, Dictionary<string, string> dic, Dictionary<string, string> 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
{

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

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

@ -2252,9 +2252,120 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL
#region 泰邦 提成计算
static public List<MsOpBillProfit> 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;
}

@ -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<string, object>
{
{ "message", _err.Message }
});
if (!AlibabaCloud.TeaUtil.Common.Empty(err.Code) && !AlibabaCloud.TeaUtil.Common.Empty(err.Message))
{
// err 中含有 code 和 message 属性,可帮助开发定位问题
}
}
}
}
}

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

@ -79,8 +79,9 @@
<Reference Include="MimeKit, Version=2.9.0.0, Culture=neutral, PublicKeyToken=bede1c8a46c66814, processorArchitecture=MSIL">
<HintPath>..\packages\MimeKit.2.9.2\lib\net45\MimeKit.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\DSWeb\bin\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Quartz, Version=2.6.2.0, Culture=neutral, PublicKeyToken=f6b8c98a402cc8a4, processorArchitecture=MSIL">
<HintPath>..\packages\Quartz.2.6.2\lib\net40\Quartz.dll</HintPath>

Loading…
Cancel
Save