templateUsedSql 配置 {policyView} 占位符
{
"diffTableNo": 0,
"isRESTful": true,
"base": {
"connName": "ConnBt",
"isRearEnd": true,
"isFrontEnd": true
},
"templateUsedSql": {
"policyView": {
"data": [
{
"value": "select",
"sortId": 1
},
{
"value": "tb_pi.policy_item_name,tb_t.it_name,tb_t.it_id,tb_t.parent_id, tb_f.family_name,tb_f.family_id,",
"sortId": 5
},
{
"value": "tb_p.bd_tbr,tb_p.bd_bbr,tb_pi.mq_price,tb_pi.bz_price,tb_pi.policy_id,tb_p.bd_bbr_idcard,tb_p.bd_tbr_idcard",
"sortId": 7
},
{
"value": ",tb_p.bd_start_date,tb_pi.bz_jf_method,tb_pi.xf_year,tb_pi.bd_year",
"sortId": 8
},
{
"value": "from bt_family tb_f ",
"sortId": 10
},
{
"value": "left join bt_policy tb_p on (tb_p.family_id=tb_f.family_id) ",
"sortId": 15
},
{
"value": "left join bt_policy_item tb_pi on (tb_pi.policy_id=tb_p.policy_id) ",
"sortId": 20
},
{
"value": "left join bt_insurance_type tb_t on (FIND_IN_SET(tb_t.it_id,tb_pi.it_name)>0) ",
"sortId": 25
},
{
"value": "where tb_f.create_user_id=@_userId",
"sortId": 30
}
]
}
},
"responseField": {
"tbr-it": {
//"njcResult": {
// "args": [],
// "moduleName": "~/Config/AppNodeJs/bt-plugins/resource-type-statistics/my",
// "functionName": null
//},
//不使用分页拼接 SQL语句
"isList": true,
//"show": "it_id,push_name",
"selectSql": {
//投保人保费分析
"sqlList": [
{
"value": "select it_id,bd_tbr_idcard,it_name,max(bd_tbr) bd_tbr,sum(mq_price) mq_price from (",
"sortId": 1
},
{
"value": "{policyView} and month(tb_p.bd_start_date)=@paymentMonth and tb_t.parent_id='0'",
"sortId": 5
},
{
"value": ") t where it_id is not null group by bd_tbr_idcard,it_id order by bd_tbr_idcard",
"sortId": 15
}
]
},
"guidMethod": 0,
"dataFromType": 0,
"original": ""
}
},
"tables": [
{
"id": 1,
"name": "bt_insurance_type",
"isPrimary": true,
"primaryColumn": [
{
"colName": "it_id",
"alias": "it_id",
"field": "itId"
}
],
"type": "Table"
}
]
}
文档更新时间: 2021-07-03 22:04 作者:admin