2023-07-24 小程序巡检增加常规巡检
This commit is contained in:
@@ -40,18 +40,19 @@ namespace WebAPI.Controllers
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="states"></param>
|
||||
/// <param name="type"> 0 日常巡检 1 常规巡检</param>
|
||||
/// <param name="pageIndex">页码</param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getHazardRegisterByProjectIdStates(string projectId, string states, int pageIndex)
|
||||
public Model.ResponeData getHazardRegisterByProjectIdStates(string projectId, string states,int type, int pageIndex )
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
List<Model.HazardRegisterItem> getDataList = new List<Model.HazardRegisterItem>();
|
||||
int pageCount = Funs.DB.HSSE_Hazard_HazardRegister.Count(x => x.ProjectId == projectId && (x.States == states || states == null));
|
||||
int pageCount = Funs.DB.HSSE_Hazard_HazardRegister.Count(x => x.ProjectId == projectId && x.Type == type && (x.States == states || states == null));
|
||||
if (pageCount > 0 && pageIndex > 0)
|
||||
{
|
||||
getDataList = APIHazardRegisterService.getHazardRegisterByProjectIdStates(projectId, states, pageIndex);
|
||||
getDataList = APIHazardRegisterService.getHazardRegisterByProjectIdStates(projectId, states, type, pageIndex);
|
||||
}
|
||||
responeData.data = new { pageCount, getDataList };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user