diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs
index 9db318d..bd29109 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingListDto.cs
@@ -43,7 +43,7 @@ namespace WY.NewJit.Extends
public string ProviderCode { get; set; }
///
- /// 零件类型
+ /// 零件类型(对应字典大类)
///
public string PartType { get; set; }
@@ -110,11 +110,19 @@ namespace WY.NewJit.Extends
///
public string EndHostSN { set; get; }
+ public Guid? SortId { get; set; }
+
+
///
/// 排序字段
///
public int SN { get; set; }
+ ///
+ /// 是否报废
+ ///
+ public bool IsScrap { get; set; }
+
public MenBanPackingListDto()
{
Details = new List();
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs
index e4053fa..d08ab89 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPackingRecDto.cs
@@ -76,9 +76,29 @@ namespace WY.NewJit.Extends
public virtual string SN { get; set; }
///
- /// 扫描零件号,供发运使用
+ /// 扫描零件号1,供发运使用
///
- public string ScanPartCode { get; set; }
+ public string ScanPartCode1 { get; set; }
+
+ ///
+ /// 扫描零件号2,供发运使用
+ ///
+ public string ScanPartCode2 { get; set; }
+
+ ///
+ /// 扫描零件号3,供发运使用
+ ///
+ public string ScanPartCode3 { get; set; }
+
+ ///
+ /// 扫描零件号4,供发运使用
+ ///
+ public string ScanPartCode4 { get; set; }
+
+ ///
+ /// 扫描零件号5,供发运使用
+ ///
+ public string ScanPartCode5 { get; set; }
///
/// 备注
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PartCfgs/Dtos/PartCfgDto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PartCfgs/Dtos/PartCfgDto.cs
index 76314b1..f591d01 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PartCfgs/Dtos/PartCfgDto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/PartCfgs/Dtos/PartCfgDto.cs
@@ -47,6 +47,13 @@ namespace WY.NewJit.MsgBaseData
[ImporterHeader(Name = "描述")]
public string Description { get; set; }
+ ///
+ /// 厂内零件
+ ///
+ [ExporterHeader(DisplayName = "厂内零件")]
+ [ImporterHeader(Name = "厂内零件")]
+ public string RelationKey { get; set; }
+
#region 派格扩展
/////
///// 门板代号
@@ -68,6 +75,5 @@ namespace WY.NewJit.MsgBaseData
/////
//public string DaXiaoLiangGang { get; set; }
#endregion
-
}
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/BillM100Dto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/BillM100Dto.cs
index 348cf10..24441ef 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/BillM100Dto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/BillM100Dto.cs
@@ -150,6 +150,21 @@ namespace WY.NewJit.MsgCheck
[ImporterHeader(Name = "零件6")]
public string PartCode6 { get; set; }
+ ///
+ /// 打印时间
+ ///
+ [ExporterHeader(DisplayName = "打印时间")]
+ [ImporterHeader(Name = "打印时间")]
+ public virtual DateTime? PrintTime { get; set; }
+
+ ///
+ /// 是否打印,打印后值是“已打印”
+ ///
+ [ExporterHeader(DisplayName = "是否打印")]
+ [ImporterHeader(Name = "是否打印")]
+ public virtual string PrintBillNum { get; set; }
+
+
}
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/ResultBillM100Dto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/ResultBillM100Dto.cs
index 472937c..3a14ee7 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/ResultBillM100Dto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM100s/Dtos/ResultBillM100Dto.cs
@@ -144,10 +144,10 @@ namespace WY.NewJit.MsgCheck
public virtual bool? CanNotPrint { get; set; }
///
- /// 柱护板打印状态(不为空时表示已打印)
+ /// 是否打印,打印后值是“已打印”
///
- [ExporterHeader(IsIgnore = true)]
- [ImporterHeader(IsIgnore = true)]
+ [ExporterHeader(DisplayName = "是否打印")]
+ [ImporterHeader(Name = "是否打印")]
public virtual string PrintBillNum { get; set; }
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/BillM110Dto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/BillM110Dto.cs
index cdabb63..d6a1d85 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/BillM110Dto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/BillM110Dto.cs
@@ -87,8 +87,8 @@ namespace WY.NewJit.MsgCheck
///
/// 单据状态(0 空;1 未匹配;2 已匹配未打印;3 已打印)
///
- [ExporterHeader(DisplayName = "单据状态")]
- [ImporterHeader(Name = "单据状态")]
+ [ExporterHeader(IsIgnore = false)]
+ [ImporterHeader(IsIgnore = false)]
public BillStatusEnum BillStatus { get; set; }
///
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/ResultBillM110Dto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/ResultBillM110Dto.cs
index 1668835..16a95d8 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/ResultBillM110Dto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillM110s/Dtos/ResultBillM110Dto.cs
@@ -85,8 +85,8 @@ namespace WY.NewJit.MsgCheck
///
/// 单据状态(0 空;1 未匹配;2 已匹配未打印;3 已打印)
///
- [ExporterHeader(DisplayName = "单据状态")]
- [ImporterHeader(Name = "单据状态")]
+ [ExporterHeader(IsIgnore = false)]
+ [ImporterHeader(IsIgnore = false)]
public BillStatusEnum BillStatus { get; set; }
///
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/BillR100Dto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/BillR100Dto.cs
index 033a000..74cdf97 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/BillR100Dto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/BillR100Dto.cs
@@ -74,8 +74,8 @@ namespace WY.NewJit.MsgCheck
///
/// 单据状态(0 空;1 未匹配;2 已匹配未导出;3 已导出)
///
- [ExporterHeader(DisplayName = "单据状态")]
- [ImporterHeader(Name = "单据状态")]
+ [ExporterHeader(IsIgnore =false)]
+ [ImporterHeader(IsIgnore = false)]
public BillStatusEnum BillStatus { get; set; }
///
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/ResultBillR100Dto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/ResultBillR100Dto.cs
index 3269628..ddc9d4d 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/ResultBillR100Dto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgCheck/BillR100s/Dtos/ResultBillR100Dto.cs
@@ -95,8 +95,8 @@ namespace WY.NewJit.MsgCheck
///
/// 单据状态(0 空;1 未匹配;2 已匹配未导出;3 已导出)
///
- [ExporterHeader(DisplayName = "单据状态")]
- [ImporterHeader(Name = "单据状态")]
+ [ExporterHeader(IsIgnore = false)]
+ [ImporterHeader(IsIgnore = false)]
public BillStatusEnum BillStatus { get; set; }
///
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
index 9073733..69230a1 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
@@ -36,7 +36,7 @@
- 零件类型
+ 零件类型(对应字典大类)
@@ -104,6 +104,11 @@
排序字段
+
+
+ 是否报废
+
+
生产线
@@ -194,9 +199,29 @@
上箱位号
-
+
+
+ 扫描零件号1,供发运使用
+
+
+
- 扫描零件号,供发运使用
+ 扫描零件号2,供发运使用
+
+
+
+
+ 扫描零件号3,供发运使用
+
+
+
+
+ 扫描零件号4,供发运使用
+
+
+
+
+ 扫描零件号5,供发运使用
@@ -1308,6 +1333,11 @@
描述
+
+
+ 厂内零件
+
+
零件编码
@@ -1601,6 +1631,16 @@
手工操作日期
+
+
+ 打印时间
+
+
+
+
+ 是否打印,打印后值是“已打印”
+
+
零件查询结果DTO
@@ -1948,7 +1988,7 @@
- 柱护板打印状态(不为空时表示已打印)
+ 是否打印,打印后值是“已打印”
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs
index 1545883..df22d93 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/BillM100AppService.cs
@@ -1128,15 +1128,17 @@ select * from
/// 将M100转换成MenBanPackingList主子表
///
///
- ///
- ///
- ///
+ /// 最大顺序号加一
+ /// 当前页的记录
/// 报表分类,对应DicItemSort4
- /// 零件大类字典项
+ /// 零件大类字典项(已经排序,当前报表类型)
+ /// 本次打印的sortId相同
///
- private MenBanPackingList DoMBPrint(MenBanPrintInputDto input, int pageIdx, double maxSN, List billLst, string reportSort, List partLargeTypeLst, Guid sortId)
+ private MenBanPackingList DoMBPrint(MenBanPrintInputDto input, double maxSN, List pageBillLst, string reportSort, List partLargeTypeLst, Guid sortId)
{
- const int _colNumberPerPage = 12; //??临时的,等
+ bool isScanFactoryPart = partLargeTypeLst[0].DicItemSort5 == "厂内零件号"; //扫描厂内零件
+ int scanPartCount = partLargeTypeLst.Count(itm => itm.DicItemSort10?.Trim() == "1"); //扫描零件数量
+
var partLargeTypeObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemCode == reportSort);
if (partLargeTypeObj == null)
{
@@ -1144,16 +1146,12 @@ select * from
}
string[] partLargeTypes = partLargeTypeLst.Select(itm => itm.DicItemCode).ToArray(); //取零件大类
- //取扫描零件的索引
- int idx = partLargeTypeLst.FindIndex(itm => itm.Id == partLargeTypeObj.Id);
- if (idx < 0)
- {
- idx = 0;
- }
-
- //取当前页内容
- List curPageLst = billLst.Skip(pageIdx * _colNumberPerPage).Take(_colNumberPerPage).ToList();
-
+ ////取扫描零件的索引
+ //int idx = partLargeTypeLst.FindIndex(itm => itm.Id == partLargeTypeObj.Id);
+ //if (idx < 0)
+ //{
+ // idx = 0;
+ //}
//var vmLst = curPageLst.Select(itm => itm.VehicleModelCode).Distinct().JoinAsString(","); //取车型
string ymd = ServerHelper.CurrentDateTime.ToString("yyyyMMdd");
string serialNum = maxSN.ToString().PadLeft(3, '0'); //075
@@ -1167,10 +1165,10 @@ select * from
packingMain.VehicleModel_Disp = partLargeTypeObj.DicItemSort6; //车型(报表显示的)
packingMain.PrintDate = ServerHelper.CurrentDateTime;
packingMain.PartType = partLargeTypeObj.DicItemCode; //零件大类
- packingMain.ProductLine = billLst[0].ProductLine;
+ packingMain.ProductLine = pageBillLst[0].ProductLine;
packingMain.SortId = sortId;
- var tempLst = curPageLst.Where(itm => string.IsNullOrEmpty(itm.VIN) == false).OrderBy(itm => itm.OnlineTime).ThenBy(itm => itm.HostSN).ToList();
+ var tempLst = pageBillLst.Where(itm => string.IsNullOrEmpty(itm.VIN) == false).OrderBy(itm => itm.OnlineTime).ThenBy(itm => itm.HostSN).ToList();
if (tempLst.Count > 0)
{
packingMain.BeginVin = tempLst[0].VIN;
@@ -1181,7 +1179,7 @@ select * from
packingMain.MinOnlineTime = tempLst.Min(itm => itm.OnlineTime); //本单据最早的上线时间
//明细
int sn = 1;
- foreach (BillM100 billObj in curPageLst)
+ foreach (BillM100 billObj in pageBillLst)
{
MenBanPackingRec packingDetail = new MenBanPackingRec();
packingDetail.SetId(GuidGenerator.Create());
@@ -1200,6 +1198,28 @@ select * from
if (partObj != null)
{
packingDetail.PartCode1 = partObj.PartCode;
+
+ #region 扫描零件赋值
+ if (scanPartCount >= 1)
+ {
+ if (isScanFactoryPart)
+ {
+ var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == partObj.PartCode);
+ if (partCfgObj == null)
+ {
+ packingDetail.Remark = $"根据客户零件{partObj.PartCode}无法取得厂内零件";
+ }
+ else
+ {
+ packingDetail.ScanPartCode1 = partCfgObj.RelationKey;
+ }
+ }
+ else
+ {
+ packingDetail.ScanPartCode1 = partObj.PartCode;
+ }
+ }
+ #endregion
}
}
//第二个零件
@@ -1209,6 +1229,29 @@ select * from
if (partObj != null)
{
packingDetail.PartCode2 = partObj.PartCode;
+
+ #region 扫描零件赋值
+ if (scanPartCount >= 2)
+ {
+ if (isScanFactoryPart)
+ {
+ var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == partObj.PartCode);
+ if (partCfgObj == null)
+ {
+ packingDetail.Remark = $"根据客户零件{partObj.PartCode}无法取得厂内零件";
+ }
+ else
+ {
+ packingDetail.ScanPartCode2 = partCfgObj.RelationKey;
+ }
+ }
+ else
+ {
+ packingDetail.ScanPartCode2 = partObj.PartCode;
+ }
+
+ }
+ #endregion
}
}
//第三个零件
@@ -1218,6 +1261,28 @@ select * from
if (partObj != null)
{
packingDetail.PartCode3 = partObj.PartCode;
+
+ #region 扫描零件赋值
+ if (scanPartCount >= 3)
+ {
+ if (isScanFactoryPart)
+ {
+ var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == partObj.PartCode);
+ if (partCfgObj == null)
+ {
+ packingDetail.Remark = $"根据客户零件{partObj.PartCode}无法取得厂内零件";
+ }
+ else
+ {
+ packingDetail.ScanPartCode3 = partCfgObj.RelationKey;
+ }
+ }
+ else
+ {
+ packingDetail.ScanPartCode3 = partObj.PartCode;
+ }
+ }
+ #endregion
}
}
//第四个零件
@@ -1227,103 +1292,30 @@ select * from
if (partObj != null)
{
packingDetail.PartCode4 = partObj.PartCode;
- }
- }
- switch (idx)
- {
- case 0:
- if (partLargeTypeLst[0].DicItemSort5 == "厂内零件号")
+ #region 扫描零件赋值
+ if (scanPartCount >= 4)
{
- var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == packingDetail.PartCode1);
- if (partCfgObj == null)
+ if (isScanFactoryPart)
{
- packingDetail.Remark = $"根据客户零件{packingDetail.PartCode1}无法取得厂内零件";
+ var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == partObj.PartCode);
+ if (partCfgObj == null)
+ {
+ packingDetail.Remark = $"根据客户零件{partObj.PartCode}无法取得厂内零件";
+ }
+ else
+ {
+ packingDetail.ScanPartCode4 = partCfgObj.RelationKey;
+ }
}
else
{
- packingDetail.ScanPartCode = partCfgObj.RelationKey;
+ packingDetail.ScanPartCode4 = partObj.PartCode;
}
}
- else
- {
- packingDetail.ScanPartCode = packingDetail.PartCode1;
- }
- break;
- case 1:
- if (partLargeTypeLst[0].DicItemSort5 == "厂内零件号")
- {
- var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == packingDetail.PartCode2);
- if (partCfgObj == null)
- {
- packingDetail.Remark = $"根据客户零件{packingDetail.PartCode2}无法取得厂内零件";
- }
- else
- {
- packingDetail.ScanPartCode = partCfgObj.RelationKey;
- }
- }
- else
- {
- packingDetail.ScanPartCode = packingDetail.PartCode2;
- }
- break;
- case 2:
- if (partLargeTypeLst[0].DicItemSort5 == "厂内零件号")
- {
- var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == packingDetail.PartCode3);
- if (partCfgObj == null)
- {
- packingDetail.Remark = $"根据客户零件{packingDetail.PartCode3}无法取得厂内零件";
- }
- else
- {
- packingDetail.ScanPartCode = partCfgObj.RelationKey;
- }
- }
- else
- {
- packingDetail.ScanPartCode = packingDetail.PartCode3;
- }
- break;
- case 3:
- if (partLargeTypeLst[0].DicItemSort5 == "厂内零件号")
- {
- var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == packingDetail.PartCode4);
- if (partCfgObj == null)
- {
- packingDetail.Remark = $"根据客户零件{packingDetail.PartCode4}无法取得厂内零件";
- }
- else
- {
- packingDetail.ScanPartCode = partCfgObj.RelationKey;
- }
- }
- else
- {
- packingDetail.ScanPartCode = packingDetail.PartCode4;
- }
- break;
- case 4:
- if (partLargeTypeLst[0].DicItemSort5 == "厂内零件号")
- {
- var partCfgObj = _partCfgLst.FirstOrDefault(itm => itm.PartCode == packingDetail.PartCode5);
- if (partCfgObj == null)
- {
- packingDetail.Remark = $"根据客户零件{packingDetail.PartCode5}无法取得厂内零件";
- }
- else
- {
- packingDetail.ScanPartCode = partCfgObj.RelationKey;
- }
- }
- else
- {
- packingDetail.ScanPartCode = packingDetail.PartCode5;
- }
- break;
+ #endregion
+ }
}
-
packingDetail.SN = sn.ToString();
packingMain.Details.Add(packingDetail);
sn++;
@@ -1331,6 +1323,7 @@ select * from
return packingMain;
}
+
///
/// 上箱位号加前缀
/// KNR前4位 大于等于 2402的 属于新发货状态, 不加前缀;
@@ -2407,10 +2400,51 @@ select * from
}
}
}
- if (retLst.Count == 0 && billLst.Count < input.EndHostSN - input.BeginHostSN + 1)
+ //if (retLst.Count == 0 && billLst.Count < input.EndHostSN - input.BeginHostSN + 1)
+ //{
+ // retLst.Add($"本车装箱单不满架!");
+ //}
+
+ return new ListResultDto(retLst);
+ }
+ catch (Exception ex)
+ {
+ ListResultDto ret = new ListResultDto();
+ ret.Status = false;
+ ret.Message = _errorMessagePrefix + "打印前检查大众顺序号是否断号ChecMBkHostSNBreakNum 执行出错:" + ex.Message;
+ _logger.LogError(ret.Message);
+ return ret;
+ }
+ }
+
+ [UnitOfWork(false)]
+ [HttpPost]
+ [Route("check-already-print")]
+ public virtual async Task> CheckAlreadyPrint(MenBanPrintInputDto input)
+ {
+ List retLst = new List();
+ try
+ {
+ ListResultDto tempLst = await GetMBReportDetailList(input, false);
+ List billLst = tempLst.Item;
+
+ if (billLst.Count < input.EndHostSN - input.BeginHostSN + 1)
{
retLst.Add($"本车装箱单不满架!");
}
+ var m100Obj = billLst[0];
+
+ if (m100Obj.PrintBillNum.HasValue())
+ {
+ var alreadyPrintLst = billLst.Where(itm => string.IsNullOrEmpty(itm.PrintBillNum) == false).ToList();
+ var sortIdLst = await GetPackingListByM100Id(input.ProductLine, m100Obj.Id);
+ foreach (var sortId in sortIdLst)
+ {
+ var allMBLst = await _menBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId);
+ string billNumStr = allMBLst.Select(itm => itm.BillNum).OrderBy(itm => itm).JoinAsString(",");
+ retLst.Add($"从{alreadyPrintLst[0].HostSN}到{alreadyPrintLst[alreadyPrintLst.Count - 1].HostSN}的大众顺序号已经打印,打印对应的单号是:{billNumStr}");
+ }
+ }
return new ListResultDto(retLst);
}
@@ -2418,12 +2452,26 @@ select * from
{
ListResultDto ret = new ListResultDto();
ret.Status = false;
- ret.Message = _errorMessagePrefix + "打印前检查大众顺序号是否断号ChecMBkHostSNBreakNum 执行出错:" + ex.Message;
+ ret.Message = _errorMessagePrefix + "CheckIsAlreadyPrint执行出错:" + ex.Message;
_logger.LogError(ret.Message);
return ret;
}
}
+ ///
+ /// 根据M100的Id取打印主表
+ ///
+ ///
+ ///
+ private async Task> GetPackingListByM100Id(string productLine, Guid m100Id, bool isTrans = false)
+ {
+ string sql = $@"
+select distinct SortId from FisMenBanPackingList where ProductLine = '{productLine}' and IsScrap = 0
+and Id in (select MenBanPackingListId from FisMenBanPackingRec where M100BillId = '{m100Id}')
+";
+ var sortIdLst = await _newJitDapperRepository.GetListBySqlAsync(sql, isTrans);
+ return sortIdLst;
+ }
///
/// 打印前检查大众顺序号是否断号
@@ -2511,36 +2559,36 @@ select * from
int? beginHostSN = null;
try
{
- if (isZhuHuBan == "1") //是柱护板, 根据PrintBillNum非空判断是柱护板
- {
- //string minSNStr = await _billM100Repository.Where(itm =>
- // itm.ProductLine == productLine //指定生产线
- // && itm.CanNotPrint != true //能打印
- // && string.IsNullOrEmpty(itm.PrintBillNum) == true //等于 未打印
- // && itm.NeedReplenishPrint != 1 //排除补打
- // ).MinAsync(itm => itm.SerialNumStr);
- string sql = @"
-with d as
-(
- select *from [dbo].[FisZHBPrintStatus] where groupName='{1}'
-)
+// if (isZhuHuBan == "1") //是柱护板, 根据PrintBillNum非空判断是柱护板
+// {
+// //string minSNStr = await _billM100Repository.Where(itm =>
+// // itm.ProductLine == productLine //指定生产线
+// // && itm.CanNotPrint != true //能打印
+// // && string.IsNullOrEmpty(itm.PrintBillNum) == true //等于 未打印
+// // && itm.NeedReplenishPrint != 1 //排除补打
+// // ).MinAsync(itm => itm.SerialNumStr);
+// string sql = @"
+//with d as
+//(
+// select *from [dbo].[FisZHBPrintStatus] where groupName='{1}'
+//)
-select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN
+//select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN
- where ProductLine='{0}' and (CanNotPrint !=1 or CanNotPrint is null) and (PrintBillNum is null or PrintBillNum ='') and (NeedReplenishPrint!=1 or NeedReplenishPrint is null) and d.BillStatus is null";
+// where ProductLine='{0}' and (CanNotPrint !=1 or CanNotPrint is null) and (PrintBillNum is null or PrintBillNum ='') and (NeedReplenishPrint!=1 or NeedReplenishPrint is null) and d.BillStatus is null";
- sql = string.Format(sql, productLine, GroupName);
- var minSNStr = await _newJitDapperRepository.GetSingleBySqlAsync(sql);
+// sql = string.Format(sql, productLine, GroupName);
+// var minSNStr = await _newJitDapperRepository.GetSingleBySqlAsync(sql);
- beginHostSN = await _billM100Repository.Where(itm =>
- itm.ProductLine == productLine //指定生产线
- && itm.CanNotPrint != true //能打印
- && string.IsNullOrEmpty(itm.PrintBillNum) == true //等于 未打印
- && itm.SerialNumStr == minSNStr
- ).MinAsync(itm => itm.HostSN);
- }
- else //---------------门板-----------------------------------------------------------------------------------
+// beginHostSN = await _billM100Repository.Where(itm =>
+// itm.ProductLine == productLine //指定生产线
+// && itm.CanNotPrint != true //能打印
+// && string.IsNullOrEmpty(itm.PrintBillNum) == true //等于 未打印
+// && itm.SerialNumStr == minSNStr
+// ).MinAsync(itm => itm.HostSN);
+// }
+// else //---------------门板-----------------------------------------------------------------------------------
{
string minSNStr2 = await _billM100Repository.Where(itm =>
itm.ProductLine == productLine //指定生产线
@@ -3705,12 +3753,6 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN
ret.Status = false;
return ret;
}
-
- //_logger.LogWarning($"SaveMenBanReport读取数据 - {sw.ElapsedMilliseconds}毫秒");
-
- int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数
-
-
//过滤产线(DicItemSort2),按“报表分类”(DicItemSort4)分组,分组后按DicItemSort7排序
Dictionary> reportSortDic = partLargeTypeLst
.Where(itm => itm.DicItemSort2 == input.ProductLine && string.IsNullOrEmpty(itm.DicItemSort4) == false)
@@ -3719,41 +3761,52 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN
Guid sortId = GuidGenerator.Create(); //每次打印所有记录的SortId是相同的
- for (int pageIdx = 0; pageIdx < pageCnt; pageIdx++)
+ foreach (var reportSortItem in reportSortDic) //先按分组(01产线有C8扶手、C8头枕两个分组)、然后按分页
{
-
- foreach (var reportSortItem in reportSortDic)
+ DicItem dicItem = reportSortItem.Value[0];
+ int pageSize = dicItem.DicItemSort9.TryToInt() ?? 24; //每页记录数
+ int pageCount = (int)Math.Ceiling(billLst.Count / (decimal)pageSize); //页数
+ for (int pageIdx = 0; pageIdx < pageCount; pageIdx++)
{
//生成顺序号:按生产线分组,取当前生产线的最大流水号:001至999往复循环
- double maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, string.Empty);
+ double maxSN = await _lineSNDomianService.GetMaxSN(ProductTypeEnum.门板, input.ProductLine, reportSortItem.Key);
- MenBanPackingList packingObj = DoMBPrint(input, pageIdx, maxSN, billLst, reportSortItem.Key, reportSortItem.Value, sortId);
+ //取当前页内容
+ List pageBillLst = billLst.Skip(pageIdx * pageSize).Take(pageSize).ToList();
+
+ MenBanPackingList packingObj = DoMBPrint(input, maxSN, pageBillLst, reportSortItem.Key, reportSortItem.Value, sortId);
reportMainLst.Add(packingObj);
+
+ }
+ }
+ #region 新校验
+ //4.校验1 - 4张单据都没有扫描提交,可以重复打印1 - 4张单据,或者打印1 - 5,
+ //5.重复打印后,原单据作废,原单据即使扫描也无法提交
+ var m100Id = billLst[0].Id;
+ var sortIdLst2 = await GetPackingListByM100Id(input.ProductLine, m100Id, true);
+ foreach (var sortId2 in sortIdLst2)
+ {
+ var allMBLst = await _menBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId2);
+ foreach (var mbObj in allMBLst)
+ {
+ mbObj.IsScrap = true;
}
+ await _menBanPackingListRepository.UpdateManyAsync(allMBLst);
}
-
- //_logger.LogWarning($"SaveMenBanReport转换数据 - {sw.ElapsedMilliseconds}毫秒");
-
+ #endregion
+
//插入门板打印记录表
await _menBanPackingListRepository.InsertManyAsync(reportMainLst, true);
- retLst.AddRange(reportMainLst.Select(itm => itm.Id));
-
- //_logger.LogWarning($"SaveMenBanReport插入门板打印记录表 - {sw.ElapsedMilliseconds}毫秒");
-
-
//调用派格版库存接口
//await SaveMiddleTable_MB(reportMainLst);
-
- //_logger.LogWarning($"SaveMenBanReport插入中间表 - {sw.ElapsedMilliseconds}毫秒");
-
-
//更新M100的门板打印标志:BillStatus=3
foreach (BillM100 billObj in billLst)
{
if (billObj.BillStatus == BillStatusEnum.Match)
{
- billObj.SetBillStatus(BillStatusEnum.Publish);
+ //billObj.SetBillStatus(BillStatusEnum.Publish);
billObj.PrintTime = ServerHelper.CurrentDateTime;
+ billObj.PrintBillNum = "已打印";
billObj.NeedReplenishPrint = 0; //不需要补打
await _billM100Repository.UpdateAsync(billObj, true);
}
@@ -3764,17 +3817,15 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN
// await _billM100Repository.UpdateAsync(billObj, true);
//}
}
-
- //_logger.LogWarning($"SaveMenBanReport更新M100的门板打印标志 - {sw.ElapsedMilliseconds}毫秒");
- }
+ } //if 正常打印
//else if (input.PrintType == PrintTypeEnum.重新打印) //和正常打印单据完全一样,可以打印部分单据
//{
// throw new BusinessException("请调用LoadMenBanReport方法!");
//}
await uow.CompleteAsync();
ret.Status = true;
- ret.Item = retLst;
+ ret.Item = reportMainLst.Select(itm => itm.Id).ToList();
return ret;
}
catch (Exception ex)
@@ -3874,7 +3925,7 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN
MenBanPackingListResultDto ret = new MenBanPackingListResultDto();
try
{
- List reportLst = await LoadMenBanReport(input);
+ List reportLst = await LoadMenBanReport(input); //例如:包含两条C8扶手、两条C8头枕
List partLargeTypeLst = await _dicItemRepository.GetListAsync(itm => itm.DicTypeCode == "零件大类");
foreach (MenBanPackingListDto report in reportLst)
@@ -3886,17 +3937,29 @@ select min(SerialNumStr) from FisBillM100 a left join d on a.VIN=d.VIN
}
}
reportLst = reportLst.OrderBy(itm => itm.SN).ToList();
- if (reportLst.Count > 0)
+ var partTypeLst = reportLst.Select(itm => itm.PartType).Distinct().ToList();
+
+ if (partTypeLst.Count > 0)
{
- ret.MainList1.Add(reportLst[0]);
- ret.DetailList1.AddRange(reportLst[0].Details);
- reportLst[0].Details = null;
+ var mainLst1 = reportLst.Where(itm => itm.PartType == partTypeLst[0]).OrderBy(itm => itm.SN).ToList();
+ var detailLst1 = mainLst1.SelectMany(itm => itm.Details).OrderBy(itm => itm.SN).ToList();
+ foreach (var item in mainLst1)
+ {
+ item.Details = null;
+ }
+ ret.MainList1 = mainLst1;
+ ret.DetailList1 = detailLst1;
}
- if (reportLst.Count > 1)
+ if (partTypeLst.Count > 1)
{
- ret.MainList2.Add(reportLst[1]);
- ret.DetailList2.AddRange(reportLst[1].Details);
- reportLst[1].Details = null;
+ var mainLst2 = reportLst.Where(itm => itm.PartType == partTypeLst[1]).OrderBy(itm => itm.SN).ToList();
+ var detailLst2 = mainLst2.SelectMany(itm => itm.Details).OrderBy(itm => itm.SN).ToList();
+ foreach (var item in mainLst2)
+ {
+ item.Details = null;
+ }
+ ret.MainList2 = mainLst2;
+ ret.DetailList2 = detailLst2;
}
return ret;
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs
index 832bfed..01379e5 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/MenBanPackingRecService.cs
@@ -10,6 +10,7 @@ using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Logging;
using Shouldly;
using System;
+using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -166,7 +167,7 @@ namespace Win.Sfs.SettleAccount.FISes
public async Task> GetMainListAsync(MenBanPackingListRequestDto input)
{
List filters = new List();
- filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ReportStatus", Logic = EnumFilterLogic.And, Value = ((int)ReportStatusEnum.已打印).ToString() });
+ filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ReportStatus", Logic = EnumFilterLogic.And, Value = ((int)ReportStatusEnum.未扫描).ToString() });
if (!string.IsNullOrEmpty(input.ProductLine))
{
@@ -436,94 +437,94 @@ namespace Win.Sfs.SettleAccount.FISes
targetLst = targetLst.OrderBy(itm => itm.BillNum).ToList();
#region 扫描依据的列表, C8返回的客户零件号,其它车型返回厂内零件号
- foreach (var targetObj in targetLst)
- {
- foreach (var detailObj in targetObj.Details)
- {
- //第一个零件
- if (detailObj.PartCode1.HasValue() && detailObj.PartCode1.Length >= 9)
- {
- //根据车型、零件大类取记录
- var partLargeTypeObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode1.Substring(6, 3));
- var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode1);
- if (partLargeTypeObj.DicItemSort5 == "客户零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode1 = partCfgObj.PartCode;
- }
- }
- else if (partLargeTypeObj.DicItemSort5 == "厂内零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode1 = partCfgObj.RelationKey;
- }
- }
- }
- //第二个零件
- if (detailObj.PartCode2.HasValue() && detailObj.PartCode2.Length >= 9)
- {
- var dicItemObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode2.Substring(6, 3));
- var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode2);
- if (dicItemObj.DicItemSort5 == "客户零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode2 = partCfgObj.PartCode;
- }
- }
- else if (dicItemObj.DicItemSort5 == "厂内零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode2 = partCfgObj.RelationKey;
- }
- }
- }
- //第三个零件
- if (detailObj.PartCode3.HasValue() && detailObj.PartCode3.Length >= 9)
- {
- var dicItemObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode3.Substring(6, 3));
- var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode3);
- if (dicItemObj.DicItemSort5 == "客户零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode3 = partCfgObj.PartCode;
- }
- }
- else if (dicItemObj.DicItemSort5 == "厂内零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode3 = partCfgObj.RelationKey;
- }
- }
- }
- //第四个零件
- if (detailObj.PartCode4.HasValue() && detailObj.PartCode4.Length >= 9)
- {
- var dicItemObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode4.Substring(6, 3));
- var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode4);
- if (dicItemObj.DicItemSort5 == "客户零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode4 = partCfgObj.PartCode;
- }
- }
- else if (dicItemObj.DicItemSort5 == "厂内零件号")
- {
- if (partCfgObj != null)
- {
- detailObj.PartCode4 = partCfgObj.RelationKey;
- }
- }
- }
+ //foreach (var targetObj in targetLst)
+ //{
+ // foreach (var detailObj in targetObj.Details)
+ // {
+ // //第一个零件
+ // if (detailObj.PartCode1.HasValue() && detailObj.PartCode1.Length >= 9)
+ // {
+ // //根据车型、零件大类取记录
+ // var partLargeTypeObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode1.Substring(6, 3));
+ // var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode1);
+ // if (partLargeTypeObj.DicItemSort5 == "客户零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode1 = partCfgObj.PartCode;
+ // }
+ // }
+ // else if (partLargeTypeObj.DicItemSort5 == "厂内零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode1 = partCfgObj.RelationKey;
+ // }
+ // }
+ // }
+ // //第二个零件
+ // if (detailObj.PartCode2.HasValue() && detailObj.PartCode2.Length >= 9)
+ // {
+ // var dicItemObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode2.Substring(6, 3));
+ // var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode2);
+ // if (dicItemObj.DicItemSort5 == "客户零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode2 = partCfgObj.PartCode;
+ // }
+ // }
+ // else if (dicItemObj.DicItemSort5 == "厂内零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode2 = partCfgObj.RelationKey;
+ // }
+ // }
+ // }
+ // //第三个零件
+ // if (detailObj.PartCode3.HasValue() && detailObj.PartCode3.Length >= 9)
+ // {
+ // var dicItemObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode3.Substring(6, 3));
+ // var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode3);
+ // if (dicItemObj.DicItemSort5 == "客户零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode3 = partCfgObj.PartCode;
+ // }
+ // }
+ // else if (dicItemObj.DicItemSort5 == "厂内零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode3 = partCfgObj.RelationKey;
+ // }
+ // }
+ // }
+ // //第四个零件
+ // if (detailObj.PartCode4.HasValue() && detailObj.PartCode4.Length >= 9)
+ // {
+ // var dicItemObj = partLargeTypeLst.FirstOrDefault(itm => itm.DicItemSort3 == targetObj.VehicleModel && itm.DicItemCode == detailObj.PartCode4.Substring(6, 3));
+ // var partCfgObj = partCfgLst.FirstOrDefault(itm => itm.PartCode == detailObj.PartCode4);
+ // if (dicItemObj.DicItemSort5 == "客户零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode4 = partCfgObj.PartCode;
+ // }
+ // }
+ // else if (dicItemObj.DicItemSort5 == "厂内零件号")
+ // {
+ // if (partCfgObj != null)
+ // {
+ // detailObj.PartCode4 = partCfgObj.RelationKey;
+ // }
+ // }
+ // }
- }
- }
+ // }
+ //}
#endregion
#endregion
@@ -543,17 +544,70 @@ namespace Win.Sfs.SettleAccount.FISes
[HttpPost]
[Route("update-scan-status")]
- public virtual async Task UpdateScanStatus(string billNum)
+ public virtual async Task UpdateScanStatus(List billNumList)
{
ObjectResultDto ret = new ObjectResultDto();
try
{
- var lst = await _menBanPackingListRepository.GetListAsync(itm => itm.BillNum == billNum);
- foreach (var item in lst)
+ #region 校验
+ if (billNumList.Count == 0)
{
- item.ReportStatus = ReportStatusEnum.已扫描;
- var succ = await _menBanPackingListRepository.UpdateAsync(item);
+ throw new Exception($"传入的单号不能为空!");
}
+ string billNumStr = billNumList.JoinAsString(",");
+
+ var allLst = await _menBanPackingListRepository.GetListAsync(itm => billNumList.Contains(itm.BillNum));
+ var menBanLst = allLst.Where(itm => itm.IsScrap == false).ToList(); //扣除报废的
+ var isScan = menBanLst.Any(itm => itm.ReportStatus == ReportStatusEnum.已扫描);
+ if (isScan)
+ {
+ throw new Exception($"存在已经扫描的单据,不允许重复提交");
+ }
+ //bool isScrap = menBanLst.Any(itm => itm.IsScrap == true);
+ //if (isScrap)
+ //{
+ // throw new Exception($"传入的单号,存在已经报废的单据(FIS操作人员重新打印引起)" + billNumStr);
+ //}
+ if (menBanLst.Count != billNumList.Count)
+ {
+ throw new Exception($"传入的单号,有的在打印表不存在(或者已经报废):" + billNumStr);
+ }
+ var distLst = menBanLst.Select(itm => itm.SortId).Distinct().ToList();
+ if (distLst.Count > 1)
+ {
+ throw new Exception($"传入的单号,不是一个打印批次:" + billNumStr);
+ }
+ var sortId = menBanLst[0].SortId;
+ var batchMenBanLst = await _menBanPackingListRepository.GetListAsync(itm => itm.SortId == sortId, true);
+ var batchSortIdLst = batchMenBanLst.Select(itm => itm.BillNum).ToList();
+
+ var exceptLst1 = batchSortIdLst.OrderBy(itm => itm).Except(billNumList.OrderBy(itm => itm)).ToList();
+ if (exceptLst1.Count > 0)
+ {
+ throw new Exception($"和一个打印批次比较,传入的单号缺失:" + exceptLst1.JoinAsString(","));
+ }
+
+ var exceptLst2 = billNumList.OrderBy(itm => itm).Except(batchSortIdLst.OrderBy(itm => itm)).ToList();
+ if (exceptLst2.Count > 0)
+ {
+ throw new Exception($"和一个打印批次比较,传入的单号多了:" + exceptLst1.JoinAsString(","));
+ }
+ #endregion
+
+ //更新状态
+ foreach (var batchMenBan in batchMenBanLst)
+ {
+ batchMenBan.ReportStatus = ReportStatusEnum.已扫描;
+ var updateObj = await _menBanPackingListRepository.UpdateAsync(batchMenBan);
+ }
+ var billIdLst = batchMenBanLst.SelectMany(itm => itm.Details).Select(itm => itm.M100BillId).Distinct().ToList();
+ var m100Lst = await _billM100Repository.GetListAsync(itm => billIdLst.Contains(itm.Id));
+ foreach (var m100 in m100Lst)
+ {
+ m100.SetBillStatus(BillStatusEnum.Publish);
+ }
+ await _billM100Repository.UpdateManyAsync(m100Lst);
+
ret.Status = true;
return ret;
}
@@ -561,7 +615,7 @@ namespace Win.Sfs.SettleAccount.FISes
{
ret.Status = false;
ret.Message = $"调用UpdateScanStatus方法报错:{ex.Message}";
- throw;
+ return ret;
}
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs
index 80c4e2a..cec7485 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgCheck/BillM100s/ZhuHuBanPackingRecService.cs
@@ -154,7 +154,7 @@ namespace Win.Sfs.SettleAccount.FISes
{
List filters = new List();
- filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ReportStatus", Logic = EnumFilterLogic.And, Value = ((int)ReportStatusEnum.已打印).ToString() });
+ filters.Add(new FilterCondition() { Action = EnumFilterAction.Equal, Column = "ReportStatus", Logic = EnumFilterLogic.And, Value = ((int)ReportStatusEnum.未扫描).ToString() });
if (!string.IsNullOrEmpty(input.ProductLine))
{
@@ -271,109 +271,109 @@ namespace Win.Sfs.SettleAccount.FISes
/// IDs
/// /// IDs
/// 是否执行成功
- [HttpPost]
- [Route("scrap")]
- [UnitOfWork(isTransactional: false)]
- virtual public async Task> ScrapAsync(List ids)
- {
- var selLst = await _ZhuHuBanPackingListRepository.Where(p => ids.Contains(p.Id)).ToListAsync();
- if (selLst == null || selLst.Count == 0)
- {
- throw new BusinessException("1001", "没有选中要作废的已打印装箱单!!");
- }
-
- foreach (var selObj in selLst)
- {
- string maxBillNum = await _ZhuHuBanPackingListRepository.Where(itm => itm.ProductLine == selObj.ProductLine && itm.ReportStatus == ReportStatusEnum.已打印).MaxAsync(itm => itm.BillNum); //取当前生产线的最大装箱单号
- if (string.IsNullOrEmpty(maxBillNum) == false)
- {
- ZhuHuBanPackingList firObj = await _ZhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => itm.BillNum == maxBillNum);
- if (firObj != null)
- {
- if (selObj.SortId != firObj.SortId)
- {
- throw new BusinessException("1001", "只能报废当前生产线的最后打印单据,要报废的单据不是最后打印单据!");
- }
- }
- }
- }
-
- var sortList = selLst.Select(p => p.SortId).Distinct().ToList();//筛选出匹配门板
- List pairlist = _ZhuHuBanPackingListRepository.Where(p => sortList.Contains(p.SortId)).ToList();
-
-
-
- var idList = pairlist.Select(p => p.Id).ToList();
- var _ls = pairlist.Select(p => p.BillNum).ToList();
- var _strList = new List();
-
- _ls.ForEach(p => {
- _strList.Add(string.Format("'{0}'", p));
- });
- string str = string.Join(",", _strList.ToArray());
- var wmsLst = _wmsRepository.GetListBySql(string.Format("select * from TB_BILL where (state=1 or state=2) and BillNum in ({0}) ", str));
- if (wmsLst.Count() == 0) //库存没有排序
- {
- //调用库存系统接口
- List billNumLst = pairlist.Select(itm => itm.BillNum).Distinct().ToList();
- foreach (string billNumStr in billNumLst)
- {
- DelOrScrapWMSInterface(billNumStr, true);
- }
-
- #region 作废时单据序号减一
- string curProductLine = selLst[0].ProductLine;
- DateTime curPrintDate = selLst[0].PrintDate;
-
- var partTypeLst = pairlist.Select(itm => itm.PartType).ToList();
- foreach (string curPartType in partTypeLst)
- {
- var priorLst = _ZhuHuBanPackingListRepository.Where(itm =>
- itm.ReportStatus == ReportStatusEnum.已打印
- && itm.ProductLine == curProductLine
- && itm.PartType == curPartType
- && idList.Contains(itm.Id) == false);
-
- if (priorLst.Any())
- {
- string maxBillNum = priorLst.Max(itm => itm.BillNum); //扣除要作废记录,取当前生产线的最大单据号
- ZhuHuBanPackingList priorObj = priorLst.FirstOrDefault(itm => itm.BillNum == maxBillNum); //扣除要作废记录,取当前生产线的最后打印记录
- double updRecCnt = await _lineSNDomianServic.SetMaxSN(ProductTypeEnum.柱护板, curProductLine, curPartType, priorObj.PrintDate, priorObj.BillSerialNum.TryToDoubleZero(), null); //调用减号接口
- }
- else
- {
- double updRecCnt2 = await _lineSNDomianServic.SetMaxSN(ProductTypeEnum.柱护板, curProductLine, curPartType, curPrintDate, 0, null); //调用减号接口,没有上条记录时 单据号传0
- }
- }
- #endregion
-
- //打印记录表更新成 已作废 状态
- foreach (var itm in pairlist)
- {
- itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.已作废;
- }
- await _ZhuHuBanPackingListRepository.UpdateManyAsync(pairlist);
- //批量改为未打印
- var _childList = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync();
- var _child = _childList.Select(p => p.M100BillId).Distinct().ToList();
- var _lst1 = await _billM100Repository.Where(p => _child.Contains(p.Id)).ToListAsync();
- _lst1.ForEach(p =>
- {
- p.SetZHBBillStatus(ZHBBillStatusEnum.NotPrint);
- p.PrintTime2 = null;
- });
- await _billM100Repository.UpdateManyAsync(_lst1);
- var types = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).Select(p => p.PartType).Distinct().ToListAsync();
- var groupName = await _printTemplateConfigurationRepository.FirstOrDefaultAsync(r => types.Contains(r.PartType));
- var vins = _childList.Select(p => p.VIN).Distinct().ToList();
- await _zHBPrintStatusRepository.DeleteAsync(r => vins.Contains(r.VIN) && r.GroupName == groupName.GroupName);
- }
- else
- {
- throw new BusinessException("1001", "WMS已经排序,不能报废!");
- }
- return wmsLst.Select(p => p.BillNum).ToList();
- }
+ //[HttpPost]
+ //[Route("scrap")]
+ //[UnitOfWork(isTransactional: false)]
+ //virtual public async Task> ScrapAsync(List ids)
+ //{
+ // var selLst = await _ZhuHuBanPackingListRepository.Where(p => ids.Contains(p.Id)).ToListAsync();
+ // if (selLst == null || selLst.Count == 0)
+ // {
+ // throw new BusinessException("1001", "没有选中要作废的已打印装箱单!!");
+ // }
+
+ // foreach (var selObj in selLst)
+ // {
+ // string maxBillNum = await _ZhuHuBanPackingListRepository.Where(itm => itm.ProductLine == selObj.ProductLine && itm.ReportStatus == ReportStatusEnum.未扫描).MaxAsync(itm => itm.BillNum); //取当前生产线的最大装箱单号
+ // if (string.IsNullOrEmpty(maxBillNum) == false)
+ // {
+ // ZhuHuBanPackingList firObj = await _ZhuHuBanPackingListRepository.FirstOrDefaultAsync(itm => itm.BillNum == maxBillNum);
+ // if (firObj != null)
+ // {
+ // if (selObj.SortId != firObj.SortId)
+ // {
+ // throw new BusinessException("1001", "只能报废当前生产线的最后打印单据,要报废的单据不是最后打印单据!");
+ // }
+ // }
+ // }
+ // }
+
+ // var sortList = selLst.Select(p => p.SortId).Distinct().ToList();//筛选出匹配门板
+ // List pairlist = _ZhuHuBanPackingListRepository.Where(p => sortList.Contains(p.SortId)).ToList();
+
+
+
+ // var idList = pairlist.Select(p => p.Id).ToList();
+ // var _ls = pairlist.Select(p => p.BillNum).ToList();
+ // var _strList = new List();
+
+ // _ls.ForEach(p => {
+ // _strList.Add(string.Format("'{0}'", p));
+ // });
+ // string str = string.Join(",", _strList.ToArray());
+ // var wmsLst = _wmsRepository.GetListBySql(string.Format("select * from TB_BILL where (state=1 or state=2) and BillNum in ({0}) ", str));
+ // if (wmsLst.Count() == 0) //库存没有排序
+ // {
+ // //调用库存系统接口
+ // List billNumLst = pairlist.Select(itm => itm.BillNum).Distinct().ToList();
+ // foreach (string billNumStr in billNumLst)
+ // {
+ // DelOrScrapWMSInterface(billNumStr, true);
+ // }
+
+ // #region 作废时单据序号减一
+ // string curProductLine = selLst[0].ProductLine;
+ // DateTime curPrintDate = selLst[0].PrintDate;
+
+ // var partTypeLst = pairlist.Select(itm => itm.PartType).ToList();
+ // foreach (string curPartType in partTypeLst)
+ // {
+ // var priorLst = _ZhuHuBanPackingListRepository.Where(itm =>
+ // itm.ReportStatus == ReportStatusEnum.未扫描
+ // && itm.ProductLine == curProductLine
+ // && itm.PartType == curPartType
+ // && idList.Contains(itm.Id) == false);
+
+ // if (priorLst.Any())
+ // {
+ // string maxBillNum = priorLst.Max(itm => itm.BillNum); //扣除要作废记录,取当前生产线的最大单据号
+ // ZhuHuBanPackingList priorObj = priorLst.FirstOrDefault(itm => itm.BillNum == maxBillNum); //扣除要作废记录,取当前生产线的最后打印记录
+ // double updRecCnt = await _lineSNDomianServic.SetMaxSN(ProductTypeEnum.柱护板, curProductLine, curPartType, priorObj.PrintDate, priorObj.BillSerialNum.TryToDoubleZero(), null); //调用减号接口
+ // }
+ // else
+ // {
+ // double updRecCnt2 = await _lineSNDomianServic.SetMaxSN(ProductTypeEnum.柱护板, curProductLine, curPartType, curPrintDate, 0, null); //调用减号接口,没有上条记录时 单据号传0
+ // }
+ // }
+ // #endregion
+
+ // //打印记录表更新成 已作废 状态
+ // foreach (var itm in pairlist)
+ // {
+ // itm.ReportStatus = WY.NewJit.Extends.PaiGe.ReportStatusEnum.已作废;
+ // }
+ // await _ZhuHuBanPackingListRepository.UpdateManyAsync(pairlist);
+ // //批量改为未打印
+ // var _childList = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).SelectMany(p => p.Details).ToListAsync();
+ // var _child = _childList.Select(p => p.M100BillId).Distinct().ToList();
+ // var _lst1 = await _billM100Repository.Where(p => _child.Contains(p.Id)).ToListAsync();
+ // _lst1.ForEach(p =>
+ // {
+ // p.SetZHBBillStatus(ZHBBillStatusEnum.NotPrint);
+ // p.PrintTime2 = null;
+ // });
+ // await _billM100Repository.UpdateManyAsync(_lst1);
+ // var types = await _ZhuHuBanPackingListRepository.Where(p => idList.Contains(p.Id)).Select(p => p.PartType).Distinct().ToListAsync();
+ // var groupName = await _printTemplateConfigurationRepository.FirstOrDefaultAsync(r => types.Contains(r.PartType));
+ // var vins = _childList.Select(p => p.VIN).Distinct().ToList();
+ // await _zHBPrintStatusRepository.DeleteAsync(r => vins.Contains(r.VIN) && r.GroupName == groupName.GroupName);
+ // }
+ // else
+ // {
+ // throw new BusinessException("1001", "WMS已经排序,不能报废!");
+ // }
+ // return wmsLst.Select(p => p.BillNum).ToList();
+ //}
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
index b95e117..c986150 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
@@ -1045,16 +1045,16 @@
-
+
将M100转换成MenBanPackingList主子表
-
-
-
+ 最大顺序号加一
+ 当前页的记录
报表分类,对应DicItemSort4
- 零件大类字典项
+ 零件大类字典项(已经排序,当前报表类型)
+ 本次打印的sortId相同
@@ -1064,6 +1064,13 @@
断号时Item不为空
+
+
+ 根据M100的Id取打印主表
+
+
+
+
根据生产线获取正常打印单据的起始大众顺序号2
@@ -2053,13 +2060,6 @@
请求条件
实体DTO列表
-
-
- 按IDs删除实体列表
-
- IDs
- 是否执行成功
-
取待报废的全部数据,用于展示
@@ -2067,7 +2067,7 @@
请求条件
实体DTO列表
-
+
报废
@@ -2118,13 +2118,5 @@
请求条件
实体DTO列表
-
-
- 报废
-
- IDs
- /// IDs
- 是否执行成功
-
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs
index 4e3d891..fc431a7 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ExtMethod.cs
@@ -66,6 +66,29 @@ namespace WY.NewJit.Common
}
}
+ public static decimal? TryToDecimal(this string p_str)
+ {
+ if (p_str == null)
+ {
+ return null;
+ }
+ decimal ret;
+ bool isSucc = Decimal.TryParse(p_str, out ret);
+ if (isSucc)
+ {
+ return ret;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public static decimal TryToDecimalZero(this string p_str)
+ {
+ return p_str.TryToDecimal() ?? 0.0M;
+ }
+
public static double TryToDoubleZero(this string p_str)
{
double resu;
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ObjectResultDto.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ObjectResultDto.cs
index a7bb060..40186bb 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ObjectResultDto.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Common/ObjectResultDto.cs
@@ -61,6 +61,13 @@ namespace WY.NewJit
this.Item = item;
}
+ public ListResultDto(List item, bool status)
+ : base(status, "")
+ {
+ this.Item = item;
+ }
+
+
public List Item { get; set; }
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Extends/PaiGe/PrintTypeEnum.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Extends/PaiGe/PrintTypeEnum.cs
index 7004fc9..1ba3ef8 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Extends/PaiGe/PrintTypeEnum.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain.Shared/Extends/PaiGe/PrintTypeEnum.cs
@@ -13,8 +13,7 @@ namespace WY.NewJit.Extends.PaiGe
public enum ReportStatusEnum
{
- 已打印 = 0,
- 已作废 = 1,
- 已扫描 = 2
+ 未扫描 = 0,
+ 已扫描 = 1,
}
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs
index 6aa4fde..755ed2d 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingList.cs
@@ -103,6 +103,11 @@ namespace WY.NewJit.Extends
///
public virtual DateTime? MinOnlineTime { get; set; }
+ ///
+ /// 是否报废
+ ///
+ public bool IsScrap { get; set; }
+
public MenBanPackingList()
{
Details = new List();
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs
index 21d2c85..6111288 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Extends/PaiGe/MenBanReports/MenBanPackingRec.cs
@@ -65,9 +65,29 @@ namespace WY.NewJit.Extends
public virtual string SN { get; set; }
///
- /// 扫描零件号,供发运使用
+ /// 扫描零件号1,供发运使用
///
- public string ScanPartCode { get; set; }
+ public string ScanPartCode1 { get; set; }
+
+ ///
+ /// 扫描零件号2,供发运使用
+ ///
+ public string ScanPartCode2 { get; set; }
+
+ ///
+ /// 扫描零件号3,供发运使用
+ ///
+ public string ScanPartCode3 { get; set; }
+
+ ///
+ /// 扫描零件号4,供发运使用
+ ///
+ public string ScanPartCode4 { get; set; }
+
+ ///
+ /// 扫描零件号5,供发运使用
+ ///
+ public string ScanPartCode5 { get; set; }
///
/// 备注
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/LineSN.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/LineSN.cs
index c1f34d0..75908e3 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/LineSN.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/LineSN.cs
@@ -68,7 +68,7 @@ namespace WY.NewJit.MsgBaseData
Remark = remark;
}
- public void Update(double sn, DateTime lastPrintTime, string remark)
+ public void Update(double sn, DateTime lastPrintTime, string remark = "")
{
SN = sn;
LastPrintTime = lastPrintTime;
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/LineSNDomianService.cs b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/LineSNDomianService.cs
index 41cc749..e68652f 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/LineSNDomianService.cs
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/LineSNDomianService.cs
@@ -19,20 +19,20 @@ namespace WY.NewJit.MsgBaseData
}
///
- /// 生成门板或柱护板右上角顺序号,每天零点开始往复循环1-99
+ /// 生成顺序号,每天零点开始往复循环1-99
///
/// 门板或柱护板
/// 产线
- /// 门板时传入""
+ /// 报表分类,对应产品大类的DicItemSort4
///
- public async Task GetMaxSN(ProductTypeEnum productType, string productLine, string partType)
+ public async Task GetMaxSN(ProductTypeEnum productType, string productLine, string reportType)
{
bool isExist = true;
- var typeObj = await _lineSNRepository.FirstOrDefaultAsync(p => p.ProductType == productType && p.ProductLine == productLine && p.PartType == partType);
+ var lineSNObj = await _lineSNRepository.FirstOrDefaultAsync(p => p.ProductType == productType && p.ProductLine == productLine && p.PartType == reportType);
- if (typeObj == null)
+ if (lineSNObj == null)
{
isExist = false;
}
@@ -40,75 +40,75 @@ namespace WY.NewJit.MsgBaseData
DateTime now = DateTime.Now;
DateTime today8 = new DateTime(now.Year, now.Month, now.Day, 0, 0, 0);
- if (typeObj != null)
+ if (lineSNObj != null) //之前生成过顺序号
{
- if (typeObj.LastPrintTime < today8 && now >= today8)
+ if (lineSNObj.LastPrintTime < today8 && now >= today8)
{
- typeObj.Update(1, now, string.Empty);
+ lineSNObj.Update(1, now);
}
else
{
- if (typeObj.SN == 99)
+ if (lineSNObj.SN == 99)
{
- typeObj.Update(1, now, string.Empty);
+ lineSNObj.Update(1, now);
}
else
{
- typeObj.Update(typeObj.SN + 1, now, string.Empty);
+ lineSNObj.Update(lineSNObj.SN + 1, now);
}
}
}
- else
+ else //第一次生成顺序号
{
- typeObj = new LineSN(Guid.NewGuid(), productType, productLine, partType, 1, now, string.Empty);
+ lineSNObj = new LineSN(Guid.NewGuid(), productType, productLine, reportType, 1, now, string.Empty);
}
if (isExist)
{
- await _lineSNRepository.UpdateAsync(typeObj, true);
+ await _lineSNRepository.UpdateAsync(lineSNObj, true);
}
else
{
- await _lineSNRepository.InsertAsync(typeObj, true);
+ await _lineSNRepository.InsertAsync(lineSNObj, true);
}
- return typeObj.SN;
+ return lineSNObj.SN;
}
- public async Task SetMaxSN(ProductTypeEnum productType, string productLine, string partType, DateTime lastPrintTime, double sn, string remark)
- {
- bool isExist = true;
+ //public async Task SetMaxSN(ProductTypeEnum productType, string productLine, string partType, DateTime lastPrintTime, double sn, string remark)
+ //{
+ // bool isExist = true;
- var typeObj = _lineSNRepository.FirstOrDefault(p => p.ProductType == productType && p.ProductLine == productLine && p.PartType == partType);
+ // var typeObj = _lineSNRepository.FirstOrDefault(p => p.ProductType == productType && p.ProductLine == productLine && p.PartType == partType);
- if (typeObj == null)
- {
- isExist = false;
- }
+ // if (typeObj == null)
+ // {
+ // isExist = false;
+ // }
- if (typeObj != null)
- {
+ // if (typeObj != null)
+ // {
- typeObj.Update(sn, lastPrintTime, remark);
- }
- else
- {
- typeObj = new LineSN(Guid.NewGuid(), productType, productLine, partType, sn, lastPrintTime, remark);
- }
+ // typeObj.Update(sn, lastPrintTime, remark);
+ // }
+ // else
+ // {
+ // typeObj = new LineSN(Guid.NewGuid(), productType, productLine, partType, sn, lastPrintTime, remark);
+ // }
- if (isExist)
- {
- await _lineSNRepository.UpdateAsync(typeObj);
- }
- else
- {
- await _lineSNRepository.InsertAsync(typeObj);
- }
+ // if (isExist)
+ // {
+ // await _lineSNRepository.UpdateAsync(typeObj);
+ // }
+ // else
+ // {
+ // await _lineSNRepository.InsertAsync(typeObj);
+ // }
- return typeObj.SN;
- }
+ // return typeObj.SN;
+ //}
}
}
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/appsettings.json b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/appsettings.json
index 2e6c0b5..a2bb27d 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/appsettings.json
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleApp/appsettings.json
@@ -60,13 +60,13 @@
},
"ConnectionStrings": {
- //"Default": "Server=192.168.1.228;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
- //"ABP": "Server=192.168.1.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
- //"WMS": "Server=192.168.1.228;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;",
+ "Default": "Server=192.168.1.228;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
+ "ABP": "Server=192.168.1.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
+ "WMS": "Server=192.168.1.228;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;",
- "Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
- "ABP": "Server=dev.ccwin-in.com,6208;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
- "WMS": "Server=dev.ccwin-in.com,6208;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;"
+ //"Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
+ //"ABP": "Server=dev.ccwin-in.com,6208;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
+ //"WMS": "Server=dev.ccwin-in.com,6208;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;"
},
diff --git a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleGetEDIFile/appsettings.json b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleGetEDIFile/appsettings.json
index 8205641..6520db4 100644
--- a/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleGetEDIFile/appsettings.json
+++ b/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleGetEDIFile/appsettings.json
@@ -46,13 +46,13 @@
},
"ConnectionStrings": {
- //"Default": "Server=192.168.1.228;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
- //"ABP": "Server=192.168.1.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
- //"WMS": "Server=192.168.1.228;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;",
+ "Default": "Server=192.168.1.228;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
+ "ABP": "Server=192.168.1.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
+ "WMS": "Server=192.168.1.228;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;",
- "Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
- "ABP": "Server=dev.ccwin-in.com,6208;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
- "WMS": "Server=dev.ccwin-in.com,6208;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;"
+ //"Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG;uid=sa;pwd=ChangkeTec@2021;",
+ //"ABP": "Server=dev.ccwin-in.com,6208;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
+ //"WMS": "Server=dev.ccwin-in.com,6208;Database=CPAT_WMS_TEST;User ID=sa;Password=ChangkeTec@2021;"
},
diff --git a/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg b/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg
index f3be9fb..0363a8c 100644
Binary files a/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg and b/Shared/Win.Sfs.Shared/bin/Debug/Win.Sfs.Shared.2.0.0.nupkg differ
diff --git a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll
index f88760c..62fe2e2 100644
Binary files a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.dll differ
diff --git a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb
index 472c778..ab51469 100644
Binary files a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb and b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Sfs.Shared.pdb differ
diff --git a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.dll b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.dll
index 04339d6..8cbc7ef 100644
Binary files a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.dll and b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.dll differ
diff --git a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.pdb b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.pdb
index b067310..185babd 100644
Binary files a/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.pdb and b/Shared/Win.Sfs.Shared/bin/Debug/netcoreapp5/Win.Utils.pdb differ
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec b/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec
index a4187c7..e61cc95 100644
--- a/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec
+++ b/Shared/Win.Sfs.Shared/obj/Debug/Win.Sfs.Shared.2.0.0.nuspec
@@ -5,7 +5,7 @@
2.0.0
Win.Sfs.Shared
Package Description
-
+
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs
index 6d53d66..5a2bee6 100644
--- a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs
+++ b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Win.Sfs.Shared")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0+a5a9bdc002c0bde27fed59155b4f42778c8a586e")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0+ec1383591dce0935576a66bebfe8f243eb6bb935")]
[assembly: System.Reflection.AssemblyProductAttribute("Win.Sfs.Shared")]
[assembly: System.Reflection.AssemblyTitleAttribute("Win.Sfs.Shared")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.0.0.0")]
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache
index 7f783e5..925c9ee 100644
--- a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache
+++ b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.AssemblyInfoInputs.cache
@@ -1 +1 @@
-ce8bce8f0148848382678a78ba43b96b07f28bbbffd2234bcd66f38b2eecf85f
+8cadcfdfe2ca4a85dd62aac09e5df76d11c27163dfcd557ec04e1ee675ca7a8d
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache
index 0ad3b9a..8df4b15 100644
Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.csproj.AssemblyReference.cache differ
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll
index f88760c..62fe2e2 100644
Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.dll differ
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb
index 472c778..ab51469 100644
Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/Win.Sfs.Shared.pdb differ
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll
index 4be7eda..f1fc2fc 100644
Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/ref/Win.Sfs.Shared.dll differ
diff --git a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll
index 4be7eda..f1fc2fc 100644
Binary files a/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll and b/Shared/Win.Sfs.Shared/obj/Debug/netcoreapp5/refint/Win.Sfs.Shared.dll differ
diff --git a/Shared/Win.Utils/bin/Debug/Win.Utils.2.0.0.nupkg b/Shared/Win.Utils/bin/Debug/Win.Utils.2.0.0.nupkg
index d8c5b7d..b2a74e6 100644
Binary files a/Shared/Win.Utils/bin/Debug/Win.Utils.2.0.0.nupkg and b/Shared/Win.Utils/bin/Debug/Win.Utils.2.0.0.nupkg differ
diff --git a/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.dll b/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.dll
index 04339d6..8cbc7ef 100644
Binary files a/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.dll and b/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.dll differ
diff --git a/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.pdb b/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.pdb
index b067310..185babd 100644
Binary files a/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.pdb and b/Shared/Win.Utils/bin/Debug/netcoreapp5/Win.Utils.pdb differ
diff --git a/Shared/Win.Utils/obj/Debug/Win.Utils.2.0.0.nuspec b/Shared/Win.Utils/obj/Debug/Win.Utils.2.0.0.nuspec
index 7a63211..a2257df 100644
--- a/Shared/Win.Utils/obj/Debug/Win.Utils.2.0.0.nuspec
+++ b/Shared/Win.Utils/obj/Debug/Win.Utils.2.0.0.nuspec
@@ -5,7 +5,7 @@
2.0.0
Win.Utils
Package Description
-
+
diff --git a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfo.cs b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfo.cs
index 508caa2..c568c99 100644
--- a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfo.cs
+++ b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfo.cs
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Win.Utils")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("2.0.0.0")]
-[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0+655f97fce0dd87165ead1e3cce91aba34298af56")]
+[assembly: System.Reflection.AssemblyInformationalVersionAttribute("2.0.0+ec1383591dce0935576a66bebfe8f243eb6bb935")]
[assembly: System.Reflection.AssemblyProductAttribute("Win.Utils")]
[assembly: System.Reflection.AssemblyTitleAttribute("Win.Utils")]
[assembly: System.Reflection.AssemblyVersionAttribute("2.0.0.0")]
diff --git a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfoInputs.cache b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfoInputs.cache
index ca30889..62d2a9c 100644
--- a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfoInputs.cache
+++ b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.AssemblyInfoInputs.cache
@@ -1 +1 @@
-d35c56c2a77531ab3e36b55a499477cd4f9db824953aa80b990cafe5b4adf800
+3305b1f11584cc8e77f0485edbdb433ff1bf37be83db08c9968f87ced8aa9106
diff --git a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.dll b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.dll
index 04339d6..8cbc7ef 100644
Binary files a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.dll and b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.dll differ
diff --git a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.pdb b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.pdb
index b067310..185babd 100644
Binary files a/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.pdb and b/Shared/Win.Utils/obj/Debug/netcoreapp5/Win.Utils.pdb differ
diff --git a/Shared/Win.Utils/obj/Debug/netcoreapp5/ref/Win.Utils.dll b/Shared/Win.Utils/obj/Debug/netcoreapp5/ref/Win.Utils.dll
index 52cfa20..96c7c59 100644
Binary files a/Shared/Win.Utils/obj/Debug/netcoreapp5/ref/Win.Utils.dll and b/Shared/Win.Utils/obj/Debug/netcoreapp5/ref/Win.Utils.dll differ
diff --git a/Shared/Win.Utils/obj/Debug/netcoreapp5/refint/Win.Utils.dll b/Shared/Win.Utils/obj/Debug/netcoreapp5/refint/Win.Utils.dll
index 52cfa20..96c7c59 100644
Binary files a/Shared/Win.Utils/obj/Debug/netcoreapp5/refint/Win.Utils.dll and b/Shared/Win.Utils/obj/Debug/netcoreapp5/refint/Win.Utils.dll differ