调试修改内容提交【代码从此处产生新分支】

This commit is contained in:
hehaibing-1996
2024-06-26 19:25:12 +08:00
parent b6f6e24f45
commit 5ea25c477c
14 changed files with 49 additions and 42 deletions

View File

@ -60,7 +60,7 @@ namespace WCS.BLL.Services.Service
try
{
DbHelp.db.BeginTran();
var startNumber = matBaseInfo.SerialNumber++;
var startNumber = ++matBaseInfo.SerialNumber;
var matInfoList = new List<MatInfo>();
for (var i = 0; i < request.TotalCount; i++)
{

View File

@ -354,6 +354,7 @@ namespace WCS.BLL.Services.Service
Message = $"Success",
Data = new MatInfo()
{
Id = inventory.Id,
MatSn = inventory.MatSN,
MatCode = inventory.MatCode,
MatName = inventory.MatName,
@ -483,6 +484,7 @@ namespace WCS.BLL.Services.Service
inventoryDetail.MatSupplier = matSnListDetail.MatSupplier;
inventoryDetail.StoreCode = request.ShelfCode;
inventoryDetail.StoreId = SI[0].Id;
inventoryDetail.GroupName = SI[0].GroupName;
int count = DbHelp.db.Insertable(inventoryDetail).ExecuteCommand();
@ -500,6 +502,7 @@ namespace WCS.BLL.Services.Service
ior.Direction = DirectionEnum.;
ior.OperateTime = DateTime.Now;
ior.OperateUser = request.UserName;
ior.GroupName = SI[0].GroupName;
int count1 = DbHelp.db.Insertable(ior).ExecuteCommand();
detail.matsn = matSnListDetail.MatSn;

View File

@ -108,6 +108,7 @@ namespace WCS.BLL.Services.Service
ShelfTypeId = request.ShelfTypeId,
ShelfTypeName = request.ShelfTypeName,
SyncType = SyncTypeEnum.ByMatCode,
GroupName = LocalFile.Config.GroupName,
CreateUser = request.UserName,
};
order.Id = await DbHelp.db.Insertable(order).ExecuteReturnIdentityAsync();
@ -211,6 +212,7 @@ namespace WCS.BLL.Services.Service
OrderType = request.OrderType,
SyncType = SyncTypeEnum.ByMatSn,
CreateUser = request.UserName,
GroupName = LocalFile.Config.GroupName,
};
order.Id = await DbHelp.db.Insertable(order).ExecuteReturnIdentityAsync();
@ -1425,6 +1427,8 @@ namespace WCS.BLL.Services.Service
inOutRecord.Direction = DirectionEnum.;
inOutRecord.OperateUser = request.UserName;
inOutRecord.OperateTime = DateTime.Now;
inOutRecord.GroupName = invetoryDetail.GroupName;
//保存出库记录
int count = DbHelp.db.Insertable(inOutRecord).ExecuteCommand();
//删除库存

View File

@ -186,21 +186,19 @@ namespace WCS.BLL.Tool
color = 0x00;
break;
}
byte[] data1 = new byte[8 + 3 * 6];
byte[] data1 = new byte[5 + 3 * 6];
data1[0] = 0xff;
data1[1] = 0x02;
data1[1] = 0x01;
data1[2] = 0x00;
data1[3] = 0x0a;
for (int i = 0; i < 7;i++)
data1[3] = (byte)(data1.Length + 2);
data1[4] = 0x06;
for (int i = 0; i < 6; i++)
{
data1[4 + i * 3] = (byte)(lightid + i);
data1[5 + i * 3] = (byte)status;
data1[6 + i * 3] = color;
data1[5 + i * 3] = (byte)(lightid + i);
data1[6 + i * 3] = (byte)status;
data1[7 + i * 3] = color;
}
//data1[4] = (byte)lightid;
//data1[5] = (byte)status;
//data1[6] = color;
data1[25] = (byte)beestatus;
byte[] data2 = Crc16(data1, data1.Length, true);
return data2;
}
@ -224,26 +222,20 @@ namespace WCS.BLL.Tool
//入库警示灯短亮(绿色),蜂鸣器鸣叫一次
public static byte[] InstoreWarnLight(int lightid)
{
byte[] data1 = new byte[8];
byte[] data1 = new byte[8 + 3 * 6];
byte[] data1 = new byte[5 + 3 * 7];
data1[0] = 0xff;
data1[1] = 0x02;
data1[1] = 0x01;
data1[2] = 0x00;
data1[3] = 0x0a;
data1[4] = (byte)lightid;
data1[5] = 0x03;
data1[6] = 0x02;
data1[3] = (byte)(data1.Length + 2);
data1[4] = 0x07;
//7就是带的有蜂鸣器
for (int i = 0; i < 7; i++)
{
data1[4 + i * 3] = (byte)(lightid + i);
data1[5 + i * 3] = 0x03;
data1[6 + i * 3] = 0x02;
data1[5 + i * 3] = (byte)(lightid + i);
data1[6 + i * 3] = 0x03;
data1[7 + i * 3] = 0x02;
}
//data1[4] = (byte)lightid;
//data1[5] = 0x03;
//data1[6] = 0x02;
//data1[7] = 0x02;
data1[7] = 0x00;
byte[] senddata1 = Tool.Helper.Crc16(data1, data1.Length, true);
return senddata1;
}

