|
@ -4,6 +4,7 @@ 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.SignWebService;
|
|
|
import com.yihu.wlyy.service.common.account.PatientService;
|
|
|
import com.yihu.wlyy.util.CommonUtil;
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
|
import com.yihu.wlyy.util.IdCardUtil;
|
|
@ -16,10 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.data.domain.Page;
|
|
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
@ -46,7 +44,8 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
private DoctorInfoService infoService;
|
|
|
@Autowired
|
|
|
StringRedisTemplate redisTemplate;
|
|
|
|
|
|
@Autowired
|
|
|
private PatientService patientService;
|
|
|
/**
|
|
|
* 三师签约列表查询
|
|
|
*
|
|
@ -522,8 +521,8 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
@ApiOperation(value = "提醒居民续签")
|
|
|
public String remindPatientRenew(@RequestParam(required = true)String patient){
|
|
|
try{
|
|
|
//int rs =signWebService.remainPatientRenew(getAccessToken(),patient,getUID());
|
|
|
int rs =signWebService.remainPatientRenew(getAccessToken(),patient,"test00000000006");
|
|
|
int rs =signWebService.remainPatientRenew(getAccessToken(),patient,getUID());
|
|
|
//int rs =signWebService.remainPatientRenew(getAccessToken(),patient,"test00000000006");
|
|
|
if(rs==-1){
|
|
|
return error(-1, "提醒失败");
|
|
|
}else if(rs ==1){
|
|
@ -537,4 +536,20 @@ public class DoctorSignController extends WeixinBaseController {
|
|
|
return error(-1, "请求失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 验证是否允许签约
|
|
|
* @param patient
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/checkCanRenew", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
@ResponseBody
|
|
|
public String checkCanRenew(@RequestParam(required = true) String patient){
|
|
|
try {
|
|
|
JSONObject result = patientService.checkCanSignRenew(patient);
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
}
|