Commit 3e92581b by lcx

核算单元及组别数据验证

parent fda2b70d
...@@ -594,6 +594,19 @@ public ApiResponse AccountingDelete([FromRoute] int accountingId) ...@@ -594,6 +594,19 @@ public ApiResponse AccountingDelete([FromRoute] int accountingId)
return new ApiResponse(ResponseType.Fail); return new ApiResponse(ResponseType.Fail);
return new ApiResponse(ResponseType.OK); 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 #endregion
/// <summary> /// <summary>
......
...@@ -219,5 +219,11 @@ union all ...@@ -219,5 +219,11 @@ union all
return flag; 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) ...@@ -643,9 +643,15 @@ public bool AgainDelete(CofAgainRequest request)
/// <returns></returns> /// <returns></returns>
public List<cof_accounting> GetAccountingList(AccoungingRequest request) public List<cof_accounting> GetAccountingList(AccoungingRequest request)
{ {
var list = request.Type != 2 ? cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId) switch (request.Type)
: cofaccountingRepository.GetEntities(t => t.AllotId == request.AllotId && t.UnitType == request.UnitType); {
return list; 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> /// <summary>
...@@ -700,6 +706,17 @@ public bool AccountingDelete(int accountingId) ...@@ -700,6 +706,17 @@ public bool AccountingDelete(int accountingId)
return cofaccountingRepository.Remove(entity); return cofaccountingRepository.Remove(entity);
} }
/// <summary>
/// 删除数据
/// </summary>
/// <param name="accountingId"></param>
/// <returns></returns>
public void AccoungtingVerify(int allotId)
{
_directorRepository.VerifyAccountingAndUnittype(allotId);
}
#endregion #endregion
#region Copy #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