|
|
@ -61,7 +61,7 @@ namespace djy.Service.AFR
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeCarrier, MappingCarrier>().InnerJoin((cc, map) => cc.Code == map.Code && map.Module == "Afr").ToList((cc, map) => new CommonMappiCode
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeCarrier, MappingCarrier>().InnerJoin((cc, map) => cc.Code == map.Code && map.Module == "AMS").ToList((cc, map) => new CommonMappiCode
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Code = cc.Code,
|
|
|
|
Code = cc.Code,
|
|
|
|
Value = cc.EnName,
|
|
|
|
Value = cc.EnName,
|
|
|
@ -75,14 +75,15 @@ namespace djy.Service.AFR
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<CommonCodeValue> GetCTNALL()
|
|
|
|
public List<CommonMappiCode> GetCTNALL()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeCtn, MappingCtn>().InnerJoin((cc, map) => cc.Code == map.Code && map.Module == "Afr").ToList((cc, map) => new CommonCodeValue
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodeCtn, MappingCtn>().InnerJoin((cc, map) => cc.Code == map.Code && map.Module == "AMS").ToList((cc, map) => new CommonMappiCode
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Code = cc.Code,
|
|
|
|
Code = cc.Code,
|
|
|
|
Value = cc.Name,
|
|
|
|
Value = cc.Name,
|
|
|
|
|
|
|
|
MapCode = map.MapCode
|
|
|
|
}).Distinct().ToList();
|
|
|
|
}).Distinct().ToList();
|
|
|
|
return List;
|
|
|
|
return List;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -92,14 +93,16 @@ namespace djy.Service.AFR
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public List<CommonCodeValue> GetPackage()
|
|
|
|
public List<CommonMappiCode> GetPackage()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodePackage, MappingPackage>().InnerJoin((cc, map) => cc.Code == map.Code && map.Module == "Afr").ToList((cc, map) => new CommonCodeValue
|
|
|
|
var List = DbBus.Get(DbList.Common).Select<CodePackage, MappingPackage>().InnerJoin((cc, map) => cc.Code == map.Code && map.Module == "AMS").ToList((cc, map) => new CommonMappiCode
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Code = cc.Code,
|
|
|
|
Code = cc.Code,
|
|
|
|
Value = cc.Name,
|
|
|
|
Value = cc.Name,
|
|
|
|
|
|
|
|
MapCode = map.MapCode,
|
|
|
|
|
|
|
|
MapName = map.MapName
|
|
|
|
}).Distinct().ToList();
|
|
|
|
}).Distinct().ToList();
|
|
|
|
return List;
|
|
|
|
return List;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -210,7 +213,7 @@ namespace djy.Service.AFR
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.MBLNO), m => m.MBLNO.Contains(input.MBLNO))
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.MBLNO), m => m.MBLNO.Contains(input.MBLNO))
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.UserName), m => m.UserName.Contains(input.UserName))
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.UserName), m => m.UserName.Contains(input.UserName))
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.DischargeHarbour), m => m.DischargeHarbour.Contains(input.DischargeHarbour))
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.DischargeHarbour), m => m.DischargeHarbour.Contains(input.DischargeHarbour))
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.ShipCompany), m => m.ShipCompany.Contains(input.ShipCompany))
|
|
|
|
.WhereIf(!string.IsNullOrEmpty(input.ShipCompanyName), m => m.ShipCompanyName.Contains(input.ShipCompanyName))
|
|
|
|
.WhereIf(input.CreateTimeStart != null, m => m.CreateTime >= input.CreateTimeStart)
|
|
|
|
.WhereIf(input.CreateTimeStart != null, m => m.CreateTime >= input.CreateTimeStart)
|
|
|
|
.WhereIf(input.CreateTimeEnd != null, m => m.CreateTime <= input.CreateTimeEnd);
|
|
|
|
.WhereIf(input.CreateTimeEnd != null, m => m.CreateTime <= input.CreateTimeEnd);
|
|
|
|
|
|
|
|
|
|
|
@ -484,14 +487,43 @@ namespace djy.Service.AFR
|
|
|
|
return history;
|
|
|
|
return history;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task Delete(string ids)
|
|
|
|
public async Task Delete(string ids)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
if (string.IsNullOrEmpty(ids))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
DateTime nowTime = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string[] idArr = ids.Split(',');
|
|
|
|
|
|
|
|
foreach (string id in idArr)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
await using DbTransaction tran = await GetDbAmsTransaction();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await DbAMS.Update<AFRMaster>()
|
|
|
|
|
|
|
|
.Set(h => h.IsDel == true)
|
|
|
|
|
|
|
|
.Set(h => h.LastUpdate == nowTime)
|
|
|
|
|
|
|
|
.WithTransaction(tran)
|
|
|
|
|
|
|
|
.Where(h => id == h.GID)
|
|
|
|
|
|
|
|
.ExecuteAffrowsAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await DbAMS.Update<AFRHouse>()
|
|
|
|
|
|
|
|
.Set(h => h.IsDel == true)
|
|
|
|
|
|
|
|
.Set(h => h.LastUpdate == nowTime)
|
|
|
|
|
|
|
|
.WithTransaction(tran)
|
|
|
|
|
|
|
|
.Where(h => h.PID == id)
|
|
|
|
|
|
|
|
.ExecuteAffrowsAsync();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tran.Commit();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task Send(string ids, string msgType)
|
|
|
|
public async Task<string> Send(string ids, int sendType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
throw new NotImplementedException();
|
|
|
|
return sendType switch
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_ => "发送成功",
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Task SaveReceipt(AFRReceiptDto input)
|
|
|
|
public Task SaveReceipt(AFRReceiptDto input)
|
|
|
@ -499,5 +531,12 @@ namespace djy.Service.AFR
|
|
|
|
throw new NotImplementedException();
|
|
|
|
throw new NotImplementedException();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<List<AFRMasterHistory>> GetHistory(string id)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var data = await DbAMS.Select<AFRMasterHistory>()
|
|
|
|
|
|
|
|
.Where(h => h.PID == id)
|
|
|
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
|
|
|
return data;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|