Browse Source

项目暂停前提交

HQ
liuyunfeng 10 months ago
parent
commit
04ff49a2f8
  1. 6
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/AssemblyCfgs/Dtos/ImportErpAssemblyGroupDto.cs
  2. 2
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/AssemblyCfgs/AssemblyCfgErpAppService.cs
  3. 4
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/Commons/Services/SequenceDomainService.cs
  4. 19
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/EdiReceive/Services/EdiParseDomainService.cs
  5. 10
      src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Job.ConsoleSyncToWms/appsettings.json

6
src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/AssemblyCfgs/Dtos/ImportErpAssemblyGroupDto.cs

@ -19,21 +19,21 @@ namespace WY.NewJit.MsgBaseData
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "规格说明")] [ExporterHeader(DisplayName = "规格说明")]
[ImporterHeader(Name = "规格说明")] [ImporterHeader(Name = "规格说明")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "规格说明{0}是必填项")]
public virtual string SpecExplain { get; set; } public virtual string SpecExplain { get; set; }
/// <summary> /// <summary>
/// 颜色说明 /// 颜色说明
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "颜色说明")] [ExporterHeader(DisplayName = "颜色说明")]
[ImporterHeader(Name = "颜色说明")] [ImporterHeader(Name = "颜色说明")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "颜色说明{0}是必填项")]
public virtual string ColorExplain { get; set; } public virtual string ColorExplain { get; set; }
/// <summary> /// <summary>
/// 物料号 /// 物料号
/// </summary> /// </summary>
[ExporterHeader(DisplayName = "物料号")] [ExporterHeader(DisplayName = "物料号")]
[ImporterHeader(Name = "物料号")] [ImporterHeader(Name = "物料号")]
[Required(ErrorMessage = "{0}是必填项")] [Required(ErrorMessage = "物料号{0}是必填项")]
public virtual string MaterialNum { get; set; } public virtual string MaterialNum { get; set; }
} }
} }

2
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); var material3 = material3Lst.FirstOrDefault(r => r.MaterialNum == material);
if (material3 == null) if (material3 == null)
{ {
error += $"零件编号【{material}】系统不存在,请检查后再导入\r\n"; error += $"零件编号【{material}】系统不存在,请检查后再导入\r\n";
} }
} }

4
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()); SequenceInfo newObj = new SequenceInfo(_guidGenerator.Create());
newObj.SequenceType = seqType; newObj.SequenceType = seqType;
newObj.SequenceNum = initMaxNum; newObj.SequenceNum = initMaxNum;
_sequenceInfoRepository.InsertAsync(newObj).GetAwaiter().GetResult(); _sequenceInfoRepository.InsertAsync(newObj, true).GetAwaiter().GetResult();
ret = newObj.SequenceNum; ret = newObj.SequenceNum;
} //不是第一次 } //不是第一次
else else
{ {
//序列+1后更新 //序列+1后更新
obj.SequenceNum++; obj.SequenceNum++;
_sequenceInfoRepository.UpdateAsync(obj).GetAwaiter().GetResult(); _sequenceInfoRepository.UpdateAsync(obj, true).GetAwaiter().GetResult();
ret = obj.SequenceNum; ret = obj.SequenceNum;
} }
} }

19
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) if (notRepeatOrder.Count == 0)
{ {
ret.Status = false; ret.Status = false;
ret.Message = "根据Vin和HostSN,排除在数据库中重复的Excel订单后,已经没有不重复的订单!"; ret.Message = $"本次导入Excel文件中{input.Count}条记录,重复订单数量{input.Count- notRepeatOrder.Count},都是重复的订单、无法导入!";
return ret; return ret;
} }
#region 断号提醒 #region 断号提醒
//校验两次导入之间是否断号 //校验两次导入之间是否断号
string betweenBreakNumMsg = await CheckBetweenBreakNum(input); int priorMaxHostSN = await _lastImportHostSNDomainService.GetLastImportMaxHostSN();
string betweenBreakNumMsg = await CheckBetweenBreakNum(input, priorMaxHostSN);
//校验本次导入数据是否断号 //校验本次导入数据是否断号
string breakNumMsg = CheckBreakNum(ref notRepeatOrder); string breakNumMsg = CheckBreakNum(ref notRepeatOrder);
@ -261,6 +262,16 @@ namespace WY.NewJit.EdiReceive.Services
//更新本次导入的最大HostSN //更新本次导入的最大HostSN
int curMaxHostSN = input.Max(itm => itm.HostSN); int curMaxHostSN = input.Max(itm => itm.HostSN);
await _lastImportHostSNDomainService.SetCurrentImportMaxHostSN(curMaxHostSN); 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; ret.Status = true;
return ret; return ret;
} }
@ -326,13 +337,13 @@ namespace WY.NewJit.EdiReceive.Services
/// </summary> /// </summary>
/// <param name="input"></param> /// <param name="input"></param>
/// <returns></returns> /// <returns></returns>
private async Task<string> CheckBetweenBreakNum(List<ImportRecord> input) private async Task<string> CheckBetweenBreakNum(List<ImportRecord> input, int priorMaxHostSN)
{ {
string ret = ""; string ret = "";
//取本次导入的最小HostSN //取本次导入的最小HostSN
int curMinHostSN = input.Min(itm => itm.HostSN); int curMinHostSN = input.Min(itm => itm.HostSN);
//上次导入的最大HostSN //上次导入的最大HostSN
int priorMaxHostSN = await _lastImportHostSNDomainService.GetLastImportMaxHostSN(); //int priorMaxHostSN = await _lastImportHostSNDomainService.GetLastImportMaxHostSN();
if (priorMaxHostSN > 0) //第一次导入时(priorMaxHostSN = 0),不需要校验两次导入之间的断号 if (priorMaxHostSN > 0) //第一次导入时(priorMaxHostSN = 0),不需要校验两次导入之间的断号
{ {
if (curMinHostSN <= priorMaxHostSN + 1) if (curMinHostSN <= priorMaxHostSN + 1)

10
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;", //"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;", //"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;" //"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;", //"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;", //"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;" //"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;", //"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;", //"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;" //"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;"
}, },

Loading…
Cancel
Save