Blame view

parking-module-park/src/main/java/com/zteits/park/biz/TpPTgsPassedcarServiceImpl.java 2 KB
9af4a544   王彪总   新项目
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
  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<PageBean<TpPTgsPassedcarDTO>> queryPassedcar4Page(TpPTgsPassedcarRequest request) {
  		PageBean<TpPTgsPassedcarDTO> pageBean = new PageBean<TpPTgsPassedcarDTO>();
          if (request == null) {
              throw new BizException(ErrorType.PARAMM_NULL, "入参不能为空!");
          }
          PageInfo<TpPTgsPassedcar> 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<TpPTgsPassedcarDTO>>(pageBean);
  	}
  
  }