|
@ -8,6 +8,7 @@ import com.yihu.jw.care.dao.label.WlyyPatientLabelDao;
|
|
|
import com.yihu.jw.care.service.patient.CarePatientService;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.exception.ApiException;
|
|
|
import com.yihu.jw.patient.dao.BasePatientDao;
|
|
|
import com.yihu.jw.restmodel.ResponseContant;
|
|
|
import com.yihu.jw.restmodel.web.Envelop;
|
|
|
import com.yihu.jw.restmodel.web.ListEnvelop;
|
|
@ -18,6 +19,7 @@ import com.yihu.jw.rm.base.BaseRequestMapping;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
@ -36,6 +38,8 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
|
|
|
private CarePatientService patientService;
|
|
|
@Autowired
|
|
|
private WlyyPatientLabelDao patientLabelDao;
|
|
|
@Autowired
|
|
|
private BasePatientDao patientDao;
|
|
|
public int num = 20;
|
|
|
|
|
|
@GetMapping(value = "testException")
|
|
@ -120,12 +124,29 @@ public class PatientEndpoint extends EnvelopRestEndpoint {
|
|
|
@ApiParam(name = "isCapacity", value = "是否返回能力评估,1返回其他值不返回,默认不返回", required = false)
|
|
|
@RequestParam(value = "isCapacity", required = false) String isCapacity) {
|
|
|
try{
|
|
|
String agent = getAgentUID();
|
|
|
if(StringUtils.isNotBlank(agent)){
|
|
|
id = agent;
|
|
|
}
|
|
|
return success("获取成功",patientService.findPatientById(id,isCapacity));
|
|
|
}catch (Exception e){
|
|
|
return failedException2(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@GetMapping(value = "findByPateintId")
|
|
|
@ApiOperation(value = "获取居民信息")
|
|
|
public Envelop findByPateintId(
|
|
|
@ApiParam(name = "id", value = "居民id")
|
|
|
@RequestParam(value = "id", required = true) String id) {
|
|
|
try{
|
|
|
BasePatientDO patientDO = patientDao.findById(id);
|
|
|
return success("获取成功",patientDO);
|
|
|
}catch (Exception e){
|
|
|
return failedException2(e);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@PostMapping(value = "updLatLon")
|
|
|
@ApiOperation(value = "修改居民经纬度信息")
|
|
|
public Envelop updLatLon(@ApiParam(name = "latLon", value = "经纬度24.48923061,118.10388605")
|