|
@ -46,7 +46,7 @@ namespace WY.NewJit.PrintTable |
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
private List<MaterialExt> _zhbCacheList = new List<MaterialExt>(); |
|
|
private List<MaterialExt> _zhbCacheList = new List<MaterialExt>(); |
|
|
|
|
|
|
|
|
public IRepository<WaitPrint, Guid> _waitPrintRepository; |
|
|
private IRepository<WaitPrint, Guid> _waitPrintRepository; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 日志
|
|
|
/// 日志
|
|
@ -185,7 +185,22 @@ namespace WY.NewJit.PrintTable |
|
|
|
|
|
|
|
|
private static string GetWhere(QueryWaitPrintDto input) |
|
|
private static string GetWhere(QueryWaitPrintDto input) |
|
|
{ |
|
|
{ |
|
|
|
|
|
//select * from FisWaitPrint
|
|
|
|
|
|
//where 1=1 and BusinessType = 1 and ProductLine = '01' and PrintType = 1 and HostSN >= 10377 and HostSN <= 10388
|
|
|
|
|
|
//order by HostSN2
|
|
|
string where = ""; |
|
|
string where = ""; |
|
|
|
|
|
if (input.BusinessType != null) |
|
|
|
|
|
{ |
|
|
|
|
|
where += string.Format(" and BusinessType = {0}", ((int)input.BusinessType).ToString()); |
|
|
|
|
|
} |
|
|
|
|
|
if (input.ProductLine != null) |
|
|
|
|
|
{ |
|
|
|
|
|
where += string.Format(" and ProductLine = '{0}'", input.ProductLine); |
|
|
|
|
|
} |
|
|
|
|
|
if (input.PrintType != null) |
|
|
|
|
|
{ |
|
|
|
|
|
where += string.Format(" and PrintType = {0}", ((int)input.PrintType).ToString()); |
|
|
|
|
|
} |
|
|
if (input.HostSNBegin != null) |
|
|
if (input.HostSNBegin != null) |
|
|
{ |
|
|
{ |
|
|
where += string.Format(" and HostSN >= {0}", input.HostSNBegin); |
|
|
where += string.Format(" and HostSN >= {0}", input.HostSNBegin); |
|
@ -226,10 +241,6 @@ namespace WY.NewJit.PrintTable |
|
|
{ |
|
|
{ |
|
|
where += string.Format(" and VehicleModelCode like '%{0}%'", input.VehicleModelCode); |
|
|
where += string.Format(" and VehicleModelCode like '%{0}%'", input.VehicleModelCode); |
|
|
} |
|
|
} |
|
|
if (input.ProductLine != null) |
|
|
|
|
|
{ |
|
|
|
|
|
where += string.Format(" and ProductLine = '{0}'", input.ProductLine); |
|
|
|
|
|
} |
|
|
|
|
|
if (input.ReceiveTimeBegin != null) |
|
|
if (input.ReceiveTimeBegin != null) |
|
|
{ |
|
|
{ |
|
|
where += string.Format(" and ReceiveTime >= '{0}'", ((DateTime)input.ReceiveTimeBegin).ToString("yyyy-MM-dd HH:mm:ss")); |
|
|
where += string.Format(" and ReceiveTime >= '{0}'", ((DateTime)input.ReceiveTimeBegin).ToString("yyyy-MM-dd HH:mm:ss")); |
|
@ -242,14 +253,6 @@ namespace WY.NewJit.PrintTable |
|
|
{ |
|
|
{ |
|
|
where += string.Format(" and BillStatus = {0}", ((int)input.BillStatus).ToString()); |
|
|
where += string.Format(" and BillStatus = {0}", ((int)input.BillStatus).ToString()); |
|
|
} |
|
|
} |
|
|
if (input.BusinessType != null) |
|
|
|
|
|
{ |
|
|
|
|
|
where += string.Format(" and BusinessType = {0}", ((int)input.BusinessType).ToString()); |
|
|
|
|
|
} |
|
|
|
|
|
if (input.PrintType != null) |
|
|
|
|
|
{ |
|
|
|
|
|
where += string.Format(" and PrintType = {0}", ((int)input.PrintType).ToString()); |
|
|
|
|
|
} |
|
|
|
|
|
return where; |
|
|
return where; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -296,6 +299,10 @@ namespace WY.NewJit.PrintTable |
|
|
return ret; |
|
|
return ret; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static string GetTrueString(string str) |
|
|
|
|
|
{ |
|
|
|
|
|
return str == null ? " " : str.Trim(); ; |
|
|
|
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 门板私有方法
|
|
|
#region 门板私有方法
|
|
@ -681,7 +688,7 @@ namespace WY.NewJit.PrintTable |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 公有方法
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 根据生产线获取正常打印单据的起始大众顺序号2
|
|
|
/// 根据生产线获取正常打印单据的起始大众顺序号2
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
@ -691,8 +698,8 @@ namespace WY.NewJit.PrintTable |
|
|
/// <returns>起始大众顺序号</returns>
|
|
|
/// <returns>起始大众顺序号</returns>
|
|
|
[UnitOfWork] |
|
|
[UnitOfWork] |
|
|
[HttpGet] |
|
|
[HttpGet] |
|
|
[Route("get-print-start-hostsn2")] |
|
|
[Route("get-print-start-hostsn22")] |
|
|
public virtual async Task<ObjectResultDto<int?>> GetPrintStartHostSN2(string productLine, string isZhuHuBan, string GroupName = null) |
|
|
public virtual async Task<ObjectResultDto<int?>> GetPrintStartHostSN22(string productLine, string isZhuHuBan, string groupName = null) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
|
int? beginHostSN = null; |
|
|
int? beginHostSN = null; |
|
@ -701,7 +708,7 @@ namespace WY.NewJit.PrintTable |
|
|
if (isZhuHuBan == "1") //是柱护板, 根据PrintBillNum非空判断是柱护板
|
|
|
if (isZhuHuBan == "1") //是柱护板, 根据PrintBillNum非空判断是柱护板
|
|
|
{ |
|
|
{ |
|
|
var qry = _waitPrintRepository.Where(itm => |
|
|
var qry = _waitPrintRepository.Where(itm => |
|
|
itm.BusinessType == (BusinessTypeEnum)(GroupName.TryToIntZero()) |
|
|
itm.BusinessType == (BusinessTypeEnum)(groupName.TryToIntZero()) |
|
|
&& itm.ProductLine == productLine |
|
|
&& itm.ProductLine == productLine |
|
|
&& itm.PrintType == PrintTypeEnum.OrderPrint); |
|
|
&& itm.PrintType == PrintTypeEnum.OrderPrint); |
|
|
|
|
|
|
|
@ -775,7 +782,6 @@ namespace WY.NewJit.PrintTable |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#region 门板打印
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 打印前检查大众顺序号是否断号
|
|
|
/// 打印前检查大众顺序号是否断号
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
@ -930,7 +936,8 @@ namespace WY.NewJit.PrintTable |
|
|
reportMainLst.AddRange(rightLst); |
|
|
reportMainLst.AddRange(rightLst); |
|
|
reportMainLst.AddRange(leftLst); |
|
|
reportMainLst.AddRange(leftLst); |
|
|
} |
|
|
} |
|
|
//校验底盘号、零件是否重复打印
|
|
|
|
|
|
|
|
|
#region //校验底盘号、零件是否重复打印
|
|
|
//string checkVinPartRepeatSql = @"
|
|
|
//string checkVinPartRepeatSql = @"
|
|
|
//select top 1 a.BillNum from FisMenBanPackingList a join FisMenBanPackingRec b
|
|
|
//select top 1 a.BillNum from FisMenBanPackingList a join FisMenBanPackingRec b
|
|
|
// on a.Id = b.MenBanPackingListId
|
|
|
// on a.Id = b.MenBanPackingListId
|
|
@ -956,6 +963,7 @@ namespace WY.NewJit.PrintTable |
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
// }
|
|
|
//}
|
|
|
//}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
//1.调用派格版库存接口
|
|
|
//1.调用派格版库存接口
|
|
|
await SaveMiddleTable_MB(reportMainLst); |
|
|
await SaveMiddleTable_MB(reportMainLst); |
|
@ -1034,30 +1042,8 @@ namespace WY.NewJit.PrintTable |
|
|
} //事务
|
|
|
} //事务
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private static string GetTrueString(string str) |
|
|
|
|
|
{ |
|
|
|
|
|
return str == null ? " " : str.Trim(); ; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
#region 柱护板打印
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// 打印前检查大众顺序号是否断号
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
|
/// <param name="isZhuHuBan">是否柱护板</param>
|
|
|
|
|
|
/// <returns>断号时Item不为空</returns>
|
|
|
|
|
|
[UnitOfWork(false)] |
|
|
|
|
|
[HttpPost] |
|
|
|
|
|
[Route("check-zhb-hostsn-break-num")] |
|
|
|
|
|
public virtual async Task<ListResultDto<string>> CheckZHBHostSNBreakNum(ZhuHuBanPrintInputDto input) |
|
|
|
|
|
{ |
|
|
|
|
|
List<string> retLst = new List<string>(); |
|
|
|
|
|
return new ListResultDto<string>(retLst); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|