视图 bug

This commit is contained in:
2024-07-05 15:17:17 +08:00
parent f35e9f3815
commit 9d625784e6
3 changed files with 13 additions and 13 deletions

View File

@@ -412,10 +412,10 @@ namespace Tnb.ProductionMgr
{
foreach (var item in input.details)
{
// if (!inputMaterials.Contains(item["material_id"]))
// {
// throw new Exception("该物料不是生产bom投入物料不能签收");
// }
if (!inputMaterials.Contains(item.material_id))
{
throw new Exception("该物料不是生产bom投入物料不能签收");
}
PrdMaterialReceiptD? detail = null;
if (carry.carrystd_id == WmsWareHouseConst.CARRY_ZYXCSTD_ID || carry.carrystd_id == WmsWareHouseConst.CARRY_ZYLJSTD_ID)

View File

@@ -164,8 +164,8 @@ namespace Tnb.ProductionMgr
eqp_type_code = SqlFunc.Subqueryable<EqpEquipType>().Where(iit => iit.id == b.equip_type_id).Select(iit => iit.name),
eqp_machine_num = b.eqp_machine_num,
tonnage = b.tonnage,
task_list_qty = SqlFunc.Subqueryable<PrdTask>().Where(x => x.eqp_id == b.id).Count(),
estimated_end_date = SqlFunc.Subqueryable<PrdTask>().Where(x => x.eqp_id == b.id).OrderByDesc(o => o.plan_end_date).Select(x => x.plan_end_date)
task_list_qty = SqlFunc.Subqueryable<PrdMoTask>().Where(x => x.eqp_id == b.id && (x.mo_task_status==DictConst.ToBeStartedEnCode || x.mo_task_status==DictConst.ToBeScheduledEncode)).Count(),
estimated_end_date = SqlFunc.Subqueryable<PrdMoTask>().Where(x => x.eqp_id == b.id && (x.mo_task_status==DictConst.ToBeStartedEnCode || x.mo_task_status==DictConst.ToBeScheduledEncode)).Max(x=>x.create_time)
}).Mapper(x =>
{
x.first_date = x.estimated_end_date.HasValue ? x.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss") : "";

View File

@@ -623,8 +623,8 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
}
catch (Exception e)
{
if (e.Message == "TypeError: Method or property not found")
{
// if (e.Message == "TypeError: Method or property not found")
// {
try
{
var result = await PreviewWithOutJs(id, input);
@@ -635,11 +635,11 @@ public class DataInterfaceService : IDataInterfaceService, IDynamicApiController
{
throw Oops.Oh(ErrorCode.COM1020);
}
}
else
{
throw Oops.Oh(ErrorCode.COM1020);
}
// }
// else
// {
// throw Oops.Oh(ErrorCode.COM1020);
// }
}
}
#endregion