/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.sg.picking.activiti.service;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.sg.picking.activiti.entity.*;
import com.jeeplus.modules.sg.picking.activiti.mapper.PickIngMapper;
import com.jeeplus.modules.sg.picking.activiti.mapper.ShowListMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.ArrayList;
import java.util.List;

/**
 * 模块显示Service
 *
 * @author
 * @version 2019-11-08
 */
@Service
@Transactional(readOnly = true)
public class ShowListService extends CrudService<ShowListMapper, ShowList> {
	@Autowired
	private ShowListMapper showListMapper;

	@Override
	public Page<ShowList> findPage(Page<ShowList> page, ShowList entity) {
		return super.findPage(page, entity);
	}


/*	public Page<ShowList> findNewPage(Page<ShowList> page, ShowList entity) {
		dataRuleFilter(entity);
		entity.setPage(page);
		page.setList(mapper.findNewList(entity));
		return page;
	}*/


	public String findNumber(String projectId) {
		return showListMapper.findNumber(projectId);
	}

	/**
	 *保存项目提前领料流程信息
	 */
	@Transactional(readOnly = false)
	public void newSave(PickApplication pickApplication){
		pickApplication.preInsert();
		showListMapper.newSave(pickApplication);
	};

	/**
	 *修改项目信息状态
	 * */
	@Transactional(readOnly = false)
	public void projectUpdate(PickApplication pickApplication){
		showListMapper.projectUpdate(pickApplication);
	};

	public String selectProjectId(String id){
		return showListMapper.selectProjectId(id);
	};
}