|  |  |  | 
|---|
|  |  |  | package com.dy.pipIrrSell.activeCard; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoBa.BaClientMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoSe.SeActiveCardMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoSe.SeClientCardMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoSe.SeClientMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoSe.SeActiveCard; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voBa.VoAreaCode; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voSe.VoActiveCard; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.dubbo.common.utils.PojoUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.time.LocalDateTime; | 
|---|
|  |  |  | import java.time.format.DateTimeFormatter; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  | import java.util.Map; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private SeClientCardMapper seClientCardMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //@Autowired | 
|---|
|  |  |  | //private BaClientMapper baClientMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private BaClientMapper baClientMapper; | 
|---|
|  |  |  | private SeClientMapper seClientMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public QueryResultVo<List<VoActiveCard>> getActiveCards(QueryVo queryVo) { | 
|---|
|  |  |  | //完善查询开卡记录的起止时间 | 
|---|
|  |  |  | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | LocalDateTime activeTimeStart = queryVo.activeTimeStart; | 
|---|
|  |  |  | LocalDateTime activeTimeStop = queryVo.activeTimeStop; | 
|---|
|  |  |  | String activeTimeStart = queryVo.activeTimeStart; | 
|---|
|  |  |  | String activeTimeStop = queryVo.activeTimeStop; | 
|---|
|  |  |  | if(activeTimeStart != null) { | 
|---|
|  |  |  | activeTimeStart = LocalDateTime.parse(df.format(activeTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | 
|---|
|  |  |  | activeTimeStart = activeTimeStart + " 00:00:00"; | 
|---|
|  |  |  | queryVo.setActiveTimeStart(activeTimeStart); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(activeTimeStop != null) { | 
|---|
|  |  |  | activeTimeStop = LocalDateTime.parse(df.format(activeTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | 
|---|
|  |  |  | activeTimeStop = activeTimeStop + " 23:59:59"; | 
|---|
|  |  |  | queryVo.setActiveTimeStop(activeTimeStop); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoActiveCard>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = queryVo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = queryVo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = seActiveCardMapper.getActiveCards(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | 
|---|
|  |  |  | * @param clientNum 农户编号 | 
|---|
|  |  |  | * @return 5级行政区划代码 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public VoAreaCode getAreaCodeByNum(String clientNum) { | 
|---|
|  |  |  | return baClientMapper.getAreaCodeByNum(clientNum); | 
|---|
|  |  |  | public Long getAreaCodeByNum(String clientNum) { | 
|---|
|  |  |  | return seClientMapper.getAreaCodeByNum(clientNum); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 根据农户编号获取农户ID | 
|---|
|  |  |  | * @param clientNum | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Long getClientIdByNum(String clientNum) { | 
|---|
|  |  |  | return seClientMapper.getClientIdByNum(clientNum); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|