| | |
| | | </select> |
| | | |
| | | <!--根据指定条件获取农户记录数--> |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | <!-- <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long">--> |
| | | <select id="getRecordCount" resultType="com.dy.pipIrrGlobal.voSe.VoClient"> |
| | | <!-- SELECT--> |
| | | <!-- COUNT(*) AS recordCount--> |
| | | SELECT DISTINCT |
| | | cli.countyId, |
| | | dis_con.name AS countryName, |
| | | cli.townId, |
| | | dis_town.name AS townName, |
| | | cli.villageId, |
| | | dis_village.name AS villageName, |
| | | cli.blockId, |
| | | blo.name AS blockName, |
| | | cli.divideId, |
| | | divi.name AS divideName, |
| | | cli.typeId, |
| | | wat.typeName AS waterTypeName, |
| | | cli.id AS clientId, |
| | | cli.name, |
| | | cli.clientNum, |
| | | cli.phone, |
| | | cli.idCard, |
| | | cli.area, |
| | | (SELECT COUNT(*) FROM se_client_card WHERE clientId = cli.id)+(SELECT COUNT(*) FROM se_virtual_card WHERE client_id = cli.id) AS cardCount, |
| | | cli.address, |
| | | cli.remarks, |
| | | cli.operateDt |
| | | FROM se_client cli |
| | | LEFT JOIN ba_district dis_con ON cli.countyId = dis_con.id |
| | | LEFT JOIN ba_district dis_town ON cli.townId = dis_town.id |
| | |
| | | |
| | | <!--根据指定条件获取农户数据--> |
| | | <select id="getClients" resultType="com.dy.pipIrrGlobal.voSe.VoClient"> |
| | | SELECT |
| | | SELECT DISTINCT |
| | | cli.countyId, |
| | | dis_con.name AS countryName, |
| | | cli.townId, |