Commit 17bb97b7 authored by xinglei's avatar xinglei

*)接警

parent b2dfeeba
......@@ -110,5 +110,5 @@ public class AlertCalled extends BaseEntity {
@TableField(exist=false)
@ApiModelProperty(value = "是否处警")
private Boolean isFatherAlert;
private Boolean isFatherAlert = false;
}
......@@ -27,7 +27,6 @@ import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -153,8 +152,10 @@ public class AlertCalledController extends BaseController {
if (alertCalled.getCallTimeStart() != null && alertCalled.getCallTimeEnd() != null) {
alertCalledQueryWrapper.between("call_time", alertCalled.getCallTimeStart(), alertCalled.getCallTimeEnd());
}
if (!ValidationUtil.isEmpty(alertCalled.getIsFatherAlert())) {
if (alertCalled.getIsFatherAlert()) { // 0:接警;1:处警
alertCalledQueryWrapper.isNull("father_alert");
} else {
alertCalledQueryWrapper.isNotNull("father_alert");
}
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
......@@ -169,7 +170,7 @@ public class AlertCalledController extends BaseController {
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(alertCalled);
alertCalledQueryWrapper.eq(name, fileValue);
} else if (type.equals(Boolean.class)) {
} else if (type.equals(Boolean.class) && !"IS_FATHER_ALERT".equals(name)) {
Boolean fileValue = (Boolean) field.get(alertCalled);
alertCalledQueryWrapper.eq(name, fileValue);
}
......@@ -205,8 +206,10 @@ public class AlertCalledController extends BaseController {
if (alertCalled.getCallTimeStart() != null && alertCalled.getCallTimeEnd() != null) {
alertCalledQueryWrapper.between("call_time", alertCalled.getCallTimeStart(), alertCalled.getCallTimeEnd());
}
if (!ValidationUtil.isEmpty(alertCalled.getIsFatherAlert())) {
if (alertCalled.getIsFatherAlert()) { // 0:接警;1:处警
alertCalledQueryWrapper.isNull("father_alert");
} else {
alertCalledQueryWrapper.isNotNull("father_alert");
}
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
......@@ -221,7 +224,7 @@ public class AlertCalledController extends BaseController {
} else if (type.equals(String.class)) {
String fileValue = (String) field.get(alertCalled);
alertCalledQueryWrapper.eq(name, fileValue);
} else if (type.equals(Boolean.class)) {
} else if (type.equals(Boolean.class) && !"IS_FATHER_ALERT".equals(name)) {
Boolean fileValue = (Boolean) field.get(alertCalled);
alertCalledQueryWrapper.eq(name, fileValue);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment