bug
This commit is contained in:
@@ -200,6 +200,11 @@ namespace Tnb.EquipMgr
|
|||||||
public async Task<string> RepeatMaintain(MaintainRecordRepeatInput input)
|
public async Task<string> RepeatMaintain(MaintainRecordRepeatInput input)
|
||||||
{
|
{
|
||||||
var db = _repository.AsSugarClient();
|
var db = _repository.AsSugarClient();
|
||||||
|
EqpMaintainRecordH eqpMaintainRecordH = await _repository.GetSingleAsync(x => x.id == input.id);
|
||||||
|
if (eqpMaintainRecordH.status == "1")
|
||||||
|
{
|
||||||
|
throw Oops.Bah("状态错误");
|
||||||
|
}
|
||||||
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,7 @@ namespace Tnb.EquipMgr
|
|||||||
DbResult<bool> result = await _repository.AsSugarClient().Ado.UseTranAsync(async () =>
|
DbResult<bool> result = await _repository.AsSugarClient().Ado.UseTranAsync(async () =>
|
||||||
{
|
{
|
||||||
EqpSpotInsRecordH eqpSpotInsRecordH = _repository.GetSingle(x=>x.id==input.id);
|
EqpSpotInsRecordH eqpSpotInsRecordH = _repository.GetSingle(x=>x.id==input.id);
|
||||||
|
|
||||||
string status = "";
|
string status = "";
|
||||||
if (eqpSpotInsRecordH.is_repeat == "1")
|
if (eqpSpotInsRecordH.is_repeat == "1")
|
||||||
{
|
{
|
||||||
@@ -184,6 +185,11 @@ namespace Tnb.EquipMgr
|
|||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task RepeatSpotIns(SpotInsRecordRepeatInput input)
|
public async Task RepeatSpotIns(SpotInsRecordRepeatInput input)
|
||||||
{
|
{
|
||||||
|
EqpSpotInsRecordH eqpSpotInsRecordH = await _repository.GetSingleAsync(x => x.id == input.id);
|
||||||
|
if (eqpSpotInsRecordH.status == "1")
|
||||||
|
{
|
||||||
|
throw Oops.Bah("状态错误");
|
||||||
|
}
|
||||||
await _repository.UpdateAsync(x => new EqpSpotInsRecordH()
|
await _repository.UpdateAsync(x => new EqpSpotInsRecordH()
|
||||||
{
|
{
|
||||||
repeat_result = input.repeat_result,
|
repeat_result = input.repeat_result,
|
||||||
|
|||||||
Reference in New Issue
Block a user