调整命名空间
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
using JNPF.Common.Contracts;
|
using JNPF.Common.Contracts;
|
||||||
using JNPF.Common.Security;
|
using JNPF.Common.Security;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using Yitter.IdGenerator;
|
||||||
|
|
||||||
namespace Tnb.EquipMgr.Entities;
|
namespace Tnb.EquipMgr.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ public partial class ToolModelCheckPeriod : BaseEntity<long>
|
|||||||
{
|
{
|
||||||
public ToolModelCheckPeriod()
|
public ToolModelCheckPeriod()
|
||||||
{
|
{
|
||||||
id = YitIdHelper.NextId();
|
id = Yitter.IdGenerator.YitIdHelper.NextId();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TODO
|
/// TODO
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace Tnb.ProductionMgr
|
|||||||
if (dic.ContainsKey("mold_id"))
|
if (dic.ContainsKey("mold_id"))
|
||||||
{
|
{
|
||||||
var moldId = dic["mold_id"]?.ToString();
|
var moldId = dic["mold_id"]?.ToString();
|
||||||
var mold = await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == moldId);
|
var mold = await db.Queryable<ToolMolds>().FirstAsync(it => it.id == moldId);
|
||||||
if (mold != null)
|
if (mold != null)
|
||||||
{
|
{
|
||||||
row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}";
|
row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}";
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ namespace Tnb.ProductionMgr
|
|||||||
public async Task<dynamic> GetMoldListByItemId(string materialId)
|
public async Task<dynamic> GetMoldListByItemId(string materialId)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
var list = await db.Queryable<Entities.ToolMolds>().InnerJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
var list = await db.Queryable<ToolMolds>().InnerJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||||
.Where((a, b) => a.material_id == materialId)
|
.Where((a, b) => a.material_id == materialId)
|
||||||
.Select((a, b) => new MoldListOutput
|
.Select((a, b) => new MoldListOutput
|
||||||
{
|
{
|
||||||
@@ -175,7 +175,7 @@ namespace Tnb.ProductionMgr
|
|||||||
var list = await _repository.AsSugarClient().Queryable<PrdMoTask>()
|
var list = await _repository.AsSugarClient().Queryable<PrdMoTask>()
|
||||||
.LeftJoin<PrdMo>((a, b) => a.mo_id == b.id)
|
.LeftJoin<PrdMo>((a, b) => a.mo_id == b.id)
|
||||||
.LeftJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
.LeftJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
||||||
.LeftJoin<Entities.ToolMolds>((a, b, c, d) => a.mold_id == d.id)
|
.LeftJoin<ToolMolds>((a, b, c, d) => a.mold_id == d.id)
|
||||||
.Where((a, b, c, d) => a.eqp_id == eqpId)
|
.Where((a, b, c, d) => a.eqp_id == eqpId)
|
||||||
.OrderBy((a, b, c, d) => a.estimated_start_date)
|
.OrderBy((a, b, c, d) => a.estimated_start_date)
|
||||||
.Select((a, b, c, d) => new PrdTaskSortOutput
|
.Select((a, b, c, d) => new PrdTaskSortOutput
|
||||||
@@ -243,7 +243,7 @@ namespace Tnb.ProductionMgr
|
|||||||
if (prdTask != null)
|
if (prdTask != null)
|
||||||
{
|
{
|
||||||
var eqp = await db.Queryable<EqpEquipment>().FirstAsync(it => it.id == prdTask.eqp_id);
|
var eqp = await db.Queryable<EqpEquipment>().FirstAsync(it => it.id == prdTask.eqp_id);
|
||||||
var mold = await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == prdTask.mold_id);
|
var mold = await db.Queryable<ToolMolds>().FirstAsync(it => it.id == prdTask.mold_id);
|
||||||
var material = await db.Queryable<BasMaterial>().FirstAsync(it => it.id == prdTask.material_id);
|
var material = await db.Queryable<BasMaterial>().FirstAsync(it => it.id == prdTask.material_id);
|
||||||
eqpCode = eqp != null ? eqp.code : "";
|
eqpCode = eqp != null ? eqp.code : "";
|
||||||
moldCode = mold != null ? mold.mold_code : "";
|
moldCode = mold != null ? mold.mold_code : "";
|
||||||
@@ -354,7 +354,7 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
result = await _db.Queryable<PrdMoTask>().LeftJoin<PrdMo>((a, b) => a.mo_id == b.id)
|
result = await _db.Queryable<PrdMoTask>().LeftJoin<PrdMo>((a, b) => a.mo_id == b.id)
|
||||||
.LeftJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
.LeftJoin<BasMaterial>((a, b, c) => a.material_id == c.id)
|
||||||
.LeftJoin<Entities.ToolMolds>((a, b, c, d) => a.mold_id == d.id)
|
.LeftJoin<ToolMolds>((a, b, c, d) => a.mold_id == d.id)
|
||||||
.LeftJoin<EqpEquipment>((a, b, c, d, e) => a.eqp_id == e.id)
|
.LeftJoin<EqpEquipment>((a, b, c, d, e) => a.eqp_id == e.id)
|
||||||
.Where((a, b, c, d, e) => a.mo_id == moId)
|
.Where((a, b, c, d, e) => a.mo_id == moId)
|
||||||
.Select((a, b, c, d, e) => new PrdMoTaskOutput
|
.Select((a, b, c, d, e) => new PrdMoTaskOutput
|
||||||
@@ -557,7 +557,7 @@ namespace Tnb.ProductionMgr
|
|||||||
taskLog.id = SnowflakeIdHelper.NextId();
|
taskLog.id = SnowflakeIdHelper.NextId();
|
||||||
taskLog.mo_code = (await db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id))?.mo_code!;
|
taskLog.mo_code = (await db.Queryable<PrdMo>().FirstAsync(it => it.id == input.mo_id))?.mo_code!;
|
||||||
taskLog.eqp_code = (await db.Queryable<EqpEquipment>().FirstAsync(it => it.id == input.eqp_id))?.code!;
|
taskLog.eqp_code = (await db.Queryable<EqpEquipment>().FirstAsync(it => it.id == input.eqp_id))?.code!;
|
||||||
taskLog.mold_code = (await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == input.mold_id))?.mold_code!;
|
taskLog.mold_code = (await db.Queryable<ToolMolds>().FirstAsync(it => it.id == input.mold_id))?.mold_code!;
|
||||||
taskLog.item_code = material?.code!;
|
taskLog.item_code = material?.code!;
|
||||||
taskLog.item_standard = material?.material_standard!;
|
taskLog.item_standard = material?.material_standard!;
|
||||||
taskLog.status = DictConst.ToBeScheduledEncode;
|
taskLog.status = DictConst.ToBeScheduledEncode;
|
||||||
@@ -574,7 +574,7 @@ namespace Tnb.ProductionMgr
|
|||||||
sacipRecord.material_code = material?.code!;
|
sacipRecord.material_code = material?.code!;
|
||||||
sacipRecord.material_name = material?.name!;
|
sacipRecord.material_name = material?.name!;
|
||||||
sacipRecord.eqp_code = (await db.Queryable<EqpEquipment>().FirstAsync(it => it.id == moTask.eqp_id))?.code!;
|
sacipRecord.eqp_code = (await db.Queryable<EqpEquipment>().FirstAsync(it => it.id == moTask.eqp_id))?.code!;
|
||||||
sacipRecord.mold_name = (await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == moTask.mold_id))?.mold_name!;
|
sacipRecord.mold_name = (await db.Queryable<ToolMolds>().FirstAsync(it => it.id == moTask.mold_id))?.mold_name!;
|
||||||
sacipRecord.estimated_start_date = moTask.plan_start_date;
|
sacipRecord.estimated_start_date = moTask.plan_start_date;
|
||||||
sacipRecord.estimated_end_date = moTask.plan_end_date;
|
sacipRecord.estimated_end_date = moTask.plan_end_date;
|
||||||
sacipRecord.plan_qty = moTask.plan_qty;
|
sacipRecord.plan_qty = moTask.plan_qty;
|
||||||
@@ -894,7 +894,7 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
if (taskItem.mold_id!.IsNotEmptyOrNull())
|
if (taskItem.mold_id!.IsNotEmptyOrNull())
|
||||||
{
|
{
|
||||||
taskLog.mold_code = (await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == taskItem.mold_id))?.mold_code!;
|
taskLog.mold_code = (await db.Queryable<ToolMolds>().FirstAsync(it => it.id == taskItem.mold_id))?.mold_code!;
|
||||||
}
|
}
|
||||||
if (taskItem.material_id!.IsNotEmptyOrNull())
|
if (taskItem.material_id!.IsNotEmptyOrNull())
|
||||||
{
|
{
|
||||||
@@ -962,7 +962,7 @@ namespace Tnb.ProductionMgr
|
|||||||
case 2: //模具
|
case 2: //模具
|
||||||
if (icmoItem != null)
|
if (icmoItem != null)
|
||||||
{
|
{
|
||||||
var moldItem = await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == icmoItem.mold_id);
|
var moldItem = await db.Queryable<ToolMolds>().FirstAsync(it => it.id == icmoItem.mold_id);
|
||||||
icmoItem.mold_id = moldItem.id;
|
icmoItem.mold_id = moldItem.id;
|
||||||
icmoItem.mold_code = moldItem.mold_code;
|
icmoItem.mold_code = moldItem.mold_code;
|
||||||
icmoItem.mold_name = moldItem.mold_name;
|
icmoItem.mold_name = moldItem.mold_name;
|
||||||
@@ -1113,7 +1113,7 @@ namespace Tnb.ProductionMgr
|
|||||||
if (dic.ContainsKey("mold_id"))
|
if (dic.ContainsKey("mold_id"))
|
||||||
{
|
{
|
||||||
var moldId = dic["mold_id"]?.ToString();
|
var moldId = dic["mold_id"]?.ToString();
|
||||||
var mold = await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == moldId);
|
var mold = await db.Queryable<ToolMolds>().FirstAsync(it => it.id == moldId);
|
||||||
if (mold != null)
|
if (mold != null)
|
||||||
{
|
{
|
||||||
row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}";
|
row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}";
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace Tnb.ProductionMgr
|
|||||||
if (dic.ContainsKey("mold_id"))
|
if (dic.ContainsKey("mold_id"))
|
||||||
{
|
{
|
||||||
var moldId = dic["mold_id"]?.ToString();
|
var moldId = dic["mold_id"]?.ToString();
|
||||||
var mold = await db.Queryable<Entities.ToolMolds>().FirstAsync(it => it.id == moldId);
|
var mold = await db.Queryable<ToolMolds>().FirstAsync(it => it.id == moldId);
|
||||||
if (mold != null)
|
if (mold != null)
|
||||||
{
|
{
|
||||||
row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}";
|
row["mold_id"] = $"{mold.mold_code}/{mold.mold_name}";
|
||||||
|
|||||||
Reference in New Issue
Block a user