网络设备-3-故障数量接口开发

This commit is contained in:
likehai 2024-09-03 16:37:26 +08:00
parent 9ec9399243
commit 7881937faa
5 changed files with 88 additions and 0 deletions

View File

@ -95,4 +95,12 @@ public class GodUniversalElectricMeterController extends BaseController {
public AjaxResult getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter) {
return success(godUniversalElectricMeterService.getCountBySome(godUniversalElectricMeter));
}
/**
* 根据条件查询折线图横纵坐标
*/
@GetMapping("/getCountEChartBySome")
public AjaxResult getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter) {
return success(godUniversalElectricMeterService.getCountEChartBySome(godUniversalElectricMeter));
}
}

View File

@ -3,6 +3,7 @@ package com.god.aiRecognition.mapper;
import com.god.aiRecognition.domain.GodUniversalElectricMeter;
import java.util.List;
import java.util.Map;
/**
* AI识别算法开发Mapper接口
@ -62,5 +63,16 @@ public interface GodUniversalElectricMeterMapper
String getMaxSnByPrefix(String yyyyMM);
/**
* 根据条件查询对应数量
* @param godUniversalElectricMeter 查询条件实体
* @return 统计结果
*/
Long getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter);
/**
*根据条件查询折线图横纵坐标
*/
List<Map<String,Object>> getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter);
}

View File

@ -1,6 +1,8 @@
package com.god.aiRecognition.service;
import java.util.List;
import java.util.Map;
import com.god.aiRecognition.domain.GodUniversalElectricMeter;
/**
@ -62,4 +64,9 @@ public interface IGodUniversalElectricMeterService
*根据条件查询对应数量
*/
Long getCountBySome(GodUniversalElectricMeter godUniversalElectricMeter);
/**
*根据条件查询折线图横纵坐标
*/
List<Map<String,Object>> getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter);
}

View File

@ -11,6 +11,7 @@ import javax.annotation.Resource;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* AI识别算法开发Service业务层处理
@ -110,4 +111,9 @@ public class GodUniversalElectricMeterServiceImpl implements IGodUniversalElectr
return godUniversalElectricMeterMapper.getCountBySome(godUniversalElectricMeter);
}
@Override
public List<Map<String, Object>> getCountEChartBySome(GodUniversalElectricMeter godUniversalElectricMeter) {
return godUniversalElectricMeterMapper.getCountEChartBySome(godUniversalElectricMeter);
}
}

View File

@ -151,6 +151,61 @@
</if>
</where>
</select>
<select id="getCountEChartBySome" resultType="java.util.Map" parameterType="GodUniversalElectricMeter">
SELECT reserve_four AS acrossName, COUNT(1) AS portaitData
from god_universal_electric_meter
<where>
<if test="reserveOne != null and reserveOne != ''">and reserve_one =
#{reserveOne}
</if>
<if test="reserveTwo != null and reserveTwo != ''">and reserve_two =
#{reserveTwo}
</if>
<if test="reserveThree != null and reserveThree != ''">and reserve_three =
#{reserveThree}
</if>
<if test="reserveFour != null and reserveFour != ''">and reserve_four =
#{reserveFour}
</if>
<if test="reserveFive != null and reserveFive != ''">and reserve_five =
#{reserveFive}
</if>
<if test="reserveSix != null and reserveSix != ''">and reserve_six =
#{reserveSix}
</if>
<if test="reserveSeven != null and reserveSeven != ''">and reserve_seven =
#{reserveSeven}
</if>
<if test="reserveEight != null and reserveEight != ''">and reserve_eight =
#{reserveEight}
</if>
<if test="reserveNine != null and reserveNine != ''">and reserve_nine =
#{reserveNine}
</if>
<if test="reserveTen != null and reserveTen != ''">and reserve_ten =
#{reserveTen}
</if>
<if test="reserveEleven != null and reserveEleven != ''">and reserve_eleven =
#{reserveEleven}
</if>
<if test="reserveTwelve != null and reserveTwelve != ''">and reserve_twelve =
#{reserveTwelve}
</if>
<if test="reserveThirteen != null and reserveThirteen != ''">and reserve_thirteen =
#{reserveThirteen}
</if>
<if test="reserveFourteen != null and reserveFourteen != ''">and reserve_fourteen =
#{reserveFourteen}
</if>
<if test="sysType != null and sysType != ''">and sys_type =
#{sysType}
</if>
<if test="moduleType != null and moduleType != ''">and module_type =
#{moduleType}
</if>
</where>
GROUP BY reserve_four
</select>
<insert id="insertGodUniversalElectricMeter" parameterType="GodUniversalElectricMeter">
insert into god_universal_electric_meter