Commit b4b0c3d9 authored by jiawei's avatar jiawei

提交Excel导出机顶盒运维信息 不用分页

parent 1ea1c297
......@@ -24,5 +24,13 @@ public interface TBoxOperationMapper extends BaseMapper<TBoxOperation> {
List<TBoxOperation> selectPageList(Page<TBoxOperation> page,@Param("tBoxOperation") TBoxOperation tBoxOperation);
/**
* 不分页查询
*
* @param tBoxOperation
* @return
*/
List<TBoxOperation> selectListA(@Param("tBoxOperation") TBoxOperation tBoxOperation);
List<TBoxOperation> selectBoxPage(@Param("user") TUser user);
}
......@@ -23,5 +23,13 @@ public interface TBoxOperationService extends IService<TBoxOperation> {
Page<TBoxOperation> selectPage(Page<TBoxOperation> page, TBoxOperation tBoxOperation);
/**
* 查询List不分页
* @param tBoxOperation
* @return
*/
List<TBoxOperation> selectListA( TBoxOperation tBoxOperation);
List<TBoxOperation> selectBoxList(TUser user);
}
......@@ -44,6 +44,11 @@ public class TBoxOperationServiceImpl extends ServiceImpl<TBoxOperationMapper, T
return page.setRecords(tBoxOperationMapper.selectPageList(page, tBoxOperation));
}
@Override
public List<TBoxOperation> selectListA(TBoxOperation tBoxOperation) {
return tBoxOperationMapper.selectListA(tBoxOperation);
}
@Override
public List<TBoxOperation> selectBoxList(TUser user) {
List<TBoxOperation> list = tBoxOperationMapper.selectBoxPage(user);
......
......@@ -352,9 +352,9 @@ public class TBoxOperationController extends BaseController {
}
Page<TBoxOperation> page = null;
try {
page = this.tBoxOperationService.selectPage(getPage(), tBoxOperation);
List<TBoxOperation> records = this.tBoxOperationService.selectListA( tBoxOperation);
//
List<TBoxOperation> records = page.getRecords();
fillAreaName(records);
//导出excel
ExcelWriter writer = ExcelUtil.getWriter();
......
......@@ -128,4 +128,28 @@
order by b.create_time desc
</select>
<select id="selectListA" resultType="cn.chnmuseum.party.model.TBoxOperation">
SELECT b.id,b.organ_id,b.mac,b.status,b.area_id,b.create_time,b.update_time,r.name organ_name ,u.user_name
FROM t_box_operation b
left join t_organ r on r.id = b.organ_id
left join t_user u on u.org_id = b.organ_id and u.type = '3'
where 1=1
<if test="tBoxOperation.organId != null and tBoxOperation.organId != '' ">
and b.organ_id =#{tBoxOperation.organId}
</if>
<if test="tBoxOperation.status != null">
and b.status =#{tBoxOperation.status}
</if>
<if test="tBoxOperation.areaId != null and tBoxOperation.areaId != '' ">
and b.area_id = #{tBoxOperation.areaId}
</if>
<if test="tBoxOperation.areaName != null and tBoxOperation.areaName != '' ">
and b.area_id LIKE concat(#{tBoxOperation.areaName}, '%')
</if>
<if test="tBoxOperation.organCode != null and tBoxOperation.organCode != '' ">
and r.code LIKE concat(#{tBoxOperation.organCode}, '%')
</if>
order by b.create_time desc
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment