|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoSe.SeReversalMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoSe.SeReversal; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voSe.VoReversal; | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | //完善查询注销记录的起止时间 | 
|---|
|  |  |  | DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | LocalDateTime reversalTimeStart = queryVo.reversalTimeStart; | 
|---|
|  |  |  | LocalDateTime reversalTimeStop = queryVo.reversalTimeStop; | 
|---|
|  |  |  | String reversalTimeStart = queryVo.reversalTimeStart; | 
|---|
|  |  |  | String reversalTimeStop = queryVo.reversalTimeStop; | 
|---|
|  |  |  | if(reversalTimeStart != null) { | 
|---|
|  |  |  | reversalTimeStart = LocalDateTime.parse(df.format(reversalTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | 
|---|
|  |  |  | reversalTimeStart = reversalTimeStart + " 00:00:00"; | 
|---|
|  |  |  | queryVo.setReversalTimeStart (reversalTimeStart); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if(reversalTimeStop != null) { | 
|---|
|  |  |  | reversalTimeStop = LocalDateTime.parse(df.format(reversalTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | 
|---|
|  |  |  | reversalTimeStop = reversalTimeStop + " 23:59:59"; | 
|---|
|  |  |  | queryVo.setReversalTimeStop(reversalTimeStop); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VoReversal>> rsVo = new QueryResultVo<>() ; | 
|---|
|  |  |  | rsVo.pageSize = queryVo.pageSize ; | 
|---|
|  |  |  | rsVo.pageCurr = queryVo.pageCurr ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = seReversalMapper.getReversals(params); | 
|---|
|  |  |  | return rsVo ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加冲正记录 | 
|---|
|  |  |  | * @param po | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Long add(SeReversal po) { | 
|---|
|  |  |  | seReversalMapper.insert(po); | 
|---|
|  |  |  | return po.getId(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|