添加规格型号
This commit is contained in:
@@ -298,7 +298,7 @@ namespace Tnb.QcMgr
|
||||
#region 质检结论不合格, 需要记录暂控时间区间,并且记录载具信息
|
||||
if (CheckTaskInput.result == "no")//质检结论不合格,记录暂控时间
|
||||
{
|
||||
if(CheckTaskInput.startEndTime==null || CheckTaskInput.startEndTime.Length <= 1)
|
||||
if (CheckTaskInput.startEndTime == null || CheckTaskInput.startEndTime.Length <= 1)
|
||||
{
|
||||
throw Oops.Bah("不合格时,请选择时间区间");
|
||||
}
|
||||
@@ -406,9 +406,10 @@ namespace Tnb.QcMgr
|
||||
mesCheckdCallbackUpinput.maintableid = QcCheckExecH.extras;
|
||||
mesCheckdCallbackUpinput.check_conclusion = dic.Where(p => p.Key == CheckTaskInput.result).Any() ? dic.Where(p => p.Key == CheckTaskInput.result).First().Value : 0;
|
||||
await _wmsPurchaseService.MesCheckdPurchaseCallback(mesCheckdCallbackUpinput);
|
||||
}else if (QcCheckExecH.checktype == WmsWareHouseConst.LINGBUJIANZUIZHONGJIANYAN_ID)
|
||||
}
|
||||
else if (QcCheckExecH.checktype == WmsWareHouseConst.LINGBUJIANZUIZHONGJIANYAN_ID)
|
||||
{
|
||||
PrdReport prdReport = await db.Queryable<PrdReport>().SingleAsync(x=>x.id==QcCheckExecH.report_id);
|
||||
PrdReport prdReport = await db.Queryable<PrdReport>().SingleAsync(x => x.id == QcCheckExecH.report_id);
|
||||
decimal pqty = prdReport.reported_qty.Value - rqty;
|
||||
if (rqty > Decimal.Parse(QcCheckExecH.checknum))
|
||||
{
|
||||
@@ -429,9 +430,10 @@ namespace Tnb.QcMgr
|
||||
pqty = pqty,
|
||||
rqty = rqty,
|
||||
check_result = ((EnumCheckConclusion)dic[CheckTaskInput.result]).ToString(),
|
||||
},prdReport,db);
|
||||
}, prdReport, db);
|
||||
}
|
||||
}else if (QcCheckExecH.checktype == WmsWareHouseConst.XUNJIAN_ID || QcCheckExecH.checktype == WmsWareHouseConst.SHOUJIAN_ID || QcCheckExecH.checktype == WmsWareHouseConst.MOJIAN_ID )
|
||||
}
|
||||
else if (QcCheckExecH.checktype == WmsWareHouseConst.XUNJIAN_ID || QcCheckExecH.checktype == WmsWareHouseConst.SHOUJIAN_ID || QcCheckExecH.checktype == WmsWareHouseConst.MOJIAN_ID)
|
||||
{
|
||||
PrdMoTask prdMoTask = await db.Queryable<PrdMoTask>().Where(x => x.mo_task_code == QcCheckExecH.mo_task_code && x.id != null).FirstAsync();
|
||||
if (CheckTaskInput.result == "no")
|
||||
@@ -606,20 +608,22 @@ namespace Tnb.QcMgr
|
||||
{
|
||||
TaskIds = NPOI.Util.Arrays.AsList(prdMoTask.id),
|
||||
Behavior = "Compled",
|
||||
},db);
|
||||
}, db);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await db.Ado.CommitTranAsync();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
await db.Ado.RollbackTranAsync();
|
||||
JNPF.Logging.Log.Error(e.Message,e);
|
||||
throw Oops.Oh("执行失败:"+e.Message);
|
||||
JNPF.Logging.Log.Error(e.Message, e);
|
||||
throw Oops.Oh("执行失败:" + e.Message);
|
||||
}
|
||||
finally{
|
||||
finally
|
||||
{
|
||||
prdreportSemaphore.Release();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,4 +10,142 @@ namespace Tnb.WarehouseMgr.Entities.Dto.Inputs
|
||||
{
|
||||
public string? id { get; set; }
|
||||
}
|
||||
|
||||
public class TransferInstockDListOutput
|
||||
{
|
||||
public string id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属组织
|
||||
/// </summary>
|
||||
public string? org_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库单ID
|
||||
/// </summary>
|
||||
public string? bill_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 执行状态
|
||||
/// </summary>
|
||||
public string? status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物品ID
|
||||
/// </summary>
|
||||
public string? material_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物品代码
|
||||
/// </summary>
|
||||
public string? material_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位ID
|
||||
/// </summary>
|
||||
public string? unit_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位代码
|
||||
/// </summary>
|
||||
public string? unit_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库需求数量
|
||||
/// </summary>
|
||||
public decimal? pr_qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已下发数量
|
||||
/// </summary>
|
||||
public decimal? xf_qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实际入库数量
|
||||
/// </summary>
|
||||
public decimal? qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程任务Id
|
||||
/// </summary>
|
||||
public string? f_flowtaskid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程引擎Id
|
||||
/// </summary>
|
||||
public string? f_flowid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规格型号
|
||||
/// </summary>
|
||||
public string? material_desc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建用户
|
||||
/// </summary>
|
||||
public string? create_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime? create_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改用户
|
||||
/// </summary>
|
||||
public string? modify_id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 修改时间
|
||||
/// </summary>
|
||||
public DateTime? modify_time { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 批号
|
||||
/// </summary>
|
||||
public string? pi_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 库存地点
|
||||
/// </summary>
|
||||
public string? stock_location { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// erp_line_pk
|
||||
/// </summary>
|
||||
public string? erp_line_pk { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 行号
|
||||
/// </summary>
|
||||
public string? lineno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料名称
|
||||
/// </summary>
|
||||
public string? material_name { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性
|
||||
/// </summary>
|
||||
public string auxprop { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性 供应商
|
||||
/// </summary>
|
||||
public string auxprop_gys { get; set; }
|
||||
/// <summary>
|
||||
/// 辅助属性 小批号
|
||||
/// </summary>
|
||||
public string auxprop_xph { get; set; }
|
||||
public string udi_code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料规格
|
||||
/// </summary>
|
||||
public string? material_specification { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料型号(箱号)
|
||||
/// </summary>
|
||||
public string? material_standard { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using Senparc.Weixin.MP.AdvancedAPIs.Card;
|
||||
using SqlSugar;
|
||||
using Tnb.BasicData.Entities;
|
||||
using Tnb.EquipMgr;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
@@ -75,7 +76,39 @@ namespace Tnb.WarehouseMgr
|
||||
var data = JsonConvert.DeserializeObject<dynamic>(json);
|
||||
JArray mainTable = data.list;
|
||||
|
||||
ISugarQueryable<WmsTransferInstockD> wmsTransferInstockDs = _db.Queryable<WmsTransferInstockD>().Where(r => mainTable.Select(r => r["id"].ToString()).ToList().Contains(r.bill_id));
|
||||
var wmsTransferInstockDs = _db.Queryable<WmsTransferInstockD>().LeftJoin<BasMaterial>((a, b) => a.material_id == b.id).Where((a, b) => mainTable.Select(r => r["id"].ToString()).ToList().Contains(a.bill_id)).Select((a, b) => new TransferInstockDListOutput
|
||||
{
|
||||
id = a.id,
|
||||
org_id = a.org_id,
|
||||
bill_id = a.bill_id,
|
||||
status = a.status,
|
||||
material_id = a.material_id,
|
||||
material_code = a.material_code,
|
||||
unit_id = a.unit_id,
|
||||
unit_code = a.unit_code,
|
||||
pr_qty = a.pr_qty,
|
||||
xf_qty = a.xf_qty,
|
||||
qty = a.qty,
|
||||
f_flowid = a.f_flowid,
|
||||
f_flowtaskid = a.f_flowtaskid,
|
||||
material_desc = a.material_desc,
|
||||
create_id = a.create_id,
|
||||
create_time = a.create_time,
|
||||
modify_id = a.modify_id,
|
||||
modify_time = a.modify_time,
|
||||
pi_code = a.pi_code,
|
||||
stock_location = a.stock_location,
|
||||
erp_line_pk = a.erp_line_pk,
|
||||
lineno = a.lineno,
|
||||
material_name = a.material_name,
|
||||
auxprop = a.auxprop,
|
||||
auxprop_gys = a.auxprop_gys,
|
||||
auxprop_xph = a.auxprop_xph,
|
||||
udi_code = a.udi_code,
|
||||
material_specification = b.material_specification,
|
||||
material_standard = b.material_standard
|
||||
|
||||
});
|
||||
|
||||
foreach (JObject wmsTransferInstockH in mainTable)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user