获取护理类指令当天已正常执行的指令数量、超时或未完成的指令数量、当天待执行的指令数量
This commit is contained in:
parent
e646713208
commit
64458fab2d
|
|
@ -260,6 +260,50 @@ public class CareDirectiveApi {
|
||||||
return Result.OK(result);
|
return Result.OK(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取指令数量
|
||||||
|
*
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping(value = "/getDirectivePlanCountByNuID")
|
||||||
|
public Result<Map<String, Object>> getDirectivePlanCountByNuID(CareDirectiveEntity dto) {
|
||||||
|
Map<String, Object> result = Maps.newHashMap();
|
||||||
|
|
||||||
|
//当天已执行完数据
|
||||||
|
CareDirectiveEntity queryParams = new CareDirectiveEntity();
|
||||||
|
queryParams.setNuId(dto.getNuId());
|
||||||
|
queryParams.setQueryDate(new Date());
|
||||||
|
List<DirectiveOrderEntity> history = directiveOrderApi.queryHistory(queryParams);
|
||||||
|
|
||||||
|
int yzx = 0;
|
||||||
|
int yc = 0;
|
||||||
|
if (!CollectionUtils.isEmpty(history)) {
|
||||||
|
// 未结束就是未执行;结束时间在应该结束时间后就是超时
|
||||||
|
for (DirectiveOrderEntity item : history) {
|
||||||
|
if ("N".equals(item.getIzFinish())) {
|
||||||
|
// 未执行
|
||||||
|
yc++;
|
||||||
|
} else if (item.getFinishTime().after(item.getEndTime())) {
|
||||||
|
// 超时
|
||||||
|
yc++;
|
||||||
|
} else {
|
||||||
|
// 正常
|
||||||
|
yzx++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//待执行
|
||||||
|
dto.setQueryFuture(true);
|
||||||
|
List<DirectiveOrderEntity> dzxList = careDirectivePlanApi.queryFuture(dto);
|
||||||
|
|
||||||
|
result.put("yzx", yzx);//已执行
|
||||||
|
result.put("dzx", dzxList.size());//待执行
|
||||||
|
result.put("yc", yc);//异常
|
||||||
|
return Result.ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取护理单元中的即时指令信息
|
* 获取护理单元中的即时指令信息
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue