1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- package com.lemon.lifecenter.scheduler.service;
- import java.util.ArrayList;
- import java.util.List;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.stereotype.Service;
- import com.lemon.lifecenter.scheduler.dto.DeviceInfoDTO;
- import com.lemon.lifecenter.scheduler.dto.PushResultDTO;
- import com.lemon.lifecenter.scheduler.dto.PushTargetTempDTO;
- import com.lemon.lifecenter.scheduler.dto.ScheduleDTO;
- import com.lemon.lifecenter.scheduler.mapper.PushMapper;
- @Service
- public class PushService {
- @Autowired
- private PushMapper mapper;
-
- public int resultTableCount(String ym) {
- return mapper.resultTableCount(ym);
- }
-
- public int createResultTable(String ym) {
- return mapper.createResultTable(ym);
- }
-
- public int selectSendPushCount() {
- return mapper.selectSendPushCount();
- }
-
- public List<ScheduleDTO> selectSendPushList() {
- return mapper.selectSendPushList();
- }
-
- public int updatePushSchedule(ScheduleDTO dto) {
- return mapper.updatePushSchedule(dto);
- }
- public int updatePushLog(ScheduleDTO dto) {
- return mapper.updatePushLog(dto);
- }
-
- public int insertPushLog(ScheduleDTO dto) {
- return mapper.insertPushLog(dto);
- }
-
- public int insertPushResult(PushResultDTO dto) {
- return mapper.insertPushResult(dto);
- }
-
- public int updatePushResult(PushResultDTO dto) {
- return mapper.updatePushResult(dto);
- }
-
- public List<DeviceInfoDTO> selectPushTarget(String targetType, ScheduleDTO dto) {
- int pushIdx = dto.getPushIdx();
- int centerCode = dto.getCenterCode();
- List<DeviceInfoDTO> result = new ArrayList<DeviceInfoDTO>();
-
- if (targetType.equals("P")) { // 환자 개별선택
- result = mapper.selectTargetPatient(pushIdx);
- } else if (targetType.equals("A")) { // 센터 전체
- result = mapper.selectTargetCenter(centerCode);
- } else if (targetType.equals("N")) { // 건강정보 미입력자
- result = mapper.selectTargetUnWritten(centerCode);
- } else if (targetType.equals("M")) { // 담당환자
- result = mapper.selectTargetMyPatient(dto);
- }
-
- return result;
- }
-
- /** 매일 **/
- public int selectEveryDaySendPushCount() {
- return mapper.selectEveryDaySendPushCount();
- }
-
- public List<ScheduleDTO> selectEveryDaySendPushList() {
- return mapper.selectEveryDaySendPushList();
- }
-
- public int insertEveryDayPushLog(ScheduleDTO dto) {
- return mapper.insertEveryDayPushLog(dto);
- }
-
- }
|