省中医住院接口

master
lzy 4 years ago
parent dde60d6c22
commit ba8cd51b39

@ -85,13 +85,18 @@ public class MyScheduling {
} }
//10分钟执行一次 //10分钟执行一次
@Scheduled(fixedRate = 1000 * 60 * 30) @Scheduled(fixedRate = 1000 * 60 * 60 * 5)
public void ruyuan() { public void ruyuan() {
log.info("----------开始采集------------"); log.info("----------开始采集------------");
log.info("-----采集时间:"+oneDate); SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String format = fmt.format(oneDate);
log.info("-----采集时间:开始时间:"+ format);
Date twoDate = new Date(); Date twoDate = new Date();
String format1 = fmt.format(twoDate);
log.info("-----采集时间:结束时间:"+ format1);
//获取jzh列表 //获取jzh列表
List<String> jzhs = afCollectTaskService.listJZHByDate(oneDate, twoDate); List<String> jzhs = afCollectTaskService.listJZHByDate(format, format1);
int size = jzhs.size(); int size = jzhs.size();
log.info("-------本次采集数:" + size); log.info("-------本次采集数:" + size);
if(size==0){ if(size==0){
@ -189,7 +194,7 @@ public class MyScheduling {
} }
} }
log.info("-------本次成功采集数:" + size); log.info("-------本次成功采集数:" + size);
oneDate = twoDate; // oneDate = twoDate;
} }
private String requestFunctionWebService(Object[] params, private String requestFunctionWebService(Object[] params,

@ -28,7 +28,7 @@ public interface IAfCollectTaskService extends IService<AfCollectTask> {
void updateInterfaceCollect(String collectSubId, int state); void updateInterfaceCollect(String collectSubId, int state);
List<String> listJZHByDate(Date date1,Date date2); List<String> listJZHByDate(String date1,String date2);
/** /**
* *

@ -19,7 +19,7 @@ import java.util.List;
*/ */
public interface AfCollectTaskMapper extends BaseMapper<AfCollectTask> { public interface AfCollectTaskMapper extends BaseMapper<AfCollectTask> {
List<String> listJZHByDate(@Param("date1") Date date1, @Param("date2") Date date2); List<String> listJZHByDate(@Param("date1") String date1, @Param("date2") String date2);
/** /**
* id * id
* @param empId * @param empId

@ -124,7 +124,7 @@ public class AfCollectTaskServiceImpl extends ServiceImpl<AfCollectTaskMapper, A
} }
@Override @Override
public List<String> listJZHByDate(Date date1, Date date2) { public List<String> listJZHByDate(String date1, String date2) {
return afCollectTaskMapper.listJZHByDate(date1, date2); return afCollectTaskMapper.listJZHByDate(date1, date2);
} }

@ -5,8 +5,17 @@
<mapper namespace="com.docus.bgts.mapper.AfCollectTaskMapper"> <mapper namespace="com.docus.bgts.mapper.AfCollectTaskMapper">
<select id="listJZHByDate" resultType="string"> <select id="listJZHByDate" resultType="string">
select jzh from docus_medicalrecord.t_basic select jzh
where create_time >=#{date1} and create_time &lt;=#{date2} and jzh is not null and is_archive=0 from docus_medicalrecord.t_basic a
where
a.create_time >=#{date1}
and a.create_time &lt;=#{date2}
and a.jzh is not null
and a.is_archive=0
and a.dis_dept in ('1211','1252')
and jzh not in
(select C3 from af_collect_task where sysflag=22 and state=3)
order by create_time asc
</select> </select>
<select id="getpatientIdByEmpId" resultType="string"> <select id="getpatientIdByEmpId" resultType="string">

Loading…
Cancel
Save