AsraOpRueryServiceImpl.java 2.4 KB
package com.zteits.oa.report.biz;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.zteits.oa.api.base.bean.BizResult;
import com.zteits.oa.api.base.bean.PageBean;
import com.zteits.oa.api.dto.asraop.AsraOpDTO;
import com.zteits.oa.api.dto.asraop.param.AsraOpQueryReq;
import com.zteits.oa.api.service.report.query.AsraOpRueryService;
import com.zteits.oa.report.dao.AsraOpDao;
import com.zteits.oa.report.domain.AsraOp;
import com.zteits.oa.util.pagepaper.PageBeanUtil;
/**
 * 工时系统操作员实现类.<br/>
 * 
 * Copyright: Copyright (c) 2017  ZTE-ITS
 * 
 * @ClassName: AmountUtils.java
 * @Description: 
 * @version: v1.0.0
 * @author: wangfs
 * @date: 2018年7月30日
 * Modification History:
 * Date             Author          Version            Description
 *---------------------------------------------------------*
 * 2018年7月30日      wangfs           v1.0.0               创建
 */
@Service("")
public class AsraOpRueryServiceImpl implements AsraOpRueryService {

	private static final Logger logger = LoggerFactory.getLogger(AsraOpRueryServiceImpl.class); 
	@Autowired
	private AsraOpDao asraOpDao;
	/**
	 * 分页查询工时系统员工信息.<br/>
	 * @param asraOpQueryReq
	 * @return
	 * 2018年7月30日  wangfs.<br/>
	 */
	@Override
	public BizResult<PageBean<AsraOpDTO>> queryAsraOpForPage(AsraOpQueryReq asraOpQueryReq) {
		logger.info("---begin查询分页员工信息..入参={}",JSONObject.toJSON(asraOpQueryReq));
		PageBean<AsraOpDTO> pageBean = new PageBean<AsraOpDTO>();
		PageInfo<AsraOp> pageInfo = asraOpDao.queryAsraOpForPage(asraOpQueryReq);
		PageBeanUtil.copyProperties(pageInfo, pageBean, AsraOpDTO.class);
		logger.info("---end查询分页员工信息..");
		return new BizResult<PageBean<AsraOpDTO>>(pageBean);
	}
	/**
	 * 获取员工信息.<br/>
	 * @param asraOpQueryRe
	 * @return
	 * 2018年7月31日  wangfs.<br/>
	 */
	@Override
	public BizResult<AsraOpDTO> queryAsraOp(AsraOpQueryReq asraOpQueryRe) {
		AsraOpDTO asraOpDTO = new AsraOpDTO();
		AsraOp queryAsraOp = asraOpDao.queryAsraOp(asraOpQueryRe);
		if(queryAsraOp != null){
			BeanUtils.copyProperties(queryAsraOp, asraOpDTO);
		}
		return new BizResult<AsraOpDTO>(asraOpDTO);
	}

}