Commit 50839c1f authored by Quxl's avatar Quxl

x

parent 6921c937
...@@ -2,6 +2,7 @@ package com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION; ...@@ -2,6 +2,7 @@ package com.egolm.sso.clients.Z_MI_SD_009_SO_CREATION;
import java.io.File; import java.io.File;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -23,8 +24,10 @@ import com.egolm.sso.services.CommonService; ...@@ -23,8 +24,10 @@ import com.egolm.sso.services.CommonService;
import com.egolm.sso.services.TraceService; import com.egolm.sso.services.TraceService;
import com.egolm.sso.util.DateUtil; import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.FileUtil; import com.egolm.sso.util.FileUtil;
import com.egolm.sso.util.SqlUtil;
import com.egolm.sso.util.ThrowableUtil; import com.egolm.sso.util.ThrowableUtil;
import com.egolm.sso.util.XMLUtil; import com.egolm.sso.util.XMLUtil;
import com.egolm.sso.util.SqlUtil.Page;
import com.google.gson.Gson; import com.google.gson.Gson;
@Component @Component
...@@ -69,9 +72,18 @@ public class ZMISD009SOCREATIONServiceTask { ...@@ -69,9 +72,18 @@ public class ZMISD009SOCREATIONServiceTask {
} }
public void sendData(ZMISD009SOCREATION ZMISD009SOCREATION) { public void sendData(ZMISD009SOCREATION ZMISD009SOCREATION) {
List<Map<String, Object>> headerList = jdbcTemplate.queryForList("SELECT * FROM t_so_creation_header WHERE SEND_STATUS = ? LIMIT ?", "N", 1); Page page = new Page(1L, 1000L);
if(headerList.size() > 0) { String sql = "SELECT * FROM t_so_creation_header WHERE SEND_STATUS = 'N'";
for(Map<String, Object> headerMap : headerList) { List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
List<Map<String, Object>> tmp = null;
do {
String limitSql = SqlUtil.limitByMysql(sql, page);
tmp = jdbcTemplate.queryForList(limitSql);
list.addAll(tmp);
page.toNextPage();
} while(tmp != null && tmp.size() > 0);
if(list.size() > 0) {
for(Map<String, Object> headerMap : list) {
try { try {
this.sendData(ZMISD009SOCREATION, headerMap); this.sendData(ZMISD009SOCREATION, headerMap);
} catch (Exception e) { } catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment