|
@ -1,19 +1,23 @@
|
|
|
package com.yihu.jw.hospital.endpoint.account;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.jw.hospital.util.AesCryptoUtil;
|
|
|
import com.yihu.jw.patient.service.BasePatientGroupDictService;
|
|
|
import com.yihu.jw.patient.service.BasePatientService;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.MixEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.ObjEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.PageEnvelop;
|
|
|
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
|
|
|
import com.yihu.jw.rm.base.BaseRequestMapping;
|
|
|
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("patient" )
|
|
|
@Api(tags = "用户基础信息", description = "互联网医院")
|
|
@ -25,6 +29,32 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
|
|
|
private BasePatientGroupDictService basePatientGroupDictService;
|
|
|
|
|
|
|
|
|
@GetMapping(value = "getAesPatientInfo")
|
|
|
@ApiOperation(value = "获取居民加密信息")
|
|
|
public Envelop getAesPatientInfo(
|
|
|
@ApiParam(name = "name", value = "姓名")
|
|
|
@RequestParam(value = "name", required = true) String name,
|
|
|
@ApiParam(name = "idcard", value = "身份证")
|
|
|
@RequestParam(value = "idcard", required = true) String idcard,
|
|
|
@ApiParam(name = "ssc", value = "社保卡号")
|
|
|
@RequestParam(value = "ssc", required = true) String ssc,
|
|
|
@ApiParam(name = "mobile", value = "手机号")
|
|
|
@RequestParam(value = "mobile", required = true) String mobile,
|
|
|
@ApiParam(name = "birthday", value = "出生日期")
|
|
|
@RequestParam(value = "birthday", required = false) String birthday) {
|
|
|
try {
|
|
|
JSONObject json = new JSONObject();
|
|
|
json.put("name", AesCryptoUtil.AscRevertData2(URLEncoder.encode(name)));
|
|
|
json.put("idcard", AesCryptoUtil.AscRevertData2(idcard));
|
|
|
json.put("ssc", AesCryptoUtil.AscRevertData2(ssc));
|
|
|
json.put("mobile", AesCryptoUtil.AscRevertData2(mobile));
|
|
|
json.put("birthday", AesCryptoUtil.AscRevertData2(birthday));
|
|
|
return ObjEnvelop.getSuccess("成功",json);
|
|
|
}catch (Exception e) {
|
|
|
return failedMixEnvelopException(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = BaseRequestMapping.BasePatient.getPatientById)
|
|
|
@ApiOperation(value = "获取居民信息")
|
|
|
public Envelop getPatientById(
|