| | |
| | | CAST(uni.id AS char)AS id, |
| | | CAST(uni.operator AS char)AS operator, |
| | | cli.name AS operatorName, |
| | | gru.group_code AS groupCode, |
| | | uni.area, |
| | | uni.remarks, |
| | | uni.operate_time AS operateDt |
| | | from ir_irrigate_unit uni |
| | | left join ir_project pro on pro.id = uni.project_id |
| | | left join se_client cli on cli.id = uni.operator |
| | | left join ir_group_unit gu on gu.unit_id = uni.id |
| | | left join ir_irrigate_group gru on gru.id = gu.group_id |
| | | where uni.id = #{id,jdbcType=BIGINT} and uni.deleted = 0 |
| | | </select> |
| | | <!--分页查灌溉单元--> |
| | |
| | | CAST(uni.id AS char)AS unitId, |
| | | CAST(uni.operator AS char)AS operator, |
| | | cli.name AS operatorName, |
| | | gru.group_code AS groupCode, |
| | | uni.area, |
| | | uni.remarks, |
| | | uni.operate_time AS operateDt |
| | | FROM ir_irrigate_unit uni |
| | | left join ir_project pro on pro.id = uni.project_id |
| | | left join se_client cli on cli.id = uni.operator |
| | | left join ir_group_unit gu on gu.unit_id = uni.id |
| | | left join ir_irrigate_group gru on gru.id = gu.group_id |
| | | <where> |
| | | uni.deleted = 0 |
| | | <if test="projectName != null and projectName != ''"> |
| | | AND pro.project_name LIKE CONCAT('%', #{projectName}, '%') |
| | | </if> |
| | | <!-- <if test = "groupCode != null and groupCode != ''">--> |
| | | <!-- AND pro.project_state = #{groupCode}--> |
| | | <!-- </if>--> |
| | | <if test = "groupCode != null and groupCode != ''"> |
| | | AND gru.group_code = #{groupCode} |
| | | </if> |
| | | </where> |
| | | ORDER BY uni.operate_time DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | |
| | | FROM ir_irrigate_unit uni |
| | | left join ir_project pro on pro.id = uni.project_id |
| | | left join se_client cli on cli.id = uni.operator |
| | | left join ir_group_unit gu on gu.unit_id = uni.id |
| | | left join ir_irrigate_group gru on gru.id = gu.group_id |
| | | <where> |
| | | uni.deleted = 0 |
| | | <if test="projectName != null and projectName != ''"> |
| | | AND pro.project_name LIKE CONCAT('%', #{projectName}, '%') |
| | | </if> |
| | | <!-- <if test = "groupCode != null and groupCode != ''">--> |
| | | <!-- AND pro.project_state = #{groupCode}--> |
| | | <!-- </if>--> |
| | | <if test = "groupCode != null and groupCode != ''"> |
| | | AND gru.group_code = #{groupCode} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |