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

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;
}