| | |
| | | import com.hxzk.pojo.TbAchor; |
| | | import com.hxzk.pojo.TbHeartRecord; |
| | | import com.hxzk.pojo.TbRealinwarning; |
| | | import com.hxzk.pojo.TbUser; |
| | | import com.hxzk.service.HeartService; |
| | | import com.hxzk.service.RealinWarningService; |
| | | import com.hxzk.udp.Udp_Out; |
| | | import com.hxzk.util.SessionManager; |
| | | import com.hxzk.util.result; |
| | | import com.hxzk.util.resultutil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | public class HeartController { |
| | | @Autowired |
| | | HeartService heartService; |
| | | @Autowired |
| | | SessionManager sessionManager; |
| | | //心率记录 |
| | | @GetMapping("findxinlv") |
| | | result<List<TbHeartRecord>> findshishigaojing(Integer page, Integer limit){ |
| | |
| | | |
| | | //删除心率记录 |
| | | @GetMapping("deleteXinLv") |
| | | public void deleteanchor(Integer id){ |
| | | String xieyi = "BSTOCS1,DELETE,XINLV" + id + ",END"; |
| | | Udp_Out.udp_to_cs(xieyi); |
| | | public void deleteanchor(Integer id, HttpServletRequest request){ |
| | | TbUser user = sessionManager.getCurrentUser(request); |
| | | heartService.deleteanchor(id); |
| | | SystemLogController.InsertSystemLog(user.getUsername(),gettime(),"删除了一条率记录ID为:"+id,"Удален идентификатор записи частоты:"+id); |
| | | } |
| | | |
| | | //获取总超高异常次数/超低异常次数/正常次数 |
| | | @GetMapping("FindHeartZongCount") |
| | | public List FindHeartZongCount(){ |
| | | return heartService.FindHeartZongCount(); |
| | | } |
| | | |
| | | @GetMapping("FindTopCount") |
| | | public List<TbHeartRecord> FindTopCount(){ |
| | | return heartService.FindTopCount(); |
| | | } |
| | | public String gettime(){ |
| | | Date now = new Date(); |