|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using Amazon.Runtime.Internal.Util;
|
|
|
|
|
using DS.Module.Core;
|
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
using DS.Module.Core.Extensions;
|
|
|
|
|
using DS.Module.SqlSugar;
|
|
|
|
@ -48,7 +49,24 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
.Select<OpBusinessYardRes>().ToQueryPage(request.PageCondition);
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<DataResult<List<OpBusinessYardHistoryRes>>> GetYardHistoryList(PageRequest request)
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
//序列化查询条件
|
|
|
|
|
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
|
|
|
|
var data = await tenantDb.Queryable<BusinessYard>()
|
|
|
|
|
.LeftJoin<SeaExport>((a,b)=>a.BusinessId == b.Id)
|
|
|
|
|
.Select((a,b)=> new OpBusinessYardHistoryRes
|
|
|
|
|
{
|
|
|
|
|
CreateTime = a.CreateTime,
|
|
|
|
|
HBLNO = b.HBLNO,
|
|
|
|
|
CustomerId = b.CustomerId,
|
|
|
|
|
CustomerName =b.CustomerName,
|
|
|
|
|
CustomerNo =b.CustomerNo,
|
|
|
|
|
},true)
|
|
|
|
|
.Where(whereList).ToQueryPageAsync(request.PageCondition);
|
|
|
|
|
return data;
|
|
|
|
|
}
|
|
|
|
|
public DataResult EditOpBusinessYard(OpBusinessYardReq req)
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
@ -57,7 +75,6 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
var data = req.Adapt<BusinessYard>();
|
|
|
|
|
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
|
|
|
|
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -69,18 +86,46 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
{
|
|
|
|
|
it.BusinessId,
|
|
|
|
|
}).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
|
}
|
|
|
|
|
return DataResult.Successed("保存成功!", MultiLanguageConst.DataUpdateSuccess);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//private void CreateLink() {
|
|
|
|
|
|
|
|
|
|
// //生成提箱小票
|
|
|
|
|
// var allowCarrier = _cache.GetAllDictData().Result.Where(x => x.TypeCode == "txxp_carrier_list").Select(x => x.Code).ToList();
|
|
|
|
|
// if (allowCarrier.Contains(order.CARRIERID))
|
|
|
|
|
// {
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// var txxpLink = await TxxpLink(input.BookingId);
|
|
|
|
|
// }
|
|
|
|
|
// catch { }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// //vgm链接
|
|
|
|
|
// allowCarrier = _cache.GetAllDictData().Result.Where(x => x.TypeCode == "vgm_carrier_list").Select(x => x.Code).ToList();
|
|
|
|
|
// if (allowCarrier.Contains(order.CARRIERID))
|
|
|
|
|
// {
|
|
|
|
|
// try
|
|
|
|
|
// {
|
|
|
|
|
// await VgmLink(input.BookingId);
|
|
|
|
|
// }
|
|
|
|
|
// catch { }
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
public DataResult<OpBusinessYardRes> GetOpBusinessYardInfo(string id)
|
|
|
|
|
{
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
var data = tenantDb.Queryable<BusinessYard>()
|
|
|
|
|
.Where(a => a.Id == long.Parse(id))
|
|
|
|
|
.Select<OpBusinessYardRes>()
|
|
|
|
|
.Mapper(it=>
|
|
|
|
|
it.Urls = tenantDb.Queryable<BookingOrderUrl>().Where(x => x.BusinessId == it.BusinessId).Select<BookingOrderUrlRes>().First()
|
|
|
|
|
)
|
|
|
|
|
.First();
|
|
|
|
|
//data.Urls = tenantDb.Queryable<BookingOrderUrl>().Where(x => x.BusinessId == data.BusinessId).Select<BookingOrderUrlRes>().First();
|
|
|
|
|
return DataResult<OpBusinessYardRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
|
public DataResult<OpBusinessYardRes> GetBusinessYardByKeyId(string id)
|
|
|
|
@ -89,6 +134,9 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
var data = tenantDb.Queryable<BusinessYard>()
|
|
|
|
|
.Where(a => a.BusinessId == long.Parse(id))
|
|
|
|
|
.Select<OpBusinessYardRes>()
|
|
|
|
|
.Mapper(it =>
|
|
|
|
|
it.Urls = tenantDb.Queryable<BookingOrderUrl>().Where(x => x.BusinessId == it.BusinessId).Select<BookingOrderUrlRes>().First()
|
|
|
|
|
)
|
|
|
|
|
.First();
|
|
|
|
|
return DataResult<OpBusinessYardRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
|
|
|
|
|
}
|
|
|
|
|