|
@ -6977,15 +6977,20 @@ public class StatisticsEsService {
|
|
|
*/
|
|
|
public JSONObject getAllFunctionSetting() {
|
|
|
JSONObject result = new JSONObject();
|
|
|
String sql = " SELECT dict_code \"functionCode\",dict_value \"functionName\" FROM wlyy_hospital_sys_dict WHERE dict_name='FUNCTION_SETTING' ORDER BY sort ";
|
|
|
String sql = " SELECT dict_code \"functionCode\",dict_value \"functionName\",py_code \"img\" FROM wlyy_hospital_sys_dict WHERE dict_name='FUNCTION_SETTING' ORDER BY sort ";
|
|
|
List<Map<String, Object>> functionList = jdbcTemplate.queryForList(sql);
|
|
|
result.put("list", functionList);
|
|
|
List<String[]> list = new ArrayList<>();
|
|
|
for (Map<String, Object> map : functionList) {
|
|
|
String[] strings = {String.valueOf(map.get("functionCode")), String.valueOf(map.get("functionName")), String.valueOf(map.get("img"))};
|
|
|
list.add(strings);
|
|
|
}
|
|
|
result.put("list", list);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public JSONObject getDoctorSetting(String doctorCode) {
|
|
|
//设置
|
|
|
String functionSql = " SELECT dict_code \"functionCode\",dict_value \"functionName\" FROM wlyy_hospital_sys_dict WHERE dict_name='FUNCTION_SETTING' ORDER BY sort ";
|
|
|
String functionSql = " SELECT dict_code \"functionCode\",dict_value \"functionName\",py_code \"img\" FROM wlyy_hospital_sys_dict WHERE dict_name='FUNCTION_SETTING' ORDER BY sort ";
|
|
|
List<Map<String, Object>> functionList = jdbcTemplate.queryForList(functionSql);
|
|
|
//医生信息
|
|
|
String sql = " SELECT function_setting \"functionCode\" FROM base.base_doctor WHERE id='"+doctorCode+"'";
|
|
@ -6998,11 +7003,12 @@ public class StatisticsEsService {
|
|
|
// List<Map<String, Object>> collect = functionList.stream()
|
|
|
// .filter(map -> map.keySet().containsAll(list))
|
|
|
// .collect(Collectors.toList());
|
|
|
List<Map<String, Object>> list = new ArrayList<>();
|
|
|
List<String[]> list = new ArrayList<>();
|
|
|
for (String code : functionCodeList.split(",")) {
|
|
|
for (Map<String, Object> map : functionList) {
|
|
|
if (code.equals(map.get("functionCode"))){
|
|
|
list.add(map);
|
|
|
String[] strings = {String.valueOf(map.get("functionCode")), String.valueOf(map.get("functionName")), String.valueOf(map.get("img"))};
|
|
|
list.add(strings);
|
|
|
}
|
|
|
}
|
|
|
}
|