Browse Source

加打印前校验,改测试bug

master
liuyunfeng 1 year ago
parent
commit
a0d7d742ab
  1. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs
  2. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
  3. 34
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs
  4. 83
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs
  5. 4
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs
  6. 7
      vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/ZhuHuBanReports/ZhuHuBanPrintInputDto.cs

@ -54,7 +54,7 @@ namespace WY.NewJit.Extends
public virtual List<Guid> WaitPrintIdList { get; set; }
/// <summary>
/// 1 门板 2 其它柱护板 3 柱护板
/// 1 门板 2 其它柱护板 3 AC柱护板
/// </summary>
public virtual string GroupName { get; set; }

2
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml

@ -575,7 +575,7 @@
</member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintInputDto.GroupName">
<summary>
1 门板 2 其它柱护板 3 柱护板
1 门板 2 其它柱护板 3 AC柱护板
</summary>
</member>
<member name="P:WY.NewJit.Extends.ZhuHuBanPrintResultDto.MasterList_AC">

34
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs

@ -828,10 +828,42 @@ namespace WY.NewJit.PrintTable
[Route("check-mb-hostsn-break-num")]
public virtual async Task<ListResultDto<string>> CheckMBHostSNBreakNum(MenBanPrintInputDto input)
{
//报文解析时已经校验断号,打印前不用校验
List<string> retLst = new List<string>();
//输入起始大众顺序号和 未打印表 中最小大众顺序号校验
int minHostSN2 = await _waitPrintRepository.Where(itm =>
itm.BusinessType == BusinessTypeEnum.MenBan
&& 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 GetMBReportDetailList(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);
}
[UnitOfWork(IsDisabled = true)]

83
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService_ZHB.cs

@ -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);
}

4
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgCheck/Services/M100DomainService.cs

@ -90,7 +90,7 @@ namespace WY.NewJit.MsgCheck
targetWaitPrint.HostSN2 = breaknum.HostSN2;
targetWaitPrint.Description = null;
targetWaitPrint.ReceiveTime = null;
//targetWaitPrint.CreationTime = null;
targetWaitPrint.CreationTime = ServerHelper.CurrentDateTime;
//targetWaitPrint.CreatorId = null;
//targetWaitPrint.LastModificationTime = null;
//targetWaitPrint.LastModifierId = null;
@ -186,7 +186,7 @@ namespace WY.NewJit.MsgCheck
waitPrint.HostSN2 = (int)m100Ret.HostSN2;
waitPrint.Description = m100Ret.Description;
waitPrint.ReceiveTime = m100Ret.ReceiveTime;
waitPrint.CreationTime = m100Ret.CreationTime;
waitPrint.CreationTime = ServerHelper.CurrentDateTime; //m100Ret.CreationTime;
waitPrint.CreatorId = m100Ret.CreatorId;
waitPrint.LastModificationTime = m100Ret.LastModificationTime;
waitPrint.LastModifierId = m100Ret.LastModifierId;

7
vue/src/views/pg-fis/basedate/m100Online/normalPritIndex.vue

@ -689,7 +689,7 @@ export default {
computed: {
getDefaultField() {
var tempsTabs = [];
tempsTabs.push({ label: "流水号", prop: "serialNum", width: 100 });
//tempsTabs.push({ label: "", prop: "serialNum", width: 100 });
tempsTabs.push({ label: "大众顺序号", prop: "hostSN", width: 120 });
// tempsTabs.push({
// label: "",
@ -741,6 +741,11 @@ export default {
prop: "billStatus",
width: 120,
});
tempsTabs.push({
label: "顺序号",
prop: "hostSN2",
width: 120,
});
// tempsTabs.push({
// label: "",

Loading…
Cancel
Save