DS7_JinGang
hanxuntao 1 year ago
parent 3e6b28fa85
commit a6abc298f3

@ -633,22 +633,16 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
} }
}); });
this.storeInvCategory = Ext.create('DsExt.ux.RefTableStore', { this.storeInvCategory = Ext.create('DsExt.ux.RefTableStore', {
model: 'DsExtEnumModel', model: 'DsExtEnumModel',
proxy: { proxy: { url: '/CommMng/PubSys/GetEnumValueList' }
url: '/CommMng/PubSys/GetEnumValueList'
}
});
this.storeInvCategory.load({
params: {
enumTypeId: 97008
}
}); });
this.storeInvCategory.load({ params: { enumTypeId: 97008 } });
this.comboxInvCategory = Ext.create('DsExt.ux.RefTableCombox', { this.comboxInvCategory = Ext.create('DsExt.ux.RefTableCombox', {
fieldLabel: '类型', fieldLabel: '类型',
labelWidth: labelwidth_sale, labelWidth: labelwidth_sale,
flex: 1,
store: this.storeInvCategory, store: this.storeInvCategory,
forceSelection: true, forceSelection: true,
name: 'INVOICECATEGORY', name: 'INVOICECATEGORY',
@ -656,6 +650,29 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
displayField: 'EnumValueName' displayField: 'EnumValueName'
}); });
//this.storeInvCategory = Ext.create('DsExt.ux.RefTableStore', {
// model: 'DsExtEnumModel',
// proxy: {
// url: '/CommMng/PubSys/GetEnumValueList'
// }
//});
//this.storeInvCategory.load({
// params: {
// enumTypeId: 97008
// }
//});
//this.comboxInvCategory = Ext.create('DsExt.ux.RefTableCombox', {
// fieldLabel: '类型',
// labelWidth: labelwidth_sale,
// flex: 1,
// store: this.storeInvCategory,
// forceSelection: true,
// name: 'INVOICECATEGORY',
// valueField: 'EnumValueId',
// displayField: 'EnumValueName'
//});
this.StoreInvNo = Ext.create('DsExt.ux.RefTableStore', { this.StoreInvNo = Ext.create('DsExt.ux.RefTableStore', {
model: 'MsChInvoiceNo', model: 'MsChInvoiceNo',
proxy: { proxy: {
@ -757,11 +774,11 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, {
url: '/CommMng/PubSys/GetEnumValueList' url: '/CommMng/PubSys/GetEnumValueList'
} }
}); });
this.storeInvCategory.load({ //this.storeInvCategory.load({
params: { // params: {
enumTypeId: 80007 // enumTypeId: 80007
} // }
}); //});
//#endregion //#endregion

@ -151,6 +151,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, {
remoteSort: true, remoteSort: true,
proxy: { proxy: {
type: 'ajax', type: 'ajax',
timeout: 120000,
url: '/Account/Chfee_lock/BsListData', url: '/Account/Chfee_lock/BsListData',
reader: { reader: {
id: '', id: '',
@ -2575,6 +2576,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, {
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: '正在锁定...', waitMsg: '正在锁定...',
url: '/Account/Chfee_lock/SelLock', url: '/Account/Chfee_lock/SelLock',
timeout: 120000,
params: { params: {
data: jsonbodyAddDatas, data: jsonbodyAddDatas,
type: type type: type
@ -2670,6 +2672,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, {
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: '正在锁定...', waitMsg: '正在锁定...',
url: '/Account/Chfee_lock/SelFeeLock', url: '/Account/Chfee_lock/SelFeeLock',
timeout: 120000,
params: { params: {
data: jsonbodyAddDatas, data: jsonbodyAddDatas,
isAccDate: _this.IsAccDate, isAccDate: _this.IsAccDate,
@ -2726,6 +2729,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, {
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: '正在锁定...', waitMsg: '正在锁定...',
url: '/Account/Chfee_lock/AllLock', url: '/Account/Chfee_lock/AllLock',
timeout: 120000,
params: { params: {
billsql: _this.sqlcontext, billsql: _this.sqlcontext,
type: type type: type
@ -2777,6 +2781,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, {
Ext.Ajax.request({ Ext.Ajax.request({
waitMsg: '正在锁定...', waitMsg: '正在锁定...',
url: '/Account/Chfee_lock/onFeeLockAll', url: '/Account/Chfee_lock/onFeeLockAll',
timeout: 120000,
params: { params: {
billsql: _this.sqlcontext, billsql: _this.sqlcontext,
isAccDate: _this.IsAccDate, isAccDate: _this.IsAccDate,

@ -3315,6 +3315,8 @@ namespace DSWeb.Areas.CommMng.DAL
data.CTN = Convert.ToString(reader["CTN"]); data.CTN = Convert.ToString(reader["CTN"]);
if (reader["DLIKGS"] != DBNull.Value) if (reader["DLIKGS"] != DBNull.Value)
data.DLIKGS = Convert.ToDecimal(reader["DLIKGS"]); data.DLIKGS = Convert.ToDecimal(reader["DLIKGS"]);
if (reader["CTNWEIGHT"] != DBNull.Value)
data.CTNWEIGHT = Convert.ToDecimal(reader["CTNWEIGHT"]);
#endregion #endregion
headList.Add(data); headList.Add(data);
} }

@ -2060,9 +2060,22 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult DeleteList(string data) public ContentResult DeleteList(string data)
{ {
string LAN = Convert.ToString(Session["LANGUAGES"]);
var headData = JsonConvert.Deserialize<List<MsOpSeae>>(data); var headData = JsonConvert.Deserialize<List<MsOpSeae>>(data);
var errstr = ""; var errstr = "";
var itemClass = ""; var itemClass = "";
var strpc = "此票业务存在派车信息,请先删除派车信息!";
var strfp = "此票拼箱主票存在分票业务,请先删除分票信息!";
var strsccg = "删除成功!";
var strfy = "存在费用,请先删除费用才能删除此票业务!";
if (LAN == "en-us")
{
strpc = "This bill has truck information. Please delete the delivery truck first";
strfp = "This LCL has ticket splitting business. Please delete the ticket splitting information first";
strsccg = "Successfully deleted";
strfy = "There are fees present. Please delete the fees before deleting this transaction";
}
var BSNOLIST = new List<BSNOLB>(); var BSNOLIST = new List<BSNOLB>();
if (headData != null) if (headData != null)
{ {
@ -2108,7 +2121,7 @@ namespace DSWeb.MvcShipping.Controllers
} }
else else
{ {
var jsonRespose3 = new JsonResponse { Success = false, Message = "此票业务存在派车信息,请先删除派车信息!" }; var jsonRespose3 = new JsonResponse { Success = false, Message = strpc };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose3) };
} }
@ -2121,7 +2134,7 @@ namespace DSWeb.MvcShipping.Controllers
} }
else else
{ {
var jsonRespose2 = new JsonResponse { Success = false, Message = "此票拼箱主票存在分票业务,请先删除分票信息!" }; var jsonRespose2 = new JsonResponse { Success = false, Message = strfp };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) };
} }
@ -2154,8 +2167,8 @@ namespace DSWeb.MvcShipping.Controllers
if (BSNOLIST != null && BSNOLIST.Count != 0) if (BSNOLIST != null && BSNOLIST.Count != 0)
MsOpSeaeEdiPortDAL.SendToDJYDel(BSNOLIST, Convert.ToString(Session["COMPANYID"])); MsOpSeaeEdiPortDAL.SendToDJYDel(BSNOLIST, Convert.ToString(Session["COMPANYID"]));
if (errstr == "") errstr = "删除成功!"; if (errstr == "") errstr = strsccg;
else errstr = errstr + "存在费用,请先删除费用才能删除此票业务!"; else errstr = errstr + strfy;
if (itemClass == "网上订舱不能删除") { errstr = "网上订舱不能删除"; } if (itemClass == "网上订舱不能删除") { errstr = "网上订舱不能删除"; }
var jsonRespose = new JsonResponse { Success = true, Message = errstr }; var jsonRespose = new JsonResponse { Success = true, Message = errstr };
@ -2165,13 +2178,26 @@ namespace DSWeb.MvcShipping.Controllers
public ContentResult DeleteDetail(string data) public ContentResult DeleteDetail(string data)
{ {
string LAN = Convert.ToString(Session["LANGUAGES"]);
var strsccg = "删除成功!";
if (LAN == "en-us") {
strsccg = "Successfully deleted";
}
var head = JsonConvert.Deserialize<MsOpSeaeDetail>(data); var head = JsonConvert.Deserialize<MsOpSeaeDetail>(data);
DBResult result = MsOpSeaeDAL.DeleteDetail2(head, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["COMPANYID"])); DBResult result = MsOpSeaeDAL.DeleteDetail2(head, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["COMPANYID"]));
var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message.Replace("操作成功", strsccg) };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
public ContentResult DeleteDetailList(string data) public ContentResult DeleteDetailList(string data)
{ {
string LAN = Convert.ToString(Session["LANGUAGES"]);
var strsccg = "删除成功!";
if (LAN == "en-us")
{
strsccg = "Successfully deleted";
}
var head = JsonConvert.Deserialize<List<MsOpSeaeDetail>>(data); var head = JsonConvert.Deserialize<List<MsOpSeaeDetail>>(data);
#region 2018年2月7日17:32:48 鼎世 李进举 #region 2018年2月7日17:32:48 鼎世 李进举
//导入主单信息删除原有集装箱分箱信息 //导入主单信息删除原有集装箱分箱信息
@ -2194,12 +2220,13 @@ namespace DSWeb.MvcShipping.Controllers
// DBResult result = MsOpSeaeDAL.DeleteDetail2(enumValue, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["COMPANYID"])); // DBResult result = MsOpSeaeDAL.DeleteDetail2(enumValue, CookieConfig.GetCookie_UserId(Request), Convert.ToString(Session["COMPANYID"]));
// } // }
//} //}
var jsonRespose = new JsonResponse { Success = true, Message = "删除成功!" }; var jsonRespose = new JsonResponse { Success = true, Message = strsccg };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
public ContentResult DeleteOpCtnDetail(string data) public ContentResult DeleteOpCtnDetail(string data)
{ {
var head = JsonConvert.Deserialize<MsOpCtnDetail>(data); var head = JsonConvert.Deserialize<MsOpCtnDetail>(data);
var modb = new ModelObjectDB(); var modb = new ModelObjectDB();
DBResult result = modb.Delete(head); DBResult result = modb.Delete(head);
@ -2208,6 +2235,13 @@ namespace DSWeb.MvcShipping.Controllers
} }
public ContentResult DeleteOpManifestDetail(string data) public ContentResult DeleteOpManifestDetail(string data)
{ {
string LAN = Convert.ToString(Session["LANGUAGES"]);
var strsccg = "删除成功!";
if (LAN == "en-us")
{
strsccg = "Successfully deleted";
}
var head = JsonConvert.Deserialize<List<MsOpSeaeManifest>>(data); var head = JsonConvert.Deserialize<List<MsOpSeaeManifest>>(data);
if (head != null) if (head != null)
@ -2220,7 +2254,7 @@ namespace DSWeb.MvcShipping.Controllers
} }
} }
var jsonRespose = new JsonResponse { Success = true, Message = "删除成功!" }; var jsonRespose = new JsonResponse { Success = true, Message = strsccg };
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
@ -9525,15 +9559,15 @@ namespace DSWeb.MvcShipping.Controllers
return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
} }
var codectnlist=BasicDataRefDAL.GetCodeCtnList();
//List<string> sheets = ExcelSheetName(filename);
//List<string> sheets = ExcelSheetName(filename); //if (sheets.Count == 0)
//if (sheets.Count == 0) //{
//{ // jsonRespose.Success = false;
// jsonRespose.Success = false; // jsonRespose.Message = "上传的Excel不包含数据02";
// jsonRespose.Message = "上传的Excel不包含数据02"; // return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) };
// return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; //}
//}
Workbook workbook = excel.Workbooks.Open(excelFilePath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); Workbook workbook = excel.Workbooks.Open(excelFilePath, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing);
Worksheet mySheet = workbook.Sheets[1] as Worksheet; Worksheet mySheet = workbook.Sheets[1] as Worksheet;
@ -9671,6 +9705,14 @@ namespace DSWeb.MvcShipping.Controllers
var tmpkgs = GetExcelValue(mySheet, "V" + excelline.ToString()); var tmpkgs = GetExcelValue(mySheet, "V" + excelline.ToString());
if (!string.IsNullOrEmpty(tmpkgs)) if (!string.IsNullOrEmpty(tmpkgs))
data.WEIGHKGS = Convert.ToDecimal(tmpkgs); data.WEIGHKGS = Convert.ToDecimal(tmpkgs);
if (data.WEIGHKGS == 0) {
var ctn = codectnlist.Find(x => x.CTN == data.CTNALL);
if (ctn != null) {
data.WEIGHKGS = ctn.CTNWEIGHT;
}
}
bodyList.Add(data); bodyList.Add(data);
@ -14677,7 +14719,7 @@ namespace DSWeb.MvcShipping.Controllers
{ {
//var headlist = MsOpSeaeDAL.GetDataList(" BSNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["CODENAME"]), Convert.ToString(Session["COMPANYID"])); //var headlist = MsOpSeaeDAL.GetDataList(" BSNO='" + bsno + "'", Convert.ToString(Session["USERID"]), Convert.ToString(Session["CODENAME"]), Convert.ToString(Session["COMPANYID"]));
//9原始 2增加 3删除 4更新 //9原始 2增加 3删除 4更新
MakeFee_VGM(headlist, type); // MakeFee_VGM(headlist, type);
} }
return BasicDataRefDAL.GetContentResult(_r); return BasicDataRefDAL.GetContentResult(_r);
} }

@ -7643,8 +7643,189 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
} }
} }
public static DBResult SendVGM(string BSNO, string userid, string companyid, string CarrierEDICode)
{
RespCommonData resp = new RespCommonData();
var result = new DBResult(true, "");
var order = MsOpSeaeDAL.GetData($" B.BSNO='{BSNO}'", userid);
var ctns = MsOpSeaeDAL.GetBodyList($" BSNO='{BSNO}'");
var paraVgmSendService = MsSysParamSetDAL.GetDataByName("bookingSendVgmServiceUrl");
// var paraMyshippingUrlService = MsSysParamSetDAL.GetDataByName("DJYURL");
#region 检测能否发出
if (string.IsNullOrEmpty(paraVgmSendService.PARAMVALUE)
)
{
result.SetErrorInfo("请正确配置vgm发送服务及大简云url地址");
}
if (string.IsNullOrEmpty(order.MBLNO))
{
result.SetErrorInfo("提单号不能为空");
}
if (string.IsNullOrEmpty(order.CARRIER) || string.IsNullOrEmpty(CarrierEDICode))
{
result.SetErrorInfo("船公司不能为空");
}
//var accType = AccountConfigType.CmaWeb.ToString();
var accCfg = MsSysThirdPartyAccount.MsSysThirdPartyAccountDAL.GetData($" CUSTOMERNAME='{order.CARRIER}' and THIRDPARTY='船公司账号' and USERID='" + userid + "' ");
if (accCfg == null || string.IsNullOrWhiteSpace(accCfg.ACCOUNT) || string.IsNullOrWhiteSpace(accCfg.ACCOUNTPSW))
{
accCfg = MsSysThirdPartyAccount.MsSysThirdPartyAccountDAL.GetData($" CUSTOMERNAME='{order.CARRIER}' and THIRDPARTY='船公司账号'");
if (accCfg == null || string.IsNullOrWhiteSpace(accCfg.ACCOUNT) || string.IsNullOrWhiteSpace(accCfg.ACCOUNTPSW))
{
result.SetErrorInfo($"未在第三方账号信息中配置船公司【{order.CARRIER}】的网站账号、密码(第三方账号每人维护各自信息,客户名称需选择船公司,第三方软件为【船公司账号】)");
}
}
//var yardset = MsCodeYardDataSetDAL.GetDataList($" YARD='{order.YARD}'", companyid);
//if (yardset == null || yardset.Count == 0)
//{
// result.SetErrorInfo("场站代号未找到");
//}
var userbaseinfo = BasicDataRefDAL.GetUserLinkRef("u.GID='" + userid + "'");
if (userbaseinfo == null || string.IsNullOrWhiteSpace(userbaseinfo.Tel) || string.IsNullOrWhiteSpace(userbaseinfo.Email))
{
result.SetErrorInfo("请维护用户基础信息中的电话和邮箱");
}
CtnCanSend(CarrierEDICode, ctns, ref result);
if (!result.Success) return result;
#endregion
var cdc = new CommonDataContext();
var vwuser = cdc.VW_user.FirstOrDefault(x => x.USERID == userid);
//var company = MsCompanysDAL.MsCompanysDAL.GetNoPicData("GID='" + companyid + "'");
int idx = 1;
var Etdstr = GetDateStr(order.ETD);
var VgmEndTimeStr = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
string GetDateStr(string datestr)
{
return !string.IsNullOrWhiteSpace(datestr) ? Convert.ToDateTime(datestr).ToString("yyyy-MM-dd") : string.Empty;
}
var strSendObj = "";
if (CarrierEDICode.ToLower() == "cma")
{
public static DBResult SendVGM(string BSNO, string userid, string companyid,string CarrierEDICode) List<List<string>> data_list = new List<List<string>>();
foreach (var ctn in ctns)
{
var newctnlist = new List<string>();
newctnlist.Add(order.MBLNO);
newctnlist.Add(ctn.CNTRNO);
if (order.ISCONTAINERSOC)
newctnlist.Add("Y");
else
newctnlist.Add("N");
newctnlist.Add(ctn.KGS.ToString());
newctnlist.Add(ctn.WEIGHKGS.ToString());
newctnlist.Add("KGM");
newctnlist.Add(ctn.WEIGHSIGN);
newctnlist.Add(ctn.WEIGHTYPE == "累加" ? "SM2" : "SM1");
data_list.Add(newctnlist);
}
var SENDGID = Guid.NewGuid().ToString();
var customername = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMID'").PARAMVALUE;
var password = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMKEY'").PARAMVALUE;
//调用接口
var sendObj = new
{
gid = SENDGID,
User = customername,
Secret = password,
web_code = CarrierEDICode.ToLower(),
web_user = accCfg.ACCOUNT,
web_pwd = accCfg.ACCOUNTPSW,
data_list = data_list
};
strSendObj = JsonConvert.Serialize(sendObj);
}
else {
List<VgmData_list> data_list = new List<VgmData_list>();
foreach (var ctn in ctns)
{
var newctnlist = new VgmData_list();
newctnlist.booking_no = order.MBLNO;
newctnlist.container_no = ctn.CNTRNO;
newctnlist.weight_type = (ctn.WEIGHTYPE == "累加" ? "SM2" : "SM1");
newctnlist.unit = ctn.KINDPKGS;
newctnlist.weight = ctn.KGS.ToString();
newctnlist.signatory = ctn.WEIGHSIGN;
newctnlist.reference_id = ctn.WEIGHSIGN;
newctnlist.e_mail_notification = userbaseinfo.Email;
data_list.Add(newctnlist);
}
var SENDGID = Guid.NewGuid().ToString();
var customername = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMID'").PARAMVALUE;
var password = MsSysParamSetDAL.GetData("PARAMNAME='DSVGMKEY'").PARAMVALUE;
//调用接口
var sendObj = new
{
gid = SENDGID,
User = customername,
Secret = password,
web_code = CarrierEDICode.ToLower(),
web_user = accCfg.ACCOUNT,
web_pwd = accCfg.ACCOUNTPSW,
data_list = data_list
};
strSendObj = JsonConvert.Serialize(sendObj);
}
strSendObj = strSendObj.Replace("\r\n", "");
//log.Debug($"准备发送vgm{strSendObj}");
try
{
BasicDataRefDAL.SaveLog(strSendObj, "", "VGM直发", "发送");
var rtn = WebRequestHelper.DoPost(paraVgmSendService.PARAMVALUE, strSendObj, timeout: 5000);
BasicDataRefDAL.SaveLog(rtn, "", "VGM直发", "返回");
//log.Debug($"发送vgm返回{rtn}");
var jobjRtn = Newtonsoft.Json.JsonConvert.DeserializeAnonymousType(rtn, new { status =0, message = string.Empty, data = string.Empty });
if (!(jobjRtn.status==1))
{
return result.SetErrorInfo($"直发VGM错误{jobjRtn.message}");
}
else
{
T_ALL_DA T_ALL_DA = new T_ALL_DA();
var blUpSQL = " insert into sys_vgm_log(GID,MBLNO,STATUS,LOGTIME,LOGCONTENT,CREATEUSER) values(NEWID(),'" + order.MBLNO + "','发送','" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "','" + order.BSNO + "','" + userid + "')";
bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL);
result.OK($"发送完成");//:[{ jobjRtn.message}]
}
}
catch (Exception ex)
{
result.SetErrorInfo(ex.Message);
}
return result;
}
public static DBResult SendVGM2(string BSNO, string userid, string companyid,string CarrierEDICode)
{ {
RespCommonData resp = new RespCommonData(); RespCommonData resp = new RespCommonData();
@ -7850,53 +8031,56 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL
} }
*/ */
if (CarrierEDICode.ToUpper() == "ESL") if (CarrierEDICode.ToUpper() == "CMA")
{ {
//船公司ESL只需要指定 提单号 箱号 毛重kgs //船公司ESL只需要指定 提单号 箱号 毛重kgs
//故做如下限制 //故做如下限制
foreach (var ctn in ctns) foreach (var ctn in ctns)
{ {
if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); //if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型");
if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); //if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零");
if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空"); if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空");
if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零");
//if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空");
//if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零");
//if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零");
}
}
else
if (CarrierEDICode.ToUpper() == "ONE")
{
//船公司ONE只需要指定 提单号 箱号 毛重kgs
//故做如下限制
foreach (var ctn in ctns)
{
if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型");
if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零");
if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空");
if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零"); if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零");
//if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零");
if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零");
//if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空");
//if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零");
//if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); //if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零");
} }
} }
//else
//if (CarrierEDICode.ToUpper() == "ONE")
//{
// //船公司ONE只需要指定 提单号 箱号 毛重kgs
// //故做如下限制
// foreach (var ctn in ctns)
// {
// //if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型");
// //if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零");
// if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空");
// if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零");
// //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空");
// //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零");
// //if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零");
// }
//}
else else
{ {
//对所有未指定的其他船公司而言: //对所有未指定的其他船公司而言:
foreach (var ctn in ctns) foreach (var ctn in ctns)
{ {
if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型"); //if (string.IsNullOrWhiteSpace(ctn.CTNALL)) result.SetErrorInfo("必须选择箱型");
if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零"); //if (ctn.CTNNUM <= 0) result.SetErrorInfo("箱量不能为零");
if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空"); if (string.IsNullOrWhiteSpace(ctn.CNTRNO)) result.SetErrorInfo("箱号不能为空");
if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空"); //if (string.IsNullOrWhiteSpace(ctn.SEALNO)) result.SetErrorInfo("封号不能为空");
if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零"); if (ctn.KGS <= 0) result.SetErrorInfo("毛重不能为零");
if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零"); //if (ctn.TAREWEIGHT <= 0) result.SetErrorInfo("皮重不能为零");
if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零"); //if (ctn.WEIGHKGS <= 0) result.SetErrorInfo("称重重量不能为零");
} }
} }
} }

@ -1015,5 +1015,41 @@ namespace DSWeb.MvcShipping.Models.MsOpSeae
public System.Collections.Generic.List<MsOpSeaeDetail> message { get; set; } public System.Collections.Generic.List<MsOpSeaeDetail> message { get; set; }
public string status { get; set; } public string status { get; set; }
} }
public class VgmData_list
{
/// <summary>
///
/// </summary>
public string booking_no { get; set; }
/// <summary>
///
/// </summary>
public string container_no { get; set; }
/// <summary>
///
/// </summary>
public string weight_type { get; set; }
/// <summary>
///
/// </summary>
public string unit { get; set; }
/// <summary>
///
/// </summary>
public string weight { get; set; }
/// <summary>
///
/// </summary>
public string signatory { get; set; }
/// <summary>
///
/// </summary>
public string reference_id { get; set; }
/// <summary>
///
/// </summary>
public string e_mail_notification { get; set; }
}
// //
} }

Loading…
Cancel
Save