|
@@ -111,7 +111,7 @@ public class AppointmentService {
|
|
for (Map<String, Object> child : tempMzDepartments.getData()) {
|
|
for (Map<String, Object> child : tempMzDepartments.getData()) {
|
|
MzDept childDepartment = new MzDept(child.get("code").toString(), child.get("name").toString());
|
|
MzDept childDepartment = new MzDept(child.get("code").toString(), child.get("name").toString());
|
|
List<Map<String, Object>> grandChildrenMap = CastUtil.cast(child.get("children"));
|
|
List<Map<String, Object>> grandChildrenMap = CastUtil.cast(child.get("children"));
|
|
- if (null != grandChildrenMap && grandChildrenMap.size() > 0) {
|
|
|
|
|
|
+ if (null != grandChildrenMap && !grandChildrenMap.isEmpty()) {
|
|
List<MzDept> grandChildren = new ArrayList<>();
|
|
List<MzDept> grandChildren = new ArrayList<>();
|
|
for (Map<String, Object> grandChild : grandChildrenMap) {
|
|
for (Map<String, Object> grandChild : grandChildrenMap) {
|
|
grandChildren.add(new MzDept(grandChild.get("code").toString(), grandChild.get("name").toString()));
|
|
grandChildren.add(new MzDept(grandChild.get("code").toString(), grandChild.get("name").toString()));
|
|
@@ -188,7 +188,7 @@ public class AppointmentService {
|
|
if (data.getResultCode() == -1) {
|
|
if (data.getResultCode() == -1) {
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, data.getResultMessage());
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR, data.getResultMessage());
|
|
}
|
|
}
|
|
- if (data.getData().size() == 0) {
|
|
|
|
|
|
+ if (data.getData().isEmpty()) {
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
|
|
}
|
|
}
|
|
if (param.getNightClinic()) {
|
|
if (param.getNightClinic()) {
|
|
@@ -238,7 +238,7 @@ public class AppointmentService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (data.getData().size() == 0) {
|
|
|
|
|
|
+ if (data.getData().isEmpty()) {
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
|
|
return ResultVoUtil.fail(ExceptionEnum.SLIGHTLY_ERROR);
|
|
}
|
|
}
|
|
return ResultVoUtil.success(data.getData());
|
|
return ResultVoUtil.success(data.getData());
|
|
@@ -337,7 +337,7 @@ public class AppointmentService {
|
|
return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, response.getString("message"));
|
|
return ResultVoUtil.fail(ExceptionEnum.INTERNAL_SERVER_ERROR, response.getString("message"));
|
|
}
|
|
}
|
|
JSONArray data = response.getJSONArray("data");
|
|
JSONArray data = response.getJSONArray("data");
|
|
- if (null == data || data.size() == 0) {
|
|
|
|
|
|
+ if (null == data || data.isEmpty()) {
|
|
return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
|
|
return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
|
|
}
|
|
}
|
|
List<MzyReqrec> list = new ArrayList<>();
|
|
List<MzyReqrec> list = new ArrayList<>();
|