添加乡镇功能

This commit is contained in:
yangjun 2025-09-11 08:34:20 +08:00
parent a98a53026c
commit 46370fc12a
10 changed files with 53 additions and 3 deletions

View File

@ -71,7 +71,7 @@ public class HomeApi {
//郊县数量郊县公司数量
LambdaQueryChainWrapper<Thermalcompany> qw3 = thermalcompanyService.lambdaQuery();
qw3.eq(Thermalcompany::getRegionType,"郊县");
qw3.eq(Thermalcompany::getRegionType,"乡镇");
qw3.eq(Thermalcompany::getDelFlag,"0");
qw3.orderByAsc(Thermalcompany::getId);
List<Thermalcompany> thermalcompanyList = qw3.list();
@ -79,7 +79,7 @@ public class HomeApi {
//郊县锅炉房数量
LambdaQueryChainWrapper<Heatsource> qw4 = heatsourceService.lambdaQuery();
qw4.eq(Heatsource::getRegionType,"郊县");
qw4.eq(Heatsource::getRegionType,"乡镇");
qw4.eq(Heatsource::getDelFlag,"0");
qw4.orderByAsc(Heatsource::getId);
List<Heatsource> heatsourceJXList = qw4.list();
@ -142,4 +142,13 @@ public class HomeApi {
return Result.ok(result);
}
@RequestMapping(value = "/getStaticNowList", method = RequestMethod.POST)
public Result<?> getStaticNowList(@RequestBody HomeApiEntity dto) {
Map<String,Object> result = new HashMap<>();
List<Heatanalysis> list = heatanalysisService.getStaticNowList(dto);
result.put("data",list);
return Result.ok(result);
}
}

View File

@ -147,5 +147,7 @@ public class Heatsource implements Serializable {
/**地区类型*/
@Excel(name = "地区类型", width = 15)
private java.lang.String regionType;
@TableField(exist = false)
private String sourceId;
}

View File

@ -29,4 +29,6 @@ public interface HeatanalysisMapper extends BaseMapper<Heatanalysis> {
List<Heatanalysis> getStaticList(@Param("params") HomeApiEntity dto);
Page<Heatanalysis> yunweiPage(Page<Heatanalysis> page, @Param("params") Heatanalysis heatanalysis);
List<Heatanalysis> getStaticNowList(@Param("params") HomeApiEntity dto);
}

View File

@ -552,6 +552,25 @@
where t1.view002= #{params.sourceId} and t1.view004 is null
ORDER BY t1.view002,t1.datatime
</select>
<select id="getStaticNowList" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
SELECT t1.*
FROM bl_heatanalysis_${params.startTime} t1
INNER JOIN (
SELECT
MIN(id) AS min_id
FROM bl_heatanalysis_${params.startTime}
WHERE DATE(datatime) = CURRENT_DATE()
AND view002 = #{params.sourceId}
AND view004 IS NULL
GROUP BY
DATE_FORMAT(datatime, '%Y-%m-%d %H'),
FLOOR(MINUTE(datatime)/5)
) t2 ON t1.id = t2.min_id
WHERE DATE(t1.datatime) = CURRENT_DATE()
AND t1.view002 = #{params.sourceId}
AND t1.view004 IS NULL
ORDER BY t1.datatime
</select>
<select id="yunweiPage" resultType="org.jeecg.modules.heating.entity.Heatanalysis">
SELECT

View File

@ -76,6 +76,10 @@
<if test="companyId != null and companyId != ''">
AND a.company_id = #{companyId}
</if>
<if test="sourceId != null and sourceId != ''">
AND a.id in (${sourceId})
</if>
</where>
ORDER BY a.id
</select>

View File

@ -24,6 +24,9 @@
<if test="regionType != null and regionType != ''">
AND a.region_type = #{regionType}
</if>
<if test="sourceId != null and sourceId != ''">
AND id in ( ${sourceId})
</if>
</where>
ORDER BY a.id
</select>

View File

@ -30,4 +30,6 @@ public interface HeatanalysisService extends JeecgService<Heatanalysis> {
List<Heatanalysis> getStaticList(HomeApiEntity dto);
IPage<Heatanalysis> yunweiPage(Page<Heatanalysis> page,Heatanalysis heatanalysis);
List<Heatanalysis> getStaticNowList(HomeApiEntity dto);
}

View File

@ -102,4 +102,9 @@ public class HeatanalysisServiceImpl extends JeecgServiceImpl<HeatanalysisMapper
return baseMapper.yunweiPage(page,heatanalysis);
}
@Override
public List<Heatanalysis> getStaticNowList(HomeApiEntity dto) {
return baseMapper.getStaticNowList(dto);
}
}

View File

@ -206,6 +206,10 @@ public class SysUser implements Serializable {
*/
private String bpmStatus;
@Dict(dictTable ="bl_heatsource",dicText = "source_name",dicCode = "id")
private String sourceId;
/**
* 是否已经绑定第三方
*/

View File

@ -1,5 +1,5 @@
server:
port: 8080
port: 8050
undertow:
decode-url: true # 启用URL解码
worker-threads: 16