1.质检不合格,选择时间区间;2.生产入库记录增加工单类型及物料的查询条件;3.产成品入库同步BIP成功后,相关信息记录到生产入库记录

This commit is contained in:
2024-10-22 13:54:43 +08:00
parent 7c9a64e5eb
commit 48299687c2
7 changed files with 153 additions and 25 deletions

View File

@@ -28,6 +28,7 @@ using Tnb.ProductionMgr.Entities.Dto;
using Tnb.WarehouseMgr.Entities.Enums;
using Tnb.ProductionMgr.Entities.Dto.PrdManage;
using Tnb.WarehouseMgr.Entities;
using JNPF.Common.Extension;
namespace Tnb.QcMgr
{
@@ -284,6 +285,19 @@ namespace Tnb.QcMgr
QcCheckExecH.check_type = CheckTaskInput.check_type;
QcCheckExecH.remark = CheckTaskInput.remark;
QcCheckExecH.attachment = CheckTaskInput.attachment;
#region
if (CheckTaskInput.result == "no")//质检结论不合格,记录暂控时间
{
if(CheckTaskInput.startEndTime==null || CheckTaskInput.startEndTime.Length <= 1)
{
throw Oops.Bah("不合格时,请选择时间区间");
}
QcCheckExecH.control_start_time = CheckTaskInput.startEndTime[0].TimeStampToDateTime().ToString("yyyy-MM-dd HH:mm:ss");
QcCheckExecH.control_end_time = CheckTaskInput.startEndTime[1].TimeStampToDateTime().ToString("yyyy-MM-dd HH:mm:ss");
}
#endregion
List<QcCheckExecD> QcCheckExecDs = await db.Queryable<QcCheckExecD>().Where(p => p.mainid == CheckTaskInput.mainid).ToListAsync();
int rqty = 0;
@@ -514,6 +528,7 @@ namespace Tnb.QcMgr
qty = a.qty,
equip_name = h.name,
checktypes = new List<List<Checktype>>(),
attachment = a.attachment,
}).FirstAsync();
Result.checktypes = new List<List<Checktype>>();
if (!string.IsNullOrEmpty(QcCheckExecH.carry_code))