diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs
index 0a03b8d..02ac4cd 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/Extends/MenBanReports/MenBanPrintInputDto.cs
@@ -33,6 +33,11 @@ namespace WY.NewJit.Extends
///
public virtual int EndHostSN { get; set; }
+ ///
+ /// 打印条数
+ ///
+ public virtual int PrintCount { get; set; }
+
#region 重新打印、补打时使用
///
/// 重新打印时使用。装箱单主表ID列表,报废时传入一个,重打时可传入多个
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/BaseConfig/Dto/BaseConfigDto.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/BaseConfig/Dto/BaseConfigDto.cs
new file mode 100644
index 0000000..cd10af3
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/MsgBaseData/BaseConfig/Dto/BaseConfigDto.cs
@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Volo.Abp.Application.Dtos;
+
+namespace WY.NewJit.MsgBaseData
+{
+ ///
+ /// 基础参数配置表
+ ///
+ [Serializable]
+ public class BaseConfigDto : EntityDto
+ {
+ ///
+ /// 参数名称
+ ///
+ public virtual string ParamName { get; set; }
+ ///
+ /// 参数值
+ ///
+ public virtual string ParamValue { get; set; }
+ ///
+ /// 状态
+ ///
+ public virtual int State { get; set; }
+ ///
+ /// 备注
+ ///
+ public virtual int Remark { get; set; }
+ }
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj
index 1525bc8..f9617ae 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.csproj
@@ -31,4 +31,8 @@
+
+
+
+
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
index abffb13..4fdf9fb 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application.Contracts/WY.NewJit.Application.Contracts.xml
@@ -209,6 +209,11 @@
终止大众顺序号
+
+
+ 打印条数
+
+
重新打印时使用。装箱单主表ID列表,报废时传入一个,重打时可传入多个
@@ -940,6 +945,31 @@
整车总成Id
Erp总成列表
+
+
+ 基础参数配置表
+
+
+
+
+ 参数名称
+
+
+
+
+ 参数值
+
+
+
+
+ 状态
+
+
+
+
+ 备注
+
+
通用字典信息DTO
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/BaseConfig/BaseGonfigService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/BaseConfig/BaseGonfigService.cs
new file mode 100644
index 0000000..9a7980e
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/MsgBaseData/BaseConfig/BaseGonfigService.cs
@@ -0,0 +1,81 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Uow;
+using WY.NewJit.Common;
+
+namespace WY.NewJit.MsgBaseData
+{
+ ///
+ /// 通用字典应用服务实现
+ ///
+ [Route("api/newjit/baseconfig")]
+ [ApiExplorerSettings(GroupName = SwaggerGroupConsts.基础数据)]
+ public class BaseGonfigService : ApplicationService
+ {
+ private readonly IRepository _repository;
+ ///
+ /// 日志
+ ///
+ private ILogger _logger;
+
+ ///
+ /// 错误信息前缀
+ ///
+ private string _errorMessagePrefix
+ {
+ get
+ {
+ return System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + ".";
+ }
+ }
+
+ ///
+ /// 构造函数
+ ///
+ public BaseGonfigService(
+ IRepository repository,
+ ILogger logger
+ )
+ {
+ _repository = repository;
+ _logger = logger;
+ }
+
+
+ #region 公共方法
+ ///
+ /// 获取所有基本参数数据
+ ///
+ ///
+ [HttpGet]
+ [UnitOfWork(false)]
+ [Route("list")]
+ public virtual async Task> GetBaseConfigListAsync()
+ {
+ _logger.LogDebug(_errorMessagePrefix + "GetBaseConfigListAsync 进入");
+ try
+ {
+ var lst = await _repository.GetListAsync();
+
+ var items = ObjectMapper.Map, List>(lst);
+
+ return new ListResultDto(items);
+ }
+ catch (Exception ex)
+ {
+ string errMsg = _errorMessagePrefix + "GetBaseConfigListAsync 执行出错:" + ex.Message;
+ _logger.LogError(errMsg);
+ return new ListResultDto(new List());
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs
index d79d20b..4bd1794 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/PrintTable/WaitPrintAppService.cs
@@ -336,20 +336,10 @@ namespace WY.NewJit.PrintTable
{
List billLst = new List();
ListResultDto ret = new ListResultDto(billLst);
-
- int printBillCnt = 0;
+ if (input.PrintCount == 0) input.PrintCount = 10;//调试用的
if (input.PrintType == WY.NewJit.Extends.PaiGe.PrintTypeEnum.正常打印)
{
- if ((input.BeginHostSN % 10000) > 1999)
- {
- throw new Exception("起始大众顺序号不能大于1999!");
- }
- if (input.BeginHostSN > input.EndHostSN)
- {
- throw new Exception("起始大众顺序号不能大于止大众顺序号!");
- }
- printBillCnt = input.EndHostSN - input.BeginHostSN + 1;
int minHostSN2 = await _waitPrintRepository.Where(itm =>
itm.BusinessType == BusinessTypeEnum.MenBan
@@ -370,8 +360,7 @@ namespace WY.NewJit.PrintTable
&& itm.PrintType == PrintTypeEnum.OrderPrint //顺序打印
&& itm.HostSN2 >= minHostSN2)
.OrderBy(itm => itm.HostSN2)
- .Take(printBillCnt).ToListAsync();
-
+ .Take(input.PrintCount).ToListAsync();
bool hasData = billLst.Any();
if (hasData == false)
{
@@ -401,7 +390,7 @@ namespace WY.NewJit.PrintTable
///
private List DoMBPrint(MenBanPrintInputDto input, int pageIdx, ref double maxBillNum, double maxSN, DateTime printTime, List billLst, string rightOrLeft)
{
- const int _colNumberPerPage = 12;
+ const int _colNumberPerPage = 10;
List retLst = new List();
//取当前页内容
@@ -566,7 +555,7 @@ namespace WY.NewJit.PrintTable
//装箱单号规则 1开头,11位,自增顺序号
if (newSNStr.Length < 11)
{
- return "F" + newSNStr.PadLeft(10, '0');
+ return "W" + newSNStr.PadLeft(10, '0');
}
return newSNStr;
}
@@ -610,7 +599,7 @@ namespace WY.NewJit.PrintTable
targetMain.BillNum = sourceObj.BillNum; //单据编号
targetMain.State = 0;
targetMain.BillType = 206; //单据类型
- targetMain.SubBillType = 21004; //单据子类型
+ targetMain.SubBillType = 21033; //红旗单据子类型
targetMain.BillTime = sourceObj.PrintDate; //单据时间
targetMain.OperName = sourceObj.CreatorId.ToString(); //操作员
targetMain.DetailQty = 0; //明细数量
@@ -663,8 +652,8 @@ namespace WY.NewJit.PrintTable
targetDetail.BillNum = sourceObj.BillNum; //单据编号 通过该字段和主表弱连接
targetDetail.VinCode = sourceRec.VIN; //VIN码
targetDetail.PartCode = sourceRec.BelowSAPMaterialNum; //物料号
- targetDetail.LineNum = (idx2 + 12); //行号
- targetDetail.SeqNum = (idx2 + 12).ToString(); //顺序号sourceRec.HostSN.ToString()
+ targetDetail.LineNum = (idx2 + 10); //行号
+ targetDetail.SeqNum = (idx2 + 10).ToString(); //顺序号sourceRec.HostSN.ToString()
//targetDetail.BarCode = sourceRec.TopBoxPositionNum; //箱码
targetDetail.ProjectId = ""; //车型
targetDetail.State = "0"; //状态
@@ -915,7 +904,7 @@ namespace WY.NewJit.PrintTable
sw.Stop();
_logger.LogWarning($"SaveMenBanReport读取数据 - {sw.ElapsedMilliseconds}毫秒");
sw.Start();
- int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数
+ int pageCnt = (int)Math.Ceiling(billLst.Count / 10.0); //每页打印10列,取打印页数
double maxBillNum = 0;
@@ -982,7 +971,7 @@ namespace WY.NewJit.PrintTable
return ret;
}
- int pageCnt = (int)Math.Ceiling(billLst.Count / 12.0); //每页打印12列,取打印页数
+ int pageCnt = (int)Math.Ceiling(billLst.Count / 10.0); //每页打印10列,取打印页数
double maxBillNum = 0;
@@ -1067,7 +1056,7 @@ namespace WY.NewJit.PrintTable
foreach (var masterObj in targetLst)
{
int trueCnt = masterObj.Details.Count;
- int planCnt = 12;
+ int planCnt = 10;
if (trueCnt > planCnt)
{
throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}");
@@ -1182,7 +1171,7 @@ namespace WY.NewJit.PrintTable
foreach (var masterObj in targetLst)
{
int trueCnt = masterObj.Details.Count;
- int planCnt = 12;
+ int planCnt = 10;
if (trueCnt > planCnt)
{
throw new Exception($"实际打印行数{trueCnt}超过每页总行数{planCnt}, 底盘起{masterObj.BeginVin}底盘止{masterObj.EndVin}");
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
index ce9a8c9..5575954 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Application/WY.NewJit.Application.xml
@@ -414,6 +414,32 @@
+
+
+ 通用字典应用服务实现
+
+
+
+
+ 日志
+
+
+
+
+ 错误信息前缀
+
+
+
+
+ 构造函数
+
+
+
+
+ 获取所有基本参数数据
+
+
+
通用字典应用服务实现
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs
new file mode 100644
index 0000000..0f08224
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Entitys/BaseConfig.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Entities;
+
+namespace WY.NewJit.MsgBaseData
+{
+ ///
+ /// 基础参数
+ ///
+ public class BaseConfig : AggregateRoot
+ {
+ ///
+ /// 参数名称
+ ///
+ public virtual string ParamName { get; set; }
+ ///
+ /// 参数值
+ ///
+ public virtual string ParamValue { get; set; }
+ ///
+ /// 状态
+ ///
+ public virtual int State { get; set; }
+ ///
+ /// 备注
+ ///
+ public virtual int Remark { get; set; }
+ }
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/BaseGonfigDomainService.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/BaseGonfigDomainService.cs
new file mode 100644
index 0000000..30c2ff6
--- /dev/null
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Domain/MsgBaseData/Services/BaseGonfigDomainService.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Domain.Services;
+
+namespace WY.NewJit.MsgBaseData
+{
+ public class BaseGonfigDomainService : DomainService
+ {
+ private readonly IRepository _repository;
+
+ public BaseGonfigDomainService(IRepository repository)
+ {
+ _repository = repository;
+ }
+
+
+ }
+}
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs
index de663c6..cae5509 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContext.cs
@@ -58,6 +58,8 @@ namespace WY.NewJit.EntityFrameworkCore
public DbSet PrintTemplateConfigurations { get; set; }
+ public DbSet BaseConfigs { get; set; }
+
#endregion
#region 报文解析及校验
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs
index e77de67..130fb8f 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.EntityFrameworkCore/EntityFrameworkCore/NewJitDbContextModelCreatingExtensions.cs
@@ -162,7 +162,16 @@ namespace WY.NewJit.EntityFrameworkCore
});
-
+ builder.Entity(b =>
+ {
+ b.ToTable(NewJitConsts.DbTablePrefix + nameof(BaseConfig)); //将Book实体映射到数据库表XXXBooks
+ b.ConfigureByConvention();//配置/映射继承的属性,应始终对你所有的实体使用它
+ b.Property("ParamName").HasMaxLength(50);
+ b.Property("ParamValue").HasMaxLength(50);
+ b.Property("State").HasPrecision(1);
+ b.Property("Remark").HasMaxLength(5000);
+ b.HasIndex(x => new { x.ParamName}).IsUnique();
+ });
#endregion
diff --git a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json
index fc604b6..a79662f 100644
--- a/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json
+++ b/src/Modules/新版JIT或JIS系统服务端/src/WY.NewJit.Web/appsettings.json
@@ -66,10 +66,10 @@
},
"ProductLineTimeoutRemind": {
- "01": 30,
- "05": 30,
- "07": 30,
- "08": 30
+ "01": 40,
+ "05": 40,
+ "07": 40,
+ "08": 40
}
},
"Serilog": {