|
@@ -332,20 +332,20 @@ public class EnvironmentControlServiceImpl implements IEnvironmentControlService
|
|
|
@Override
|
|
|
@DS("master")
|
|
|
public void save(DeviceUpDataEntity[] forObject) {
|
|
|
- warningInfoEntityRepo.updateShowStatusByWarningType();
|
|
|
- List<FarmSm> all = farmSmRepository.findAll();
|
|
|
|
|
|
+
|
|
|
+ List<FarmSm> all = farmSmRepository.findAll();
|
|
|
+ warningInfoEntityRepo.updateShowStatusByWarningType();
|
|
|
if (forObject == null){
|
|
|
for (FarmSm farmSm : all) {
|
|
|
WarningInfoEntity warningInfoEntity = new WarningInfoEntity();
|
|
|
warningInfoEntity.setLQID(farmSm.getLqid());
|
|
|
- warningInfoEntity.setType("设备故障");
|
|
|
+ warningInfoEntity.setType("设备故障,当天无数据上传");
|
|
|
warningInfoEntity.setUploadTime(new Date());
|
|
|
warningInfoEntity.setShowStatus(0);
|
|
|
warningInfoEntity.setWarningType(1);
|
|
|
warningInfoEntityRepo.save(warningInfoEntity);
|
|
|
}
|
|
|
-
|
|
|
}else {
|
|
|
List list1= new ArrayList();
|
|
|
List list2= new ArrayList();
|
|
@@ -355,10 +355,8 @@ public class EnvironmentControlServiceImpl implements IEnvironmentControlService
|
|
|
for (FarmSm farmSm : all) {
|
|
|
list2.add(farmSm.getLqid());
|
|
|
}
|
|
|
-
|
|
|
Collection<String> subtract = CollectionUtils.subtract(list2, list1);
|
|
|
if (subtract == null){
|
|
|
- warningInfoEntityRepo.updateShowStatusByWarningType();
|
|
|
return;
|
|
|
}else {
|
|
|
for (String s : subtract) {
|