This commit is contained in:
2024-09-02 09:05:03 +08:00
3 changed files with 89 additions and 73 deletions

View File

@@ -1667,7 +1667,15 @@ namespace Tnb.ProductionMgr
if (qcCheckPlanAdds.Count == 1) if (qcCheckPlanAdds.Count == 1)
{ {
int hour = int.Parse(qcCheckPlanAdds[0].content.Split(" ")[2].Split("/")[1]); int hour = int.Parse(qcCheckPlanAdds[0].content.Split(" ")[2].Split("/")[1]);
int minute = int.Parse(qcCheckPlanAdds[0].content.Split(" ")[1].Split("/")[1]);
if (hour > 0)
{
TimerPoolHelper.GetInstance().StartTimer(TimeCallback2,prdTaskList.Where(p => p.mo_task_status == "Pause" || p.mo_task_status == "ToBeStarted").ToList(),TimeSpan.FromHours(hour),Timeout.InfiniteTimeSpan,false); TimerPoolHelper.GetInstance().StartTimer(TimeCallback2,prdTaskList.Where(p => p.mo_task_status == "Pause" || p.mo_task_status == "ToBeStarted").ToList(),TimeSpan.FromHours(hour),Timeout.InfiniteTimeSpan,false);
}else if (minute > 0)
{
TimerPoolHelper.GetInstance().StartTimer(TimeCallback2,prdTaskList.Where(p => p.mo_task_status == "Pause" || p.mo_task_status == "ToBeStarted").ToList(),TimeSpan.FromMinutes(minute),Timeout.InfiniteTimeSpan,false);
}
} }
} }
@@ -2451,6 +2459,9 @@ namespace Tnb.ProductionMgr
{ {
throw Oops.Bah(result2.msg !=null ? result2.msg : "生产入库接口报错"); throw Oops.Bah(result2.msg !=null ? result2.msg : "生产入库接口报错");
} }
//来源erp需要调接口
if (prdMo.data_sources == "1")
{
List<DictionaryDataEntity> unitDatas = await db.Queryable<DictionaryTypeEntity>() List<DictionaryDataEntity> unitDatas = await db.Queryable<DictionaryTypeEntity>()
.LeftJoin<DictionaryDataEntity>((x, y) => x.Id == y.DictionaryTypeId) .LeftJoin<DictionaryDataEntity>((x, y) => x.Id == y.DictionaryTypeId)
.Where((x, y) => x.EnCode == DictConst.MeasurementUnit && y.EnCode==report.unit_id) .Where((x, y) => x.EnCode == DictConst.MeasurementUnit && y.EnCode==report.unit_id)
@@ -2524,11 +2535,15 @@ namespace Tnb.ProductionMgr
thirdWebapiRecord.third_name = WmsWareHouseConst.BIP; thirdWebapiRecord.third_name = WmsWareHouseConst.BIP;
thirdWebapiRecord.name = "生产报告"; thirdWebapiRecord.name = "生产报告";
thirdWebapiRecord.method = "POST"; thirdWebapiRecord.method = "POST";
thirdWebapiRecord.url = config.value+"uapws/rest/pwrnew/save"; // thirdWebapiRecord.url = config.value+"uapws/rest/pwrnew/save";
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN+"uapws/rest/pwrnew/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(erpRequestData); thirdWebapiRecord.request_data = JsonConvert.SerializeObject(erpRequestData);
thirdWebapiRecord.create_time = DateTime.Now; thirdWebapiRecord.create_time = DateTime.Now;
await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync(); await _db.Insertable(thirdWebapiRecord).ExecuteCommandAsync();
}
if (prdMoTask.schedule_type == 2) if (prdMoTask.schedule_type == 2)
{ {

View File

@@ -2965,8 +2965,8 @@ namespace Tnb.WarehouseMgr
thirdWebapiRecord.third_name = WmsWareHouseConst.BIP; thirdWebapiRecord.third_name = WmsWareHouseConst.BIP;
thirdWebapiRecord.name = "其它入库"; thirdWebapiRecord.name = "其它入库";
thirdWebapiRecord.method = "POST"; thirdWebapiRecord.method = "POST";
// thirdWebapiRecord.url = config.value+"uapws/rest/generalin/save"; // thirdWebapiRecord.url = config.value + "uapws/rest/generalin/save";
thirdWebapiRecord.url = config.value + "uapws/rest/generalin/save"; thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/generalin/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData); thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData);
thirdWebapiRecord.create_time = DateTime.Now; thirdWebapiRecord.create_time = DateTime.Now;

View File

@@ -1101,7 +1101,8 @@ namespace Tnb.WarehouseMgr
thirdWebapiRecord.third_name = WmsWareHouseConst.BIP; thirdWebapiRecord.third_name = WmsWareHouseConst.BIP;
thirdWebapiRecord.name = "其它出库"; thirdWebapiRecord.name = "其它出库";
thirdWebapiRecord.method = "POST"; thirdWebapiRecord.method = "POST";
thirdWebapiRecord.url = config.value + "uapws/rest/generalout/save"; // thirdWebapiRecord.url = config.value + "uapws/rest/generalout/save";
thirdWebapiRecord.url = WmsWareHouseConst.BIP_DOMAIN + "uapws/rest/generalout/save";
thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData); thirdWebapiRecord.request_data = JsonConvert.SerializeObject(requestData);
thirdWebapiRecord.create_time = DateTime.Now; thirdWebapiRecord.create_time = DateTime.Now;