49 lines
1.6 KiB
Java
49 lines
1.6 KiB
Java
package com.engine.salary.biz;
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam;
|
|
import com.google.common.collect.Lists;
|
|
import weaver.general.GCONST;
|
|
import org.junit.Before;
|
|
import org.junit.Test;
|
|
import weaver.conn.RecordSet;
|
|
import weaver.soa.workflow.request.RequestInfo;
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class SIAccountBizTest {
|
|
@Before
|
|
public void startEnv() {
|
|
// 本地e9的demo路径
|
|
String rootPath = "D:\\xcsqls\\ecology\\";
|
|
GCONST.setRootPath(rootPath);
|
|
GCONST.setServerName("ecology");
|
|
}
|
|
@Test
|
|
public void test() {
|
|
InsuranceAccountDetailParam queryParam = new InsuranceAccountDetailParam();
|
|
queryParam.setBillMonth("2022-05");
|
|
SIAccountBiz siAccountBiz = new SIAccountBiz();
|
|
siAccountBiz.overView(queryParam);
|
|
}
|
|
@Test
|
|
public void testSalaryArchiveInitAction(){
|
|
String requestId = "564566";
|
|
String tableName = "formtable_main_26";
|
|
RecordSet rs = new RecordSet();
|
|
String sql = "select xzxmdr from "+tableName+" where requestid="+requestId;
|
|
rs.executeQuery(sql);
|
|
List<Map<String, Object>> importDatas = Lists.newArrayList();
|
|
if (rs.next()){
|
|
String data = rs.getString("xzxmdr");
|
|
JSONArray jsonObject = JSONObject.parseArray(data);
|
|
jsonObject.forEach(e -> {
|
|
Map<String, Object> map = (Map<String, Object>)e;
|
|
importDatas.add(map);
|
|
});
|
|
}
|
|
}
|
|
}
|