package com.zteits.park.biz; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageInfo; import com.zteits.clouds.api.apibase.bean.BizResult; import com.zteits.clouds.api.apibase.bean.PageBean; import com.zteits.clouds.api.apibase.constants.ErrorType; import com.zteits.clouds.api.apibase.exception.BizException; import com.zteits.clouds.api.dto.park.dto.TpPTgsPassedcarDTO; import com.zteits.clouds.api.dto.park.param.TpPTgsPassedcarRequest; import com.zteits.clouds.api.service.park.TpPTgsPassedcarService; import com.zteits.park.biz.eqp.oper.TpPPdaOperServiceImpl; import com.zteits.park.dao.TpPTgsPassedcardaDao; import com.zteits.park.domain.TpPTgsPassedcar; import com.zteits.park.pagepager.PageBeanUtil; import org.springframework.stereotype.Service; @Service("com.zteits.park.biz.TpPTgsPassedcarServiceImpl") public class TpPTgsPassedcarServiceImpl implements TpPTgsPassedcarService { private static final Logger logger = LoggerFactory.getLogger(TpPPdaOperServiceImpl.class); @Autowired private TpPTgsPassedcardaDao tpPTgsPassedcardaDao; @Override public BizResult> queryPassedcar4Page(TpPTgsPassedcarRequest request) { PageBean pageBean = new PageBean(); if (request == null) { throw new BizException(ErrorType.PARAMM_NULL, "入参不能为空!"); } PageInfo pageInfo = tpPTgsPassedcardaDao.queryTpPRegionAreaForPage(request); if (pageInfo != null && pageInfo.getList() != null && pageInfo.getList().size() > 0) { PageBeanUtil.copyProperties(pageInfo, pageBean, TpPTgsPassedcarDTO.class); } else { logger.info("没有查询到过车信息..."); } logger.info("---end-过车分页查询,结果={}", JSONObject.toJSON(pageBean)); return new BizResult>(pageBean); } }