更新MybatisPlusSaasConfig中的租户ID默认值为1002;在ShiroConfig中添加MES密炼物料管理和系统分类字典的免密接口;在MesMixerMaterialController中实现密炼物料信息的免密增删改查接口,并添加相应的事件广播功能;在SysCategoryController中新增分类字典的免密查询接口;更新前端导航和菜单数据以支持密炼物料信息模块。
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using Prism.Events;
|
||||
|
||||
namespace YY.Admin.Core.Events;
|
||||
|
||||
public class MixerMaterialChangedPayload
|
||||
{
|
||||
public string Action { get; set; } = string.Empty;
|
||||
public string? MixerMaterialId { get; set; }
|
||||
}
|
||||
|
||||
public class MixerMaterialChangedEvent : PubSubEvent<MixerMaterialChangedPayload> { }
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
using YY.Admin.Core.Entity;
|
||||
|
||||
namespace YY.Admin.Core.Services;
|
||||
|
||||
public record MixerMaterialPageResult(List<MesMixerMaterial> Records, long Total, int Current, int Size);
|
||||
|
||||
public interface IMixerMaterialService
|
||||
{
|
||||
Task<MixerMaterialPageResult> PageAsync(
|
||||
int pageNo,
|
||||
int pageSize,
|
||||
string? materialCode = null,
|
||||
string? materialName = null,
|
||||
string? erpCode = null,
|
||||
string? majorCategoryId = null,
|
||||
string? minorCategoryId = null,
|
||||
CancellationToken ct = default);
|
||||
|
||||
Task<MesMixerMaterial?> GetByIdAsync(string id, CancellationToken ct = default);
|
||||
Task<bool> AddAsync(MesMixerMaterial material, CancellationToken ct = default);
|
||||
Task<bool> EditAsync(MesMixerMaterial material, CancellationToken ct = default);
|
||||
Task<bool> DeleteAsync(string id, CancellationToken ct = default);
|
||||
Task<bool> DeleteBatchAsync(string ids, CancellationToken ct = default);
|
||||
Task<List<KeyValuePair<string, string>>> GetMajorCategoryOptionsAsync(CancellationToken ct = default);
|
||||
Task<List<KeyValuePair<string, string>>> GetMinorCategoryOptionsAsync(string majorCategoryId, CancellationToken ct = default);
|
||||
}
|
||||
|
||||
38
yy-admin-master/YY.Admin.Core/Entity/JeecgSysCategoryItem.cs
Normal file
38
yy-admin-master/YY.Admin.Core/Entity/JeecgSysCategoryItem.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
namespace YY.Admin.Core.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// Jeecg 分类字典镜像表
|
||||
/// </summary>
|
||||
[SugarTable("jeecg_sys_category_item", "Jeecg分类字典镜像表")]
|
||||
[SysTable]
|
||||
[SugarIndex("index_{table}_PC", nameof(Pid), OrderByType.Asc, nameof(Code), OrderByType.Asc)]
|
||||
public class JeecgSysCategoryItem
|
||||
{
|
||||
[SugarColumn(IsPrimaryKey = true, ColumnDescription = "主键ID", Length = 64)]
|
||||
public string Id { get; set; } = string.Empty;
|
||||
|
||||
[SugarColumn(ColumnDescription = "父ID", Length = 64)]
|
||||
public string? Pid { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "分类名称", Length = 128)]
|
||||
public string? Name { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "分类编码", Length = 128)]
|
||||
public string? Code { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "是否有子节点", Length = 1)]
|
||||
public string? HasChild { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "创建人", Length = 64)]
|
||||
public string? CreateBy { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "创建时间")]
|
||||
public DateTime? CreateTime { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "更新人", Length = 64)]
|
||||
public string? UpdateBy { get; set; }
|
||||
|
||||
[SugarColumn(ColumnDescription = "更新时间")]
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
}
|
||||
|
||||
40
yy-admin-master/YY.Admin.Core/Entity/MesMixerMaterial.cs
Normal file
40
yy-admin-master/YY.Admin.Core/Entity/MesMixerMaterial.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace YY.Admin.Core.Entity;
|
||||
|
||||
public class MesMixerMaterial
|
||||
{
|
||||
public string? Id { get; set; }
|
||||
public string? MaterialCode { get; set; }
|
||||
public string? MaterialName { get; set; }
|
||||
public string? ErpCode { get; set; }
|
||||
public string? MajorCategoryId { get; set; }
|
||||
public string? MinorCategoryId { get; set; }
|
||||
public string? MaterialDesc { get; set; }
|
||||
public string? AliasName { get; set; }
|
||||
public int? FeedManageStatus { get; set; }
|
||||
public int? UseStatus { get; set; }
|
||||
public double? SpecificGravity { get; set; }
|
||||
public int? ShelfLifeDays { get; set; }
|
||||
public int? MinBakeMinutes { get; set; }
|
||||
public double? TotalSafetyStockKg { get; set; }
|
||||
public double? QualifiedSafetyStockKg { get; set; }
|
||||
public string? Remark { get; set; }
|
||||
public int? TenantId { get; set; }
|
||||
public string? SysOrgCode { get; set; }
|
||||
public string? CreateBy { get; set; }
|
||||
public DateTime? CreateTime { get; set; }
|
||||
public string? UpdateBy { get; set; }
|
||||
public DateTime? UpdateTime { get; set; }
|
||||
public int? DelFlag { get; set; }
|
||||
|
||||
[JsonPropertyName("majorCategoryId_dictText")]
|
||||
public string? MajorCategoryText { get; set; }
|
||||
|
||||
[JsonPropertyName("minorCategoryId_dictText")]
|
||||
public string? MinorCategoryText { get; set; }
|
||||
|
||||
public string FeedManageStatusText => FeedManageStatus == 1 ? "在投管" : "未投管";
|
||||
public string UseStatusText => UseStatus == 1 ? "使用中" : "停用";
|
||||
}
|
||||
|
||||
@@ -36,6 +36,8 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
|
||||
new SysMenu{ Id=1300150010401, Pid=1300150000101, Title="磅单记录管理", Path="/xslmes/mesXslWeightRecord", Name="mesXslWeightRecord", Component="WeightRecordListView", Icon="", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=103 },
|
||||
// 地磅称重操作(操作台大页面)
|
||||
new SysMenu{ Id=1300150010501, Pid=1300150000101, Title="地磅称重操作", Path="/xslmes/weightRecordOperation", Name="weightRecordOperation", Component="WeightRecordOperationView", Icon="", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=104 },
|
||||
// 密炼物料信息
|
||||
new SysMenu{ Id=1300150010601, Pid=1300150000101, Title="密炼物料信息", Path="/xslmes/mesMixerMaterial", Name="mesMixerMaterial", Component="MixerMaterialListView", Icon="", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=105 },
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -60,6 +62,10 @@ public class SysMenuSeedData : ISqlSugarEntitySeedData<SysMenu>
|
||||
new SysMenu{ Id=1300200012001, Pid=1300200000101, Title="数据字典", Path="DataDictionaryManagementView", Name="sysDict", Component="/system/dict/index", Icon="", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=105 },
|
||||
new SysMenu{ Id=1300200012011, Pid=1300200012001, Title="查询", Permission="sysDict:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1300200012021, Pid=1300200012001, Title="同步", Permission="sysDict:sync", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
// 分类字典(SCADA同步)
|
||||
new SysMenu{ Id=1300200012101, Pid=1300200000101, Title="分类字典", Path="CategoryDictionaryManagementView", Name="sysCategory", Component="/system/category/index", Icon="", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=106 },
|
||||
new SysMenu{ Id=1300200012111, Pid=1300200012101, Title="查询", Permission="sysCategory:page", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
new SysMenu{ Id=1300200012121, Pid=1300200012101, Title="同步", Permission="sysCategory:sync", Type=MenuTypeEnum.Btn, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=100 },
|
||||
|
||||
// 登录设置(桌面端会话与检查间隔)
|
||||
new SysMenu{ Id=1300200013001, Pid=1300200000101, Title="登录设置", Path="LoginSettingsView", Name="loginSettings", Component="LoginSettingsView", Icon="", Type=MenuTypeEnum.Menu, CreateTime=DateTime.Parse("2022-02-10 00:00:00"), OrderNo=107 },
|
||||
|
||||
@@ -26,6 +26,10 @@ public class SysTenantMenuSeedData : ISqlSugarEntitySeedData<SysTenantMenu>
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300150010201},
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300150010401},
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300150010501},
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300150010601},
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300200012101},
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300200012111},
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300200012121},
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300200010701 },
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300300100601 },
|
||||
new SysTenantMenu(){ TenantId=1300000000001,MenuId=1300200090401 },
|
||||
|
||||
Reference in New Issue
Block a user