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;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -23,8 +24,10 @@ import com.egolm.sso.services.CommonService;
import com.egolm.sso.services.TraceService;
import com.egolm.sso.util.DateUtil;
import com.egolm.sso.util.FileUtil;
import com.egolm.sso.util.SqlUtil;
import com.egolm.sso.util.ThrowableUtil;
import com.egolm.sso.util.XMLUtil;
import com.egolm.sso.util.SqlUtil.Page;
import com.google.gson.Gson;
@Component
......@@ -69,9 +72,18 @@ public class ZMISD009SOCREATIONServiceTask {
}
public void sendData(ZMISD009SOCREATION ZMISD009SOCREATION) {
List<Map<String, Object>> headerList = jdbcTemplate.queryForList("SELECT * FROM t_so_creation_header WHERE SEND_STATUS = ? LIMIT ?", "N", 1);
if(headerList.size() > 0) {
for(Map<String, Object> headerMap : headerList) {
Page page = new Page(1L, 1000L);
String sql = "SELECT * FROM t_so_creation_header WHERE SEND_STATUS = 'N'";
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 {
this.sendData(ZMISD009SOCREATION, headerMap);
} 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