parent
70345f8131
commit
c8da9848e5
|
|
@ -0,0 +1,32 @@
|
||||||
|
package shkd.sys.sys.plugin.report;
|
||||||
|
|
||||||
|
import kd.bos.algo.DataSet;
|
||||||
|
import kd.bos.algo.JoinDataSet;
|
||||||
|
import kd.bos.algo.JoinType;
|
||||||
|
import kd.bos.db.DB;
|
||||||
|
import kd.bos.db.DBRoute;
|
||||||
|
import kd.bos.entity.report.AbstractReportListDataPluginExt;
|
||||||
|
import kd.bos.event.AfterQueryEvent;
|
||||||
|
import shkd.sys.sys.plugin.report.util.ReportUtils;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @FileName AddTradeFinanceDataListPlugin
|
||||||
|
* @Description 融资动态查询明细表拓展插件
|
||||||
|
* @Author csx
|
||||||
|
* @date 2025-11-12
|
||||||
|
**/
|
||||||
|
public class AddTradeFinanceDataListPlugin extends AbstractReportListDataPluginExt {
|
||||||
|
@Override
|
||||||
|
public void afterQuery(AfterQueryEvent event) {
|
||||||
|
DataSet dataSet = event.getDataSet();
|
||||||
|
StringBuilder sqlBuilder = new StringBuilder("/*dialect*/ ");
|
||||||
|
sqlBuilder.append("select fid,fk_shkd_zqrzh as shkd_zqrzh from t_cfm_loanbill");
|
||||||
|
DataSet res = DB.queryDataSet(this.getClass().getSimpleName(), DBRoute.of("fi"), sqlBuilder.toString());//财务云
|
||||||
|
JoinDataSet join = dataSet.join(res, JoinType.LEFT);//连接组织
|
||||||
|
String[] strings = ReportUtils.ExpansionArray(dataSet.getRowMeta().getFieldNames(), Arrays.asList("shkd_zqrzh"));
|
||||||
|
DataSet finish = join.on("loanbillid", "fid").select(strings).finish();
|
||||||
|
event.setDataSet(finish);
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue