|
@ -4,6 +4,7 @@ import com.yihu.wlyy.aop.ObserverRequired;
|
|
|
import com.yihu.wlyy.entity.patient.Patient;
|
|
|
import com.yihu.wlyy.service.app.account.DoctorInfoService;
|
|
|
import com.yihu.wlyy.service.app.account.PatientInfoService;
|
|
|
import com.yihu.wlyy.service.app.sign.FamilyContractService;
|
|
|
import com.yihu.wlyy.service.app.sign.SignWebService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
|
import com.yihu.wlyy.service.third.jw.JwSignService;
|
|
@ -53,20 +54,22 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
StringRedisTemplate redisTemplate;
|
|
|
@Autowired
|
|
|
private PatientService patientService;
|
|
|
@Autowired
|
|
|
private FamilyContractService familyContractService;
|
|
|
|
|
|
@RequestMapping(value = "getPatientFamilyServer",method = RequestMethod.GET)
|
|
|
@ResponseBody
|
|
|
@ApiOperation("获取居民慢病服务类型")
|
|
|
public String getPatientFamilyServer(@ApiParam(name = "patient", value = "居民code") @RequestParam(required = true) String patient){
|
|
|
public String getPatientFamilyServer(@ApiParam(name = "patient", value = "居民code") @RequestParam(required = true) String patient) {
|
|
|
try {
|
|
|
JSONObject json = signWebService.getPatientFamilyServer(patient);
|
|
|
if(json.has("msg")){
|
|
|
return error(-1,json.getString("msg"));
|
|
|
if (json.has("msg")) {
|
|
|
return error(-1, json.getString("msg"));
|
|
|
}
|
|
|
return write(200,"获取成功","data",json);
|
|
|
}catch (Exception e){
|
|
|
return write(200, "获取成功", "data", json);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1,"请求失败");
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -127,14 +130,14 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
String doctor = getUID();
|
|
|
Page<Object> page = infoService.findPatientByDoctorSign(doctor, id, pagesize, patientName);
|
|
|
JSONArray array = new JSONArray();
|
|
|
Map<Object,Object> exitMap = new HashMap<>();
|
|
|
Map<Object, Object> exitMap = new HashMap<>();
|
|
|
if (page != null) {
|
|
|
for (Object obj : page) {
|
|
|
Object[] temp = (Object[]) obj;
|
|
|
if (temp == null) {
|
|
|
continue;
|
|
|
}
|
|
|
if(exitMap.get(temp[9])!=null){//防止患者既有三师签约也有家庭签约导致数据重复
|
|
|
if (exitMap.get(temp[9]) != null) {//防止患者既有三师签约也有家庭签约导致数据重复
|
|
|
continue;
|
|
|
}
|
|
|
JSONObject json = new JSONObject();
|
|
@ -159,7 +162,7 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
//患者联系方式
|
|
|
json.put("mobile", temp[10]);
|
|
|
array.put(json);
|
|
|
exitMap.put(temp[9],temp);
|
|
|
exitMap.put(temp[9], temp);
|
|
|
}
|
|
|
}
|
|
|
return write(200, "查询成功!", "list", array);
|
|
@ -229,12 +232,14 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
*/
|
|
|
@RequestMapping("/sign_info")
|
|
|
public String getSignInfoByDoctor(
|
|
|
@RequestParam(required = false)Integer status,
|
|
|
@RequestParam(required = false)Integer doctorType,
|
|
|
@RequestParam(required = false)Integer page,
|
|
|
@RequestParam(required = false)Integer pageSize) {
|
|
|
try {page = page > 0 ? page -1 : 0;
|
|
|
List<Map<String, Object>> listSign = signWebService.getSignWebByDoctor(getUID(), status, page, pageSize);
|
|
|
@RequestParam(required = false) Integer status,
|
|
|
@RequestParam(required = false) Integer doctorType,
|
|
|
@RequestParam(required = false) String patientInfo,
|
|
|
@RequestParam(required = false) Integer page,
|
|
|
@RequestParam(required = false) Integer pageSize) {
|
|
|
try {
|
|
|
page = page > 0 ? page -1 : 0;
|
|
|
List<Map<String, Object>> listSign = signWebService.getSignWebByDoctor(getUID(), status, patientInfo, page, pageSize);
|
|
|
|
|
|
JSONObject data = new JSONObject();
|
|
|
List<JSONObject> jsonArray = new ArrayList<>();
|
|
@ -249,6 +254,7 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
json.put("doctorCode", temp.get("doctor"));
|
|
|
json.put("patientCode", temp.get("patient"));
|
|
|
json.put("patientName", temp.get("name"));
|
|
|
json.put("mobile", temp.get("mobile"));
|
|
|
json.put("age", IdCardUtil.getAgeForIdcard(String.valueOf(temp.get("idcard"))));
|
|
|
json.put("provinceName", temp.get("provinceName"));
|
|
|
json.put("cityName", temp.get("cityName"));
|
|
@ -296,7 +302,7 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
if (status == 3) {
|
|
|
boolean epTime = false;
|
|
|
try {
|
|
|
epTime = redisTemplate.hasKey("wechat:focus:remind:flag:"+temp.get("patient"));
|
|
|
epTime = redisTemplate.hasKey("wechat:focus:remind:flag:" + temp.get("patient"));
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
}
|
|
@ -339,12 +345,12 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
@RequestMapping("/sign_info_count")
|
|
|
@ApiOperation(value = "签约居民数目")
|
|
|
public String getSignWebByDoctorCount(){
|
|
|
try{
|
|
|
public String getSignWebByDoctorCount() {
|
|
|
try {
|
|
|
//hxmD201703150222
|
|
|
return write(200,"查询成功","data",signWebService.getSignWebByDoctorCount(getUID()));
|
|
|
}catch (Exception e){
|
|
|
return error(-1,"查询失败");
|
|
|
return write(200, "查询成功", "data", signWebService.getSignWebByDoctorCount(getUID()));
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -355,11 +361,11 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/is_remind_focus_all")
|
|
|
@ApiOperation(value = "今天是否已全部提醒关注")
|
|
|
public String isRemindFocusAllToday(){
|
|
|
try{
|
|
|
return write(200,"查询成功","data",signWebService.isRemindFocusAll(getUID()));
|
|
|
}catch (Exception e){
|
|
|
return error(-1,"查询失败");
|
|
|
public String isRemindFocusAllToday() {
|
|
|
try {
|
|
|
return write(200, "查询成功", "data", signWebService.isRemindFocusAll(getUID()));
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -370,29 +376,29 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/is_remind_expenses_all")
|
|
|
@ApiOperation(value = "今天是否已全部提醒缴费")
|
|
|
public String isRemindFExpensesAllToday(){
|
|
|
try{
|
|
|
return write(200,"查询成功","data",signWebService.isRemindExpensesAll(getUID()));
|
|
|
}catch (Exception e){
|
|
|
public String isRemindFExpensesAllToday() {
|
|
|
try {
|
|
|
return write(200, "查询成功", "data", signWebService.isRemindExpensesAll(getUID()));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1,"查询失败");
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取续签约患者信息
|
|
|
*
|
|
|
* @param status 签约状态 1:待签约 2 待缴费 3 已签约
|
|
|
* @param status 签约状态 1:待签约 2 待缴费 3 已签约
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/sign_info_renew")
|
|
|
@ApiOperation(value = "医生获取获取列表")
|
|
|
public String getSignRenewInfoByDoctor(
|
|
|
@RequestParam(required = true)int status,
|
|
|
@RequestParam(required = true)int page,
|
|
|
@RequestParam(required = true)int pageSize) {
|
|
|
@RequestParam(required = true) int status,
|
|
|
@RequestParam(required = true) int page,
|
|
|
@RequestParam(required = true) int pageSize) {
|
|
|
try {
|
|
|
page = page > 0 ? page -1 : 0;
|
|
|
page = page > 0 ? page - 1 : 0;
|
|
|
List<Map<String, Object>> listSign = signWebService.getSignRenewWebByDoctor(getUID(), status, page, pageSize);
|
|
|
//List<Map<String, Object>> listSign = signWebService.getSignRenewWebByDoctor("64de930c-5b15-11e6-8344-fa163e8aee56", status, page, pageSize);
|
|
|
JSONObject data = new JSONObject();
|
|
@ -417,7 +423,7 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
json.put("status", temp.get("status"));
|
|
|
json.put("openid", temp.get("openid"));
|
|
|
json.put("renewTime", temp.get("czrq"));
|
|
|
json.put("renewFlag",temp.get("renewFlag"));
|
|
|
json.put("renewFlag", temp.get("renewFlag"));
|
|
|
String statusName = "";
|
|
|
switch (Integer.parseInt(temp.get("status").toString())) {
|
|
|
case 0:
|
|
@ -453,24 +459,25 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 批量提醒居民续签
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/sendRenewToPatients")
|
|
|
@ApiOperation(value = "提醒用户签约接口")
|
|
|
@ObserverRequired
|
|
|
public String sendRenewToPatients(){
|
|
|
try{
|
|
|
int rs ;
|
|
|
if(DateUtil.getNowMonth()>=7){
|
|
|
rs = signWebService.sendRenewOverToPatients(getAccessToken(),getUID());
|
|
|
}else{
|
|
|
rs = signWebService.sendRenewToPatients(getAccessToken(),getUID());
|
|
|
public String sendRenewToPatients() {
|
|
|
try {
|
|
|
int rs;
|
|
|
if (DateUtil.getNowMonth() >= 7) {
|
|
|
rs = signWebService.sendRenewOverToPatients(getAccessToken(), getUID());
|
|
|
} else {
|
|
|
rs = signWebService.sendRenewToPatients(getAccessToken(), getUID());
|
|
|
}
|
|
|
|
|
|
//int rs = signWebService.sendRenewToPatients(getAccessToken(),"zbqD201703150222");
|
|
|
if(rs == 0){
|
|
|
if (rs == 0) {
|
|
|
return write(200, "您当前签约用户无需提醒!", "data", rs);
|
|
|
}else{
|
|
|
} else {
|
|
|
return write(200, "提醒成功!", "data", rs);
|
|
|
}
|
|
|
}catch (Exception e){
|
|
@ -481,18 +488,18 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 同意或拒绝
|
|
|
*
|
|
|
* @param state
|
|
|
* @param refuseReason 医生拒签原因
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/agreeRenew")
|
|
|
@ApiOperation(value = "医生处理签约")
|
|
|
@ObserverRequired
|
|
|
public String agreeRenew(@RequestParam(required = true)String state,
|
|
|
@RequestParam(required = true)String patient,
|
|
|
public String agreeRenew(@RequestParam(required = true) String state,
|
|
|
@RequestParam(required = true) String patient,
|
|
|
@RequestParam(required = false) Long mesId,
|
|
|
@RequestParam(required = false)String signCode,
|
|
|
@RequestParam(required = false) String signCode,
|
|
|
@RequestParam(required = false) String health,
|
|
|
@RequestParam(required = false) String disease,
|
|
|
@RequestParam(required = false) String custom,
|
|
@ -500,16 +507,16 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
@RequestParam(required = false) String healthDoctor,
|
|
|
@RequestParam(required = false) Long teamCode,
|
|
|
@RequestParam(required = false) String expenses,
|
|
|
@RequestParam(required = false) String refuseReason){
|
|
|
try{
|
|
|
@RequestParam(required = false) String refuseReason) {
|
|
|
try {
|
|
|
//屏蔽了预签约
|
|
|
int rs = 0;
|
|
|
rs =signWebService.agreeRenewOverDue(getAccessToken(),getUID(),patient,state,mesId,"",signCode,health,disease,custom,sevId,healthDoctor,teamCode,expenses,refuseReason);
|
|
|
if(rs != 1){
|
|
|
rs = signWebService.agreeRenewOverDue(getAccessToken(), getUID(), patient, state, mesId, "", signCode, health, disease, custom, sevId, healthDoctor, teamCode, expenses, refuseReason);
|
|
|
if (rs != 1) {
|
|
|
//设置代码为已读
|
|
|
signWebService.setMessState(mesId);
|
|
|
return write(200, "未找到签约记录", "data", rs);
|
|
|
}else{
|
|
|
return write(200, "未找到签约记录", "data", rs);
|
|
|
} else {
|
|
|
return write(200, "操作成功!", "data", rs);
|
|
|
}
|
|
|
|
|
@ -544,7 +551,7 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
// }else{
|
|
|
// return write(200, "操作成功!", "data", rs);
|
|
|
// }
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
@ -590,19 +597,19 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
*统计
|
|
|
* 统计
|
|
|
* 咨询量、获取待预约、获取健康教育、获取健康指导
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping("/getSignCountInfoInYear")
|
|
|
@ApiOperation(value = "统计咨询量、获取待预约、获取健康教育、获取健康指导")
|
|
|
public String getSignCountInfoInYear(@RequestParam(required = true)String patient){
|
|
|
try{
|
|
|
JSONObject rs =signWebService.getSignCountInfoInYear(patient);
|
|
|
public String getSignCountInfoInYear(@RequestParam(required = true) String patient) {
|
|
|
try {
|
|
|
JSONObject rs = signWebService.getSignCountInfoInYear(patient);
|
|
|
//JSONObject rs =signWebService.getRenewYearCount("64de930c-5b15-11e6-8344-fa163e8aee56");
|
|
|
return write(200, "操作成功!", "data", rs);
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
@ -611,19 +618,19 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
@RequestMapping("/remindPatientRenew")
|
|
|
@ApiOperation(value = "提醒居民续签")
|
|
|
@ObserverRequired
|
|
|
public String remindPatientRenew(@RequestParam(required = true)String patient){
|
|
|
try{
|
|
|
int rs =signWebService.remainPatientRenew(getAccessToken(),patient,getUID());
|
|
|
public String remindPatientRenew(@RequestParam(required = true) String patient) {
|
|
|
try {
|
|
|
int rs = signWebService.remainPatientRenew(getAccessToken(), patient, getUID());
|
|
|
//int rs =signWebService.remainPatientRenew(getAccessToken(),patient,"zbqD201703150222");
|
|
|
if(rs==-1){
|
|
|
if (rs == -1) {
|
|
|
return error(-1, "提醒失败");
|
|
|
}else if(rs ==1){
|
|
|
} else if (rs == 1) {
|
|
|
return write(200, "微信提醒成功!", "data", rs);
|
|
|
}else if(rs ==2){
|
|
|
} else if (rs == 2) {
|
|
|
return write(200, "短信提醒成功!", "data", rs);
|
|
|
}
|
|
|
return error(-1, "提醒失败");
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
@ -631,12 +638,13 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 验证是否允许签约
|
|
|
*
|
|
|
* @param patient
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/checkCanRenew", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String checkCanRenew(@RequestParam(required = true) String patient){
|
|
|
public String checkCanRenew(@RequestParam(required = true) String patient) {
|
|
|
try {
|
|
|
//JSONObject result = patientService.checkCanSignRenew(patient);
|
|
|
JSONObject result = patientService.checkCanRenewNew(patient);
|
|
@ -649,11 +657,12 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取签约字典数据
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getSigndict", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getSigndict(@RequestParam(required = false) String signYear){
|
|
|
public String getSigndict(@RequestParam(required = false) String signYear) {
|
|
|
try {
|
|
|
JSONArray result = patientService.getSigndict(signYear);
|
|
|
return write(200, "查询成功", "data", result);
|
|
@ -665,11 +674,12 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取签约字典数据
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getSigndictTree", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getSigndictTree(@RequestParam(required = true) Long teamCode){
|
|
|
public String getSigndictTree(@RequestParam(required = true) Long teamCode) {
|
|
|
try {
|
|
|
JSONArray result = patientService.getSignByTeamCodeGpbyServer(teamCode);
|
|
|
return write(200, "查询成功", "data", result);
|
|
@ -681,13 +691,14 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取当前医生签约关系分组
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getSignByDoctorCodeGpbyServer", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getSignByDoctorCodeGpbyServer(){
|
|
|
public String getSignByDoctorCodeGpbyServer() {
|
|
|
try {
|
|
|
JSONArray result = patientService.getSignByDoctorCodeGpbyServer(getUID(),null, false, "");
|
|
|
JSONArray result = patientService.getSignByDoctorCodeGpbyServer(getUID(), null, false, "");
|
|
|
//JSONArray result = patientService.getSignByDoctorCodeGpbyServer("xh1D201703150222");
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
} catch (Exception e) {
|
|
@ -697,12 +708,13 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取团队名称
|
|
|
* 获取团队名称
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getTeamNameByTeamCode", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getTeamNameByTeamCode(@RequestParam(required = true) Long teamCode){
|
|
|
public String getTeamNameByTeamCode(@RequestParam(required = true) Long teamCode) {
|
|
|
try {
|
|
|
String result = patientService.getTeamNameByTeamCode(teamCode);
|
|
|
return write(200, "查询成功", "data", result);
|
|
@ -713,7 +725,7 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
@RequestMapping(value = "/getPatientSignLogInfo", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getPatientSignLogInfo(@RequestParam(required = true)String patient){
|
|
|
public String getPatientSignLogInfo(@RequestParam(required = true) String patient) {
|
|
|
try {
|
|
|
JSONObject result = signWebService.getPatientSignLogInfo(patient);
|
|
|
return write(200, "查询成功", "data", result);
|
|
@ -725,12 +737,12 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
@RequestMapping(value = "/updateSignServerByCode", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
@ObserverRequired
|
|
|
public String updateSignServerByCode(@RequestParam(required = true)String signCode,@RequestParam(required = true)String sevId){
|
|
|
public String updateSignServerByCode(@RequestParam(required = true) String signCode, @RequestParam(required = true) String sevId) {
|
|
|
try {
|
|
|
int result = signWebService.updateSignServerByCode(signCode,sevId);
|
|
|
if(result==1){
|
|
|
int result = signWebService.updateSignServerByCode(signCode, sevId);
|
|
|
if (result == 1) {
|
|
|
return write(200, "保存成功", "data", result);
|
|
|
}else{
|
|
|
} else {
|
|
|
return write(200, "保存失败", "data", result);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
@ -741,11 +753,12 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取厦门市区
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getTownList", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getTownList(){
|
|
|
public String getTownList() {
|
|
|
try {
|
|
|
return write(200, "查询成功", "data", signWebService.getTownList());
|
|
|
} catch (Exception e) {
|
|
@ -756,12 +769,13 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取区域下街道
|
|
|
*
|
|
|
* @param town
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getStreetListByTown", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getStreetListByTown(@RequestParam(required = true)String town){
|
|
|
public String getStreetListByTown(@RequestParam(required = true) String town) {
|
|
|
try {
|
|
|
return write(200, "查询成功", "data", signWebService.getStreetListByTown(town));
|
|
|
} catch (Exception e) {
|
|
@ -773,12 +787,13 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取街道下居委会
|
|
|
*
|
|
|
* @param street
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/getCountryListByStreet", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String getCountryListByStreet(@RequestParam(required = true)String street){
|
|
|
public String getCountryListByStreet(@RequestParam(required = true) String street) {
|
|
|
try {
|
|
|
return write(200, "查询成功", "data", signWebService.getCountryListByStreet(street));
|
|
|
} catch (Exception e) {
|
|
@ -789,35 +804,86 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
|
|
|
/**
|
|
|
* 获取居委会字段
|
|
|
*
|
|
|
* @param countryCode
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/updatePatientCountry", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String setPatientCountry(@RequestParam(required = true)String countryCode){
|
|
|
public String setPatientCountry(@RequestParam(required = true) String countryCode) {
|
|
|
try {
|
|
|
return write(200, "保存成功", "data", signWebService.setPatientCountry(countryCode,getRepUID()));
|
|
|
return write(200, "保存成功", "data", signWebService.setPatientCountry(countryCode, getRepUID()));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 根据身份证号同步居民签约信息
|
|
|
*
|
|
|
* @param idcard
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/loadSignFamilyByIdcard", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String loadSignFamilyByIdcard(@RequestParam(required = true)String idcard){
|
|
|
public String loadSignFamilyByIdcard(@RequestParam(required = true) String idcard) {
|
|
|
try {
|
|
|
String re = jwSignService.LoadSignFamilyByIdcard(idcard);
|
|
|
Patient patient = patientService.findByIdcard(idcard);
|
|
|
return write(200, "更新签约成功","patient",patient);
|
|
|
return write(200, "更新签约成功", "patient", patient);
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "更新签约失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/findPatientCertificate", method = {RequestMethod.GET})
|
|
|
@ResponseBody
|
|
|
@ApiOperation("获取居民服务类型凭证")
|
|
|
public String findPatientCertificate(@ApiParam(name = "patient", value = "居民code") @RequestParam(required = true)String patient) {
|
|
|
try {
|
|
|
return write(200, "查询成功", "data", signWebService.findPatientCertificate(patient));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/findPatientCertificateByType", method = {RequestMethod.GET})
|
|
|
@ResponseBody
|
|
|
@ApiOperation("获取居民服务类型凭证")
|
|
|
public String findPatientCertificate(@ApiParam(name = "patient", value = "居民code") @RequestParam(required = true)String patient,
|
|
|
@ApiParam(name = "type", value = "服务类型code") @RequestParam(required = true)String type) {
|
|
|
try {
|
|
|
return write(200, "查询成功", "data", signWebService.findByPatientAndSignYearAndDelAndSignDictCode(patient,type));
|
|
|
} catch (Exception e) {
|
|
|
error(e);
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/getSignDict")
|
|
|
@ApiOperation(value = "获取当前年度服务类型")
|
|
|
@ResponseBody
|
|
|
public String getSignDict() {
|
|
|
try{
|
|
|
return write(200, "操作成功!", "data", familyContractService.getSignDict());
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping("/findPatientSignServerBySignCode")
|
|
|
@ApiOperation(value = "获取患者申请的服务类型")
|
|
|
@ResponseBody
|
|
|
public String findPatientSignServerBySignCode(String signCode){
|
|
|
try{
|
|
|
return write(200, "操作成功!", "data", familyContractService.findPatientSignServerBySignCode(signCode));
|
|
|
}catch (Exception e){
|
|
|
error(e);
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
|
}
|
|
|
}
|