diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/AssemblyCfgs/Dtos/ImportErpAssemblyGroupDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/AssemblyCfgs/Dtos/ImportErpAssemblyGroupDto.cs
index 280b57b..1b9adb2 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/AssemblyCfgs/Dtos/ImportErpAssemblyGroupDto.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/AssemblyCfgs/Dtos/ImportErpAssemblyGroupDto.cs
@@ -19,21 +19,21 @@ namespace WY.NewJit.MsgBaseData
///
[ExporterHeader(DisplayName = "规格说明")]
[ImporterHeader(Name = "规格说明")]
- [Required(ErrorMessage = "{0}是必填项")]
+ [Required(ErrorMessage = "规格说明{0}是必填项")]
public virtual string SpecExplain { get; set; }
///
/// 颜色说明
///
[ExporterHeader(DisplayName = "颜色说明")]
[ImporterHeader(Name = "颜色说明")]
- [Required(ErrorMessage = "{0}是必填项")]
+ [Required(ErrorMessage = "颜色说明{0}是必填项")]
public virtual string ColorExplain { get; set; }
///
/// 物料号
///
[ExporterHeader(DisplayName = "物料号")]
[ImporterHeader(Name = "物料号")]
- [Required(ErrorMessage = "{0}是必填项")]
+ [Required(ErrorMessage = "物料号{0}是必填项")]
public virtual string MaterialNum { get; set; }
}
}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/AssemblyCfgs/AssemblyCfgErpAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/AssemblyCfgs/AssemblyCfgErpAppService.cs
index 97e70c0..b2c88c0 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/AssemblyCfgs/AssemblyCfgErpAppService.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/AssemblyCfgs/AssemblyCfgErpAppService.cs
@@ -827,7 +827,7 @@ SELECT top 1 v.Id
var material3 = material3Lst.FirstOrDefault(r => r.MaterialNum == material);
if (material3 == null)
{
- error += $"零件编号【{material}】系统同不存在,请检查后再导入\r\n";
+ error += $"零件编号【{material}】系统中不存在,请检查后再导入\r\n";
}
}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Commons/Services/SequenceDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Commons/Services/SequenceDomainService.cs
index 376a752..8dc8d84 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Commons/Services/SequenceDomainService.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Commons/Services/SequenceDomainService.cs
@@ -72,14 +72,14 @@ namespace WY.NewJit.Commons
SequenceInfo newObj = new SequenceInfo(_guidGenerator.Create());
newObj.SequenceType = seqType;
newObj.SequenceNum = initMaxNum;
- _sequenceInfoRepository.InsertAsync(newObj).GetAwaiter().GetResult();
+ _sequenceInfoRepository.InsertAsync(newObj, true).GetAwaiter().GetResult();
ret = newObj.SequenceNum;
} //不是第一次
else
{
//序列+1后更新
obj.SequenceNum++;
- _sequenceInfoRepository.UpdateAsync(obj).GetAwaiter().GetResult();
+ _sequenceInfoRepository.UpdateAsync(obj, true).GetAwaiter().GetResult();
ret = obj.SequenceNum;
}
}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs
index 019516e..f4f7401 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs
@@ -164,12 +164,13 @@ namespace WY.NewJit.EdiReceive.Services
if (notRepeatOrder.Count == 0)
{
ret.Status = false;
- ret.Message = "根据Vin和HostSN,排除在数据库中重复的Excel订单后,已经没有不重复的订单!";
+ ret.Message = $"本次导入Excel文件中{input.Count}条记录,重复订单数量{input.Count- notRepeatOrder.Count},都是重复的订单、无法导入!";
return ret;
}
#region 断号提醒
//校验两次导入之间是否断号
- string betweenBreakNumMsg = await CheckBetweenBreakNum(input);
+ int priorMaxHostSN = await _lastImportHostSNDomainService.GetLastImportMaxHostSN();
+ string betweenBreakNumMsg = await CheckBetweenBreakNum(input, priorMaxHostSN);
//校验本次导入数据是否断号
string breakNumMsg = CheckBreakNum(ref notRepeatOrder);
@@ -261,6 +262,16 @@ namespace WY.NewJit.EdiReceive.Services
//更新本次导入的最大HostSN
int curMaxHostSN = input.Max(itm => itm.HostSN);
await _lastImportHostSNDomainService.SetCurrentImportMaxHostSN(curMaxHostSN);
+
+ if (notRepeatOrder.Count < input.Count)
+ {
+ int repeatCount = input.Count - notRepeatOrder.Count;
+
+ ret.Message = $"本次导入Excel文件中{input.Count}条记录,上次导入最大流水号是{priorMaxHostSN},本次导入重复记录{repeatCount}";
+ ret.Status = false;
+ return ret;
+ }
+
ret.Status = true;
return ret;
}
@@ -326,13 +337,13 @@ namespace WY.NewJit.EdiReceive.Services
///
///
///
- private async Task CheckBetweenBreakNum(List input)
+ private async Task CheckBetweenBreakNum(List input, int priorMaxHostSN)
{
string ret = "";
//取本次导入的最小HostSN
int curMinHostSN = input.Min(itm => itm.HostSN);
//上次导入的最大HostSN
- int priorMaxHostSN = await _lastImportHostSNDomainService.GetLastImportMaxHostSN();
+ //int priorMaxHostSN = await _lastImportHostSNDomainService.GetLastImportMaxHostSN();
if (priorMaxHostSN > 0) //第一次导入时(priorMaxHostSN = 0),不需要校验两次导入之间的断号
{
if (curMinHostSN <= priorMaxHostSN + 1)
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json
index dce7525..be42a0c 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json
@@ -17,12 +17,16 @@
//"Default": "Server=192.168.0.140;Database=NewJitPG_TEST_20230703;uid=sa;pwd=Microsoft2008;",
//"ABP": "Server=192.168.0.140;Database=ABP;User ID=sa;Password=Microsoft2008;",
//"WMS": "Server=192.168.0.140;Database=CPAT_WMS_TEST;User ID=sa;Password=Microsoft2008;"
- "Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG_HQ;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;User ID=sa;Password=ChangkeTec@2021;"
+ //"Default": "Server=dev.ccwin-in.com,6208;Database=NewJitPG_HQ;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;User ID=sa;Password=ChangkeTec@2021;"
//"Default": "Server=192.168.0.228;Database=NewJitPG_HQ_Temp;uid=sa;pwd=ChangkeTec@2021;",
//"ABP": "Server=192.168.0.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
//"WMS": "Server=192.168.0.228;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;"
+ "Default": "Server=192.168.0.228;Database=NewJitPG_HQ;uid=sa;pwd=ChangkeTec@2021;",
+ "ABP": "Server=192.168.0.228;Database=ABP;User ID=sa;Password=ChangkeTec@2021;",
+ "WMS": "Server=192.168.0.228;Database=CPAT_WMS;User ID=sa;Password=ChangkeTec@2021;"
+
},