|
@ -155,7 +155,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
* @param group 患者组 1是健康人群组 2是慢病 3是65岁以上人群
|
|
|
* @param emerMobile 应急人手机号
|
|
|
* @param images 图片URL,多图以逗号分隔
|
|
|
* @param expenses 签约费用
|
|
|
* @param expenses 签约费用
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "agent")
|
|
@ -163,7 +163,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
public String agent(
|
|
|
String name,
|
|
|
String idcard,
|
|
|
@RequestParam(required = false)String ssc,
|
|
|
@RequestParam(required = false) String ssc,
|
|
|
String mobile,
|
|
|
@RequestParam(required = false, defaultValue = "") String disease,
|
|
|
@RequestParam(required = false) String emerMobile,
|
|
@ -172,7 +172,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
String healthDoctor,
|
|
|
String healthDoctorName,
|
|
|
String images,
|
|
|
@RequestParam(required = false,defaultValue = "0") String expenses,
|
|
|
@RequestParam(required = false, defaultValue = "0") String expenses,
|
|
|
String doctor,//全科医生code
|
|
|
String doctorName,//全科医生名字
|
|
|
String signDoctorCode,//簽約人code
|
|
@ -216,7 +216,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
if (StringUtils.isEmpty(idcard)) {
|
|
|
return error(-1, "身份证号不允许为空!");
|
|
|
}
|
|
|
if(StringUtils.isEmpty(ssc)){
|
|
|
if (StringUtils.isEmpty(ssc)) {
|
|
|
return error(-1, "社保卡号不允许为空!");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(mobile)) {
|
|
@ -236,7 +236,7 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
Doctor cDoctor = doctorService.findDoctorByCode(getUID());
|
|
|
SignFamily sf = familyContractService.agent(getAccessToken(), name, doctor, doctorName,
|
|
|
healthDoctor, healthDoctorName, majorDoctor, majorDoctorName, cDoctor.getHospital(), cDoctor.getHosptialName(),
|
|
|
idcard, ssc, mobile, emerMobile, images, disease,expenses,signDoctorCode,signDoctorName,signDoctorLevel,group);
|
|
|
idcard, ssc, mobile, emerMobile, images, disease, expenses, signDoctorCode, signDoctorName, signDoctorLevel, group);
|
|
|
|
|
|
if (sf == null) {
|
|
|
return error(-1, "代理签约失败!");
|
|
@ -257,7 +257,6 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
* @param healthDoctorName 健康管理师姓名
|
|
|
* @param majorDoctor 专科医生标识
|
|
|
* @param disease 疾病code
|
|
|
* @param majorhDoctorName 专科医生姓名
|
|
|
* @param msgid 消息id
|
|
|
* @param patientIDcard 患者身份证
|
|
|
* @param type 处理类型:1同意,2拒绝
|
|
@ -275,10 +274,10 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
@RequestParam(required = false) String majorDoctorName,
|
|
|
long msgid,
|
|
|
String patientIDcard,
|
|
|
int type,String group,
|
|
|
@RequestParam(required = false,defaultValue = "0") String expenses) {
|
|
|
int type, String group,
|
|
|
@RequestParam(required = false, defaultValue = "0") String expenses) {
|
|
|
try {
|
|
|
int res = familyContractService.handleSign(signType, getAccessToken(), healthDoctor, healthDoctorName, msgid, patientIDcard, type, disease, majorDoctor, majorDoctorName,group,expenses);
|
|
|
int res = familyContractService.handleSign(signType, getAccessToken(), healthDoctor, healthDoctorName, msgid, patientIDcard, type, disease, majorDoctor, majorDoctorName, group, expenses);
|
|
|
if (res == -1) {
|
|
|
return error(-1, "未知的处理类型!");
|
|
|
} else if (res == 0) {
|
|
@ -454,17 +453,17 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "patient_sanshi_signinfo")
|
|
|
@ResponseBody
|
|
|
public String getPatientSanshiSignByIdCard(String idCard){
|
|
|
try{
|
|
|
if(StringUtils.isEmpty(idCard)){
|
|
|
return error(-1,"请输入身份证号!");
|
|
|
public String getPatientSanshiSignByIdCard(String idCard) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(idCard)) {
|
|
|
return error(-1, "请输入身份证号!");
|
|
|
}
|
|
|
|
|
|
JSONObject result = familyContractService.getSanshiSingInfoByPatientIdCard(idCard);
|
|
|
|
|
|
return write(200,"查询成功!","data",result);
|
|
|
}catch (Exception e){
|
|
|
return error(-1,"查询失败!");
|
|
|
return write(200, "查询成功!", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, "查询失败!");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -472,28 +471,38 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
* 更新患者签约补贴类型
|
|
|
*
|
|
|
* @param expensesType 补贴类型
|
|
|
* @param patient 患者
|
|
|
* @param patient 患者
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/expenses_type_update")
|
|
|
@ResponseBody
|
|
|
public String updateExpensesType(String expensesType,String patient){
|
|
|
try{
|
|
|
if(StringUtils.isEmpty(expensesType)){
|
|
|
return error(-1,"补贴类型不能为空");
|
|
|
public String updateExpensesType(String expensesType, String patient) {
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(expensesType)) {
|
|
|
return error(-1, "补贴类型不能为空");
|
|
|
}
|
|
|
if(StringUtils.isEmpty(patient)){
|
|
|
return error(-1,"患者不能为空");
|
|
|
if (StringUtils.isEmpty(patient)) {
|
|
|
return error(-1, "患者不能为空");
|
|
|
}
|
|
|
|
|
|
if(familyContractService.updateExpensesType(expensesType,patient)){
|
|
|
return write(200,"更新成功");
|
|
|
}else{
|
|
|
return write(-1,"不存在该患者签约");
|
|
|
SignFamily familySign = familyContractService.findByPatient(patient);
|
|
|
|
|
|
if (familySign == null) {
|
|
|
return error(-1, "居民家庭签约不存在");
|
|
|
} else {
|
|
|
if (StringUtils.isNotEmpty(familySign.getMedicalInsuranceNum())) {
|
|
|
return error(-1, "数据已上传社保,不能修改补贴类型");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (familyContractService.updateExpensesType(expensesType, patient)) {
|
|
|
return write(200, "更新成功");
|
|
|
} else {
|
|
|
return write(-1, "不存在该患者签约");
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1,"更新失败");
|
|
|
return error(-1, "更新失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
@ -505,8 +514,8 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
*/
|
|
|
@RequestMapping(value = "/patient_signing")
|
|
|
@ResponseBody
|
|
|
public String getSigningPatientInfo(String patient){
|
|
|
try{
|
|
|
public String getSigningPatientInfo(String patient) {
|
|
|
try {
|
|
|
Patient temp = patientInfoService.findByCode(patient);
|
|
|
if (temp != null) {
|
|
|
JSONObject json = new JSONObject();
|
|
@ -541,20 +550,20 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
json.put("ssc", temp.getSsc());
|
|
|
|
|
|
String diseases = redisTemplate.opsForValue().get("disease:" + patient);
|
|
|
if(!StringUtils.isEmpty(diseases)){
|
|
|
json.put("diseases",new JSONArray(diseases));
|
|
|
}else{
|
|
|
json.put("diseases","");
|
|
|
if (!StringUtils.isEmpty(diseases)) {
|
|
|
json.put("diseases", new JSONArray(diseases));
|
|
|
} else {
|
|
|
json.put("diseases", "");
|
|
|
}
|
|
|
|
|
|
SignFamily jtSign = familyContractService.findSigningByPatient(patient);
|
|
|
|
|
|
// 家庭签约
|
|
|
if(jtSign != null){
|
|
|
if (jtSign != null) {
|
|
|
json.put("applySurrDate", jtSign.getPatientApplyUnsignDate());
|
|
|
json.put("applyDate", jtSign.getPatientApplyDate());
|
|
|
json.put("jtSign",new JSONObject(jtSign));
|
|
|
}else{
|
|
|
json.put("jtSign", new JSONObject(jtSign));
|
|
|
} else {
|
|
|
throw new Exception("未找到患者待家庭签约的数据");
|
|
|
}
|
|
|
|
|
@ -562,9 +571,42 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
} else {
|
|
|
return error(-1, "患者信息查询失败!");
|
|
|
}
|
|
|
}catch (Exception e){
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1, "患者信息查询失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 获取家庭签约社保流水号
|
|
|
*
|
|
|
* @param patient
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/medical_insurance_num")
|
|
|
@ResponseBody
|
|
|
public String getMedicalInsuranceNum(String patient) {
|
|
|
try {
|
|
|
JSONObject json = new JSONObject();
|
|
|
SignFamily familySign = familyContractService.findByPatient(patient);
|
|
|
|
|
|
if (familySign != null) {
|
|
|
if (StringUtils.isNotEmpty(familySign.getMedicalInsuranceNum())) {
|
|
|
json.put("status", 1); // 已上传社保
|
|
|
json.put("medicalInsuranceNum", familySign.getMedicalInsuranceNum());
|
|
|
} else {
|
|
|
json.put("status", 0);
|
|
|
json.put("medicalInsuranceNum", "");
|
|
|
}
|
|
|
} else {
|
|
|
json.put("status", -1); // 没有家庭签约
|
|
|
json.put("medicalInsuranceNum", "");
|
|
|
}
|
|
|
|
|
|
return write(200, "查询成功", "data", json);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1,"患者信息查询失败");
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
}
|