Commit 3e92581b by lcx

核算单元及组别数据验证

parent fda2b70d
......@@ -594,6 +594,19 @@ public ApiResponse AccountingDelete([FromRoute] int accountingId)
return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK);
}
/// <summary>
/// 核算单元及组别数据验证
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[Route("accountingverify/{allotId}")]
[HttpPost]
public ApiResponse AccountingVerify([FromRoute] int allotId)
{
_configService.AccoungtingVerify(allotId);
return new ApiResponse(ResponseType.OK);
}
#endregion
/// <summary>
......
......@@ -219,5 +219,11 @@ union all
return flag;
}
}
public int VerifyAccountingAndUnittype(int allotId)
{
return Execute("call proc_verify_accoungingunit_unittype(@allotId);", new { allotId });
}
}
}
......@@ -643,9 +643,15 @@ public bool AgainDelete(CofAgainRequest request)
/// <returns></returns>
public List<cof_accounting> GetAccountingList(AccoungingRequest request)
{
var list = request.Type != 2 ? cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId)
: cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId && t.UnitType == request.UnitType);
return list;
switch (request.Type)
{
case 1: //返回accounting列表
case 2: //返回核算单元类型
default:
return cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId);
case 3: //返回核算单元
return cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId && t.UnitType == request.UnitType);
}
}
/// <summary>
......@@ -700,6 +706,17 @@ public bool AccountingDelete(int accountingId)
return cofaccountingRepository.Remove(entity);
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="accountingId"></param>
/// <returns></returns>
public void AccoungtingVerify(int allotId)
{
_directorRepository.VerifyAccountingAndUnittype(allotId);
}
#endregion
#region Copy
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment