火点重构-完善检查重复火点的规则

This commit is contained in:
liuchengqian 2023-03-29 11:09:51 +08:00
parent ce85cf0b42
commit c240261336

View File

@ -33,6 +33,7 @@ public class FirePointFilterUtils {
public static boolean checkDuplicated(FirePointOrdinaryDao firePointDao, FirePointOrdinaryEntity firePointEntity) {
Specification<FirePointOrdinaryEntity> specification = (root, criteriaQuery, criteriaBuilder) -> {
List<Predicate> predicateList = new ArrayList<>();
predicateList.add(criteriaBuilder.equal(root.get("fireCode").as(String.class), firePointEntity.getFireCode()));
predicateList.add(criteriaBuilder.equal(root.get("longitude").as(Double.class), firePointEntity.getLongitude()));
predicateList.add(criteriaBuilder.equal(root.get("latitude").as(Double.class), firePointEntity.getLatitude()));
predicateList.add(criteriaBuilder.equal(root.get("satelliteTime").as(String.class), firePointEntity.getSatelliteTime()));