|
|
|
@ -8663,42 +8663,69 @@ HLCUTA12307DPXJ3 以这票为例 6个柜
|
|
|
|
|
|
|
|
|
|
#region 临时测试使用
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 比对数据临时测试
|
|
|
|
|
/// 恢复场站数据临时使用
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("/BookingOrder/HCCompareTest"), AllowAnonymous]
|
|
|
|
|
[NonUnify]
|
|
|
|
|
public async Task<string> HCCompareTest()
|
|
|
|
|
{
|
|
|
|
|
return
|
|
|
|
|
"{ " +
|
|
|
|
|
" \"Code\": 200, " +
|
|
|
|
|
" \"Message\": \"\", " +
|
|
|
|
|
" \"Data\": { " +
|
|
|
|
|
" \"Normal\": [ " +
|
|
|
|
|
" { " +
|
|
|
|
|
" \"Id\": 123123, " +
|
|
|
|
|
" \"MBLNO\": \"aaaaaaa\", " +
|
|
|
|
|
" \"Result\": \"没有此票业务\" " +
|
|
|
|
|
" } " +
|
|
|
|
|
" ], " +
|
|
|
|
|
" \"Deleted\": [ " +
|
|
|
|
|
" { " +
|
|
|
|
|
" \"Id\": 234234, " +
|
|
|
|
|
" \"MBLNO\": \"bbbbbbb\", " +
|
|
|
|
|
" \"Result\": \"此业务未删除\" " +
|
|
|
|
|
" } " +
|
|
|
|
|
" ] " +
|
|
|
|
|
" } " +
|
|
|
|
|
"} ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[HttpGet("/BookingOrder/AutoYard"), AllowAnonymous]
|
|
|
|
|
public async Task AutoYard(long bookId = 437779259732037)
|
|
|
|
|
{
|
|
|
|
|
await AutoYardData(bookId);
|
|
|
|
|
[HttpGet("/BookingOrder/DataRepire"), AllowAnonymous]
|
|
|
|
|
public async Task DataRepire()
|
|
|
|
|
{
|
|
|
|
|
var basePath = Path.Combine(App.WebHostEnvironment.WebRootPath, "DataRepire");
|
|
|
|
|
if (Directory.Exists(basePath))
|
|
|
|
|
{
|
|
|
|
|
var files = Directory.GetFiles(basePath, "*.txt");
|
|
|
|
|
foreach (var f in files)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
var jobj = JObject.Parse(File.ReadAllText(f));
|
|
|
|
|
var jinput = jobj.GetJObjectValue("input");
|
|
|
|
|
|
|
|
|
|
var bookId = Convert.ToInt64(Path.GetFileNameWithoutExtension(f));
|
|
|
|
|
var bookOrd = _rep.AsQueryable().Filter(null, true).First(x => x.Id == bookId);
|
|
|
|
|
var dbCtns = _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == bookId).ToList();
|
|
|
|
|
foreach (var dbCtn in dbCtns)
|
|
|
|
|
{
|
|
|
|
|
dbCtn.IsDeleted = true;
|
|
|
|
|
dbCtn.REMARK = "系统恢复删除";
|
|
|
|
|
_repCtn.Update(dbCtn);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var jarrCtn = jinput.GetJArrayValue("ctnInputs");
|
|
|
|
|
foreach (JObject jc in jarrCtn)
|
|
|
|
|
{
|
|
|
|
|
var ctnentity = new BookingCtn();
|
|
|
|
|
ctnentity.Id = YitIdHelper.NextId();
|
|
|
|
|
ctnentity.CTNCODE = jc.GetStringValue("ctncode");
|
|
|
|
|
ctnentity.CTNALL = jc.GetStringValue("ctnall");
|
|
|
|
|
ctnentity.CTNNUM = jc.GetIntValue("ctnnum");
|
|
|
|
|
ctnentity.CNTRNO = jc.GetStringValue("cntrno");
|
|
|
|
|
ctnentity.SEALNO = jc.GetStringValue("sealno");
|
|
|
|
|
ctnentity.PKGS = jc.GetIntValue("pkgs");
|
|
|
|
|
ctnentity.KINDPKGS = jc.GetStringValue("kindpkgs");
|
|
|
|
|
ctnentity.KGS = jc.GetDecimalValue("kgs");
|
|
|
|
|
ctnentity.CBM = jc.GetDecimalValue("cbm");
|
|
|
|
|
ctnentity.WEIGHTYPE = jc.GetStringValue("weightype");
|
|
|
|
|
ctnentity.WEIGHKGS = jc.GetDecimalValue("weighkgs");
|
|
|
|
|
ctnentity.BILLID = bookId;
|
|
|
|
|
ctnentity.CreatedUserName = "系统恢复";
|
|
|
|
|
ctnentity.REMARK = "系统恢复";
|
|
|
|
|
ctnentity.TEU = 0;
|
|
|
|
|
ctnentity.TAREWEIGHT = jc.GetDecimalValue("tareweight");
|
|
|
|
|
ctnentity.CreatedUserId = bookOrd.CreatedUserId;
|
|
|
|
|
ctnentity.TenantId = bookOrd.TenantId;
|
|
|
|
|
await _repCtn.InsertAsync(ctnentity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
File.Delete(f);
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|