|
@@ -42,13 +42,13 @@ public class XCFYDataV_PRESCRIPTION_ORDERJob implements Job {
|
|
|
@Override
|
|
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
|
|
String sql = "select * from V_PRESCRIPTION_ORDER where rownum<1000 %s";
|
|
|
- while(true) {
|
|
|
+ while (true) {
|
|
|
log.info("开始同步V_PRESCRIPTION_ORDER数据");
|
|
|
String whereSql = "";
|
|
|
Date orderTime = getLastOpEndDate();
|
|
|
log.info("开始同步V_PRESCRIPTION_ORDER数据,获取上个同步记录访问最大ORDER_TIME:{}", orderTime);
|
|
|
- Map<String,Object> paramMap = new HashMap<>();
|
|
|
- if(null != orderTime){
|
|
|
+ Map<String, Object> paramMap = new HashMap<>();
|
|
|
+ if (null != orderTime) {
|
|
|
whereSql = "and ORDER_TIME>:ORDER_TIME";
|
|
|
paramMap.put("ORDER_TIME", orderTime);
|
|
|
}
|
|
@@ -63,7 +63,7 @@ public class XCFYDataV_PRESCRIPTION_ORDERJob implements Job {
|
|
|
dataMap.put("CREATE_TIME", new Date());
|
|
|
}
|
|
|
});
|
|
|
- if(count<=0){
|
|
|
+ if (count <= 0) {
|
|
|
log.info(" V_PRESCRIPTION_ORDER 大于ORDER_TIME:{} 没有的数据,停止同步", orderTime);
|
|
|
return;
|
|
|
}
|
|
@@ -71,7 +71,7 @@ public class XCFYDataV_PRESCRIPTION_ORDERJob implements Job {
|
|
|
|
|
|
}
|
|
|
|
|
|
- public Date getLastOpEndDate(){
|
|
|
+ public Date getLastOpEndDate() {
|
|
|
Date opEndDate = jdbcTemplate.queryForObject("select max(ORDER_TIME) as opEndDate from PRESCRIPTION_ORDER", Date.class);
|
|
|
return opEndDate;
|
|
|
}
|