|
|
@@ -514,24 +514,29 @@ public class ResumptionBusiness {
|
|
|
List<AppResumptionDataRemarkimg> allImgs = appResumptionTaskDataRemarkimgService
|
|
|
.list(new LambdaUpdateWrapper<AppResumptionDataRemarkimg>()
|
|
|
.eq(AppResumptionDataRemarkimg::getResumptionId, request.getTaskId()));
|
|
|
- try {
|
|
|
- for (ResumptionPointVo pointVo : pointList) {
|
|
|
- List<ResumptionNfcVo> nfclista = nfclist.stream().filter(r -> r.getPointId().equals(pointVo.getPointid())).collect(Collectors.toList());
|
|
|
- if (nfclista != null && nfclista.size() > 0) {
|
|
|
- nfclista.forEach(r -> r.setNfcdataid(IDHelper.id()));
|
|
|
- }
|
|
|
- pointVo.setPointnfclist(nfclista == null ? new ArrayList<>() : nfclista);
|
|
|
+ nfclist.forEach(nfc -> {
|
|
|
+ if (ObjectUtil.isNull(nfc.getNfcdataid())) {
|
|
|
+ nfc.setNfcdataid(IDHelper.id());
|
|
|
+ }
|
|
|
+ });
|
|
|
+// try {
|
|
|
+// for (ResumptionPointVo pointVo : pointList) {
|
|
|
+// List<ResumptionNfcVo> nfclista = nfclist.stream().filter(r -> r.getPointId().equals(pointVo.getPointid())).collect(Collectors.toList());
|
|
|
+// if (nfclista != null && nfclista.size() > 0) {
|
|
|
+// nfclista.forEach(r -> r.setNfcdataid(IDHelper.id()));
|
|
|
+// }
|
|
|
+// pointVo.setPointnfclist(nfclista == null ? new ArrayList<>() : nfclista);
|
|
|
//如果是布撤防数据要显示默认时间
|
|
|
|
|
|
|
|
|
- DateTime datetime = new DateTime();
|
|
|
- datetime.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
|
|
- Date startTime = datetime.setField(DateField.HOUR_OF_DAY, 0).setField(DateField.MINUTE, 0).setField(DateField.SECOND, 0);
|
|
|
- Date endTime = DateUtil.endOfDay(datetime).offset(DateField.MILLISECOND, -999);
|
|
|
- SimpleDateFormat sdftb = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- sdftb.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
|
|
- String strStartTime = sdftb.format(startTime);
|
|
|
- String strEndTime = sdftb.format(endTime);
|
|
|
+// DateTime datetime = new DateTime();
|
|
|
+// datetime.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
|
|
+// Date startTime = datetime.setField(DateField.HOUR_OF_DAY, 0).setField(DateField.MINUTE, 0).setField(DateField.SECOND, 0);
|
|
|
+// Date endTime = DateUtil.endOfDay(datetime).offset(DateField.MILLISECOND, -999);
|
|
|
+// SimpleDateFormat sdftb = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+// sdftb.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
|
|
|
+// String strStartTime = sdftb.format(startTime);
|
|
|
+// String strEndTime = sdftb.format(endTime);
|
|
|
// //撤防时间
|
|
|
// ProtectionLog log = null;
|
|
|
// if ((pointVo.getPointid().equals("3916620810321920") || pointVo.getPointname().equals("入侵报警撤防时间")) && pointVo.getTimeType() == 1) {
|
|
|
@@ -551,11 +556,11 @@ public class ResumptionBusiness {
|
|
|
// dealWithPointBusinessData(pointVo,resumption,plan);
|
|
|
// }
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
+// }
|
|
|
+//
|
|
|
+// } catch (Exception e) {
|
|
|
+// e.printStackTrace();
|
|
|
+// }
|
|
|
//将数据按区域分组
|
|
|
Map<Long, List<ResumptionPointVo>> pointListMap = pointList.stream().collect(Collectors.groupingBy(r -> r.getAreaid()));
|
|
|
for (Long key : pointListMap.keySet()) {
|
|
|
@@ -710,7 +715,7 @@ public class ResumptionBusiness {
|
|
|
}
|
|
|
//获取履职数据异常的数据个数
|
|
|
int exceptionCount = (int) appResumptionDataService.count((new QueryWrapper<AppResumptionData>()).lambda().eq(AppResumptionData::getResumptionId, request.getResumptionId()).eq(AppResumptionData::getResValue, 1));
|
|
|
- if(CollectionUtil.isNotEmpty(resumptionProtections)){
|
|
|
+ if (CollectionUtil.isNotEmpty(resumptionProtections)) {
|
|
|
coreResumptionDataProtectionService.saveBatch(resumptionProtections);
|
|
|
}
|
|
|
resumption.setExceptionCount(exceptionCount);
|