|
|
|
@ -12,6 +12,7 @@ import com.glxp.udidl.common.res.BaseResponse;
|
|
|
|
|
import com.glxp.udidl.common.util.ResultVOUtils;
|
|
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.scheduling.annotation.Async;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
@ -127,6 +128,7 @@ public class DeviceSyncService {
|
|
|
|
|
jobLogService.insert(jobLog);
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
@Async
|
|
|
|
|
public void downloadUdi(String day,String downloadType){
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
@ -151,17 +153,23 @@ public class DeviceSyncService {
|
|
|
|
|
* @param endDate
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Async
|
|
|
|
|
public BaseResponse downloadUdi(Date startDate, Date endDate){
|
|
|
|
|
if(startDate.getTime() > endDate.getTime())
|
|
|
|
|
return ResultVOUtils.error(-1,"起始日期不能大于结束日期!");
|
|
|
|
|
Date fdate=startDate;
|
|
|
|
|
for (int i=0;fdate.getTime()<=endDate.getTime();i++){
|
|
|
|
|
while (fdate.getTime()<=endDate.getTime()){
|
|
|
|
|
String day=DateUtil.formatDate(fdate);
|
|
|
|
|
downloadUdi(day,"manual");
|
|
|
|
|
fdate = DateUtil.addDays(fdate,1);
|
|
|
|
|
}
|
|
|
|
|
/*for (int i=0;fdate.getTime()<=endDate.getTime();i++){
|
|
|
|
|
String day=DateUtil.formatDate(fdate);
|
|
|
|
|
downloadUdi(day,"manual");
|
|
|
|
|
//System.out.println(fdate);
|
|
|
|
|
i++;
|
|
|
|
|
fdate = DateUtil.addDays(fdate,1);
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
return ResultVOUtils.success("执行完成,详情请查看日志!");
|
|
|
|
|
}
|
|
|
|
|
public BaseResponse downloadByDi(String deviceId){
|
|
|
|
|