啊鑫
2025-09-01 3b3e5ca0fc0addf20cb5f7308b7636562746fe4c
基础资料更新
已修改2个文件
306 ■■■■■ 文件已修改
MES.Service/Modes/MesDepots.cs 288 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/service/BasicData/MesDepotsManager.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES.Service/Modes/MesDepots.cs
@@ -15,195 +15,257 @@
    public Guid Guid { get; set; }
    /// <summary>
    /// ID(SEQ_INV_ID)
    ///</summary>
    [SugarColumn(ColumnName = "DEPOT_ID")]
    /// 仓库ID
    /// </summary>
    [SugarColumn(ColumnName = "depot_id", IsNullable = false)]
    public long DepotId { get; set; }
    /// <summary>
    /// 仓库类别编码
    ///</summary>
    [SugarColumn(ColumnName = "DEPOT_CODE")]
    /// 仓库编码
    /// </summary>
    [SugarColumn(ColumnName = "depot_code", Length = 50, IsNullable = true)]
    public string? DepotCode { get; set; }
    /// <summary>
    /// 仓库类别名称
    ///</summary>
    [SugarColumn(ColumnName = "DEPOT_NAME")]
    /// 仓库名称
    /// </summary>
    [SugarColumn(ColumnName = "depot_name", Length = 100, IsNullable = true)]
    public string? DepotName { get; set; }
    /// <summary>
    /// 备注
    ///</summary>
    [SugarColumn(ColumnName = "DESCRIPTION")]
    /// 备注
    /// </summary>
    [SugarColumn(ColumnName = "description", Length = 255, IsNullable = true)]
    public string? Description { get; set; }
    /// <summary>
    /// 仓库负责人
    ///</summary>
    [SugarColumn(ColumnName = "CREATE_BY")]
    /// 仓库负责人
    /// </summary>
    [SugarColumn(ColumnName = "create_by", Length = 20, IsNullable = true)]
    public string? CreateBy { get; set; }
    /// <summary>
    /// 创建时间
    ///</summary>
    [SugarColumn(ColumnName = "CREATE_DATE")]
    public string? CreateDate { get; set; }
    /// 创建时间
    /// </summary>
    [SugarColumn(ColumnName = "create_date", IsNullable = true)]
    public DateTime? CreateDate { get; set; }
    /// <summary>
    /// 最后更新人
    ///</summary>
    [SugarColumn(ColumnName = "LASTUPDATE_BY")]
    /// 最后更新人
    /// </summary>
    [SugarColumn(ColumnName = "lastupdate_by", Length = 20, IsNullable = true)]
    public string? LastupdateBy { get; set; }
    /// <summary>
    /// 最后更新时间
    ///</summary>
    [SugarColumn(ColumnName = "LASTUPDATE_DATE")]
    public string? LastupdateDate { get; set; }
    /// 最后更新时间
    /// </summary>
    [SugarColumn(ColumnName = "lastupdate_date", IsNullable = true)]
    public DateTime? LastupdateDate { get; set; }
    /// <summary>
    /// 仓库类型
    ///</summary>
    [SugarColumn(ColumnName = "DEPOTTYPE")]
    /// 仓库类型
    /// </summary>
    [SugarColumn(ColumnName = "depottype", Length = 30, IsNullable = true)]
    public string? Depottype { get; set; }
    /// <summary>
    /// 分厂编码
    ///</summary>
    [SugarColumn(ColumnName = "FACTORY")]
    /// 分厂编码
    /// </summary>
    [SugarColumn(ColumnName = "factory", Length = 20, IsNullable = true)]
    public string? Factory { get; set; }
    /// <summary>
    /// 物料使用
    /// 默认值: ((0))
    ///</summary>
    [SugarColumn(ColumnName = "TYPE_1")]
    public long? Type1 { get; set; }
    /// 物料使用 (默认 0)
    /// </summary>
    [SugarColumn(ColumnName = "type_1", IsNullable = true)]
    public int? Type1 { get; set; }
    /// <summary>
    /// 成品使用
    /// 默认值: ((0))
    ///</summary>
    [SugarColumn(ColumnName = "TYPE_2")]
    public long? Type2 { get; set; }
    /// 成品使用 (默认 0)
    /// </summary>
    [SugarColumn(ColumnName = "type_2", IsNullable = true)]
    public int? Type2 { get; set; }
    /// <summary>
    /// 仓库类型编码
    ///</summary>
    [SugarColumn(ColumnName = "DEPOTTYPECODE")]
    public long? Depottypecode { get; set; }
    /// 仓库类型编码
    /// </summary>
    [SugarColumn(ColumnName = "depottypecode", IsNullable = true)]
    public int? Depottypecode { get; set; }
    /// <summary>
    /// 公司代码
    ///</summary>
    [SugarColumn(ColumnName = "COMPANY")]
    /// 公司代码
    /// </summary>
    [SugarColumn(ColumnName = "company", Length = 20, IsNullable = true)]
    public string? Company { get; set; }
    /// <summary>
    /// 看板图标样式
    ///</summary>
    [SugarColumn(ColumnName = "ICON_TYPE")]
    public long? IconType { get; set; }
    /// 看板图标样式
    /// </summary>
    [SugarColumn(ColumnName = "icon_type", IsNullable = true)]
    public int? IconType { get; set; }
    /// <summary>
    /// 是否委外仓库
    /// 默认值: ((0))
    ///</summary>
    [SugarColumn(ColumnName = "IS_WY")]
    public long? IsWy { get; set; }
    /// 是否委外仓库 (默认 0)
    /// </summary>
    [SugarColumn(ColumnName = "is_wy", IsNullable = true)]
    public int? IsWy { get; set; }
    /// <summary>
    /// 是否不良品仓
    /// 默认值: ('0')
    ///</summary>
    [SugarColumn(ColumnName = "IS_NG")]
    /// 禁用状态 (默认 0) 注意:原表为 nvarchar(10) 且默认 '0'
    /// </summary>
    [SugarColumn(ColumnName = "is_ng", Length = 10, IsNullable = true)]
    public string? IsNg { get; set; }
    /// <summary>
    /// 仓库地址
    ///</summary>
    [SugarColumn(ColumnName = "CWHADDRESS")]
    /// 仓库地址
    /// </summary>
    [SugarColumn(ColumnName = "cwhaddress", Length = 200, IsNullable = true)]
    public string? Cwhaddress { get; set; }
    /// <summary>
    /// 看板显示区域编号
    /// 默认值: ('1')
    ///</summary>
    [SugarColumn(ColumnName = "PI_TYPE")]
    /// 看板显示区域编号 (默认 1)
    /// </summary>
    [SugarColumn(ColumnName = "pi_type", Length = 10, IsNullable = true)]
    public string? PiType { get; set; }
    /// <summary>
    /// 分组
    ///</summary>
    [SugarColumn(ColumnName = "ZUID")]
    /// 分组
    /// </summary>
    [SugarColumn(ColumnName = "zuid", Length = 20, IsNullable = true)]
    public string? Zuid { get; set; }
    /// <summary>
    /// 允许即时库存负库存
    ///</summary>
    [SugarColumn(ColumnName = "IS_FKC")]
    /// 允许即时库存负库存
    /// </summary>
    [SugarColumn(ColumnName = "is_fkc", Length = 30, IsNullable = true)]
    public string? IsFkc { get; set; }
    /// <summary>
    /// 生产车间
    ///</summary>
    [SugarColumn(ColumnName = "PRODUCTION_WORKSHOP")]
    /// 生产车间
    /// </summary>
    [SugarColumn(ColumnName = "production_workshop", Length = 32,
        IsNullable = true)]
    public string? ProductionWorkshop { get; set; }
    /// <summary>
    /// 0=普通仓,1=露天仓,2=寄外仓,3=外寄仓,4=在制品,5=报废
    ///</summary>
    [SugarColumn(ColumnName = "MATERIAL_PROPERTI")]
    /// 物料属性
    /// </summary>
    [SugarColumn(ColumnName = "material_properti", Length = 32,
        IsNullable = true)]
    public string? MaterialProperti { get; set; }
    /// <summary>
    /// 创建组织
    ///</summary>
    [SugarColumn(ColumnName = "CREATE_ORG")]
    public long? CreateOrg { get; set; }
    /// <summary>
    /// 使用组织
    ///</summary>
    [SugarColumn(ColumnName = "USE_ORG")]
    public long? UseOrg { get; set; }
    /// <summary>
    /// 自定义字段3
    ///</summary>
    [SugarColumn(ColumnName = "REMARK3")]
    /// 自定义字段3
    /// </summary>
    [SugarColumn(ColumnName = "remark3", Length = 32, IsNullable = true)]
    public string? Remark3 { get; set; }
    /// <summary>
    /// 自定义字段4
    ///</summary>
    [SugarColumn(ColumnName = "REMARK4")]
    /// 自定义字段4
    /// </summary>
    [SugarColumn(ColumnName = "remark4", Length = 32, IsNullable = true)]
    public string? Remark4 { get; set; }
    /// <summary>
    /// 自定义字段5
    ///</summary>
    [SugarColumn(ColumnName = "REMARK5")]
    /// 自定义字段5
    /// </summary>
    [SugarColumn(ColumnName = "remark5", Length = 32, IsNullable = true)]
    public string? Remark5 { get; set; }
    /// <summary>
    /// 0 =不生效, 1=生效
    ///</summary>
    [SugarColumn(ColumnName = "FORBID_STATUS")]
    public string? ForbidStatus { get; set; }
    /// 点检时间
    /// </summary>
    [SugarColumn(ColumnName = "check_date", IsNullable = true)]
    public DateTime? CheckDate { get; set; }
    /// <summary>
    /// 单据状态
    ///</summary>
    [SugarColumn(ColumnName = "DOCUMENT_STATUS")]
    /// 点检人
    /// </summary>
    [SugarColumn(ColumnName = "check_by", Length = 50, IsNullable = true)]
    public string? CheckBy { get; set; }
    /// <summary>
    /// 点检状态 (默认 0)
    /// </summary>
    [SugarColumn(ColumnName = "check_status", IsNullable = true)]
    public bool? CheckStatus { get; set; }
    /// <summary>
    /// 创建组织
    /// </summary>
    [SugarColumn(ColumnName = "Fumbrella", Length = 32, IsNullable = true)]
    public string? Fumbrella { get; set; }
    /// <summary>
    /// 使用组织
    /// </summary>
    [SugarColumn(ColumnName = "FSubsidiary", Length = 32, IsNullable = true)]
    public string? FSubsidiary { get; set; }
    /// <summary>
    /// 供应商
    /// </summary>
    [SugarColumn(ColumnName = "SUPPLIER_ID", Length = 50, IsNullable = true)]
    public string? SupplierId { get; set; }
    /// <summary>
    /// 客户
    /// </summary>
    [SugarColumn(ColumnName = "Client_Id", Length = 50, IsNullable = true)]
    public string? ClientId { get; set; }
    /// <summary>
    /// 部门
    /// </summary>
    [SugarColumn(ColumnName = "department", Length = 50, IsNullable = true)]
    public string? Department { get; set; }
    /// <summary>
    /// 联系电话
    /// </summary>
    [SugarColumn(ColumnName = "Phone", Length = 50, IsNullable = true)]
    public string? Phone { get; set; }
    /// <summary>
    /// Z=暂存,A=创建,B=审核中,C=已审核,D=重新审核
    /// </summary>
    [SugarColumn(ColumnName = "DOCUMENT_STATUS", Length = 10,
        IsNullable = true)]
    public string? DocumentStatus { get; set; }
    /// <summary>
    /// 批号管理
    ///</summary>
    [SugarColumn(ColumnName = "IS_LOT")]
    public string? IsLot { get; set; }
    /// 0=可用,4=在途,6=废品,2=冻结,5=收货冻结,1=待检,8=不参与核算,3=退回冻结,7=不良
    /// </summary>
    [SugarColumn(ColumnName = "STOCK_STATUS_TYPE", Length = 50,
        IsNullable = true)]
    public string? StockStatusType { get; set; }
    /// <summary>
    /// 数据状态
    /// </summary>
    [SugarColumn(ColumnName = "FDocumentStatus", Length = 100,
        IsNullable = true)]
    public string? FDocumentStatus { get; set; }
    /// <summary>
    /// 客户 (整数)
    /// </summary>
    [SugarColumn(ColumnName = "FCustomerId", IsNullable = true)]
    public int? FCustomerId { get; set; }
    /// <summary>
    /// 库存状态类型
    /// </summary>
    [SugarColumn(ColumnName = "FStockStatusType", Length = 50,
        IsNullable = true)]
    public string? FStockStatusType { get; set; }
    /// <summary>
    /// 启用仓位管理
    /// </summary>
    [SugarColumn(ColumnName = "FISOPENLOCATION", Length = 5, IsNullable = true)]
    public string? FIsOpenLocation { get; set; }
    [SugarColumn(IsIgnore = true)] public string? Type { get; set; }
}
MES.Service/service/BasicData/MesDepotsManager.cs
@@ -95,7 +95,7 @@
            DepotName = depots.FName,
            DepotId = string.IsNullOrEmpty(depots.Id)
                ? DateTimeOffset.UtcNow.ToUnixTimeSeconds()
                : long.Parse(depots.Id),
                : Convert.ToInt32(depots.Id),
            IsFkc = depots.FAllowMinusQty,
            CreateBy = depots.FPrincipal,
            Depottype = depots.FStockProperty,
@@ -103,14 +103,14 @@
            Zuid = depots.FGroup,
            DocumentStatus = depots.FDocumentStatus,
            
            UseOrg = string.IsNullOrEmpty(depots.FUseOrgId)
                ? 1
                : long.Parse(depots.FUseOrgId),
            CreateOrg = string.IsNullOrEmpty(depots.FCreateOrgId)
                ? 1
                : long.Parse(depots.FCreateOrgId),
            CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
            LastupdateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
            FSubsidiary = string.IsNullOrEmpty(depots.FUseOrgId)
                ? "1"
                :  depots.FUseOrgId,
            Fumbrella = string.IsNullOrEmpty(depots.FCreateOrgId)
                ? "1"
                : depots.FCreateOrgId,
            CreateDate = DateTime.Now,
            LastupdateDate = DateTime.Now,
            Company = "1000",
            Factory = "1000"
        };