| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.LocalTime; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | |
| | | return result; |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> selectShiftQuantitySv(Map<String, Object> reportingWork) { |
| | | String creatorId = (String) reportingWork.get("userId"); |
| | | List<LocalDateTime> dateList = (List<LocalDateTime>) reportingWork.get("searchDate"); |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | String startDate = LocalDateTime.now().with(LocalTime.MIN).format(formatter); |
| | | String endDate = LocalDateTime.now().format(formatter); |
| | | if (dateList.get(0)!=null){ |
| | | startDate = String.valueOf(dateList.get(0)); |
| | | } |
| | | if (dateList.get(1)!=null){ |
| | | endDate = String.valueOf(dateList.get(1)); |
| | | } |
| | | List<String> date = new ArrayList<>(); |
| | | date.add(startDate); |
| | | date.add(endDate); |
| | | Map<String, Object> result = new HashMap<>(); |
| | | result.put("data",orderProcessDetailMapper.selectShiftQuantitySv(creatorId, startDate, endDate)); |
| | | result.put("date",date); |
| | | return result; |
| | | } |
| | | } |