ShenZhenCHJY
dengyu 2 months ago
parent f64c59ac79
commit 145e6fcd5c

@ -166,6 +166,7 @@ namespace DSWeb.MvcShipping.Controllers
#endregion
}
}

@ -8454,18 +8454,33 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
//}
var thirdaccount = MsSysThirdPartyAccountDAL.GetData($"USERID='{USERID}' and THIRDPARTY='大简云订舱船公司账号' and CUSTOMERNAME='{result.OpseaeHead.CARRIER}'");
//var thirdaccount = MsSysThirdPartyAccountDAL.GetData($"USERID='{USERID}' and THIRDPARTY='大简云订舱船公司账号' and CUSTOMERNAME='{result.OpseaeHead.CARRIER}' and account='{result.OpseaeDjyOrderHead.THIRDACCOUNT}'");
if (thirdaccount == null || string.IsNullOrWhiteSpace(thirdaccount.ACCOUNT))
//if (thirdaccount == null || string.IsNullOrWhiteSpace(thirdaccount.ACCOUNT))
//{
// canmake.SetErrorInfo($"该用户没有为船公司{result.OpseaeHead.CARRIER}配置第三方账号");
//}
//else {
// result.CarrierUserKey = thirdaccount.ACCOUNT;
// result.CarrierUserSecret = thirdaccount.ACCOUNTPSW;
//}
var CarrierUserKey = "";
var CarrierUserSecret = "";
var _r= MsSysThirdPartyAccountDAL.GetAccountAndPwd(
USERID, result.OpseaeHead.CARRIER, result.OpseaeDjyOrderHead.THIRDACCOUNT
, ref CarrierUserKey, ref CarrierUserSecret
);
if (!_r.Success)
{
canmake.SetErrorInfo($"该用户没有为船公司{result.OpseaeHead.CARRIER}配置第三方账号");
canmake.SetErrorInfo(_r.Message);
}
else {
result.CarrierUserKey = thirdaccount.ACCOUNT;
result.CarrierUserSecret = thirdaccount.ACCOUNTPSW;
result.CarrierUserKey = CarrierUserKey;
result.CarrierUserSecret = CarrierUserSecret;
}
BasicDataRefDAL.CheckWebconfig("DJY_COSCOPORTUrl", ref canmake);
BasicDataRefDAL.CheckWebconfig("DJY_COSCOPORT_key", ref canmake);
BasicDataRefDAL.CheckWebconfig("DJY_COSCOPORT_secret", ref canmake);
@ -8716,16 +8731,33 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
//}
var thirdaccount = MsSysThirdPartyAccountDAL.GetData($"USERID='{USERID}' and THIRDPARTY='大简云订舱船公司账号' and CUSTOMERNAME='{result.OpseaeHead.CARRIER}'");
//var thirdaccount = MsSysThirdPartyAccountDAL.GetData($"USERID='{USERID}' and THIRDPARTY='大简云订舱船公司账号' and CUSTOMERNAME='{result.OpseaeHead.CARRIER}' and account='{result.OpseaeDjyOrderHead.THIRDACCOUNT}'");
//if (thirdaccount == null || string.IsNullOrWhiteSpace(thirdaccount.ACCOUNT))
//{
// canmake.SetErrorInfo($"该用户没有为船公司{result.OpseaeHead.CARRIER}配置第三方账号");
//}
//else
//{
// result.CarrierUserKey = thirdaccount.ACCOUNT;
// result.CarrierUserSecret = thirdaccount.ACCOUNTPSW;
//}
var CarrierUserKey = "";
var CarrierUserSecret = "";
if (thirdaccount == null || string.IsNullOrWhiteSpace(thirdaccount.ACCOUNT))
var _r = MsSysThirdPartyAccountDAL.GetAccountAndPwd(
USERID, result.OpseaeHead.CARRIER, result.OpseaeDjyOrderHead.THIRDACCOUNT
, ref CarrierUserKey, ref CarrierUserSecret
);
if (!_r.Success)
{
canmake.SetErrorInfo($"该用户没有为船公司{result.OpseaeHead.CARRIER}配置第三方账号");
canmake.SetErrorInfo(_r.Message);
}
else
{
result.CarrierUserKey = thirdaccount.ACCOUNT;
result.CarrierUserSecret = thirdaccount.ACCOUNTPSW;
result.CarrierUserKey = CarrierUserKey;
result.CarrierUserSecret = CarrierUserSecret;
}
@ -10322,6 +10354,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
sendParam.userKey = USER_KEY;
sendParam.userSecret = USER_SECRET;
sendParam.webAccount = CarrierUserKey;
sendParam.webPassword = CarrierUserSecret;
@ -10564,23 +10597,35 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
var _carrieraccount = carrieraccount[0];
= _carrieraccount.ACCOUNT;
var thirdaccount = MsSysThirdPartyAccountDAL.GetData($"USERID='{USERID}' and THIRDPARTY='大简云订舱船公司账号' and CUSTOMERNAME='{carrier}'");
//var thirdaccount = MsSysThirdPartyAccountDAL.GetData($"USERID='{USERID}' and THIRDPARTY='大简云订舱船公司账号' and CUSTOMERNAME='{carrier}' and account='{OpseaeDjyOrderHead.THIRDACCOUNT}'");
if (thirdaccount == null || string.IsNullOrWhiteSpace(thirdaccount.ACCOUNT))
{
result.SetErrorInfo($"该用户没有为船公司{carrier}配置第三方账号");
//if (thirdaccount == null || string.IsNullOrWhiteSpace(thirdaccount.ACCOUNT))
//{
// result.SetErrorInfo($"该用户没有为船公司{carrier}配置第三方账号");
return result;
// return result;
//}
//else
//{
// 第三方密码 = thirdaccount.ACCOUNTPSW;
//}
var CarrierUserKey = "";
var CarrierUserSecret = "";
var _r = MsSysThirdPartyAccountDAL.GetAccountAndPwd(
USERID, carrier,
, ref CarrierUserKey, ref CarrierUserSecret
);
if (!_r.Success)
{
return _r;
}
else
{
= thirdaccount.ACCOUNTPSW;
= CarrierUserSecret;
}
//第三方密码 = _carrieraccount.ACCOUNTPSW;
result.OK();
}
else {

@ -214,5 +214,25 @@ namespace DSWeb.MvcShipping.DAL.MsSysThirdPartyAccount
public static DBResult GetAccountAndPwd(string USERID, string CARRIER, string THIRDACCOUNT, ref string CarrierUserKey, ref string CarrierUserSecret)
{
var result = new DBResult();
result.OK();
var thirdaccount = MsSysThirdPartyAccountDAL.GetData($"USERID='{USERID}' and THIRDPARTY='大简云订舱船公司账号' and CUSTOMERNAME='{CARRIER}' and account='{THIRDACCOUNT}'");
if (thirdaccount == null || string.IsNullOrWhiteSpace(thirdaccount.ACCOUNT))
{
//canmake.SetErrorInfo($"该用户没有为船公司{result.OpseaeHead.CARRIER}配置第三方账号");
result.SetErrorInfo($"该用户没有为船公司[{CARRIER}]配置第三方账号");
}
else
{
CarrierUserKey = thirdaccount.ACCOUNT;
CarrierUserSecret = thirdaccount.ACCOUNTPSW;
result.OK();
}
return result;
}
}
}

