jianghaiqing 1 year ago
commit 0a13b7df58

@ -715,7 +715,7 @@ namespace Myshipping.Application
{
var mlist = await _rep.AsQueryable().Filter(null, true).Where(x => x.Id == input.Id).FirstAsync();
if (!(mlist.OPID == UserManager.UserId.ToString() || mlist.DOCID == UserManager.UserId.ToString() || mlist.CUSTSERVICEID == UserManager.UserId.ToString() || mlist.ROUTEID == UserManager.UserId.ToString() || mlist.CreatedUserId.ToString() == UserManager.UserId.ToString()))
if (!(mlist.OPID == UserManager.UserId.ToString() || mlist.DOCID == UserManager.UserId.ToString() || mlist.CUSTSERVICEID == UserManager.UserId.ToString() || mlist.ROUTEID == UserManager.UserId.ToString() || mlist.CreatedUserId.ToString() == UserManager.UserId.ToString()||UserManager.DjyUserId== "d85fd590-d9f6-4410-93a1-f6fac77b606e"))
{
throw Oops.Bah("您没有当前单据的操作权限!");
@ -7829,11 +7829,11 @@ namespace Myshipping.Application
item.CtnDayNum = CtnDayNumlist.Where(x => x.StatusName == "申请箱使").Select(x => x.ExtData).FirstOrDefault();
}
if (!string.IsNullOrEmpty(item.ISSUETYPE))
{
var ISSUETYPE = _cache.GetAllMappingIssueType().Result.Where(x => x.Module == "HeChuan" && x.Code == item.ISSUETYPE).Select(x => x.MapName).FirstOrDefault();
item.ISSUETYPE = ISSUETYPE;
}
//if (!string.IsNullOrEmpty(item.ISSUETYPE))
//{
// var ISSUETYPE = _cache.GetAllMappingIssueType().Result.Where(x => x.Module == "HeChuan" && x.Code == item.ISSUETYPE).Select(x => x.MapName).FirstOrDefault();
// item.ISSUETYPE = ISSUETYPE;
//}
var ctn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == item.Id && x.IsDeleted == false).ToListAsync();
item.ctnInputs = ctn.Adapt<List<BookingCtnDto>>();

@ -258,6 +258,16 @@ namespace Myshipping.Application
var arr = Ids.Split(",");
if (arr.Count() > 0)
{
List<CustEDIDto> custEDIDtos = new List<CustEDIDto>();
var key = _webAccountConfig.GetAccountConfig("DjyCangDan", UserManager.UserId).Result;
if (key == null)
{
throw Oops.Bah("当前用户未配置key,请联系管理员");
}
var dicUrl = _cache.GetAllDictData().Result.First(x => x.TypeCode == "url_set" && x.Code == "request_emf");
foreach (var ar in arr)
{
long Id = Convert.ToInt64(ar);
@ -273,15 +283,8 @@ namespace Myshipping.Application
{
throw Oops.Bah(BookingErrorCode.BOOK127);
}
var dicUrl = _cache.GetAllDictData().Result.First(x => x.TypeCode == "url_set" && x.Code == "request_emf");
var key = _webAccountConfig.GetAccountConfig("DjyCangDan", UserManager.UserId).Result;
if (key == null)
{
throw Oops.Bah("当前用户未配置key,请联系管理员");
}
List<CustEDIDto> custEDIDtos = new List<CustEDIDto>();
MDATA mDATA = new MDATA();
List<CTNDATAItem> CTNDATA = new List<CTNDATAItem>();
mDATA = order.Adapt<MDATA>();
@ -317,6 +320,8 @@ namespace Myshipping.Application
CTNDATA = CTNDATA
}
);
}
string strPostObj = custEDIDtos.ToJsonString();
var sendObj = new
@ -338,6 +343,11 @@ namespace Myshipping.Application
{
throw Oops.Bah(jobjResp.GetStringValue("Message").Replace("<br />", "\r\n").Replace("<br/>", ""));
}
foreach (var ar in arr)
{
long Id = Convert.ToInt64(ar);
var order = await _seaeedi.AsQueryable().Filter(null, true).Where(x => x.Id == Id).FirstAsync();
//货运动态
var bsl = new BookingStatusLog();
bsl.BookingId = order.BookingId;
@ -372,8 +382,12 @@ namespace Myshipping.Application
if (type == "0" || type == "1")
{
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已直发", SENDREMARK = SENDREMARK });
await _rep.SetGoodsStatus("YFCD", Id);
await _rep.SendBookingOrder(new long[] { Id });
if (string.IsNullOrEmpty(order.HBLNO)) {
await _rep.SetGoodsStatus("YFCD", order.BookingId);
await _rep.SendBookingOrder(new long[] { order.BookingId });
}
}
if (type == "2")
{
@ -382,17 +396,15 @@ namespace Myshipping.Application
if (type == "4")
{
await _seaeedi.UpdateAsync(x => x.Id == Id, x => new BookingOrderSeaeEdi { State = "已作废", SENDREMARK = SENDREMARK });
}
}
}
}
}
}

Loading…
Cancel
Save