|  | @ -57,16 +57,16 @@ public class DoctorSignController extends WeixinBaseController {
 | 
	
		
			
				|  |  |     @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 +127,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 +159,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 +229,13 @@ public class DoctorSignController extends WeixinBaseController {
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     @RequestMapping("/sign_info")
 | 
	
		
			
				|  |  |     public String getSignInfoByDoctor(
 | 
	
		
			
				|  |  |             @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;
 | 
	
		
			
				|  |  |             @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();
 | 
	
	
		
			
				|  | @ -298,7 +299,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();
 | 
	
		
			
				|  |  |                         }
 | 
	
	
		
			
				|  | @ -341,12 +342,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, "查询失败");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -357,11 +358,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, "查询失败");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -372,29 +373,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();
 | 
	
	
		
			
				|  | @ -419,7 +420,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:
 | 
	
	
		
			
				|  | @ -455,24 +456,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){
 | 
	
	
		
			
				|  | @ -483,18 +485,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,
 | 
	
	
		
			
				|  | @ -502,16 +504,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);
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  | 
 | 
	
	
		
			
				|  | @ -546,7 +548,7 @@ public class DoctorSignController extends WeixinBaseController {
 | 
	
		
			
				|  |  | //            }else{
 | 
	
		
			
				|  |  | //                return write(200, "操作成功!", "data", rs);
 | 
	
		
			
				|  |  | //            }
 | 
	
		
			
				|  |  |         }catch (Exception e){
 | 
	
		
			
				|  |  |         } catch (Exception e) {
 | 
	
		
			
				|  |  |             error(e);
 | 
	
		
			
				|  |  |             return error(-1, "请求失败");
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -592,19 +594,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, "请求失败");
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -613,19 +615,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, "请求失败");
 | 
	
		
			
				|  |  |         }
 | 
	
	
		
			
				|  | @ -633,12 +635,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);
 | 
	
	
		
			
				|  | @ -651,11 +654,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);
 | 
	
	
		
			
				|  | @ -667,11 +671,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);
 | 
	
	
		
			
				|  | @ -683,13 +688,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) {
 | 
	
	
		
			
				|  | @ -699,12 +705,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);
 | 
	
	
		
			
				|  | @ -715,7 +722,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);
 | 
	
	
		
			
				|  | @ -727,12 +734,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) {
 | 
	
	
		
			
				|  | @ -743,11 +750,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) {
 | 
	
	
		
			
				|  | @ -758,12 +766,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) {
 | 
	
	
		
			
				|  | @ -775,12 +784,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) {
 | 
	
	
		
			
				|  | @ -791,35 +801,49 @@ 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, "查询失败!");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | }
 |