|
@@ -1,5 +1,7 @@
|
|
|
package thyyxxk.webserver.service.outpatient.triage;
|
|
|
|
|
|
+import lombok.Getter;
|
|
|
+import lombok.Setter;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import thyyxxk.webserver.dao.his.outpatient.triage.TriageSettingsDao;
|
|
@@ -12,6 +14,7 @@ import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
import thyyxxk.webserver.utils.StringUtil;
|
|
|
import thyyxxk.webserver.utils.TokenUtil;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -20,16 +23,10 @@ import java.util.List;
|
|
|
@Service
|
|
|
public class TriageSettingsService {
|
|
|
private final TriageSettingsDao dao;
|
|
|
+ @Setter
|
|
|
+ @Getter
|
|
|
private static List<CodeName> reqArr;
|
|
|
|
|
|
- public static List<CodeName> getReqArr() {
|
|
|
- return reqArr;
|
|
|
- }
|
|
|
-
|
|
|
- public static void setReqArr(List<CodeName> arr) {
|
|
|
- reqArr = arr;
|
|
|
- }
|
|
|
-
|
|
|
@Autowired
|
|
|
public TriageSettingsService(TriageSettingsDao dao) {
|
|
|
this.dao = dao;
|
|
@@ -64,6 +61,9 @@ public class TriageSettingsService {
|
|
|
|
|
|
public ResultVo<List<MzfzZdDeptRoom>> getChosenRoom() {
|
|
|
String[] deptCodes = StringUtil.triageDeptString2Array(dao.getChosenDept(TokenUtil.getInstance().getTokenUserId()));
|
|
|
+ if (deptCodes.length == 0) {
|
|
|
+ return ResultVoUtil.success(new ArrayList<>());
|
|
|
+ }
|
|
|
return ResultVoUtil.success(dao.getChosenRoom(deptCodes));
|
|
|
}
|
|
|
|