修复错误
This commit is contained in:
23
EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs
Normal file
23
EquipMgr/Tnb.EquipMgr.Entities/Dto/RelevanceMoldInput.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tnb.EquipMgr.Entities.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 模具规则定义,关键模具输入参数
|
||||
/// </summary>
|
||||
public class RelevanceMoldInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 规则Id
|
||||
/// </summary>
|
||||
public string? rule_id { get; set; }
|
||||
/// <summary>
|
||||
/// 模具Id
|
||||
/// </summary>
|
||||
public string? mold_id { get; set;}
|
||||
}
|
||||
}
|
||||
@@ -8,90 +8,86 @@ namespace Tnb.EquipMgr.Entities
|
||||
///<summary>
|
||||
///模具保养
|
||||
///</summary>
|
||||
[SugarTable("mold_maintenance")]
|
||||
[SugarTable("tool_mold_maintenance")]
|
||||
public partial class MoldMaintenance
|
||||
{
|
||||
public MoldMaintenance(){
|
||||
/// <summary>
|
||||
/// Desc:编号
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true)]
|
||||
public string id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:所属组织
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? org_id { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:编号
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public string id {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:项目
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:所属组织
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? org_id {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:描述
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? descrip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:项目
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? name {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:备注
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:描述
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? descrip {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:查看照片
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? image { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:备注
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? remark {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:扩展
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? extras { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:查看照片
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? image {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:创建用户
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? create_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:扩展
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? extras {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? create_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建用户
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? create_id {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:修改用户
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? modify_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:创建时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? create_time {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改用户
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? modify_id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? modify_time {get;set;}
|
||||
/// <summary>
|
||||
/// Desc:修改时间
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public DateTime? modify_time { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public long id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public long id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public char id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public char id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public long id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public long id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public long id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -11,33 +11,22 @@ namespace Tnb.EquipMgr.Entities
|
||||
///模具保养项目组与保养项关系
|
||||
///</summary>
|
||||
[SugarTable("tool_mold_maintain_group_item")]
|
||||
public partial class ToolMoldMaintainGroupItem
|
||||
public partial class ToolMoldMaintainGroupItem : BaseEntity<string>
|
||||
{
|
||||
public ToolMoldMaintainGroupItem(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:主键
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// Desc:项目组id
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:项目组id
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? item_group_id {get;set;}
|
||||
public string? item_group_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:保养项id
|
||||
/// Default:NULL::character varying
|
||||
/// Default:NULL::character varying
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string? item_id {get;set;}
|
||||
public string? item_id { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,19 +11,9 @@ namespace Tnb.EquipMgr.Entities
|
||||
///模具保养组与磨具关联
|
||||
///</summary>
|
||||
[SugarTable("tool_mold_maintain_group_relation")]
|
||||
public partial class ToolMoldMaintainGroupRelation
|
||||
public partial class ToolMoldMaintainGroupRelation :BaseEntity<string>
|
||||
{
|
||||
public ToolMoldMaintainGroupRelation(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:主键
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:项目组Id
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public long id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Tnb.EquipMgr.Entities
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public long id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||
|
||||
/// <summary>
|
||||
/// Desc:TODO
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tnb.EquipMgr.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// 设备保养规则定义
|
||||
/// </summary>
|
||||
public interface IToolMoldMaintainRuleService
|
||||
{
|
||||
}
|
||||
}
|
||||
12
EquipMgr/Tnb.EquipMgr/MoldMaintainBaseService.cs
Normal file
12
EquipMgr/Tnb.EquipMgr/MoldMaintainBaseService.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tnb.EquipMgr
|
||||
{
|
||||
public class MoldMaintainBaseService
|
||||
{
|
||||
}
|
||||
}
|
||||
52
EquipMgr/Tnb.EquipMgr/ToolMoldMaintainRuleService.cs
Normal file
52
EquipMgr/Tnb.EquipMgr/ToolMoldMaintainRuleService.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Aspose.Cells.Drawing;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using Mapster;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SqlSugar;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.EquipMgr.Entities.Dto;
|
||||
using Tnb.EquipMgr.Interfaces;
|
||||
|
||||
namespace Tnb.EquipMgr
|
||||
{
|
||||
/// <summary>
|
||||
/// 模具保养规则定义服务
|
||||
/// </summary>
|
||||
[ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
|
||||
[Route("api/[area]/[controller]/[action]")]
|
||||
public class ToolMoldMaintainRuleService : IToolMoldMaintainRuleService, IDynamicApiController, ITransient
|
||||
{
|
||||
private readonly ISqlSugarRepository<ToolMoldMaintainRule> _repository;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly ISqlSugarClient _db;
|
||||
public ToolMoldMaintainRuleService(ISqlSugarRepository<ToolMoldMaintainRule> repository, IUserManager userManager)
|
||||
{
|
||||
_repository = repository;
|
||||
_userManager = userManager;
|
||||
_db = repository.AsSugarClient();
|
||||
}
|
||||
/// <summary>
|
||||
/// 关联模具
|
||||
/// </summary>
|
||||
/// <param name="input">关联模具输入参数</param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
[HttpPost]
|
||||
public async Task RelevanceMold(RelevanceMoldInput input)
|
||||
{
|
||||
if (input is null) throw new ArgumentNullException(nameof(input));
|
||||
var entity = input.Adapt<ToolMoldMaintainRuleRelation>();
|
||||
var row = await _db.Insertable(entity).ExecuteCommandAsync();
|
||||
if (row < 1) throw Oops.Oh(ErrorCode.COM1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user