This commit is contained in:
2024-08-29 17:12:24 +08:00
parent c7f93be0c5
commit f59b70427b
3 changed files with 31 additions and 5 deletions

View File

@@ -72,6 +72,7 @@ namespace Tnb.ProductionMgr
private static readonly Dictionary<string, object> _dicWorkLine = new();
private static readonly Dictionary<string, object> _dicProcess = new();
private readonly ISqlSugarClient _db;
private ISqlSugarClient _db2;
private readonly IBillRullService _billRuleService;
private readonly IPrdInstockService _prdInstockService;
private readonly WmsPrdInstockHService _wmsPrdInstockHService;
@@ -1114,7 +1115,7 @@ namespace Tnb.ProductionMgr
/// <exception cref="ArgumentNullException"></exception>
/// <exception cref="NotImplementedException"></exception>
[HttpPost]
public async Task<dynamic> PrdTaskRelease(PrdTaskReleaseUpInput input,ISqlSugarClient db = null)
public async Task<dynamic> PrdTaskRelease(PrdTaskReleaseUpInput input)
{
int row = -1;
if (input is null)
@@ -1132,9 +1133,14 @@ namespace Tnb.ProductionMgr
}
bool tranFlag = true;
if (db==null)
ISqlSugarClient db = null;
if (_db2!=null)
{
tranFlag = false;
db = _db2;
}
else
{
db = _repository.AsSugarClient();
}
@@ -1628,6 +1634,13 @@ namespace Tnb.ProductionMgr
return "保存成功";
}
public async Task<dynamic> PrdTaskRelease2(PrdTaskReleaseUpInput input,ISqlSugarClient db)
{
this._db2 = db;
await PrdTaskRelease(input);
return "保存成功";
}
public async void TimeCallback(object args)
{
@@ -3946,6 +3959,12 @@ namespace Tnb.ProductionMgr
return !result.IsSuccess ? throw Oops.Oh(ErrorCode.COM1008) : (dynamic)(result.IsSuccess ? "操作成功" : result.ErrorMessage);
}
[HttpPost]
public async Task<PrdMoTask> GetSchedulingInfo(string id)
{
return await _db.Queryable<PrdMoTask>().SingleAsync(x => x.id == id);
}
}