| | |
| | | package com.dy.pipIrrWechat.issue; |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeIssueReportMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeIssueReport; |
| | | import com.dy.pipIrrGlobal.voSe.VoIssueReport; |
| | | import com.dy.pipIrrWechat.issue.qo.QoIssueReport; |
| | | 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.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | seIssueReportMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | |
| | | /** |
| | | * 根据指定条件获取农户问题上报 |
| | | * @param queryVo |
| | | * @return |
| | | */ |
| | | public QueryResultVo<List<VoIssueReport>> getIssueReports(QoIssueReport queryVo) { |
| | | //完善查询充值记录的起止时间 |
| | | String timeStart = queryVo.getTimeStart(); |
| | | String timeStop = queryVo.getTimeStop(); |
| | | if (timeStart != null) { |
| | | timeStart = timeStart + " 00:00:00"; |
| | | queryVo.setTimeStart(timeStart); |
| | | } |
| | | if (timeStop != null) { |
| | | timeStop = timeStop + " 23:59:59"; |
| | | queryVo.setTimeStop(timeStop); |
| | | } |
| | | |
| | | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(queryVo); |
| | | |
| | | Long itemTotal = seIssueReportMapper.getIssueReportsCount(params); |
| | | QueryResultVo<List<VoIssueReport>> rsVo = new QueryResultVo<>(); |
| | | |
| | | rsVo.pageSize = queryVo.pageSize; |
| | | rsVo.pageCurr = queryVo.pageCurr; |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = seIssueReportMapper.getIssueReports(params); |
| | | return rsVo; |
| | | } |
| | | |
| | | /** |
| | | * 删除农户问题上报 |
| | | * @param issueReportId |
| | | * @return |
| | | */ |
| | | public Integer deleteIssueReport(Long issueReportId) { |
| | | return seIssueReportMapper.deleteIssueReport(issueReportId); |
| | | } |
| | | |
| | | } |