Commit aaa926fe authored by xinglei's avatar xinglei

*)增加boolean类型

parent 204cd27f
......@@ -19,12 +19,15 @@ import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import com.baomidou.mybatisplus.core.metadata.IPage;
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;
......@@ -123,9 +126,9 @@ public class AlertCalledController extends BaseController {
queryWrapper.eq("alert_called_id", id);
// 警情动态表单数据
List<AlertFormValue> list = iAlertFormValueService.list(queryWrapper);
List<FormValue> formValue =new ArrayList();
for (AlertFormValue alertFormValue:list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(),alertFormValue.getFieldName(),"text",alertFormValue.getFieldValue());
List<FormValue> formValue = new ArrayList();
for (AlertFormValue alertFormValue : list) {
FormValue value = new FormValue(alertFormValue.getFieldCode(), alertFormValue.getFieldName(), "text", alertFormValue.getFieldValue());
formValue.add(value);
}
AlertCalledFormVo alertCalledFormVo = new AlertCalledFormVo(alertCalled, formValue);
......@@ -150,11 +153,9 @@ public class AlertCalledController extends BaseController {
if (alertCalled.getCallTimeStart() != null && alertCalled.getCallTimeEnd() != null) {
alertCalledQueryWrapper.between("call_time", alertCalled.getCallTimeStart(), alertCalled.getCallTimeEnd());
}
if(alertCalled.getIsFatherAlert()) {
if (!ValidationUtil.isEmpty(alertCalled.getIsFatherAlert())) {
alertCalledQueryWrapper.isNull("father_alert");
}
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
try {
field.setAccessible(true);
......@@ -168,6 +169,9 @@ 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)) {
Boolean fileValue = (Boolean) field.get(alertCalled);
alertCalledQueryWrapper.eq(name, fileValue);
}
}
} catch (Exception e) {
......@@ -201,8 +205,7 @@ public class AlertCalledController extends BaseController {
if (alertCalled.getCallTimeStart() != null && alertCalled.getCallTimeEnd() != null) {
alertCalledQueryWrapper.between("call_time", alertCalled.getCallTimeStart(), alertCalled.getCallTimeEnd());
}
if(alertCalled.getIsFatherAlert()) {
if (!ValidationUtil.isEmpty(alertCalled.getIsFatherAlert())) {
alertCalledQueryWrapper.isNull("father_alert");
}
Arrays.stream(aClass.getDeclaredFields()).forEach(field -> {
......@@ -218,6 +221,9 @@ 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)) {
Boolean fileValue = (Boolean) field.get(alertCalled);
alertCalledQueryWrapper.eq(name, fileValue);
}
}
} catch (Exception e) {
......
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