| | |
| | | |
| | | private OthStatisticWorkloadMapper workloadDao; |
| | | private PrOrderMapper orderDao; |
| | | private OthStatisticWorkloadMapper statisticWorkDao; |
| | | |
| | | @Autowired |
| | | public void setOrderDao(PrOrderMapper orderDao) { |
| | |
| | | this.workloadDao = workloadDao; |
| | | } |
| | | |
| | | @Autowired |
| | | public void setStatisticWorkDao(OthStatisticWorkloadMapper statisticWorkDao) { |
| | | this.statisticWorkDao = statisticWorkDao; |
| | | } |
| | | |
| | | public Map<String, Object> getDeviceInfo(String deviceNo) { |
| | | if (StringUtils.isBlank(deviceNo)) { |
| | |
| | | return list; |
| | | } |
| | | |
| | | //没写完 |
| | | public List<JSONObject> queryOrderList() { |
| | | List<JSONObject> list = assemblyPlanDao.queryPlanList(); |
| | | /* Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(); |
| | |
| | | List<JSONObject> list = deviceProductionLogDao.queryTopError(startDt, endDt); |
| | | return list; |
| | | } |
| | | public List<JSONObject> queryAttendUser() { |
| | | public JSONObject queryAttendUser() { |
| | | Date startDt = Date.from(LocalDateTime.of(LocalDate.now().minusDays(2000), LocalTime.of(0, 0, 0)).atZone(ZoneId.systemDefault()).toInstant()); |
| | | Date endDt = new Date(); |
| | | Date todayDt = Date.from(LocalDateTime.of(LocalDate.now(), LocalTime.of(0, 0, 0)).atZone(ZoneId.systemDefault()).toInstant()); |
| | | List<JSONObject> list = assemblyWorkLastDao.queryAttendUser(startDt, endDt,todayDt); |
| | | if(list.size() == 0){ |
| | | JSONObject obj = new JSONObject(); |
| | | obj.set("require_attend", "0"); |
| | | obj.set("actual_attend", "0"); |
| | | return obj; |
| | | } |
| | | return list.get(0); |
| | | } |
| | | |
| | | public List<JSONObject> queryStatisticWork() { |
| | | Date startDt = Date.from(LocalDateTime.of(LocalDate.now(), LocalTime.of(0, 0, 0)).atZone(ZoneId.systemDefault()).toInstant()); |
| | | Date endDt = new Date(); |
| | | List<JSONObject> list = statisticWorkDao.queryStatisticWork(startDt, endDt); |
| | | return list; |
| | | } |
| | | public JSONObject queryStatisticOrder() { |
| | | List<JSONObject> list = orderDao.queryStatisticOrder(); |
| | | if(list.size() == 0){ |
| | | JSONObject obj = new JSONObject(); |
| | | obj.set("total", "0"); |
| | | obj.set("year_total", "0"); |
| | | obj.set("complete", "0"); |
| | | obj.set("uncomplete", "0"); |
| | | return obj; |
| | | } |
| | | return list.get(0); |
| | | } |
| | | } |