|
@@ -48,7 +48,6 @@ import com.lemon.lifecenter.common.LifeCenterController;
|
|
|
import com.lemon.lifecenter.common.LifeCenterFileDownload;
|
|
|
import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
|
import com.lemon.lifecenter.common.LifeCenterSessionController;
|
|
|
-import com.lemon.lifecenter.dto.ClinicConfigurationDTO;
|
|
|
import com.lemon.lifecenter.dto.FileDownloadDTO;
|
|
|
import com.lemon.lifecenter.dto.PatientDTO;
|
|
|
import com.lemon.lifecenter.dto.PatientMemoDTO;
|
|
@@ -989,81 +988,5 @@ public class ClinicController extends LifeCenterController {
|
|
|
i++;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- @RequestMapping("/api/configuration")
|
|
|
- public @ResponseBody ClinicConfigurationDTO getConfigurationAPI(
|
|
|
- @RequestParam(value = "centerCode", required = true, defaultValue = "") int centerCode) {
|
|
|
-
|
|
|
- ClinicConfigurationDTO dto = new ClinicConfigurationDTO();
|
|
|
- dto.setCenterCode(centerCode);
|
|
|
-
|
|
|
- return clinicService.selectConfiguration(dto);
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value = "/api/configuration", method = RequestMethod.POST)
|
|
|
- public @ResponseBody String insertConfigurationAPI(@ModelAttribute("dto") final ClinicConfigurationDTO dto) {
|
|
|
-
|
|
|
- try {
|
|
|
- clinicService.insertConfiguration(dto);
|
|
|
-
|
|
|
- JSONObject json = new JSONObject();
|
|
|
-
|
|
|
- json.put("code", "00");
|
|
|
- json.put("message", "");
|
|
|
-
|
|
|
- return json.toString();
|
|
|
- } catch (Exception e) {
|
|
|
- JSONObject json = new JSONObject();
|
|
|
-
|
|
|
- json.put("code", "01");
|
|
|
- json.put("message", e.getLocalizedMessage());
|
|
|
-
|
|
|
- return json.toString();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value = "/api/configuration", method = RequestMethod.DELETE)
|
|
|
- public @ResponseBody String deleteConfigurationAPI(@ModelAttribute("dto") final ClinicConfigurationDTO dto) {
|
|
|
-
|
|
|
- try {
|
|
|
- clinicService.deleteConfiguration(dto);
|
|
|
-
|
|
|
- JSONObject json = new JSONObject();
|
|
|
-
|
|
|
- json.put("code", "00");
|
|
|
- json.put("message", "");
|
|
|
-
|
|
|
- return json.toString();
|
|
|
- } catch (Exception e) {
|
|
|
- JSONObject json = new JSONObject();
|
|
|
-
|
|
|
- json.put("code", "01");
|
|
|
- json.put("message", e.getLocalizedMessage());
|
|
|
-
|
|
|
- return json.toString();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @RequestMapping(value = "/api/configuration", method = RequestMethod.PATCH)
|
|
|
- public @ResponseBody String updateConfigurationAPI(@ModelAttribute("dto") final ClinicConfigurationDTO dto) {
|
|
|
-
|
|
|
- try {
|
|
|
- clinicService.updateConfiguration(dto);
|
|
|
-
|
|
|
- JSONObject json = new JSONObject();
|
|
|
-
|
|
|
- json.put("code", "00");
|
|
|
- json.put("message", "");
|
|
|
-
|
|
|
- return json.toString();
|
|
|
- } catch (Exception e) {
|
|
|
- JSONObject json = new JSONObject();
|
|
|
-
|
|
|
- json.put("code", "01");
|
|
|
- json.put("message", e.getLocalizedMessage());
|
|
|
-
|
|
|
- return json.toString();
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|