|
|
@ -14,6 +14,10 @@ using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Text;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
using DS.Module.Core.Data;
|
|
|
|
|
|
|
|
using DS.WMS.Core.Sys.Entity;
|
|
|
|
|
|
|
|
using DS.WMS.Core.Code.Dtos;
|
|
|
|
|
|
|
|
using DS.WMS.Core.Code.Entity;
|
|
|
|
|
|
|
|
using Microsoft.AspNet.SignalR.Hubs;
|
|
|
|
|
|
|
|
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
namespace DS.WMS.Core.Op.Method
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -175,5 +179,76 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
|
|
|
|
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 历史引入查询列表
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
public DataResult<List<BillManageHistoryListRes>> GetBillManageHistoryList(PageRequest request)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
var users = db.Queryable<SysUser>().Select(x => new { x.Id, x.UserName }).ToList();
|
|
|
|
|
|
|
|
//序列化查询条件
|
|
|
|
|
|
|
|
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
|
|
|
|
|
|
|
var data = tenantDb.Queryable<SeaExportBillManage>()
|
|
|
|
|
|
|
|
.Where(whereList)
|
|
|
|
|
|
|
|
.Select<BillManageHistoryListRes>()
|
|
|
|
|
|
|
|
.Mapper(it =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
it.CreateByName = users.Find(x => x.Id == it.CreateBy).UserName;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
.ToQueryPage(request.PageCondition);
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
/// 历史引入提单信息
|
|
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
/// <param name="req">主表Id及历史提单Ids</param>
|
|
|
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
|
|
|
public async Task<DataResult> ImportBillManageHistory(IdModel req)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
|
|
|
|
|
|
|
var info = await tenantDb.Queryable<SeaExport>().Where(x => x.Id ==long.Parse(req.Id)).FirstAsync();
|
|
|
|
|
|
|
|
if (info.IsNull())
|
|
|
|
|
|
|
|
return await Task.FromResult(DataResult.Failed("不存在的海运出口信息!", MultiLanguageConst.SeaExportExist));
|
|
|
|
|
|
|
|
if (!tenantDb.Queryable<SeaExportBillManage>().Where(x => req.Ids.Contains(x.Id)).Any())
|
|
|
|
|
|
|
|
return DataResult.Failed("提单信息不存在", MultiLanguageConst.ShippingBillManageNotExist);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var list = await tenantDb.Queryable<SeaExportBillManage>().Where(x => req.Ids.Contains(x.Id)).ToListAsync();
|
|
|
|
|
|
|
|
var newList = new List<SeaExportBillManage>();
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var temp = new SeaExportBillManage()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BusinessId = long.Parse(req.Id),
|
|
|
|
|
|
|
|
ShipperContent = item.ShipperContent,
|
|
|
|
|
|
|
|
ShipperCode = item.ShipperCode,
|
|
|
|
|
|
|
|
ShipperCountry = item.ShipperCountry,
|
|
|
|
|
|
|
|
ShipperEmail = item.ShipperEmail,
|
|
|
|
|
|
|
|
ShipperTel = item.ShipperTel,
|
|
|
|
|
|
|
|
ConsigneeContent = item.ConsigneeContent,
|
|
|
|
|
|
|
|
ConsigneeCode = item.ConsigneeCode,
|
|
|
|
|
|
|
|
ConsigneeCountry = item.ConsigneeCountry,
|
|
|
|
|
|
|
|
ConsigneeEmail = item.ConsigneeEmail,
|
|
|
|
|
|
|
|
ConsigneeTel = item.ConsigneeTel,
|
|
|
|
|
|
|
|
NotifyPartyContent = item.NotifyPartyContent,
|
|
|
|
|
|
|
|
NotifyPartyCode = item.NotifyPartyCode,
|
|
|
|
|
|
|
|
NotifyPartyCountry = item.NotifyPartyCountry,
|
|
|
|
|
|
|
|
NotifyPartyEmail = item.NotifyPartyEmail,
|
|
|
|
|
|
|
|
NotifyPartyTel = item.NotifyPartyTel,
|
|
|
|
|
|
|
|
Marks = item.Marks,
|
|
|
|
|
|
|
|
Description = item.Description,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newList.Add(temp);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
await tenantDb.Insertable(newList).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await Task.FromResult(DataResult.Successed("导入成功",MultiLanguageConst.DataImportSuccess));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|