Merge branch 'dev' of https://git.tuotong-tech.com/tnb/tnb.server into dev
This commit is contained in:
@@ -145,6 +145,7 @@ namespace Tnb.ProductionMgr
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f)=>e.equip_id==f.id)
|
||||
.LeftJoin<PrdMoTask>((a,b,c,d,e,f,g)=>e.mo_task_id==g.id)
|
||||
.Where((a, b, c) => a.material_id == materialId)
|
||||
.OrderBy((a,b)=>b.mold_code)
|
||||
.Select((a, b, c,d,e,f,g) => new Tnb.ProductionMgr.Entities.Dto.MoldListOutput
|
||||
{
|
||||
mold_id = b.id,
|
||||
@@ -171,6 +172,7 @@ namespace Tnb.ProductionMgr
|
||||
{
|
||||
List<EquipmentListOutput> items = await _db.Queryable<ToolMoldsEquipment>().InnerJoin<EqpEquipment>((a, b) => a.equipment_id == b.id)
|
||||
.Where((a, b) => a.mold_id == moldId)
|
||||
.OrderBy((a,b)=>b.code)
|
||||
.Select((a, b) => new Entities.Dto.EquipmentListOutput
|
||||
{
|
||||
eqp_id = b.id,
|
||||
@@ -1361,8 +1363,11 @@ namespace Tnb.ProductionMgr
|
||||
});
|
||||
}
|
||||
|
||||
await db.Insertable(toolMoldMaintainRecordH).ExecuteCommandAsync();
|
||||
await db.Insertable(insertRecordDs).ExecuteCommandAsync();
|
||||
if (insertRecordDs.Count>0)
|
||||
{
|
||||
await db.Insertable(toolMoldMaintainRecordH).ExecuteCommandAsync();
|
||||
await db.Insertable(insertRecordDs).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2477,18 +2482,18 @@ namespace Tnb.ProductionMgr
|
||||
//来源erp需要调接口
|
||||
if (prdMo.mo_source == "1")
|
||||
{
|
||||
List<DictionaryDataEntity> unitDatas = await db.Queryable<DictionaryTypeEntity>()
|
||||
.LeftJoin<DictionaryDataEntity>((x, y) => x.Id == y.DictionaryTypeId)
|
||||
.Where((x, y) => x.EnCode == DictConst.MeasurementUnit && y.EnCode==report.unit_id)
|
||||
.Select((x, y) => y)
|
||||
.ToListAsync();
|
||||
// List<DictionaryDataEntity> unitDatas = await db.Queryable<DictionaryTypeEntity>()
|
||||
// .LeftJoin<DictionaryDataEntity>((x, y) => x.Id == y.DictionaryTypeId)
|
||||
// .Where((x, y) => x.EnCode == DictConst.MeasurementUnit && y.EnCode==report.unit_id)
|
||||
// .Select((x, y) => y)
|
||||
// .ToListAsync();
|
||||
|
||||
List<string> erpExtendIds = new List<string>();
|
||||
erpExtendIds.Add(_userManager.UserId);
|
||||
erpExtendIds.Add(WmsWareHouseConst.AdministratorOrgId);
|
||||
erpExtendIds.Add(report.material_id);
|
||||
erpExtendIds.Add(report.unit_id);
|
||||
erpExtendIds.AddRange(unitDatas.Select(x => x.Id).ToList());
|
||||
// erpExtendIds.AddRange(unitDatas.Select(x => x.Id).ToList());
|
||||
|
||||
List<ErpExtendField> erpExtendFields = await _db.Queryable<ErpExtendField>().Where(x=>erpExtendIds.Contains(x.table_id)).ToListAsync();
|
||||
string erpCreateId = erpExtendFields.Find(x=>x.table_id==_userManager.UserId)?.user_id ?? "";
|
||||
@@ -2529,8 +2534,8 @@ namespace Tnb.ProductionMgr
|
||||
["cbmoid"] = prdMo.erp_mo_pk,
|
||||
// ["cbunitid"] = erpExtendFields.Find(x=>x.table_id==report.unit_id)?.cunitid ?? "",
|
||||
// ["cbastunitid"] = erpExtendFields.Find(x=>x.table_id==report.unit_id)?.cunitid ?? "",
|
||||
["cbunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == report.unit_id)?.Id ?? ""))?.cunitid ?? "",
|
||||
["cbastunitid"] = erpExtendFields.Find(x => x.table_id == (unitDatas.Find(x => x.EnCode == report.unit_id)?.Id ?? ""))?.cunitid ?? "",
|
||||
["cbunitid"] = erpExtendFields.Find(x => x.table_id == report.unit_id)?.cunitid ?? "",
|
||||
["cbastunitid"] = erpExtendFields.Find(x => x.table_id == report.unit_id)?.cunitid ?? "",
|
||||
["nbplanwrnum"] = report.reported_qty,
|
||||
["nbwrnum"] = report.reported_qty,
|
||||
["tbendtime"] = nowStr,
|
||||
|
||||
Reference in New Issue
Block a user