View File

@ -22,6 +22,8 @@ namespace WCS.Model.ApiModel.OutStore
public DateTime CreateTime { get; set; }
public string ShelfTypeName { get; set; }
public string CreateUser { get; set; }
public bool IsSelected
{

View File

@ -143,8 +143,8 @@ namespace WebApi.Controllers
//TODO:<3A><><EFBFBD><EFBFBD> <20><><EFBFBD>ƻ<EFBFBD><C6BB><EFBFBD><EFBFBD><EFBFBD><E1BDBB><EFBFBD><EFBFBD>
try
{
var aa = Helper.Query();
var bb = Helper.SetId();
//var aa = Helper.Query();
//var bb = Helper.SetId();
return await _instoreService.queryInstoreStatusSingle(request);
//ShelfManager.
//

View File

@ -74,7 +74,7 @@ namespace WCS.WebApi.Controllers
{
var guid = Guid.NewGuid();
//TO DO如何将记日志的 和不记日志的分开 解耦
if (!context.Request.Path.ToString().Contains("getInterfaceRecord"))
if (!context.Request.Path.ToString().Contains("getInterfaceRecord") && !context.Request.Path.ToString().Contains("getShelfStatus"))
{
try
{

View File

@ -20,9 +20,6 @@ namespace WebApi
{
public static void Main(string[] args)
{
<<<<<<< HEAD
WebSoceketManager.InitWebSocket();
=======
try
{
//<2F><>ʼ<EFBFBD><CABC>websocket
@ -30,7 +27,7 @@ namespace WebApi
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
DbInit.InitDb();
>>>>>>> 7f35077c07959e9571515ee1a1f88123f9e20bd5
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
LocalFile.SaveConfig();

View File

@ -46,6 +46,9 @@ namespace 货架标准上位机
/// </summary>
public int ScannerTimeOut { get; set; }
public string ModuleCodePattern { get; set; }
#region
public bool IsMx { get; set; }
/// <summary>

View File

@ -85,7 +85,9 @@ namespace 货架标准上位机.ViewModel
{
//TO DO 配置项进行配置正则表达式
//数据处理
string ModuleCodePattern = "^[ABCD][0-9]{2}-R[0-9]{1,2}C[0-9]{1,2}$";
//获取配置文件的正则表达式
var configModuleCodePattern = LocalFile.Config.ModuleCodePattern;
string ModuleCodePattern = string.IsNullOrEmpty(configModuleCodePattern) ? "^[ABCD][0-9]{2}-R[0-9]{1,2}C[0-9]{1,2}$" : configModuleCodePattern;
var isModuleCode = Regex.IsMatch(scanner.TempCode, ModuleCodePattern);
if (isModuleCode)
{

View File

@ -117,6 +117,7 @@
</DataGridTemplateColumn>
<DataGridTextColumn IsReadOnly="True" Header="序号" Binding="{Binding RowNumber}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Header="单据编号" Binding="{Binding OrderNumber}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Header="货架类型" Binding="{Binding ShelfTypeName}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Header="单据来源" Binding="{Binding OrderSource}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Header="单据类型" Binding="{Binding OrderType}"></DataGridTextColumn>
<DataGridTextColumn IsReadOnly="True" Header="单据状态" Binding="{Binding OrderStatus}"></DataGridTextColumn>

View File

@ -2,11 +2,11 @@
//连接不上加SslMode=none;
"MySql": "server=localhost;Database=db1;Uid=root;Pwd=123456;Convert Zero Datetime=True",
//货架服务器的IP和端口号
"ApiIpHost": "http://192.168.9.183:8888/",
"ApiIpHost": "http://127.0.0.1:8888/",
//WebSocket的地址
"WebSocketUrl": "ws://192.168.9.183:7789/ws",
"WebSocketUrl": "ws://127.0.0.1:7789/ws",
//货架分区
"GroupName": [ "C0"],
"GroupName": [ "C0" ],
//设备类型 可以配置为每个电脑不一样
"DeviceType": "WCS前端",
//货架类型的是否开机自检
@ -16,7 +16,7 @@
//串口扫码枪延时
"ScannerTimeOut": 2000,
//盟讯公司配置-是否是盟讯
"IsMX": true,
"IsMX": false,
//盟讯公司配置-获取要料单
"GetPickOrderUrl": "http://192.168.2.23:9289/integrate/inOut/missPickListR",
//盟讯公司配置-获取要料明细接口

View File

@ -90,6 +90,9 @@
<None Update="data\jsconfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="data\操作说明书.docx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Excel\出库单据导入模板.xlsx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>