|
@ -688,20 +688,42 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
* @param healthDoctor 健康管理师code
|
|
* @param healthDoctor 健康管理师code
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@RequestMapping(value = "/patient_health_doctor")
|
|
|
|
|
|
@RequestMapping(value = "/sign_info_update")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public String setHealthDoctor(String patient,String healthDoctor){
|
|
|
|
|
|
public String setHealthDoctor(String patient,@RequestParam(required = false) String healthDoctor
|
|
|
|
,@RequestParam(required = false)String expensesType){
|
|
try{
|
|
try{
|
|
JSONObject result = familyContractService.updateHealthDoctor(patient,healthDoctor);
|
|
|
|
|
|
if (StringUtils.isEmpty(patient)) {
|
|
|
|
return error(-1, "患者不能为空");
|
|
|
|
}
|
|
|
|
|
|
|
|
if(StringUtils.isNotEmpty(healthDoctor)) {
|
|
|
|
JSONObject result = familyContractService.updateHealthDoctor(patient, healthDoctor);
|
|
|
|
|
|
if(result.getInt("status") == 1){
|
|
|
|
return write(200,"分配健管师成功");
|
|
|
|
}else{
|
|
|
|
return error(-1,result.getString("msg"));
|
|
|
|
|
|
if (result.getInt("status") != 1) {
|
|
|
|
return error(-1, result.getString("msg"));
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
if(StringUtils.isNotEmpty(expensesType)){
|
|
|
|
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 error(-1, "更新失败");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return write(200,"更新成功");
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return error(-1,"分配健管师失败");
|
|
|
|
|
|
return error(-1,"更新失败");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|