Commit e87f55dec74c71fc6f232229aab6a62bf52a4959

Authored by liquanyu
1 parent f26a0953b4
Exists in master and in 1 other branch dev

update

Showing 4 changed files with 59 additions and 5 deletions

platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/AntExRecordFacade.java View file @ e87f55d
... ... @@ -59,6 +59,10 @@
59 59 */
60 60 @Component
61 61 public class AntExRecordFacade {
  62 +
  63 + //滦平高危同步地址
  64 + public static final String LP_RISK_URL = PropertiesUtils.getPropertyValue("lp_risk_url");
  65 +
62 66 public static final List<String> INCR_HRISK = new ArrayList();
63 67 @Autowired
64 68 private AntExRecordService recordService;
... ... @@ -2421,8 +2425,11 @@
2421 2425 {
2422 2426 continue;
2423 2427 }
2424   - data.put("risks",risks);
2425   - System.out.println(JsonUtil.obj2Str(data));
  2428 + data.put("risks", risks);
  2429 + String json = JsonUtil.obj2Str(data);
  2430 + ExceptionUtils.catchException("yun params = " + json);
  2431 + String result = HttpClientUtil.doPostSSL(LP_RISK_URL + "/api/ms/mommy", json);
  2432 + ExceptionUtils.catchException("yun result = " + result);
2426 2433 }
2427 2434 }
2428 2435 }
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyCheckFacade.java View file @ e87f55d
... ... @@ -48,7 +48,8 @@
48 48  
49 49 @Component
50 50 public class BabyCheckFacade extends BaseServiceImpl {
51   -
  51 + //滦平高危同步地址
  52 + public static final String LP_RISK_URL = PropertiesUtils.getPropertyValue("lp_risk_url");
52 53 @Autowired
53 54 private BabyCheckService babyCheckService;
54 55 @Autowired
... ... @@ -3972,7 +3973,10 @@
3972 3973 continue;
3973 3974 }
3974 3975 data.put("risks",risks);
3975   - System.out.println(JsonUtil.obj2Str(data));
  3976 + String json = JsonUtil.obj2Str(data);
  3977 + ExceptionUtils.catchException("baby params = " + json);
  3978 + String result = HttpClientUtil.doPostSSL(LP_RISK_URL + "/api/ms/baby", json);
  3979 + ExceptionUtils.catchException("baby result = " + result);
3976 3980 }
3977 3981 }
3978 3982 }
platform-operate-api/src/main/resources/config.properties View file @ e87f55d
... ... @@ -45,4 +45,6 @@
45 45 hospitalId=2100002042
46 46  
47 47 cert_url=https://try-cert-api.healthbaby.com.cn
  48 +
  49 +lp_risk_url=http://192.168.1.141:8082
platform-operate-api/src/main/resources/spring/applicationContext-quartz.xml View file @ e87f55d
... ... @@ -590,8 +590,45 @@
590 590 </bean>
591 591  
592 592  
  593 + <!-- 滦平高危评估同步到his-->
  594 + <bean id="patientRiskWork" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
  595 + <!-- 要调用的bean -->
  596 + <property name="targetObject" ref="antExRecordFacade"></property>
  597 + <!-- 要调用的Method -->
  598 + <property name="targetMethod" value="syncLpRisk"></property>
  599 + <!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 -->
  600 + <property name="concurrent" value="false"></property>
  601 + </bean>
593 602  
  603 + <!-- 配置一个触发器 0 0 0/1 * * ?-->
  604 + <bean id="patientRiskTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
  605 + <property name="jobDetail" ref="patientRiskWork"></property>
  606 + <property name="cronExpression" value="0 30 10 * * ?"></property>
  607 + <!--<property name="cronExpression" value="0/5 * * * * ? "></property>-->
  608 + </bean>
594 609  
  610 +
  611 + <bean id="babyRiskWork" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean">
  612 + <!-- 要调用的bean -->
  613 + <property name="targetObject" ref="babyCheckFacade"></property>
  614 + <!-- 要调用的Method -->
  615 + <property name="targetMethod" value="syncBabyRiskToLp"></property>
  616 + <!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 -->
  617 + <property name="concurrent" value="false"></property>
  618 + </bean>
  619 +
  620 + <!-- 配置一个触发器 0 0 0/1 * * ?-->
  621 + <bean id="babyRiskTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean">
  622 + <property name="jobDetail" ref="babyRiskWork"></property>
  623 + <property name="cronExpression" value="0 25 10 * * ?"></property>
  624 + <!--<property name="cronExpression" value="0/5 * * * * ? "></property>-->
  625 + </bean>
  626 +
  627 +
  628 +
  629 +
  630 +
  631 +
595 632 <!-- 总调度,用于启动定时器 -->
596 633 <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
597 634 <property name="triggers" >
... ... @@ -626,6 +663,10 @@
626 663 <ref bean="autoGetSieveTrigger" />
627 664 <ref bean="genWeightTrigger" />
628 665 <!-- <ref bean="handleTrackDownTrigger" />-->
  666 +
  667 + <ref bean="patientRiskTrigger"/>
  668 + <ref bean="babyRiskTrigger"/>
  669 +
629 670  
630 671 <!--陵城孕前优生临床检查自动保存到表
631 672 <ref bean="dzlcTyTrigger" />-->