|
@@ -363,15 +363,17 @@ public class EquipmentSendNotifyServiceImpl implements EquipmentSendNotifyServic
|
|
|
Calendar calendar = Calendar.getInstance();
|
|
|
Date date = new Date();
|
|
|
calendar.setTime(date);
|
|
|
+ int month = calendar.get(Calendar.MONTH)+1;
|
|
|
+ int year = calendar.get(Calendar.YEAR);
|
|
|
calendar.set(Calendar.DAY_OF_MONTH,1);
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
String newDate = simpleDateFormat.format(calendar.getTime());
|
|
|
- calendar.set(Calendar.MONTH, -11);
|
|
|
- String oldDate = simpleDateFormat.format(calendar.getTime());
|
|
|
+ // calendar.set(Calendar.MONTH, -11);
|
|
|
+ // String oldDate = simpleDateFormat.format(calendar.getTime());
|
|
|
// 查询距近一年时间内未完成保养/润滑任务
|
|
|
- List<EquMaintenanceTaskDo> maintenanceTaskDoList = maintenanceTaskService.getListByTimeQuantum(newDate, oldDate);
|
|
|
+ List<EquMaintenanceTaskDo> maintenanceTaskDoList = maintenanceTaskService.getListByTimeQuantum(year, month, true);
|
|
|
List<EquLubricationTaskManagementDo> lubricationTaskManagementDoList = equLubricationTaskManagementService
|
|
|
- .getListByTimeQuantum(newDate, oldDate);
|
|
|
+ .getListByTimeQuantum(year, month,true );
|
|
|
if (maintenanceTaskDoList.size() + lubricationTaskManagementDoList.size() == 0) {
|
|
|
return R.ok();
|
|
|
}
|
|
@@ -449,13 +451,15 @@ public class EquipmentSendNotifyServiceImpl implements EquipmentSendNotifyServic
|
|
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
calendar.setTime(date);
|
|
|
String newDate = simpleDateFormat.format(date);
|
|
|
- // int sky = calendar.get(Calendar.DAY_OF_MONTH)-1;
|
|
|
- calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
- String oldDate = simpleDateFormat.format(calendar.getTime());
|
|
|
+ // // int sky = calendar.get(Calendar.DAY_OF_MONTH)-1;
|
|
|
+ // calendar.set(Calendar.DAY_OF_MONTH, 1);
|
|
|
+ // String oldDate = simpleDateFormat.format(calendar.getTime());
|
|
|
+ int year = calendar.get(Calendar.YEAR);
|
|
|
+ int month = calendar.get(Calendar.MONTH)+1;
|
|
|
// 查询距近一年时间内未完成保养/润滑任务
|
|
|
- List<EquMaintenanceTaskDo> maintenanceTaskDoList = maintenanceTaskService.getListByTimeQuantum(newDate, oldDate);
|
|
|
+ List<EquMaintenanceTaskDo> maintenanceTaskDoList = maintenanceTaskService.getListByTimeQuantum(year, month, false);
|
|
|
List<EquLubricationTaskManagementDo> lubricationTaskManagementDoList = equLubricationTaskManagementService
|
|
|
- .getListByTimeQuantum(newDate, oldDate);
|
|
|
+ .getListByTimeQuantum(year, month, false );
|
|
|
if (maintenanceTaskDoList.size() + lubricationTaskManagementDoList.size() == 0) {
|
|
|
return R.ok();
|
|
|
}
|