| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Calendar; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public DailyProductionVO querySameDayProduction(DateRequest query) { |
| | | public List<DailyProductionVO> querySameDayProduction(DateRequest query) { |
| | | if (StringUtils.isEmpty(query.getBeginDate())) { |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| | | query.setBeginDate(sdf.format(new Date())); |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.add(Calendar.DAY_OF_MONTH, -6); |
| | | query.setBeginDate(sdf.format(calendar.getTime())); |
| | | query.setEndDate(sdf.format(new Date())); |
| | | } |
| | | List<DailyProductionVO> list = largenScreenMapper.queryDailyProduction(query.getBeginDate(), query.getEndDate()); |
| | | return list.get(0); |
| | | return list; |
| | | } |
| | | |
| | | |