| | |
| | | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoSe.SeUnlockMapper; |
| | | import com.dy.pipIrrGlobal.pojoSe.VoUnlock; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeUnlock; |
| | | import com.dy.pipIrrGlobal.voSe.VoUnlock; |
| | | 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 unlocklTimeStart = queryVo.unlocklTimeStart; |
| | | LocalDateTime unlockTimeStop = queryVo.unlockTimeStop; |
| | | String unlocklTimeStart = queryVo.unlocklTimeStart; |
| | | String unlockTimeStop = queryVo.unlockTimeStop; |
| | | if(unlocklTimeStart != null) { |
| | | unlocklTimeStart = LocalDateTime.parse(df.format(unlocklTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | unlocklTimeStart = unlocklTimeStart + " 00:00:00"; |
| | | queryVo.setUnlocklTimeStart(unlocklTimeStart); |
| | | } |
| | | |
| | | if(unlockTimeStop != null) { |
| | | unlockTimeStop = LocalDateTime.parse(df.format(unlockTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); |
| | | unlockTimeStop = unlockTimeStop + " 23:59:59"; |
| | | queryVo.setUnlockTimeStop(unlockTimeStop); |
| | | } |
| | | |
| | |
| | | Long itemTotal = seUnlockMapper.getRecordCount(params); |
| | | |
| | | QueryResultVo<List<VoUnlock>> rsVo = new QueryResultVo<>() ; |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr ; |
| | | Integer pageCurr = 0; |
| | | Integer pageSize = 10000; |
| | | rsVo.pageCurr = 1; |
| | | rsVo.pageSize = 10000; |
| | | if(queryVo.pageSize != null && queryVo.pageCurr != null) { |
| | | rsVo.pageSize = queryVo.pageSize ; |
| | | rsVo.pageCurr = queryVo.pageCurr; |
| | | pageSize = queryVo.pageSize ; |
| | | pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString()); |
| | | } |
| | | params.put("pageCurr", pageCurr); |
| | | params.put("pageSize", pageSize); |
| | | |
| | | rsVo.calculateAndSet(itemTotal, params); |
| | | rsVo.obj = seUnlockMapper.getUnlocks(params); |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * 添加解锁记录 |
| | | * @param po |
| | | * @return |
| | | */ |
| | | public Long add(SeUnlock po) { |
| | | seUnlockMapper.insert(po); |
| | | return po.getId(); |
| | | } |
| | | } |