//package com.zteits.pay.biz; // //import java.text.SimpleDateFormat; //import java.util.ArrayList; //import java.util.Date; //import java.util.List; // //import org.apache.commons.lang3.StringUtils; // //import com.clouds.common.utils.ListCopyUtil; //import com.zteits.clouds.api.apibase.bean.BizResult; //import com.zteits.clouds.api.apibase.constants.ErrorType; //import com.zteits.clouds.api.apibase.exception.BizException; //import com.zteits.clouds.api.dto.clouds.dto.CustIncomeForPayTypeDTO; //import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalDTO; //import com.zteits.clouds.api.dto.clouds.dto.CustIncomeTotalParkDTO; //import com.zteits.clouds.api.dto.clouds.dto.InComeOfDayDTO; //import com.zteits.clouds.api.dto.clouds.dto.ParkingCountDTO; //import com.zteits.clouds.api.dto.clouds.param.CustIncomeTotalQueryRequset; //import com.zteits.clouds.api.dto.clouds.param.QueryInComeOfDayRequest; //import com.zteits.clouds.api.service.clouds.CustIncomeService; //import com.zteits.pay.dao.CustIncomeDao; //import com.zteits.pay.domain.CustIncomeForPayTypeDO; //import com.zteits.pay.domain.CustIncomeTotalDO; //import com.zteits.pay.domain.ParkingCountDO; //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; // ///** // * 企业客户下停车场收入情况-首页.
// * // * Copyright: Copyright (c) 2017 zteits // * // * @ClassName: CustIncomeService.java // * @Description: // * @version: v1.0.0 // * @author: wangfs // * @date: 2017年6月16日 下午2:55:20 // * Modification History: // * Date Author Version Description // * ---------------------------------------------------------* // * 2017年6月16日 wangfs v1.0.0 创建 // */ //@Service("com.zteits.pay.biz.CustIncomeServiceImpl") //public class CustIncomeServiceImpl implements CustIncomeService { // // private static final Logger logger = LoggerFactory.getLogger(CustIncomeServiceImpl.class); // @Autowired // private CustIncomeDao custIncomeDao; // // //private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // private SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd"); // // @Override // public BizResult queryCustIncomeTotal(CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) // throws Exception { // // CustIncomeTotalDTO custIncomeTotalDTO = new CustIncomeTotalDTO(); // if (custIncomeTotalQueryRequset != null) { // if (StringUtils.isEmpty(custIncomeTotalQueryRequset.getBeginTime())) { // custIncomeTotalQueryRequset.setBeginTime(formatDate.format(new Date()) + " 00:00:00"); // } // if (StringUtils.isEmpty(custIncomeTotalQueryRequset.getEndTime())) { // custIncomeTotalQueryRequset.setEndTime(formatDate.format(new Date()) + " 23:59:59"); // } // CustIncomeTotalDO custIncomeTotalDO = custIncomeDao.queryCustIncomeTotal(custIncomeTotalQueryRequset); // if (custIncomeTotalDO != null) { // BeanUtils.copyProperties(custIncomeTotalDO, custIncomeTotalDTO); // } // } else { // logger.info("入参为空"); // throw new BizException(ErrorType.PARAMM_NULL, "入参不能为空!"); // } // // return new BizResult(custIncomeTotalDTO); // } // // @Override // public BizResult queryCustIncomeTotalForPark( // CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) throws Exception { // CustIncomeTotalParkDTO custIncomeTotalDTO = new CustIncomeTotalParkDTO(); // if (custIncomeTotalQueryRequset != null) { // if (StringUtils.isEmpty(custIncomeTotalQueryRequset.getBeginTime())) { // custIncomeTotalQueryRequset.setBeginTime(formatDate.format(new Date()) + " 00:00:00"); // } // if (StringUtils.isEmpty(custIncomeTotalQueryRequset.getEndTime())) { // custIncomeTotalQueryRequset.setEndTime(formatDate.format(new Date()) + " 23:59:59"); // } // CustIncomeTotalDO custIncomeTotalDO = custIncomeDao.queryCustIncomeTotal(custIncomeTotalQueryRequset); // if (custIncomeTotalDO != null) { // BeanUtils.copyProperties(custIncomeTotalDO, custIncomeTotalDTO); // } // } else { // logger.info("入参为空"); // throw new BizException(ErrorType.PARAMM_NULL, "入参不能为空!"); // } // return new BizResult(custIncomeTotalDTO); // } // // @Override // public BizResult> queryCustIncomeForPayType( // CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) throws Exception { // List listDTO = new ArrayList(); // // if (custIncomeTotalQueryRequset != null) { // if (StringUtils.isEmpty(custIncomeTotalQueryRequset.getBeginTime())) { // custIncomeTotalQueryRequset.setBeginTime(formatDate.format(new Date()) + " 00:00:00"); // } // if (StringUtils.isEmpty(custIncomeTotalQueryRequset.getEndTime())) { // custIncomeTotalQueryRequset.setEndTime(formatDate.format(new Date()) + " 23:59:59"); // } // List list = custIncomeDao.queryCustIncomeForPayType( // custIncomeTotalQueryRequset); // ListCopyUtil.listCopyProperties(list, listDTO, CustIncomeForPayTypeDTO.class); // } else { // logger.info("入参为空"); // throw new BizException(ErrorType.PARAMM_NULL, "入参不能为空!"); // } // // return new BizResult>(listDTO); // } // // @Override // public BizResult> queryParingCount(CustIncomeTotalQueryRequset custIncomeTotalQueryRequset) // throws Exception { // List list = new ArrayList(); // List doList = custIncomeDao.queryParingCount(custIncomeTotalQueryRequset); // ListCopyUtil.listCopyProperties(doList, list, ParkingCountDTO.class); // return new BizResult>(list); // } // // @Override // public BizResult> queryIncomeOfDay(QueryInComeOfDayRequest request) { // List dtos = custIncomeDao.queryIncomeOfDay(request); // // return new BizResult<>(dtos); // } // //} //