@ -1707,140 +1707,18 @@ Ext.extend(Shipping.formDjyOrder_COSCO, Ext.Panel, {
var resultData = eval('(' + response.responseText + ')');//JSON字符串=>JSON对象
if (!resultData.Success) {
if (resultData.Message == "船名航次错误") {
_this.storeVesselVoyno_Cosco.removeAll();
for (var i = 0; i < resultData.Data.length; i += 1) {
var rec = resultData.Data[i];
var allowBooking = "";
if (rec.allowBooking == true) {
allowBooking = "√";
}
var cnl = "";
if (rec.cargoNatureList && rec.cargoNatureList.length > 0) {
for (var j = 0; j < rec.cargoNatureList.length; j += 1) {
if (cnl != "") cnl += " ";
cnl += rec.cargoNatureList[j];
}
}
var CMHCHX = "";
var YJLG = "";
var TJGK = "";
var vesselName = "";
var voyageNumber = "";
var serviceCode = "";
var 直达 = false;
var 中转 = false;
var PolPortName = "";
var PodPortName = "";
if (rec.oceanLegLength == 1) {
直达 = true;
} else {
中转 = true;
}
if (rec.oceanLegs && rec.oceanLegs.length > 0) {
var _startinfo = rec.oceanLegs[0];
PolPortName = _startinfo.polPortName;
var _lastinfo = rec.oceanLegs[rec.oceanLegs.length - 1];
PodPortName = _lastinfo.podPortName;
CMHCHX = _startinfo.vesselName + "/" + _startinfo.voyageNumber + "/" + _startinfo.serviceCode;
YJLG = _this.strtodatastr(_startinfo.polETDOrder);
vesselName = _startinfo.vesselName;
voyageNumber = _startinfo.voyageNumber;
serviceCode = _startinfo.serviceCode;
for (var j = 0; j < rec.oceanLegs.length; j += 1) {
if (TJGK != "") TJGK += "/";
var _gk = rec.oceanLegs[j];
TJGK += _gk.podPortName;
}
}
if (直达) {
TJGK = "(直达)" + TJGK;
}
if (中转) {
TJGK = "(中转)" + TJGK;
}
var CFDFW = "";
if (rec.originHaulageIndicator == "C") {
CFDFW = "CY"
}
if (rec.originHaulageIndicator == "D") {
CFDFW = "Door"
}
if (rec.originHaulageIndicator == "B") {
CFDFW = "CY/Door"
}
var DDDFW = "";
if (rec.fndHaulageIndicator == "C") {
DDDFW = "CY"
}
if (rec.fndHaulageIndicator == "D") {
DDDFW = "Door"
}
if (rec.fndHaulageIndicator == "B") {
DDDFW = "CY/Door"
}
var podETAOrder = _this.strtodatastr(rec.eatAtFNDOrder);
var record = Ext.create('VesselVoyno_Cosco_md', {
allowBooking: allowBooking,
cargoNatureList: cnl,
YJLG: YJLG,
estimatedTransitTimeInDays: rec.estimatedTransitTimeInDays,
CMHCHX: CMHCHX,
vesselName: vesselName,
voyageNumber: voyageNumber,
serviceCode: serviceCode,
TJGK: TJGK,
podETAOrder: podETAOrder,
originHaulageIndicator: CFDFW,
fndHaulageIndicator: DDDFW,
PolPortName: PolPortName,
PodPortName: PodPortName
});
_this.storeVesselVoyno_Cosco.add(record);
}
//_this.storeVesselVoyno.loadData(resultData.Data);
//_this.win_VesselVoyno.setTitle("中远订舱:" + resultData.Message2 + "");
_this.win_VesselVoyno.title = "中远订舱:<a><font color='#FF0000'>" + resultData.Message2 + "</font></a>";
_this.win_VesselVoyno.doLayout();
_this.win_VesselVoyno.show();
//失败
Ext.Msg.show({
title: '提示',
msg: resultData.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
//Ext.MessageBox.getDialog().getEl().setStyle('z-index', '80000');
me.GetLogic();
} else {
//失败
Ext.Msg.show({
title: '提示',
msg: resultData.Message,
icon: Ext.MessageBox.ERROR,
buttons: Ext.Msg.OK
});
//Ext.MessageBox.getDialog().getEl().setStyle('z-index', '80000');
me.GetLogic();
//return;
//me.winDjyOrderShow_COSCO.close();
}
me.win_VesselVoyno_Cosco.close();
}
else {
//成功

Loading…
Cancel
Save