Commit ed2163c072226e80046f1533560e27caf1666ab1
1 parent
a9ae65bd44
Exists in
master
and in
6 other branches
快速测量
Showing 3 changed files with 46 additions and 0 deletions
platform-biz-service/src/main/resources/mainOrm/master/MeasureDataInfoMapper.xml
View file @
ed2163c
| ... | ... | @@ -118,6 +118,14 @@ |
| 118 | 118 | <if test="createdTimeEnd != null"> |
| 119 | 119 | AND <![CDATA[ m.created < date_format(#{createdTimeEnd},'%Y-%m-%d') ]]> |
| 120 | 120 | </if> |
| 121 | + | |
| 122 | + <if test="modifiedTimeStart != null"> | |
| 123 | + AND m.modified >= date_format(#{modifiedTimeStart},'%Y-%m-%d') | |
| 124 | + </if> | |
| 125 | + <if test="modifiedTimeEnd != null"> | |
| 126 | + AND <![CDATA[ m.modified < date_format(#{modifiedTimeEnd},'%Y-%m-%d') ]]> | |
| 127 | + </if> | |
| 128 | + | |
| 121 | 129 | <if test="todayCount != null and todayCount > 0"> |
| 122 | 130 | m.today_count = #{todayCount,jdbcType=INTEGER}, |
| 123 | 131 | </if> |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/MeasureInfoFacade.java
View file @
ed2163c
| ... | ... | @@ -579,5 +579,25 @@ |
| 579 | 579 | } |
| 580 | 580 | |
| 581 | 581 | |
| 582 | + /** | |
| 583 | + * 处理历史测量保存的数据 | |
| 584 | + */ | |
| 585 | + public void doHistoryMeasureData() | |
| 586 | + { | |
| 587 | + MeasureDataInfoQuery query = new MeasureDataInfoQuery(); | |
| 588 | + query.setModifiedTimeEnd(DateUtil.parseYMD(DateUtil.getymd())); | |
| 589 | + List<MeasureDataInfoModel> list = mysqlMeasureDataInfoService.queryMeasureList(query); | |
| 590 | + if (CollectionUtils.isNotEmpty(list)) | |
| 591 | + { | |
| 592 | + for (MeasureDataInfoModel model : list) | |
| 593 | + { | |
| 594 | + model.setRecordContent(""); | |
| 595 | + mysqlMeasureDataInfoService.updateMeasureDataInfo(model); | |
| 596 | + } | |
| 597 | + | |
| 598 | + } | |
| 599 | + } | |
| 600 | + | |
| 601 | + | |
| 582 | 602 | } |
platform-operate-api/src/main/resources/spring/applicationContext-quartz.xml
View file @
ed2163c
| ... | ... | @@ -230,6 +230,23 @@ |
| 230 | 230 | </bean> |
| 231 | 231 | |
| 232 | 232 | |
| 233 | + <!-- 快速测量定时任务 --> | |
| 234 | + <bean id="measureDataWorker" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean"> | |
| 235 | + <!-- 要调用的bean --> | |
| 236 | + <property name="targetObject" ref="measureInfoFacade"></property> | |
| 237 | + <!-- 要调用的Method --> | |
| 238 | + <property name="targetMethod" value="doHistoryMeasureData"></property> | |
| 239 | + <!-- 是否并发,false表示 如果发生错误也不影响下一次的调用 --> | |
| 240 | + <property name="concurrent" value="false"></property> | |
| 241 | + </bean> | |
| 242 | + | |
| 243 | + | |
| 244 | + <bean id="measureDataTrigger" class="org.springframework.scheduling.quartz.CronTriggerBean"> | |
| 245 | + <property name="jobDetail" ref="measureDataWorker"></property> | |
| 246 | + <property name="cronExpression" value="0 30 12 * * ?"></property> | |
| 247 | + </bean> | |
| 248 | + | |
| 249 | + | |
| 233 | 250 | <!-- 总调度,用于启动定时器 --> |
| 234 | 251 | <bean id="schedulerFactory" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"> |
| 235 | 252 | <property name="triggers" > |
| ... | ... | @@ -240,6 +257,7 @@ |
| 240 | 257 | <ref bean="correctSieveOrderTrigger"/> |
| 241 | 258 | <ref bean="autoInsertIdTrigger"/> |
| 242 | 259 | <ref bean="courseTrigger"/> |
| 260 | + <ref bean="measureDataTrigger" /> | |
| 243 | 261 | <!--预产期前两周自动创建分娩住院追访--> |
| 244 | 262 | <ref bean="dandleReachDueTrigger"/> |
| 245 | 263 | <!--预产期前两周自动创建分娩住院追访启动时执行一次--> |