提交代码
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@ -7,65 +8,77 @@ using WCS.BLL.HardWare;
|
||||
|
||||
namespace WCS.DAL.DbModels
|
||||
{
|
||||
///<summary>
|
||||
///模组信息表
|
||||
///</summary>
|
||||
[SugarTable("module_info")]
|
||||
public partial class ModuleInfo
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 模组Id
|
||||
/// 主键 Id 自增
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsNullable = false, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模组编码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "module_code", Length = 50, IsNullable = false, ColumnDescription = "模组编码")]
|
||||
public string ModuleCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 货架Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "shelf_id", IsNullable = false, ColumnDescription = "货架Id")]
|
||||
public int ShelfId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 货架编码
|
||||
/// 货架号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "shelf_code", Length = 50, IsNullable = false, ColumnDescription = "货架编码;货架一般按照报警灯来区分 一个报警灯指示的是一个货架")]
|
||||
public string ShelfCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 板子的Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "board_id", IsNullable = false, ColumnDescription = "模组pcb板id")]
|
||||
public int BoardId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 板子上有几个灯
|
||||
/// 板子上第几个灯
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "light_count", IsNullable = false, ColumnDescription = "板子上灯的数量")]
|
||||
public int LightCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 板子所连接模块的Ip
|
||||
/// 对应Can模块的Ip
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "client_ip", Length = 50, IsNullable = false, ColumnDescription = "货架对应Can模块的Ip")]
|
||||
public string CleintIp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第几行
|
||||
/// R 行
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "R", Length = 50, IsNullable = false, ColumnDescription = "R 行")]
|
||||
public string R { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 第几列
|
||||
/// C 列
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "C", Length = 50, IsNullable = false, ColumnDescription = " C 列")]
|
||||
public string C { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 串联后大货架编码;大货架编码:未串联时是与货架编码是一对一的关系;串联后与货架编码是一对多
|
||||
/// 串联后大货架编码;大货架编码:未串联时是与货架编码是一对一的关系;串联后与货架编码是一对多的关系
|
||||
/// </summary>
|
||||
public string Bigshelfcode { get; set; }
|
||||
[SugarColumn(ColumnName = "big_shelf_code", Length = 50, IsNullable = true, ColumnDescription = "串联后大货架编码;大货架编码:未串联时是与货架编码是一对一的关系;串联后与货架编码是一对多的关系")]
|
||||
public string? Bigshelfcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否被禁用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
[SugarColumn(ColumnName = "is_enable", IsNullable = false, ColumnDescription = "串联后大货架编码;大货架编码:未串联时是与货架编码是一对一的关系;串联后与货架编码是一对多的关系")]
|
||||
public bool IsEnable { get; set; } = true;
|
||||
|
||||
|
||||
public Mode CurentMode { get; set; } = Mode.待机模式;
|
||||
[SugarColumn(ColumnName = "current_mode", IsNullable = true, ColumnDescription = "串联后大货架编码;大货架编码:未串联时是与货架编码是一对一的关系;串联后与货架编码是一对多的关系")]
|
||||
public Mode CurrentMode { get; set; } = Mode.待机模式;
|
||||
}
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ namespace WCS.DAL.DbModels
|
||||
/// <summary>
|
||||
/// 板子的Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "board_id", IsNullable = false, ColumnDescription = "货架Id")]
|
||||
[SugarColumn(ColumnName = "board_id", IsNullable = false, ColumnDescription = "模组pcb板id")]
|
||||
public int BoardId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -33,7 +33,7 @@ namespace WCS.BLL.HardWare
|
||||
|
||||
public void GoInInstore(string IPAdress)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
//找到对应的灯 亮灯
|
||||
}
|
||||
|
||||
public void GoInOutstore(List<OutOrderMatDetail> MatDetails, OutOrder outOrder)
|
||||
@ -53,6 +53,7 @@ namespace WCS.BLL.HardWare
|
||||
|
||||
public void GoOutInstore()
|
||||
{
|
||||
//找到已亮灯的 灭灯
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ namespace WCS.BLL.HardWare
|
||||
ModuleCode = module.ModuleCode,
|
||||
BoardId = module.BoardId,
|
||||
IsEnable = module.IsEnable,
|
||||
CurrentMode = module.CurentMode
|
||||
CurrentMode = module.CurrentMode
|
||||
});
|
||||
}
|
||||
ModulesStr = string.Join(";", Modules.Select(t => t.ModuleCode));
|
||||
|
@ -153,7 +153,7 @@ namespace WCS.BLL.HardWare
|
||||
{
|
||||
if (CurrentMode != Mode.待机模式)
|
||||
{
|
||||
//TO DO 退出对应的模式 然后再发送进入入库模式
|
||||
return;
|
||||
}
|
||||
var storeInfos = DbHelp.db.Queryable<StoreInfo>()
|
||||
.Where(t => t.BoardId == BoardId)
|
||||
|
@ -38,6 +38,13 @@ namespace WCS.BLL.Manager
|
||||
ShelfCode = shelfInDb.ShelfCode,
|
||||
GroupName = shelfInDb.GroupName,
|
||||
};
|
||||
case 2:
|
||||
return new SmartShelf(shelfInDb)
|
||||
{
|
||||
ShelfId = shelfInDb.Id,
|
||||
ShelfCode = shelfInDb.ShelfCode,
|
||||
GroupName = shelfInDb.GroupName,
|
||||
};
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ namespace WCS.BLL.Services.Service
|
||||
.WhereIF(!string.IsNullOrEmpty(request.MatSpec), (id, si) => id.MatSpec.Contains(request.MatSpec))
|
||||
.WhereIF(!string.IsNullOrEmpty(request.MatSupplier), (id, si) => id.MatSpec.Contains(request.MatSupplier))
|
||||
.WhereIF(!string.IsNullOrEmpty(request.MatCustomer), (id, si) => id.MatSpec.Contains(request.MatCustomer))
|
||||
.WhereIF(request.Direction != null, (id, si) => id.Direction == request.Direction)
|
||||
|
||||
|
||||
.WhereIF(request.StoreId != 0, (id, si) => id.StoreId == request.StoreId)
|
||||
@ -94,7 +95,6 @@ namespace WCS.BLL.Services.Service
|
||||
.WhereIF(!string.IsNullOrEmpty(request.StoreCode), (id, si) => id.StoreCode.Contains(request.StoreCode))
|
||||
;
|
||||
var records = await recordsQueryable
|
||||
.Skip((request.PageNumber - 1) * request.PageSize).Take(request.PageSize)
|
||||
.Select<InOutRecord>()
|
||||
.ToListAsync();
|
||||
//生成序号
|
||||
|
@ -909,7 +909,6 @@ namespace WCS.BLL.Services.Service
|
||||
};
|
||||
DbHelp.db.Updateable(inventoryDetail).ExecuteCommand();
|
||||
DbHelp.db.Insertable(inOutRecord).ExecuteCommand();
|
||||
|
||||
}
|
||||
//数量相等的情况 暂时不用管 不动库存数据也不生成记录
|
||||
else
|
||||
|
@ -236,15 +236,6 @@ namespace WCS.BLL.Services.Service
|
||||
}
|
||||
}
|
||||
|
||||
Task<PageQueryResponse<ShelfInfo>> IStoreInfoService.GetShelves(GetShelvesRequest request)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
Task<ResponseCommon<object>> IStoreInfoService.addOrUpdateShelfInfo(AddShelfInfoRequest<ShelfInfo> request)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
async Task<ResponseCommon<object>> IStoreInfoService.GenerateStoreInfo()
|
||||
{
|
||||
|
Reference in New Issue
Block a user