Przeglądaj źródła

Merge branch 'dev' of zd_123/patient-co-management into dev

liuwenbin 6 lat temu
rodzic
commit
00249d472d

+ 4 - 2
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/service/imm/ChildVaccinImmuneService.java

@ -117,7 +117,9 @@ public class ChildVaccinImmuneService extends BaseService {
											jdbcTemplate.update(uSql);
										}else {
											//判断是否过了7天提醒时间
											if (childImmuneVaccin.getAlert_tag()==1 && DateUtil.getPreDays(childImmuneVaccin.getAlert_time(),7).before(new Date())) {
											String afterAlertSevenDay = DateUtil.dateToStr(DateUtil.getPreDays(childImmuneVaccin.getAlert_time(),7),DateUtil.YYYY_MM_DD);
											String nowShotDay = DateUtil.dateToStrShort(new Date());
											if (childImmuneVaccin.getAlert_tag()==1 && DateUtil.strToDate(afterAlertSevenDay,DateUtil.YYYY_MM_DD).before(DateUtil.strToDate(nowShotDay,DateUtil.YYYY_MM_DD))) {
												String updateSql = "UPDATE wlyy_child_immune_vaccin SET alert_tag=0  AND `code`='" + childImmuneVaccin.getCode() + "'";
												jdbcTemplate.update(updateSql);
											}
@ -289,7 +291,7 @@ public class ChildVaccinImmuneService extends BaseService {
                            json.put("first", temp.getFirst().replace("key1",String.valueOf(map.get("name"))).replace("key2", childName));
                            json.put("url",temp.getUrl().replace("key1",childCode));
                            logger.info("weiTempJOSN:"+json.toString());
							pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 24,String.valueOf(map.get("openid")) , String.valueOf(map.get("name")), json);
							pushMsgTask.putWxMsg(weiXinAccessTokenUtils.getAccessToken(), 11,String.valueOf(map.get("openid")) , String.valueOf(map.get("name")), json);
						}catch (Exception e){
							e.printStackTrace();
							flag = false;

+ 9 - 6
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/service/imm/ChildInfoService.java

@ -38,18 +38,21 @@ public class ChildInfoService extends BaseService {
		//2.如果本地数据库无记录则请求基卫接口查询
		if(childInfo == null){
		    String re = immuneService.GetChildrenInfo(barCode);
		    System.out.println("条形码--"+barCode+"请求基卫接口返回结果--"+re);
//		    String re = "{\"status\":200,\"message\":\"string\",\"data\":{\"birthday\":\"2017-01-05\",\"deptName\":\"金山街道社区卫生服务中心\",\"deptNum\":\"350211B1040\",\"name\":\"刘柠\",\"sex\":2.0}}";
			JSONObject rejson = JSONObject.parseObject(re);
			int status = rejson.getInteger("status");
			JSONObject data = rejson.getJSONObject("data");
			if(200 == status){
				JSONObject data = rejson.getJSONObject("data").getJSONObject("body");
				childInfo = new ChildInfo();
				childInfo.setCode(UUID.randomUUID().toString());
				childInfo.setBirthday(data.getString("birthday"));
				childInfo.setSex(data.getString("sex"));
				childInfo.setName(data.getString("name"));
				childInfo.setDeliverOrgname(data.getString("deptName"));
				childInfo.setDeliverJworgcode(data.getString("deptNum"));
				childInfo.setBirthday(data.getString("etCsrq"));
				childInfo.setSex(data.getString("etXb"));
				childInfo.setName(data.getString("etXm"));
				/*childInfo.setDeliverOrgname(data.getString("deptName"));
				childInfo.setDeliverJworgcode(data.getString("deptNum"));*/
				childInfo.setMotherIdcard(data.getString("etMqsfz"));
				childInfo.setMotherName(data.getString("etMqxm"));
				childInfo.setDel(0);
				childInfo.setCreate_time(new Date());
				childInfo.setBarcode(barCode);

+ 5 - 1
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/booking/PatientBookingController.java

@ -187,7 +187,11 @@ public class PatientBookingController extends WeixinBaseController{
    
        try{
            ChildInfo childInfo  = childInfoService.getByBarCode(barCode);
            return write(200, "查询成功","data",childInfo);
            if (childInfo==null){
                return write(-1,"根据免疫卡号查询不到儿童");
            }else {
                return write(200, "查询成功","data",childInfo);
            }
        }catch (Exception e){
            error(e);
            return error(-1, e.getMessage());

+ 3 - 0
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/family/FamilyMemberController.java

@ -498,6 +498,9 @@ public class FamilyMemberController extends WeixinBaseController {
        try {
    
            ChildInfo childInfo  = childInfoService.getByBarCode(barCode);
            if (childInfo==null){
                return write(-1,"根据免疫卡号查询不到儿童!");
            }
            
            if(StringUtils.isNotBlank(idcard) && !idcard.equals(childInfo.getIdcard()) && StringUtils.isNotBlank(childInfo.getIdcard())){
                return error(-1, "输入的新生儿身份证信息不一致,无法绑定");

+ 16 - 7
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/third/gateway/controller/message/GcOtherMessageController.java

@ -72,11 +72,7 @@ public class GcOtherMessageController {
            @ApiParam(name = "type", value = "1待支付,2支付成功", required = true) @RequestParam(value = "type", required = true) String type
            ) {
        try {
            System.out.println("------------start send message--------------");
            System.out.println("param1-------"+cardNo);
            System.out.println("param2-------"+templateJson);
            System.out.println("param3-------"+type);
            System.out.println("param4-------"+url);
            Patient patient =  patientDao.findBySsc(cardNo);
            SignFamily signFamily = null;
            if (patient!=null){
@ -92,10 +88,16 @@ public class GcOtherMessageController {
            }else if ("2".equals(type)){
                templateId=template_pay_success;
            }
            System.out.println("接收者id----"+patient.getOpenid());
            System.out.println("消息模板id----"+templateId);
            //郑松
            if ("oULM4xNdf4lqcjuq0-MGFRuhOcz8".equals(patient.getOpenid())){
                System.out.println("------------start send message--------------");
                System.out.println("param1-------"+cardNo);
                System.out.println("param2-------"+templateJson);
                System.out.println("param3-------"+type);
                System.out.println("param4-------"+url);
                System.out.println("接收者id----"+patient.getOpenid());
                System.out.println("消息模板id----"+templateId);
                weiXinTempMsgSendUtils.sendTemplateMessage(templateId, patient.getOpenid(), url, new JSONObject(templateJson));
            }
            /*if ("3502110100".equals(signFamily.getHospital())){
@ -103,6 +105,13 @@ public class GcOtherMessageController {
            }*/
            //秀萍
            if ("oULM4xPHQO1MYOPJdI9AtVKx3fIo".equals(patient.getOpenid())){
                System.out.println("------------start send message--------------");
                System.out.println("param1-------"+cardNo);
                System.out.println("param2-------"+templateJson);
                System.out.println("param3-------"+type);
                System.out.println("param4-------"+url);
                System.out.println("接收者id----"+patient.getOpenid());
                System.out.println("消息模板id----"+templateId);
                weiXinTempMsgSendUtils.sendTemplateMessage(templateId, patient.getOpenid(), url, new JSONObject(templateJson));
            }
            return new BaseResultModel(BaseResultModel.statusEm.success.getCode(),BaseResultModel.statusEm.success.getMessage());