设备维修bug
This commit is contained in:
@@ -113,7 +113,7 @@ namespace Tnb.EquipMgr
|
|||||||
eqpRepairApply.org_id = (string)input.data["org_id"];
|
eqpRepairApply.org_id = (string)input.data["org_id"];
|
||||||
eqpRepairApply.remark = input.data.ContainsKey("remark") ? (string)input.data["remark"] : "";
|
eqpRepairApply.remark = input.data.ContainsKey("remark") ? (string)input.data["remark"] : "";
|
||||||
eqpRepairApply.description = input.data.ContainsKey("description") ? (string)input.data["description"] : "";
|
eqpRepairApply.description = input.data.ContainsKey("description") ? (string)input.data["description"] : "";
|
||||||
eqpRepairApply.status = RepairApplyStatus.TOBEEXECUTED;
|
eqpRepairApply.status = RepairApplyStatus.TOBERECEIVED;
|
||||||
|
|
||||||
_ = await _repository.InsertAsync(eqpRepairApply);
|
_ = await _repository.InsertAsync(eqpRepairApply);
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ namespace Tnb.EquipMgr
|
|||||||
{
|
{
|
||||||
throw Oops.Bah("状态错误");
|
throw Oops.Bah("状态错误");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
@@ -194,7 +194,7 @@ namespace Tnb.EquipMgr
|
|||||||
|
|
||||||
string id = dic["id"];
|
string id = dic["id"];
|
||||||
EqpRepairApply eqpRepairApply = await _repository.GetSingleAsync(x => x.id == id);
|
EqpRepairApply eqpRepairApply = await _repository.GetSingleAsync(x => x.id == id);
|
||||||
if (eqpRepairApply.status == RepairApplyStatus.TOBEEXECUTED)
|
if (eqpRepairApply.status == RepairApplyStatus.TOBERECEIVED)
|
||||||
{
|
{
|
||||||
if (await _repository.AsSugarClient().Queryable<UserRelationEntity>().AnyAsync(x => x.UserId == _userManager.UserId && x.ObjectId == "26586914497557"))
|
if (await _repository.AsSugarClient().Queryable<UserRelationEntity>().AnyAsync(x => x.UserId == _userManager.UserId && x.ObjectId == "26586914497557"))
|
||||||
{
|
{
|
||||||
@@ -364,7 +364,7 @@ namespace Tnb.EquipMgr
|
|||||||
switch (input.status)
|
switch (input.status)
|
||||||
{
|
{
|
||||||
case "1":
|
case "1":
|
||||||
statusList.Add(RepairApplyStatus.TOBEEXECUTED);
|
statusList.Add(RepairApplyStatus.TOBERECEIVED);
|
||||||
statusList.Add(RepairApplyStatus.REFUSE);
|
statusList.Add(RepairApplyStatus.REFUSE);
|
||||||
break;
|
break;
|
||||||
case "2":
|
case "2":
|
||||||
@@ -374,6 +374,7 @@ namespace Tnb.EquipMgr
|
|||||||
statusList.Add(RepairApplyStatus.APPROVEPASS);
|
statusList.Add(RepairApplyStatus.APPROVEPASS);
|
||||||
statusList.Add(RepairApplyStatus.APPROVENOTPASS);
|
statusList.Add(RepairApplyStatus.APPROVENOTPASS);
|
||||||
statusList.Add(RepairApplyStatus.TOBEOUTAPPLY);
|
statusList.Add(RepairApplyStatus.TOBEOUTAPPLY);
|
||||||
|
statusList.Add(RepairApplyStatus.REFUSE);
|
||||||
break;
|
break;
|
||||||
case "3":
|
case "3":
|
||||||
statusList.Add(RepairApplyStatus.COMPLETED);
|
statusList.Add(RepairApplyStatus.COMPLETED);
|
||||||
@@ -436,7 +437,7 @@ namespace Tnb.EquipMgr
|
|||||||
EqpRepairApply eqpRepairApply = await _repository.GetSingleAsync(x => x.id == input.id);
|
EqpRepairApply eqpRepairApply = await _repository.GetSingleAsync(x => x.id == input.id);
|
||||||
if (eqpRepairApply.status == RepairApplyStatus.REPEATCHECKING)
|
if (eqpRepairApply.status == RepairApplyStatus.REPEATCHECKING)
|
||||||
{
|
{
|
||||||
string status = input.repeat_result=="1" ? RepairApplyStatus.COMPLETED : RepairApplyStatus.TOBEEXECUTED;
|
string status = input.repeat_result=="1" ? RepairApplyStatus.COMPLETED : RepairApplyStatus.TOBERECEIVED;
|
||||||
await _repository.AsSugarClient().Updateable<EqpRepairApply>()
|
await _repository.AsSugarClient().Updateable<EqpRepairApply>()
|
||||||
.SetColumns(x => x.repeat_result == input.repeat_result)
|
.SetColumns(x => x.repeat_result == input.repeat_result)
|
||||||
.SetColumns(x => x.repeat_descrip == input.repeat_descrip)
|
.SetColumns(x => x.repeat_descrip == input.repeat_descrip)
|
||||||
|
|||||||
Reference in New Issue
Block a user