This commit is contained in:
2024-10-08 11:33:48 +08:00
12 changed files with 26 additions and 23 deletions

View File

@@ -2092,8 +2092,9 @@ namespace Tnb.ProductionMgr
}else if (mo.mo_type == DictConst.PrdMoTypeJC && prdMoTask.is_hand_set_batch==0)
{
EqpEquipment equipment = await _db.Queryable<EqpEquipment>().SingleAsync(x => x.id == prdMoTask.eqp_id);
ToolMolds toolMolds = await _db.Queryable<ToolMolds>().SingleAsync(x => x.id == prdMoTask.mold_id);
batch = $"6{toolMolds.mold_code.Substring(toolMolds.mold_code.Length - 4, 2)}{DateTime.Now.ToString("yyMMdd")}";
batch = $"6{toolMolds.mold_code.Substring(toolMolds.mold_code.Length - 4, 2)}{equipment.code.Substring(equipment.code.Length - 2, 2)}{DateTime.Now.ToString("yyMMdd")}";
await db.Updateable<PrdMoTask>()
.SetColumns(x => x.batch == batch)
.Where(x => x.id == prdMoTask.id)
@@ -2659,7 +2660,7 @@ namespace Tnb.ProductionMgr
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN+"uapws/rest/pwrnew/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(erpRequestData);
thirdWebapiRecord.create_time = DateTime.Now;
thirdWebapiRecord.remark = $"载具编号:{report?.material_box_code ?? ""}";
thirdWebapiRecord.remark = $"【PrdMoTaskService ReportInstock】载具编号:{report?.material_box_code ?? ""}";
await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
if(callErp.value=="1"){