|
|
@ -92,7 +92,7 @@ namespace WY.NewJit.PrintTable |
|
|
|
zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); |
|
|
|
zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); |
|
|
|
} |
|
|
|
zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
|
|
|
|
//取当前页的详细信息
|
|
|
|
foreach (WaitPrint billObj in billLst) |
|
|
@ -104,7 +104,7 @@ namespace WY.NewJit.PrintTable |
|
|
|
zhbRec.VIN = billObj.VIN; |
|
|
|
zhbRec.HostSN = billObj.HostSN; |
|
|
|
zhbRec.HostSN2 = billObj.HostSN2; |
|
|
|
if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
{ |
|
|
|
//取柱护板-A上C上
|
|
|
|
if (zhbPartType == "A上C上") |
|
|
@ -172,7 +172,7 @@ namespace WY.NewJit.PrintTable |
|
|
|
zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); |
|
|
|
zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); |
|
|
|
} |
|
|
|
zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
|
|
|
|
|
|
|
|
//取当前页的详细信息
|
|
|
@ -185,7 +185,7 @@ namespace WY.NewJit.PrintTable |
|
|
|
zhbRec.VIN = billObj.VIN; |
|
|
|
zhbRec.HostSN = billObj.HostSN; |
|
|
|
zhbRec.HostSN2 = billObj.HostSN2; |
|
|
|
if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
{ |
|
|
|
//取A柱下、A中
|
|
|
|
if (zhbPartType == "A柱下A中") |
|
|
@ -262,14 +262,14 @@ namespace WY.NewJit.PrintTable |
|
|
|
zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); |
|
|
|
zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); |
|
|
|
} |
|
|
|
zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
|
|
|
|
|
|
|
|
//取当前页的详细信息
|
|
|
|
foreach (WaitPrint billObj in billLst) |
|
|
|
{ |
|
|
|
ZhuHuBanPackingRec zhbRec; |
|
|
|
if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
{ |
|
|
|
if (zhbPartType == "B柱上") |
|
|
|
{ |
|
|
@ -392,7 +392,7 @@ namespace WY.NewJit.PrintTable |
|
|
|
zhbObj.BeginHostSN = tempLst[0].HostSN.ToString(); |
|
|
|
zhbObj.EndHostSN = tempLst[tempLst.Count - 1].HostSN.ToString(); |
|
|
|
} |
|
|
|
zhbObj.MinOnlineTime = billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
zhbObj.MinOnlineTime = billLst.Count == 0 ? null : billLst.Min(itm => itm.OnlineTime); //取最早上线时间,库存接口用
|
|
|
|
|
|
|
|
//取当前页的详细信息
|
|
|
|
foreach (WaitPrint billObj in billLst) |
|
|
@ -415,7 +415,7 @@ namespace WY.NewJit.PrintTable |
|
|
|
zhbRec.VIN = billObj.VIN; |
|
|
|
zhbRec.HostSN = billObj.HostSN; |
|
|
|
zhbRec.HostSN2 = billObj.HostSN2; |
|
|
|
if (_m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
if (_m100PartDicCache.ContainsKey(billObj.M100Id) && _m100PartDicCache[billObj.M100Id] != null && _m100PartDicCache[billObj.M100Id].Count > 0) |
|
|
|
{ |
|
|
|
if (zhbPartType == "D柱") |
|
|
|
{ |
|
|
@ -736,19 +736,7 @@ namespace WY.NewJit.PrintTable |
|
|
|
|
|
|
|
printBillCnt = input.EndHostSN - input.BeginHostSN + 1; |
|
|
|
|
|
|
|
BusinessTypeEnum busiType; |
|
|
|
if (input.GroupName == "2") |
|
|
|
{ |
|
|
|
busiType = BusinessTypeEnum.OtherZhuHuBan; |
|
|
|
} |
|
|
|
else if (input.GroupName == "3") |
|
|
|
{ |
|
|
|
busiType = BusinessTypeEnum.AC_ZhuHuBan; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new Exception("input.GroupName参数值必须是2或3!"); |
|
|
|
} |
|
|
|
BusinessTypeEnum busiType = GetBusinessType(input.GroupName); |
|
|
|
|
|
|
|
int minHostSN2 = await _waitPrintRepository.Where(itm => |
|
|
|
itm.BusinessType == busiType |
|
|
@ -788,6 +776,25 @@ namespace WY.NewJit.PrintTable |
|
|
|
return ret; |
|
|
|
} |
|
|
|
|
|
|
|
private static BusinessTypeEnum GetBusinessType(string groupName) |
|
|
|
{ |
|
|
|
BusinessTypeEnum busiType; |
|
|
|
if (groupName == "2") |
|
|
|
{ |
|
|
|
busiType = BusinessTypeEnum.OtherZhuHuBan; |
|
|
|
} |
|
|
|
else if (groupName == "3") |
|
|
|
{ |
|
|
|
busiType = BusinessTypeEnum.AC_ZhuHuBan; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
throw new Exception("input.GroupName参数值必须是2或3!"); |
|
|
|
} |
|
|
|
|
|
|
|
return busiType; |
|
|
|
} |
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
#region 柱护板公有方法
|
|
|
@ -818,6 +825,40 @@ namespace WY.NewJit.PrintTable |
|
|
|
public virtual async Task<ListResultDto<string>> CheckZHBHostSNBreakNum(ZhuHuBanPrintInputDto input) |
|
|
|
{ |
|
|
|
List<string> retLst = new List<string>(); |
|
|
|
//输入起始大众顺序号和 未打印表 中最小大众顺序号校验
|
|
|
|
BusinessTypeEnum busiType = GetBusinessType(input.GroupName); |
|
|
|
|
|
|
|
int minHostSN2 = await _waitPrintRepository.Where(itm => |
|
|
|
itm.BusinessType == busiType |
|
|
|
&& itm.ProductLine == input.ProductLine //生产线
|
|
|
|
&& itm.PrintType == PrintTypeEnum.OrderPrint //顺序打印
|
|
|
|
).MinAsync(itm => itm.HostSN2); |
|
|
|
int minHostSN = minHostSN2 % 100000; |
|
|
|
if (input.BeginHostSN != minHostSN) |
|
|
|
{ |
|
|
|
retLst.Add($"输入的大众起始大众顺序号{input.BeginHostSN}和未打印表中的最小大众顺序号{minHostSN2}不相等!"); |
|
|
|
return new ListResultDto<string>(retLst); |
|
|
|
} |
|
|
|
//判断是否断号
|
|
|
|
ListResultDto<WaitPrint> tempLst = await GetZHBReportDetailList(input, true); //-------------------
|
|
|
|
List<WaitPrint> billLst = tempLst.Item; |
|
|
|
bool isBreakNum = billLst.Any(itm => itm.BillStatus == BillStatusEnum.BreakNum); |
|
|
|
if (isBreakNum) |
|
|
|
{ |
|
|
|
var breakNumLst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.BreakNum).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ",").ToList(); |
|
|
|
string breakNumStr = string.Concat(breakNumLst); |
|
|
|
retLst.Add($"存在断号:{breakNumStr}"); |
|
|
|
return new ListResultDto<string>(retLst); |
|
|
|
} |
|
|
|
//判断未知总成
|
|
|
|
bool containNotMatch = billLst.Any(itm => itm.BillStatus == BillStatusEnum.NotMatch); |
|
|
|
if (containNotMatch) |
|
|
|
{ |
|
|
|
var lst = billLst.Where(itm => itm.BillStatus == BillStatusEnum.NotMatch).OrderBy(itm => itm.HostSN2).Select(itm => itm.HostSN2.ToString() + ",").ToList(); |
|
|
|
string str = string.Concat(lst); |
|
|
|
retLst.Add($"存在未知总成:{str}"); |
|
|
|
return new ListResultDto<string>(retLst); |
|
|
|
} |
|
|
|
return new ListResultDto<string>(retLst); |
|
|
|
} |
|
|
|
|
|
|
|