|
|
|
@ -97,6 +97,9 @@ namespace Myshipping.Application
|
|
|
|
|
const string CONST_WEB_LARA_ACCOUNT_TYPE = "LaraWeb";
|
|
|
|
|
const string CONST_LARA_DOWN_URL_CODE = "LaraPaperPostUrl";
|
|
|
|
|
|
|
|
|
|
//LARA纸计算常量
|
|
|
|
|
const int LARA_PARER_DRAFT_VAR = 3;
|
|
|
|
|
|
|
|
|
|
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskSIFeedBackInfo> taskSIFeedBackInfoRepository,
|
|
|
|
|
SqlSugarRepository<TaskSIFeedBackContaInfo> taskSIFeedBackContaInfoRepository,
|
|
|
|
@ -3034,31 +3037,31 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (currInfo != null)
|
|
|
|
|
{
|
|
|
|
|
if(!l.SEALNO.Equals(currInfo.SEAL_NO))
|
|
|
|
|
if(l.SEALNO != currInfo.SEAL_NO)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.SealNo));
|
|
|
|
|
}
|
|
|
|
|
if (!l.CTNCODE.Equals(currInfo.CONTA_TYPE))
|
|
|
|
|
if (l.CTNCODE != currInfo.CONTA_TYPE)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.ContaType));
|
|
|
|
|
}
|
|
|
|
|
if (!l.CTNALL.Equals(currInfo.CONTA_TYPE_NAME))
|
|
|
|
|
if (l.CTNALL != currInfo.CONTA_TYPE_NAME)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.ContaTypeName));
|
|
|
|
|
}
|
|
|
|
|
if (!l.KGS.Equals(currInfo.KGS))
|
|
|
|
|
if (l.KGS != currInfo.KGS)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.KGS));
|
|
|
|
|
}
|
|
|
|
|
if (!l.TAREWEIGHT.Equals(currInfo.TAREWEIGHT))
|
|
|
|
|
if (l.TAREWEIGHT != currInfo.TAREWEIGHT)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.TareWeight));
|
|
|
|
|
}
|
|
|
|
|
if (!l.WEIGHKGS.Equals(currInfo.WEIGHKGS))
|
|
|
|
|
if (l.WEIGHKGS != currInfo.WEIGHKGS)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.WeighKGs));
|
|
|
|
|
}
|
|
|
|
|
if (!l.WEIGHTYPE.Equals(currInfo.WEIGHTYPE))
|
|
|
|
|
if (l.WEIGHTYPE != currInfo.WEIGHTYPE)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.WeighType));
|
|
|
|
|
}
|
|
|
|
@ -3088,31 +3091,31 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
if (currInfo != null)
|
|
|
|
|
{
|
|
|
|
|
if (!l.SEAL_NO.Equals(currInfo.SEALNO))
|
|
|
|
|
if (l.SEAL_NO != currInfo.SEALNO)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.SealNo));
|
|
|
|
|
}
|
|
|
|
|
if (!l.CONTA_TYPE.Equals(currInfo.CTNCODE))
|
|
|
|
|
if (l.CONTA_TYPE != currInfo.CTNCODE)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.ContaType));
|
|
|
|
|
}
|
|
|
|
|
if (!l.CONTA_TYPE_NAME.Equals(currInfo.CTNALL))
|
|
|
|
|
if (l.CONTA_TYPE_NAME != currInfo.CTNALL)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.ContaTypeName));
|
|
|
|
|
}
|
|
|
|
|
if (!l.KGS.Equals(currInfo.KGS))
|
|
|
|
|
if (l.KGS != currInfo.KGS)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.KGS));
|
|
|
|
|
}
|
|
|
|
|
if (!l.TAREWEIGHT.Equals(currInfo.TAREWEIGHT))
|
|
|
|
|
if (l.TAREWEIGHT != currInfo.TAREWEIGHT)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.TareWeight));
|
|
|
|
|
}
|
|
|
|
|
if (!l.WEIGHKGS.Equals(currInfo.WEIGHKGS))
|
|
|
|
|
if (l.WEIGHKGS != currInfo.WEIGHKGS)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.WeighKGs));
|
|
|
|
|
}
|
|
|
|
|
if (!l.WEIGHTYPE.Equals(currInfo.WEIGHTYPE))
|
|
|
|
|
if (l.WEIGHTYPE != currInfo.WEIGHTYPE)
|
|
|
|
|
{
|
|
|
|
|
md.compareDiffList.Add(nameof(TaskVgmCompareDto.WeighType));
|
|
|
|
|
}
|
|
|
|
@ -3603,9 +3606,22 @@ namespace Myshipping.Application
|
|
|
|
|
{
|
|
|
|
|
List<LaraPaperRegistPostDto> list = new List<LaraPaperRegistPostDto>();
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
LARA计算方法
|
|
|
|
|
|
|
|
|
|
1、判断是否为首次加载,model.moveType为空时表示首次加载,触发InitCalcLaraPageNumbers方法。
|
|
|
|
|
2、如果 model.moveType有值时,判断是调整行位置,根据指定的行位置重新计算编号。
|
|
|
|
|
*/
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
list = model.paperList;
|
|
|
|
|
if(string.IsNullOrWhiteSpace(model.moveType))
|
|
|
|
|
{
|
|
|
|
|
list = InnerCalcLaraPageNumbers(model,true);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
list = InnerCalcLaraPageNumbers(model);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
@ -3615,6 +3631,97 @@ namespace Myshipping.Application
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 计算LARA纸
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 计算LARA纸
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="model">请求LARA纸详情</param>
|
|
|
|
|
/// <param name="isInit">是否初始化 true-初始化</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
private List<LaraPaperRegistPostDto> InnerCalcLaraPageNumbers(CalcLaraPageNumbersDto model,bool isInit = false)
|
|
|
|
|
{
|
|
|
|
|
List<LaraPaperRegistPostDto> list = new List<LaraPaperRegistPostDto>();
|
|
|
|
|
|
|
|
|
|
//如果判断不是首次加载,需要将移动的行从列表移动到指定位置后,重新计算。
|
|
|
|
|
if(!isInit)
|
|
|
|
|
{
|
|
|
|
|
model.paperList = model.paperList.Select(t =>
|
|
|
|
|
{
|
|
|
|
|
if (t.SortNo == model.origIndex.Value)
|
|
|
|
|
{
|
|
|
|
|
//up
|
|
|
|
|
if(model.currIndex < model.origIndex)
|
|
|
|
|
{
|
|
|
|
|
t.SortNo = (decimal)model.currIndex.Value - 0.1m;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
t.SortNo = (decimal)model.currIndex.Value + 0.1m;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return t;
|
|
|
|
|
}).OrderBy(t => t.SortNo)
|
|
|
|
|
.Select((t, idx) =>
|
|
|
|
|
{
|
|
|
|
|
t.SortNo = (decimal)idx + 1;
|
|
|
|
|
return t;
|
|
|
|
|
|
|
|
|
|
}).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var mNumberTo = int.Parse(model.numberTo.TrimStart('0'));
|
|
|
|
|
|
|
|
|
|
if (mNumberTo > 0)
|
|
|
|
|
{
|
|
|
|
|
int lastNumberTo = 0;
|
|
|
|
|
int lastNumberFrom = 0;
|
|
|
|
|
|
|
|
|
|
model.paperList.OrderBy(t => t.SortNo).ToList().ForEach(t =>
|
|
|
|
|
{
|
|
|
|
|
LaraPaperRegistPostDto info = new LaraPaperRegistPostDto();
|
|
|
|
|
|
|
|
|
|
info.SortNo = t.SortNo;
|
|
|
|
|
info.DraftNum = t.DraftNum;
|
|
|
|
|
info.TaskId = t.TaskId;
|
|
|
|
|
info.ORDNO = t.ORDNO;
|
|
|
|
|
info.MBLNO = t.MBLNO;
|
|
|
|
|
info.ISSUETYPE = t.ISSUETYPE;
|
|
|
|
|
|
|
|
|
|
if (t.SortNo == 1)
|
|
|
|
|
{
|
|
|
|
|
lastNumberFrom = mNumberTo + 1;
|
|
|
|
|
info.NumberFrom = (lastNumberFrom).ToString().PadLeft(9, '0');
|
|
|
|
|
|
|
|
|
|
var currNumberTo = (t.DraftNum * LARA_PARER_DRAFT_VAR) + mNumberTo;
|
|
|
|
|
|
|
|
|
|
info.NumberTo = currNumberTo.ToString().PadLeft(9, '0');
|
|
|
|
|
info.PageSum = currNumberTo - lastNumberFrom + 1;
|
|
|
|
|
|
|
|
|
|
lastNumberTo = currNumberTo;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
lastNumberFrom = lastNumberTo + 1;
|
|
|
|
|
info.NumberFrom = (lastNumberFrom).ToString().PadLeft(9, '0');
|
|
|
|
|
|
|
|
|
|
var currNumberTo = (t.DraftNum * LARA_PARER_DRAFT_VAR) + lastNumberTo;
|
|
|
|
|
|
|
|
|
|
info.NumberTo = currNumberTo.ToString().PadLeft(9, '0');
|
|
|
|
|
info.PageSum = currNumberTo - lastNumberFrom + 1;
|
|
|
|
|
|
|
|
|
|
lastNumberTo = currNumberTo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
list.Add(info);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region 样本业务提取帮助类
|
|
|
|
|