Commit d6894817 authored by zhangsen's avatar zhangsen

公用API参数修改

parent f3215d30
......@@ -19,12 +19,12 @@ public interface MonitorFanIndicatorMapper extends BaseMapper<MonitorFanIndicato
//批量修改
void UpdateMonitorFanIndicator(@Param(value = "list") List<IndexDto> list);
Integer queryByPageTotal(@Param("fanCode") String fanCode,
Integer queryByPageTotal(@Param("equipmentNumber") String equipmentNumber,
@Param("gateway") String gateway,
@Param("frontModule") String frontModule);
Page<MonitorFanIndicator> queryByPage(@Param("size") long size,
@Param("fanCode") String fanCode,
List<MonitorFanIndicator> queryByPage(@Param("size") long size,
@Param("equipmentNumber") String equipmentNumber,
@Param("gateway") String gateway,
@Param("frontModule") String frontModule,
@Param("offset") int offset);
......
......@@ -39,8 +39,8 @@
<select id="queryByPage" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.MonitorFanIndicator">
select * from monitor_fan_indicator
<where>
<if test="fanCode != null and fanCode !=''">
fan_code like concat('%', #{fanCode},'%')
<if test="equipmentNumber != null and equipmentNumber !=''">
equipment_number = #{equipmentNumber}
</if>
<if test="gateway != null and gateway !=''">
AND gateway = #{gateway}
......@@ -55,8 +55,8 @@
<select id="queryByPageTotal" resultType="java.lang.Integer">
select count(1) from monitor_fan_indicator
<where>
<if test="fanCode != null and fanCode !=''">
fan_code like concat('%', #{fanCode},'%')
<if test="equipmentNumber != null and equipmentNumber !=''">
equipment_number = #{equipmentNumber}
</if>
<if test="gateway != null and gateway !=''">
AND gateway = #{gateway}
......
......@@ -34,14 +34,14 @@ public class MonitorFanIdxController extends BaseController {
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据风机编码、网关ID、前段展示模块查询表数据")
@ApiOperation(value = "根据设备编号、网关ID、前段展示模块查询表数据")
@GetMapping("/getFanIdxInfoByPage")
public ResponseModel<IPage<MonitorFanIndicator>> getFanIdxInfoByPage(@RequestParam(value = "fanCode", required = false) String fanCode,
public ResponseModel<IPage<MonitorFanIndicator>> getFanIdxInfoByPage(@RequestParam(value = "equipmentNumber", required = false) String equipmentNumber,
@RequestParam(value = "gateway", required = false) String gateway,
@RequestParam(value = "frontModule", required = false) String frontModule,
@RequestParam(value = "current", required = false) int current,
@RequestParam(value = "size", required = false) int size) {
return ResponseHelper.buildResponse(monitorFanIndicator.getFanIdxInfoByPage(fanCode, gateway, frontModule, current, size));
return ResponseHelper.buildResponse(monitorFanIndicator.getFanIdxInfoByPage(equipmentNumber, gateway, frontModule, current, size));
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
......
......@@ -51,12 +51,13 @@ public class MonitorFanIndicatorImpl implements IMonitorFanIndicator {
}
public IPage<MonitorFanIndicator> getFanIdxInfoByPage(String fanCode, String gateway, String frontModule, int current, int size) {
public IPage<MonitorFanIndicator> getFanIdxInfoByPage(String equipmentNumber, String gateway, String frontModule, int current, int size) {
Page<MonitorFanIndicator> page = new Page<>(current, size);
Integer integer = monitorFanIndicatorregionMapper.queryByPageTotal(fanCode, gateway, frontModule);
Page<MonitorFanIndicator> monitorFanIndicators = monitorFanIndicatorregionMapper.queryByPage(page.getSize(), fanCode, gateway, frontModule, (current - 1) * size);
monitorFanIndicators.setTotal(integer);
return monitorFanIndicators;
Integer integer = monitorFanIndicatorregionMapper.queryByPageTotal(equipmentNumber, gateway, frontModule);
List<MonitorFanIndicator> monitorFanIndicators = monitorFanIndicatorregionMapper.queryByPage(page.getSize(), equipmentNumber, gateway, frontModule, (current - 1) * size);
page.setTotal(integer);
page.setRecords(monitorFanIndicators);
return page;
}
public TreeDto getTreeInfo(String sequenceNbr) {
......
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