|
@@ -1,10 +1,19 @@
|
|
|
package com.lemon.lifecenter.controller;
|
|
|
|
|
|
+import java.text.DateFormat;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Calendar;
|
|
|
+import java.util.Date;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
+import java.util.TreeMap;
|
|
|
|
|
|
+import org.json.JSONArray;
|
|
|
+import org.json.JSONObject;
|
|
|
+import org.json.simple.JSONValue;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -15,6 +24,10 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import com.lemon.lifecenter.common.LifeCenterConfigVO;
|
|
|
+import com.lemon.lifecenter.common.LifeCenterFunction;
|
|
|
+import com.lemon.lifecenter.dto.ApiPhrResponseDTO;
|
|
|
+import com.lemon.lifecenter.dto.ApiSymptomDTO;
|
|
|
import com.lemon.lifecenter.dto.AppVersionDTO;
|
|
|
import com.lemon.lifecenter.dto.DeviceInfoDTO;
|
|
|
import com.lemon.lifecenter.dto.HlRequestDTO;
|
|
@@ -30,8 +43,409 @@ public class RestApiController {
|
|
|
@Autowired
|
|
|
private RestApiService service;
|
|
|
|
|
|
- @RequestMapping(value="/patientList" , method = RequestMethod.POST)
|
|
|
- public void selectHLPatientList(@RequestBody HlRequestDTO dto) {
|
|
|
+ @RequestMapping(value="/tokenTest", method = RequestMethod.POST)
|
|
|
+ public String tokenTest(@RequestBody HlRequestDTO dto) {
|
|
|
+ String apiKey = service.selectApiKey(dto);
|
|
|
+
|
|
|
+ String token = "";
|
|
|
+ String id = dto.getManagerId();
|
|
|
+ String time = LifeCenterFunction.getNow();
|
|
|
+ int centerCode = dto.getCenterCode();
|
|
|
+ String careAgencyCode = dto.getCareAgencyCode();
|
|
|
+
|
|
|
+ try {
|
|
|
+ token = LifeCenterFunction.aesEncrypt(apiKey, LifeCenterConfigVO.IV, id+"|"+careAgencyCode+"|"+time);
|
|
|
+ } catch (Exception e) {
|
|
|
+ // TODO Auto-generated catch block
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return token;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * api 분기
|
|
|
+ * @param dto
|
|
|
+ * resourceType
|
|
|
+ * bloodPressure : 혈압
|
|
|
+ * bloodSugar : 혈당
|
|
|
+ * oxygenSaturation : 산소포화도
|
|
|
+ * pulseRate : 맥박수
|
|
|
+ * temperature : 체온
|
|
|
+ * patientInfoList : 환자정보
|
|
|
+ * munjin : 문진 정보
|
|
|
+ * symptom : 환자 임상정보
|
|
|
+ * @return json String
|
|
|
+ */
|
|
|
+ @RequestMapping(value="/toAction", method = RequestMethod.POST)
|
|
|
+ public String moveToAction(@RequestBody HlRequestDTO dto) {
|
|
|
+
|
|
|
+ String result = "";
|
|
|
+ String token = dto.getToken();
|
|
|
+ LinkedHashMap<String, Object> object = new LinkedHashMap<>();
|
|
|
+ if (!token.equals("")) {
|
|
|
+ String apiKey = service.selectApiKey(dto);
|
|
|
+ if (apiKey.equals("")) {
|
|
|
+ object.put("error", "invalidToken");
|
|
|
+ return object.toString();
|
|
|
+ } else {
|
|
|
+ try {
|
|
|
+ token = LifeCenterFunction.aesDecrypt(apiKey, LifeCenterConfigVO.IV, token);
|
|
|
+ String[] splitToken = token.split("[|]");
|
|
|
+ String managerId = splitToken[0];
|
|
|
+ //int centerCode = Integer.parseInt(splitToken[1]);
|
|
|
+ String careAgencyCode = splitToken[1];
|
|
|
+ String time = splitToken[2];
|
|
|
+
|
|
|
+ if (managerId.equals(dto.getManagerId()) && careAgencyCode.equals(dto.getCareAgencyCode())) {
|
|
|
+ DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Calendar cal = Calendar.getInstance();
|
|
|
+ Date getDate = dateFormat.parse(time);
|
|
|
+ cal.setTime(getDate);
|
|
|
+ cal.add(Calendar.MINUTE, 15);
|
|
|
+ String tokenDateTime = dateFormat.format(cal.getTime());
|
|
|
+ getDate = dateFormat.parse(tokenDateTime);
|
|
|
+
|
|
|
+ Date nowDate = new Date();
|
|
|
+ if (nowDate.getTime() < getDate.getTime()) {
|
|
|
+
|
|
|
+ String resourceType = dto.getResourceType();
|
|
|
+ if (resourceType.equals("")) {
|
|
|
+ object.put("error", "invalidParameters");
|
|
|
+ return object.toString();
|
|
|
+ } else {
|
|
|
+ if (resourceType.equals("bloodPressure") || resourceType.equals("bloodSugar") ||
|
|
|
+ resourceType.equals("oxygenSaturation") || resourceType.equals("pulseRate") || resourceType.equals("temperature")) {
|
|
|
+
|
|
|
+ result = selectPhrData(dto);
|
|
|
+
|
|
|
+ } else if (resourceType.equals("patientInfoList")) {
|
|
|
+ result = selectHLPatientList(dto);
|
|
|
+ } else if (resourceType.equals("munjin")) {
|
|
|
+ result = selectMunjinDataList(dto);
|
|
|
+ } else if (resourceType.equals("symptom")) {
|
|
|
+ result = selectSymptomDataList(dto);
|
|
|
+ } else if (resourceType.equals("vitalSign")) {
|
|
|
+ //String[] strAr = {"temperature", "bloodPressure", "bloodSugar", "oxygenSaturation", "pulseRate"};
|
|
|
+// result = selectVitalSign(dto);
|
|
|
+ } else {
|
|
|
+ object.put("error", "invalidParameters");
|
|
|
+ return object.toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ } else {
|
|
|
+ object.put("error", "expireToken");
|
|
|
+ return object.toString();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ object.put("error", "invalidParameters");
|
|
|
+ return object.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ object.put("error", "invalidParameters");
|
|
|
+ return object.toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ object.put("error", "emptyToken");
|
|
|
+ return object.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ //@RequestMapping(value="/patientList" , method = RequestMethod.POST)
|
|
|
+ private String selectHLPatientList(HlRequestDTO dto) {
|
|
|
List<PatientDTO> list = service.selectHLPatientList(dto);
|
|
|
+ JSONArray array = new JSONArray();
|
|
|
+
|
|
|
+ for (int i = 0; i < list.size(); i ++) {
|
|
|
+ LinkedHashMap<String, Object> object = new LinkedHashMap<>();
|
|
|
+ String patientNumber = list.get(i).getPatientNumber();
|
|
|
+ String patientName = list.get(i).getPatientName();
|
|
|
+ String gender = list.get(i).getGender();
|
|
|
+ String wardNumber = list.get(i).getWardNumber();
|
|
|
+ String roomNumber = list.get(i).getRoomNumber();
|
|
|
+ String finalClinicDate = list.get(i).getFinamClinicDate();
|
|
|
+ String hospitalizationDate = list.get(i).getHospitalizationDate();
|
|
|
+ String state = list.get(i).getState();
|
|
|
+ int centerCode = list.get(i).getCenterCode();
|
|
|
+ String jumin = list.get(i).getJumin();
|
|
|
+ String patientPhone = list.get(i).getPatientPhone();
|
|
|
+ String guardianPhone = list.get(i).getGuardianPhone();
|
|
|
+ String symptomStartDate = list.get(i).getSymptomStartDate();
|
|
|
+ String confirmationDate = list.get(i).getConfirmationDate();
|
|
|
+ String disisolationDate = list.get(i).getDisisolationDate();
|
|
|
+ String basalDiseaseYn = list.get(i).getBasalDiseaseYn();
|
|
|
+ String drugYn = list.get(i).getDrugYn();
|
|
|
+ String drugContent = list.get(i).getDrugContent();
|
|
|
+ String pregnancyStatus = list.get(i).getPregnancyStatus();
|
|
|
+ String pregnancyWeek = list.get(i).getPregnancyWeek();
|
|
|
+ String managerId = list.get(i).getManagerId();
|
|
|
+ String expectedDischargeDate = list.get(i).getExpectedDischargeDate();
|
|
|
+
|
|
|
+ object.put("resourceType", "patientInfoList");
|
|
|
+ object.put("patinetId", patientNumber);
|
|
|
+ object.put("patientName", patientName);
|
|
|
+ object.put("gender", gender);
|
|
|
+ object.put("wardNumber", wardNumber);
|
|
|
+ object.put("roomNumber", roomNumber);
|
|
|
+ object.put("state", state);
|
|
|
+ object.put("centerCode", centerCode);
|
|
|
+ object.put("birthDate", jumin);
|
|
|
+ object.put("patientPhone", patientPhone);
|
|
|
+ object.put("guardianPhone", guardianPhone);
|
|
|
+ object.put("finalClinicDate", finalClinicDate);
|
|
|
+ object.put("hospitalizationDate", hospitalizationDate);
|
|
|
+ object.put("symptomDate", symptomStartDate);
|
|
|
+ object.put("confirmationDate", confirmationDate);
|
|
|
+ object.put("disisolationDate", disisolationDate);
|
|
|
+ object.put("dischargeDate", expectedDischargeDate);
|
|
|
+ object.put("basalDiseaseYn", basalDiseaseYn);
|
|
|
+ object.put("drugYn", drugYn);
|
|
|
+ object.put("drugContent", drugContent);
|
|
|
+ object.put("pregnancyStatus", pregnancyStatus);
|
|
|
+ object.put("pregnancyWeek", pregnancyWeek);
|
|
|
+ object.put("doctorId", managerId);
|
|
|
+
|
|
|
+ String jsonText = JSONValue.toJSONString(object);
|
|
|
+ array.put(jsonText);
|
|
|
+ }
|
|
|
+
|
|
|
+ return array.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ private String selectPhrData(HlRequestDTO dto) {
|
|
|
+ String resourceType = dto.getResourceType();
|
|
|
+
|
|
|
+ List<ApiPhrResponseDTO> list = service.selectPhrData(dto);
|
|
|
+ JSONArray array = new JSONArray();
|
|
|
+
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
+ LinkedHashMap<String, Object> object = new LinkedHashMap<>();
|
|
|
+ String patientNumber = list.get(i).getPatientNumber();
|
|
|
+ String patientName = list.get(i).getPatientName();
|
|
|
+ String patientPhone = list.get(i).getPatientPhone();
|
|
|
+ String jumin = list.get(i).getJumin();
|
|
|
+ String recordedByName = list.get(i).getRecordedByName();
|
|
|
+ String recordedById = list.get(i).getRecordedById();
|
|
|
+ String recordedDate = list.get(i).getRecordedDate();
|
|
|
+ String createDate = list.get(i).getCreateDate();
|
|
|
+ String phrValue1 = list.get(i).getValueType1();
|
|
|
+ String phrValue2 = list.get(i).getValueType2();
|
|
|
+
|
|
|
+ object.put("resourceType", resourceType);
|
|
|
+ object.put("patinetId", patientNumber);
|
|
|
+ object.put("patientName", patientName);
|
|
|
+ object.put("patientPhone", patientPhone);
|
|
|
+ object.put("birthDate", jumin);
|
|
|
+ if (resourceType.equals("bloodPressure")) {
|
|
|
+ object.put("bloodSbp", phrValue1);
|
|
|
+ object.put("bloodDbp", phrValue2);
|
|
|
+ } else {
|
|
|
+ object.put(resourceType, phrValue1);
|
|
|
+ }
|
|
|
+ object.put("recordedByName", recordedByName);
|
|
|
+ object.put("recordedById", recordedById);
|
|
|
+ object.put("recodedDate", recordedDate);
|
|
|
+ object.put("createDate", createDate);
|
|
|
+
|
|
|
+ String jsonText = JSONValue.toJSONString(object);
|
|
|
+ array.put(jsonText);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ return array.toString();
|
|
|
}
|
|
|
+
|
|
|
+ private String selectMunjinDataList(HlRequestDTO dto) {
|
|
|
+ String resourceType = dto.getResourceType();
|
|
|
+ List<PatientDTO> list = service.selectMunjinDataList(dto);
|
|
|
+ JSONArray array = new JSONArray();
|
|
|
+
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
+ LinkedHashMap<String, Object> object = new LinkedHashMap<>();
|
|
|
+ String patientNumber = list.get(i).getPatientNumber();
|
|
|
+ String patientName = list.get(i).getPatientName();
|
|
|
+ String patientPhone = list.get(i).getPatientPhone();
|
|
|
+ String jumin = list.get(i).getJumin();
|
|
|
+ String feverCheck = list.get(i).getFeverCheck();
|
|
|
+ String coughCheck = list.get(i).getCoughCheck();
|
|
|
+ String colic = list.get(i).getColic();
|
|
|
+ String coldFitCheck = list.get(i).getColdFitCheck();
|
|
|
+ String sputumCheck = list.get(i).getSputumCheck();
|
|
|
+ String ocinCheck = list.get(i).getOcinCheck();
|
|
|
+ String feverRight = list.get(i).getFeverRight();
|
|
|
+ String feverLeft = list.get(i).getFeverLeft();
|
|
|
+ String fatigueCheck = list.get(i).getFatigueCheck();
|
|
|
+ String etcCheck = list.get(i).getEtcCheck();
|
|
|
+ String etcContent = list.get(i).getEtcContent();
|
|
|
+ String chestPain = list.get(i).getChestPain();
|
|
|
+ String noseCheck = list.get(i).getNoseCheck();
|
|
|
+ String vomitingCheck = list.get(i).getVomitingCheck();
|
|
|
+ String musclePain = list.get(i).getMusclePainCheck();
|
|
|
+ String soreThroatCheck = list.get(i).getSoreThroatCheck();
|
|
|
+ String diarrheaCheck = list.get(i).getDiarrheaCheck();
|
|
|
+ String headacheCheck = list.get(i).getHeadacheCheck();
|
|
|
+ String dyspenaCheck = list.get(i).getDyspneaCheck();
|
|
|
+ String pulseRate = list.get(i).getPulseRate();
|
|
|
+ String respirationRate = list.get(i).getRespirationRate();
|
|
|
+ String bloodPressureLevel = list.get(i).getBloodPressureLevel();
|
|
|
+ String oxygenSaturatio = list.get(i).getOxygenSaturation();
|
|
|
+
|
|
|
+ object.put("resourceType", resourceType);
|
|
|
+ object.put("patinetId", patientNumber);
|
|
|
+ object.put("patientName", patientName);
|
|
|
+ object.put("patientPhone", patientPhone);
|
|
|
+ object.put("birthDate", jumin);
|
|
|
+
|
|
|
+ object.put("feverCheck", feverCheck);
|
|
|
+ object.put("coughCheck", coughCheck);
|
|
|
+ object.put("colic", colic);
|
|
|
+ object.put("coldFitCheck", coldFitCheck);
|
|
|
+ object.put("sputumCheck", sputumCheck);
|
|
|
+ object.put("ocinCheck", ocinCheck);
|
|
|
+ object.put("feverRight", feverRight);
|
|
|
+ object.put("feverLeft", feverLeft);
|
|
|
+ object.put("fatigueCheck", fatigueCheck);
|
|
|
+ object.put("etcCheck", etcCheck);
|
|
|
+ object.put("etcContent", etcContent);
|
|
|
+ object.put("chestPain", chestPain);
|
|
|
+ object.put("noseCheck", noseCheck);
|
|
|
+ object.put("vomitingCheck", vomitingCheck);
|
|
|
+ object.put("musclePain", musclePain);
|
|
|
+ object.put("soreThroatCheck", soreThroatCheck);
|
|
|
+ object.put("diarrheaCheck", diarrheaCheck);
|
|
|
+ object.put("headacheCheck", headacheCheck);
|
|
|
+ object.put("dyspenaCheck", dyspenaCheck);
|
|
|
+ object.put("pulseRate", pulseRate);
|
|
|
+ object.put("respirationRate", respirationRate);
|
|
|
+ object.put("bloodPressureLevel", bloodPressureLevel);
|
|
|
+ object.put("oxygenSaturation", oxygenSaturatio);
|
|
|
+
|
|
|
+ String jsonText = JSONValue.toJSONString(object);
|
|
|
+ array.put(jsonText);
|
|
|
+ }
|
|
|
+
|
|
|
+ return array.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ private String selectSymptomDataList(HlRequestDTO dto) {
|
|
|
+ String resourceType = dto.getResourceType();
|
|
|
+ List<ApiSymptomDTO> list = service.selectSymptomDataList(dto);
|
|
|
+ JSONArray array = new JSONArray();
|
|
|
+
|
|
|
+ for (int i = 0; i < list.size(); i++) {
|
|
|
+ LinkedHashMap<String, Object> object = new LinkedHashMap<>();
|
|
|
+ String patientNumber = list.get(i).getPatientNumber();
|
|
|
+ String patientName = list.get(i).getPatientName();
|
|
|
+ String patientPhone = list.get(i).getPatientPhone();
|
|
|
+ String jumin = list.get(i).getJumin();
|
|
|
+ String coughCheck = list.get(i).getCoughCheck();
|
|
|
+ String dyspneaCheck = list.get(i).getDyspneaCheck();
|
|
|
+ String coldFitCheck = list.get(i).getColdFitCheck();
|
|
|
+ String musclePainCheck = list.get(i).getMusclePainCheck();
|
|
|
+ String headacheCheck = list.get(i).getHeadacheCheck();
|
|
|
+ String soreThroatCheck = list.get(i).getSoreThroatCheck();
|
|
|
+ String smellPlateCheck = list.get(i).getSmellPlateCheck();
|
|
|
+ String fatigueCheck = list.get(i).getFatigueCheck();
|
|
|
+ String appetiteLossCheck = list.get(i).getAppetiteLossCheck();
|
|
|
+ String sputumCheck = list.get(i).getSputumCheck();
|
|
|
+ String ocinCheck = list.get(i).getOcinCheck();
|
|
|
+ String vomitingCheck = list.get(i).getVomitingCheck();
|
|
|
+ String diarrheaCheck = list.get(i).getDiarrheaCheck();
|
|
|
+ String dizzinessCheck = list.get(i).getDizzinessCheck();
|
|
|
+ String noseCheck = list.get(i).getNoseCheck();
|
|
|
+ String etcCheck = list.get(i).getEtcCheck();
|
|
|
+ String etcContent = list.get(i).getEtcContent();
|
|
|
+ String recordedById = list.get(i).getRecordedById();
|
|
|
+ String recordedByName = list.get(i).getRecordedByName();
|
|
|
+ String recordedByDate = list.get(i).getRecordedByDate();
|
|
|
+ String createDate = list.get(i).getCreateDate();
|
|
|
+
|
|
|
+ object.put("resourceType", resourceType);
|
|
|
+ object.put("patinetId", patientNumber);
|
|
|
+ object.put("patientName", patientName);
|
|
|
+ object.put("patientPhone", patientPhone);
|
|
|
+ object.put("birthDate", jumin);
|
|
|
+
|
|
|
+ object.put("coughCheck", coughCheck);
|
|
|
+ object.put("dyspenaCheck", dyspneaCheck);
|
|
|
+ object.put("coldFitCheck", coldFitCheck);
|
|
|
+ object.put("musclePain", musclePainCheck);
|
|
|
+ object.put("headacheCheck", headacheCheck);
|
|
|
+ object.put("soreThroatCheck", soreThroatCheck);
|
|
|
+ object.put("smellPlateCheck", smellPlateCheck);
|
|
|
+ object.put("fatigueCheck", fatigueCheck);
|
|
|
+ object.put("appetiteLossCheck", appetiteLossCheck);
|
|
|
+ object.put("sputumCheck", sputumCheck);
|
|
|
+ object.put("ocinCheck", ocinCheck);
|
|
|
+ object.put("vomitingCheck", vomitingCheck);
|
|
|
+ object.put("diarrheaCheck", diarrheaCheck);
|
|
|
+ object.put("dizzinessCheck", dizzinessCheck);
|
|
|
+ object.put("noseCheck", noseCheck);
|
|
|
+ object.put("etcCheck", etcCheck);
|
|
|
+ object.put("etcContent", etcContent);
|
|
|
+ object.put("recordedById", recordedById);
|
|
|
+ object.put("recordedByName", recordedByName);
|
|
|
+ object.put("recordedByDate", recordedByDate);
|
|
|
+ object.put("createDate", createDate);
|
|
|
+
|
|
|
+ String jsonText = JSONValue.toJSONString(object);
|
|
|
+ array.put(jsonText);
|
|
|
+ }
|
|
|
+
|
|
|
+ return array.toString();
|
|
|
+ }
|
|
|
+
|
|
|
+ private String selectVitalSign(HlRequestDTO dto) {
|
|
|
+ dto.setCenterCode(63);
|
|
|
+ List<ApiPhrResponseDTO> patientList = service.selectPatientInfoList(dto);
|
|
|
+ JSONArray array = new JSONArray();
|
|
|
+
|
|
|
+ for (int i = 0; i < patientList.size(); i++) {
|
|
|
+ LinkedHashMap<String, Object> object = new LinkedHashMap<>();
|
|
|
+ int patientIdx = patientList.get(i).getPatientIdx();
|
|
|
+ String patientId = patientList.get(i).getPatientNumber();
|
|
|
+ String patientName = patientList.get(i).getPatientName();
|
|
|
+ String patientPhone = patientList.get(i).getPatientPhone();
|
|
|
+ String jumin = patientList.get(i).getJumin();
|
|
|
+ List<ApiPhrResponseDTO> phrList = service.selectPatientPhrData(patientIdx);
|
|
|
+
|
|
|
+ object.put("patinetId", patientId);
|
|
|
+ object.put("patientName", patientName);
|
|
|
+ object.put("patientPhone", patientPhone);
|
|
|
+ object.put("birthDate", jumin);
|
|
|
+ for (int j = 0; j < phrList.size(); j++ ) {
|
|
|
+ LinkedHashMap<String, Object> object2 = new LinkedHashMap<>();
|
|
|
+ String phrType = phrList.get(j).getPhrType();
|
|
|
+ String valueType1 = phrList.get(j).getValueType1();
|
|
|
+ String valueType2 = phrList.get(j).getValueType2();
|
|
|
+ String recordedByName = phrList.get(j).getRecordedByName();
|
|
|
+ String recordedById = phrList.get(j).getRecordedById();
|
|
|
+ String createDate = phrList.get(j).getCreateDate();
|
|
|
+
|
|
|
+ if (phrType.equals("bloodPressure")) {
|
|
|
+ object2.put("bloodSbp", valueType1);
|
|
|
+ object2.put("bloodDbp", valueType2);
|
|
|
+ } else {
|
|
|
+ object2.put(phrType, valueType1);
|
|
|
+ }
|
|
|
+
|
|
|
+ object2.put("recordedByName", recordedByName);
|
|
|
+ object2.put("recordedById", recordedById);
|
|
|
+ object2.put("createDate", createDate);
|
|
|
+ object.put(phrType, object2);
|
|
|
+ }
|
|
|
+ String jsonText = JSONValue.toJSONString(object);
|
|
|
+ array.put(jsonText);
|
|
|
+ }
|
|
|
+
|
|
|
+ return array.toString();
|
|
|
+ }
|
|
|
+
|
|
|
}
|