package com.unis.base.server.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.unis.base.common.vo.DYpxxHisVO;
import com.unis.base.common.vo.DYpxxQueryVO;
import com.unis.base.common.vo.DYpxxVO;
import com.unis.base.common.vo.EquipmentTypeVO;
import com.unis.base.common.vo.EquipmentTypequeryVO;
import com.unis.base.server.domain.DYpxxDomain;
import com.unis.base.server.domain.EquipmentTypeDomain;
import com.unis.base.server.entity.EquipmentTypeDO;
import com.unis.base.server.service.DYpxxService;
import com.unis.base.server.service.EquipmentTypeService;
import com.unis.common.utils.LsBeanUtils;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 设备类型
 * @author liuweilong
 *
 */
@Service
public class EquipmentTypeServiceImpl implements EquipmentTypeService {

    @Autowired
    private EquipmentTypeDomain equipmentTypeDomain;



	/**
	 * 查询设备类型
	 */
	@Override
	public EquipmentTypeVO getEquipmentTypeVOBysblxbh(String sblxbh) {
		EquipmentTypeDO geEquipmentTypeDO = equipmentTypeDomain.geEquipmentTypeDO(sblxbh);
		EquipmentTypeVO equipmentTypeVO = new EquipmentTypeVO();
		LsBeanUtils.copyAllProperties(geEquipmentTypeDO, equipmentTypeVO);


		return equipmentTypeVO;
	}


	/**
	 * 更新设备类型
	 */
	@Override
	public int update(EquipmentTypeVO equipmentTypeVO) {

		int update = equipmentTypeDomain.update(equipmentTypeVO);
		return update;
	}


	/**
	 * 删除设备类型
	 */
	@Override
	public int delete(String sblxbh) {
		int delete = equipmentTypeDomain.delete(sblxbh);
		return delete;
	}


	/**
	 * 新增设备类型
	 */
	@Override
	public int insert(EquipmentTypeVO equipmentTypeVO) {

		int insert = equipmentTypeDomain.insert(equipmentTypeVO);


		return insert;
	}


	/**
	 * 查询列表
	 * @param equipmentTypequeryVO
	 * @return
	 */
	@Override
	public List<EquipmentTypeVO> getEquipmentTypeList(EquipmentTypequeryVO equipmentTypequeryVO) {
		return equipmentTypeDomain.getEquipmentTypeList(equipmentTypequeryVO);
	}

	/**
     * 分页
     */
	@Override
	public List<EquipmentTypeVO> getEquipmentTypeListPage(EquipmentTypequeryVO equipmentTypequeryVO,
			Integer pageNum, Integer pageSize) {
		PageHelper.startPage(pageNum, pageSize);
		return equipmentTypeDomain.getEquipmentTypeList(equipmentTypequeryVO);
	}


}
