do {
YstAgentInfoPojo pojo = new YstAgentInfoPojo();
pojo.setAgtMerId(rsAll.getString(1));
pojo.setAgtName(rsAll.getString(2));
pojos.add(pojo);
} while (rsAll.next());
//关闭查询代理商连接,重新获得连接
closeConn(conn, psAll, rsAll);
//重新获得连接
conn = YstManagerConnFactory.getConn();
for (YstAgentInfoPojo agent : pojos) {
logger.info("----->代理商查询月报表start" + agent.getAgtMerId());
pstmtProfit = conn.prepareStatement(Configure
.getProperty("agent.profit.withdraw.month.sql1"));
pstmtProfit.setString(1, agent.getAgtMerId());
pstmtProfit.setString(2, agent.getAgtMerId());
pstmtProfit.setString(3, acdt.substring(0,6));
rsProfit = pstmtProfit.executeQuery();
logger.info("----->代理商查询月报表end");
while (rsProfit.next()) {
logger.info("---------->insert month report start:" + agent.getAgtMerId() + " ," + rsProfit.getString(1));
SpringContext.getBean(IYstManagerAgentProfitDao.class).saveAgentMonthProfit(agent.getAgtMerId(), agent.getAgtName(), rsProfit.getString(1),
rsProfit.getString(2), rsProfit.getString(3),rsProfit.getString(4),String.valueOf(rsProfit.getDouble(5)),
String.valueOf(rsProfit.getDouble(6)), String.valueOf(rsProfit.getDouble(7)), "0");
logger.info("---------->insert month report end:" + agent.getAgtMerId() + "," + rsProfit.getString(1));
}
logger.info("代理商月提现分润(不包含下级)遍历:" + agent.getAgtMerId());
closeConn(null, pstmtProfit, rsProfit);
logger.info("代理商月提现分润(不包含下级)遍历关闭陈述:" + agent.getAgtMerId());
}