|
@ -1,5 +1,6 @@
|
|
package com.yihu.wlyy.web.doctor.imm;
|
|
package com.yihu.wlyy.web.doctor.imm;
|
|
|
|
|
|
|
|
import com.yihu.wlyy.entity.imm.ChildImmuneVaccin;
|
|
import com.yihu.wlyy.entity.imm.ChildInfoVO;
|
|
import com.yihu.wlyy.entity.imm.ChildInfoVO;
|
|
import com.yihu.wlyy.service.imm.ChildFamilyImmuneService;
|
|
import com.yihu.wlyy.service.imm.ChildFamilyImmuneService;
|
|
import com.yihu.wlyy.service.imm.ChildInfoService;
|
|
import com.yihu.wlyy.service.imm.ChildInfoService;
|
|
@ -7,6 +8,7 @@ import com.yihu.wlyy.web.BaseController;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiParam;
|
|
import io.swagger.annotations.ApiParam;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONArray;
|
|
import org.json.JSONObject;
|
|
import org.json.JSONObject;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -77,4 +79,79 @@ public class DoctorImmController extends BaseController {
|
|
return error(-1, e.getMessage());
|
|
return error(-1, e.getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getImmVaccinList", method = RequestMethod.GET)
|
|
|
|
@ApiOperation(value = "获取签约居民待接种疫苗列表")
|
|
|
|
public String getImmVaccinList(@ApiParam(name = "doctorcode", value = "医生CODE", defaultValue = "")
|
|
|
|
@RequestParam(value = "doctorcode", required = false) String doctorcode){
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
if(StringUtils.isBlank(doctorcode)){
|
|
|
|
doctorcode = getUID();
|
|
|
|
}
|
|
|
|
|
|
|
|
List<Map<String, Object>> immrs = childFamilyImmuneService.getImmVaccinList(doctorcode);
|
|
|
|
JSONArray jsonArray = new JSONArray();
|
|
|
|
if (immrs != null) {
|
|
|
|
for (Map<String, Object> map : immrs) {
|
|
|
|
JSONObject json = new JSONObject();
|
|
|
|
json.put("child_code", map.get("child_code"));//儿童编码
|
|
|
|
json.put("name", map.get("name"));//儿童姓名
|
|
|
|
json.put("photo", map.get("photo"));//头像
|
|
|
|
json.put("idcard", map.get("idcard"));//新生儿身份证号
|
|
|
|
json.put("barcode", map.get("barcode"));//新生儿条码
|
|
|
|
json.put("family_code", map.get("family_code"));//家人CODE
|
|
|
|
json.put("relation", map.get("relation"));//---1父亲 2母亲 3老公 4老婆 5儿子 6女儿 7其他
|
|
|
|
json.put("del", map.get("del"));//0为有效,1为删除状态
|
|
|
|
jsonArray.put(json);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return write(200, "查询成功", "data", jsonArray);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value = "/alertImmVacclinByDoctor", method = RequestMethod.POST)
|
|
|
|
@ApiOperation(value = "医生批量提醒待接种疫苗接种")
|
|
|
|
public String alertImmVacclinByDoctor(@ApiParam(name = "doctorcode", value = "医生CODE", defaultValue = "")
|
|
|
|
@RequestParam(value = "doctorcode", required = true) String doctorcode){
|
|
|
|
try {
|
|
|
|
// TODO: 2018/6/21
|
|
|
|
return write(200, "请求成功");
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value = "/alertImmVacclinByPatient", method = RequestMethod.POST)
|
|
|
|
@ApiOperation(value = "医生提醒单个居民疫苗接种")
|
|
|
|
public String alertImmVacclinByPatient(@ApiParam(name = "code", value = "待接种记录CODE", defaultValue = "")
|
|
|
|
@RequestParam(value = "待接种记录CODE", required = true) String code){
|
|
|
|
try {
|
|
|
|
// TODO: 2018/6/21
|
|
|
|
return write(200, "请求成功");
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@RequestMapping(value = "/getPatientImmVacclin", method = RequestMethod.GET)
|
|
|
|
@ApiOperation(value = "根据儿童免疫条码获取待接种疫苗")
|
|
|
|
public String getPatientImmVacclin(@ApiParam(name = "barcode", value = "儿童免疫编码", defaultValue = "")
|
|
|
|
@RequestParam(value = "儿童免疫编码", required = true) String barcode){
|
|
|
|
try {
|
|
|
|
ChildImmuneVaccin childImmuneVaccin = childFamilyImmuneService.getChildImmuneVaccinByBarcode(barcode);
|
|
|
|
return write(200, "请求成功","data",childImmuneVaccin);
|
|
|
|
} catch (Exception e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
return error(-1, "查询失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|