BUG
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using JNPF;
|
using JNPF;
|
||||||
using JNPF.Common.Core.Manager;
|
using JNPF.Common.Core.Manager;
|
||||||
|
using JNPF.Common.Enums;
|
||||||
using JNPF.DependencyInjection;
|
using JNPF.DependencyInjection;
|
||||||
using JNPF.DynamicApiController;
|
using JNPF.DynamicApiController;
|
||||||
using JNPF.Extras.CollectiveOAuth.Models;
|
using JNPF.Extras.CollectiveOAuth.Models;
|
||||||
@@ -457,15 +458,17 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (insertHList.Count <= 0 || insertDList.Count <= 0)
|
||||||
|
{
|
||||||
|
throw Oops.Bah(ErrorCode.COM1000);
|
||||||
|
}
|
||||||
|
|
||||||
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
int row1 = await db.Insertable(insertHList).ExecuteCommandAsync();
|
||||||
|
int row2 = await db.Insertable(insertDList).ExecuteCommandAsync();
|
||||||
|
if (row1 <= 0 || row2 <= 0)
|
||||||
{
|
{
|
||||||
await db.Insertable(insertHList).ExecuteCommandAsync();
|
throw Oops.Bah(ErrorCode.COM1000);
|
||||||
await db.Insertable(insertDList).ExecuteCommandAsync();
|
|
||||||
});
|
|
||||||
if (!result.IsSuccess)
|
|
||||||
{
|
|
||||||
throw Oops.Bah(result.ErrorMessage);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,11 @@ namespace Tnb.ProductionMgr
|
|||||||
public async Task<string> FixedPointDelivery()
|
public async Task<string> FixedPointDelivery()
|
||||||
{
|
{
|
||||||
string state = await _redisData.TryGetValueByKeyField<string>("YTCS", "State");
|
string state = await _redisData.TryGetValueByKeyField<string>("YTCS", "State");
|
||||||
if ("OK" != state) return "YTCS没开机";
|
if ("OK" != state)
|
||||||
|
{
|
||||||
|
Log.Error($"TCS没开机");
|
||||||
|
return "YTCS没开机";
|
||||||
|
}
|
||||||
string stateHxja = await _redisData.TryGetValueByKeyField<string>("hxjA", "State");
|
string stateHxja = await _redisData.TryGetValueByKeyField<string>("hxjA", "State");
|
||||||
string stateHxjc = await _redisData.TryGetValueByKeyField<string>("hxjC", "State");
|
string stateHxjc = await _redisData.TryGetValueByKeyField<string>("hxjC", "State");
|
||||||
List<String> hxjList = new List<string>();
|
List<String> hxjList = new List<string>();
|
||||||
@@ -250,7 +254,11 @@ namespace Tnb.ProductionMgr
|
|||||||
hxjList.Add("hxjC");
|
hxjList.Add("hxjC");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hxjList.IsEmpty()) return "hxjA,hxjC不正常";
|
if (hxjList.IsEmpty())
|
||||||
|
{
|
||||||
|
Log.Error($"hxjA,hxjC不正常");
|
||||||
|
return "hxjA,hxjC不正常";
|
||||||
|
}
|
||||||
string msg = "";
|
string msg = "";
|
||||||
List<EqpEquipment> equipments = await _db.Queryable<EqpEquipType>()
|
List<EqpEquipment> equipments = await _db.Queryable<EqpEquipType>()
|
||||||
.InnerJoin<EqpEquipment>((x, y) => x.id == y.equip_type_id)
|
.InnerJoin<EqpEquipment>((x, y) => x.id == y.equip_type_id)
|
||||||
|
|||||||
Reference in New Issue
Block a user