package com.palmnest.service.notice;

import com.palmnest.application.bean.AppResultDto;
import com.palmnest.application.bean.Page;
import com.palmnest.application.dto.DeptGroupDto;
import com.palmnest.application.dto.DeptGroupVo;
import com.palmnest.application.dto.DeptUserVo;
import com.palmnest.application.dto.output.NoticeDto;
import com.palmnest.model.User;
import com.palmnest.model.notice.AppNoticeModel;
import com.palmnest.service.GenericManager;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

public interface AppNoticeManager extends GenericManager<AppNoticeModel, Integer> {
	/**
	 * @return
	 * @throws Exception
	 */
	public Page getDataList(Map<String, Object> map, int pageNo, int pageSize) throws Exception;

	public Page getNewDataList(Map<String, Object> map, int pageNo, int pageSize) throws Exception;

	public AppNoticeModel getDataById(int id) throws Exception;

	public NoticeDto getDetailById(int id, int type,int from) throws Exception;

	public AppNoticeModel saveOrUpdateAppNoticeModel(AppNoticeModel appNotice);

	/**
	 * 首页公告待审核数量
	 *
	 * @return
	 */
	public Integer getTotal(String orgIds);

	public void pushMessage(Long id, String code, String url, String title, String content, List<User> users) throws Exception;

	public List<NoticeDto> finByType(Integer noticeType, String positionType, String orgIds);

	public NoticeDto convertToDto(AppNoticeModel notice);

	AppResultDto getOrgListByCity(String orgIds, String city);

	void setTopByNum(int parseInt, String userId, Integer num);

	void unSetTop(int parseInt, String toString);
	
	List<Map<String,Object>> getApprovalRole(Integer orgId,String syscode);
	
	String getRoleIds(User user);
	
	List<DeptUserVo> getDeptGroupUserListByOrgId(DeptGroupVo vo);
	
	AppResultDto setUserInfo(String orgId,List<DeptGroupDto> dtoList,int type);
}
