1、载具主表新增check_conclusion检验结论字段
This commit is contained in:
@@ -76,6 +76,10 @@ namespace Tnb.WarehouseMgr.Entities.Dto.Outputs
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string check_conclusion { get; set; }
|
public string check_conclusion { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
/// 质检状态
|
||||||
|
/// </summary>
|
||||||
|
public string qc_status { get; set; }
|
||||||
|
/// <summary>
|
||||||
/// 载具条码明细输出
|
/// 载具条码明细输出
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<CarryCodeQueryOutput>? wmsCarryCodes { get; set; }
|
public List<CarryCodeQueryOutput>? wmsCarryCodes { get; set; }
|
||||||
|
|||||||
@@ -39,6 +39,6 @@ public partial class WmsCarryCode
|
|||||||
/// 检验结论
|
/// 检验结论
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[SugarColumn(IsIgnore = true)]
|
[SugarColumn(IsIgnore = true)]
|
||||||
public string check_conclusion { get; set; }
|
public int check_conclusion { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,5 +131,9 @@ public partial class WmsCarryH : BaseEntity<string>
|
|||||||
/// 齐套搭配方案编号
|
/// 齐套搭配方案编号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string? collocation_scheme_code { get; set; }
|
public string? collocation_scheme_code { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// 检验结论
|
||||||
|
/// </summary>
|
||||||
|
public int check_conclusion { get; set; } = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Tnb.WarehouseMgr.Entities.Enums
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检验结论
|
||||||
|
/// </summary>
|
||||||
|
public enum EnumCheckConclusion
|
||||||
|
{
|
||||||
|
[Description("合格")]
|
||||||
|
合格 = 1,
|
||||||
|
[Description("让步合格")]
|
||||||
|
让步合格 = 2,
|
||||||
|
[Description("不合格")]
|
||||||
|
不合格 = 4,
|
||||||
|
[Description("待检")]
|
||||||
|
待检 = 8,
|
||||||
|
[Description("暂控")]
|
||||||
|
暂控 = 16,
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,10 @@
|
|||||||
using Tnb.WarehouseMgr.Entities;
|
using Tnb.WarehouseMgr.Entities;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto;
|
using Tnb.WarehouseMgr.Entities.Dto;
|
||||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Dto.Outputs;
|
||||||
|
using Tnb.Common;
|
||||||
|
using JNPF.Common.Extension;
|
||||||
|
using Tnb.WarehouseMgr.Entities.Enums;
|
||||||
|
|
||||||
namespace Tnb.WarehouseMgr.Entities.Mapper
|
namespace Tnb.WarehouseMgr.Entities.Mapper
|
||||||
{
|
{
|
||||||
@@ -16,6 +20,10 @@ namespace Tnb.WarehouseMgr.Entities.Mapper
|
|||||||
config.ForType<MESCarrySignInput, SignForDeliveryInput>()
|
config.ForType<MESCarrySignInput, SignForDeliveryInput>()
|
||||||
.Map(dest => dest.carryId, src => src.carry_code)
|
.Map(dest => dest.carryId, src => src.carry_code)
|
||||||
;
|
;
|
||||||
|
config.ForType<WmsCarryH, CarryQueryOutput>()
|
||||||
|
.Map(dest => dest.qc_status, src => src.is_check == 0 ? "不合格" : "合格");
|
||||||
|
config.ForType<WmsCarryCode, CarryCodeQueryOutput>()
|
||||||
|
.Map(dest => dest.check_conclusion, src => src.check_conclusion.ToEnum<EnumCheckConclusion>().GetDescription());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,14 +76,14 @@ namespace Tnb.WarehouseMgr
|
|||||||
? a => mCarryIdDic.Keys.Contains(a.carry_id)
|
? a => mCarryIdDic.Keys.Contains(a.carry_id)
|
||||||
: a => a.carry_id == carry.id;
|
: a => a.carry_id == carry.id;
|
||||||
|
|
||||||
var carryCodes = await _db.Queryable<WmsCarryCode>().LeftJoin<WmsInstockH>((a, b) => a.carry_id == b.carry_id)
|
var carryCodes = await _db.Queryable<WmsCarryCode>().InnerJoin<WmsCarryH>((a, b) => a.carry_id == b.id).LeftJoin<WmsInstockH>((a, b, c) => a.carry_id == c.carry_id)
|
||||||
.Where(whereExp)
|
.Where(whereExp)
|
||||||
.Select((a, b) => new WmsCarryCode
|
.Select((a, b, c) => new WmsCarryCode
|
||||||
{
|
{
|
||||||
is_check = SqlFunc.Subqueryable<WmsCarryH>().Where(it => it.id == a.carry_id).Select(it => it.is_check),
|
//is_check = SqlFunc.Subqueryable<WmsCarryH>().Where(it => it.id == a.carry_id).Select(it => it.is_check),
|
||||||
|
check_conclusion = SqlFunc.IsNull(b.check_conclusion, 1),
|
||||||
instock_time = b.create_time,
|
instock_time = b.create_time,
|
||||||
}, true)
|
}, true)
|
||||||
.Mapper(a => a.check_conclusion = a.is_check == 1 ? "合格" : "不合格")
|
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID && mCarryIdDic?.Count > 0)
|
if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID && mCarryIdDic?.Count > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ public class Startup : AppStartup
|
|||||||
SnowflakeIdHelper.InitYitIdWorker();
|
SnowflakeIdHelper.InitYitIdWorker();
|
||||||
|
|
||||||
bool isStartTimeJob = App.GetConfig<bool>("IsStartTimeJob");
|
bool isStartTimeJob = App.GetConfig<bool>("IsStartTimeJob");
|
||||||
//if (isStartTimeJob)
|
if (isStartTimeJob)
|
||||||
// serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
|
serviceProvider.GetRequiredService<ITimeTaskService>().StartTimerJob();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,6 +200,12 @@ public static class EnumExtensions
|
|||||||
var arr = System.Enum.GetNames(type);
|
var arr = System.Enum.GetNames(type);
|
||||||
return arr.Select(name => (T)System.Enum.Parse(type, name)).ToList();
|
return arr.Select(name => (T)System.Enum.Parse(type, name)).ToList();
|
||||||
}
|
}
|
||||||
|
//added by ly on 20230823
|
||||||
|
public static T ToEnum<T>(this int value) where T : Enum
|
||||||
|
{
|
||||||
|
return (T)Enum.ToObject(typeof(T), value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user