Commit 7e10677e authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/developer' into developer

parents d785ccf7 69db9929
...@@ -33,10 +33,17 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW ...@@ -33,10 +33,17 @@ public interface TdHygfJpInverterWarnMapper extends BaseMapper<TdHygfJpInverterW
@UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and") @UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and")
List<TdHygfJpInverterWarnDto> selectWarnList(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName); List<TdHygfJpInverterWarnDto> selectWarnList(List<String> state, String regionalCompaniesCode, String amosCompanyCode, String thirdStationId, String type, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName);
@UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and") @UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and")
int selectWarnListTotal(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName); int selectWarnListTotal(List<String> state,String regionalCompaniesCode, String amosCompanyCode, String thirdStationId, String type, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName);
@UserEmpower(field = {"regional_companies_code"}, dealerField = {"amos_company_code", "regional_companies_code"}, fieldConditions = {"eq", "in"}, relationship = "and")
int selectWarnTotal(List<String> state, String regionalCompaniesCode,
String amosCompanyCode,
String thirdStationId,
String type);
@Select("SELECT * from td_hygf_jp_inverter_warn WHERE (third_station_id = #{thirdStationId} AND sn_code = #{sncode} AND created_time = #{createdTime})") @Select("SELECT * from td_hygf_jp_inverter_warn WHERE (third_station_id = #{thirdStationId} AND sn_code = #{sncode} AND created_time = #{createdTime})")
TdHygfJpInverterWarn getInverTerWarnByparams(@Param("createdTime") long createdTime, @Param("sncode") String snCode, @Param("thirdStationId") String thirdStationId); TdHygfJpInverterWarn getInverTerWarnByparams(@Param("createdTime") long createdTime, @Param("sncode") String snCode, @Param("thirdStationId") String thirdStationId);
......
...@@ -80,6 +80,27 @@ ...@@ -80,6 +80,27 @@
<!-- <if test="handlerStatus != null and handlerStatus != ''">--> <!-- <if test="handlerStatus != null and handlerStatus != ''">-->
<!-- AND handler_status = #{handlerStatus}--> <!-- AND handler_status = #{handlerStatus}-->
<!-- </if>--> <!-- </if>-->
<if test="regionalCompaniesCode != null and regionalCompaniesCode != ''">
AND regional_companies_code = #{regionalCompaniesCode}
</if>
<if test="amosCompanyCode != null and amosCompanyCode != ''">
AND amos_company_code = #{amosCompanyCode}
</if>
<if test="thirdStationId != null and thirdStationId != ''">
AND third_station_id = #{thirdStationId}
</if>
<!-- <if test="type != null and type != ''">-->
<!-- AND type = #{type}-->
<!-- </if>-->
<if test="level != null and level != ''">
AND `level` = #{level}
</if>
<if test="level != null and level != ''">
AND `level` = #{level}
</if>
<if test="level != null and level != ''">
AND `level` = #{level}
</if>
<if test="level != null and level != ''"> <if test="level != null and level != ''">
AND `level` = #{level} AND `level` = #{level}
</if> </if>
...@@ -127,6 +148,18 @@ ...@@ -127,6 +148,18 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="regionalCompaniesCode != null and regionalCompaniesCode != ''">
AND regional_companies_code = #{regionalCompaniesCode}
</if>
<if test="amosCompanyCode != null and amosCompanyCode != ''">
AND amos_company_code = #{amosCompanyCode}
</if>
<if test="thirdStationId != null and thirdStationId != ''">
AND third_station_id = #{thirdStationId}
</if>
<!-- <if test="type != null and type != ''">-->
<!-- AND type = #{type}-->
<!-- </if>-->
<!-- <if test="handlerStatus != null and handlerStatus != ''">--> <!-- <if test="handlerStatus != null and handlerStatus != ''">-->
<!-- AND handler_status = #{handlerStatus}--> <!-- AND handler_status = #{handlerStatus}-->
<!-- </if>--> <!-- </if>-->
...@@ -166,6 +199,37 @@ ...@@ -166,6 +199,37 @@
</select> </select>
<select id="selectWarnTotal" resultType="int">
SELECT
count (1)
FROM house_pv_data.td_hygf_jp_inverter_warn
<where>
<if test="state != null and state.size>0">
`state` in
<foreach collection="state" item="item" open='(' close=')' separator=",">
#{item}
</foreach>
</if>
<if test="regionalCompaniesCode != null and regionalCompaniesCode != ''">
AND regional_companies_code = #{regionalCompaniesCode}
</if>
<if test="amosCompanyCode != null and amosCompanyCode != ''">
AND amos_company_code = #{amosCompanyCode}
</if>
<if test="thirdStationId != null and thirdStationId != ''">
AND third_station_id = #{thirdStationId}
</if>
<!-- <if test="type != null and type != ''">-->
<!-- AND type = #{type}-->
<!-- </if>-->
</where>
</select>
<select id="queryAlarmNumber" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto"> <select id="queryAlarmNumber" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto">
SELECT SELECT
`state` `state`
......
...@@ -231,6 +231,10 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -231,6 +231,10 @@ public class TdHygfJpInverterWarnController extends BaseController {
@UserLimits @UserLimits
public ResponseModel<Page<TdHygfJpInverterWarnDto>> selectWarnList(@RequestParam(required = false) List<String> state, public ResponseModel<Page<TdHygfJpInverterWarnDto>> selectWarnList(@RequestParam(required = false) List<String> state,
@RequestParam(required = false) String handlerStatus, @RequestParam(required = false) String handlerStatus,
@RequestParam(required = false) String regionalCompaniesCode,
@RequestParam(required = false) String amosCompanyCode,
@RequestParam(required = false) String thirdStationId,
@RequestParam(required = false) String type,
@RequestParam(required = false) String level, @RequestParam(required = false) String level,
@RequestParam(required = false) String stationName, @RequestParam(required = false) String stationName,
@RequestParam(required = false) String minvalue, @RequestParam(required = false) String minvalue,
...@@ -286,7 +290,7 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -286,7 +290,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
} }
List<TdHygfJpInverterWarnDto> maps = tdHygfJpInverterWarnServiceImpl.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, current, size, handlerStatus, stationName); List<TdHygfJpInverterWarnDto> maps = tdHygfJpInverterWarnServiceImpl.selectWarnList(state,regionalCompaniesCode,amosCompanyCode, thirdStationId, type, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, current, size, handlerStatus, stationName);
for (TdHygfJpInverterWarnDto map : maps) { for (TdHygfJpInverterWarnDto map : maps) {
// if (nameMaps.containsKey(map.getThirdStationId())) { // if (nameMaps.containsKey(map.getThirdStationId())) {
// map.setStationName(nameMaps.get(map.getThirdStationId())); // map.setStationName(nameMaps.get(map.getThirdStationId()));
...@@ -295,7 +299,7 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -295,7 +299,7 @@ public class TdHygfJpInverterWarnController extends BaseController {
map.setTimeLongFormat(te); map.setTimeLongFormat(te);
} }
result.setTotal(tdHygfJpInverterWarnServiceImpl.selectWarnListTotal(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName)); result.setTotal(tdHygfJpInverterWarnServiceImpl.selectWarnListTotal(state,regionalCompaniesCode,amosCompanyCode, thirdStationId, type, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName));
List<Long> waringIds = maps.stream().map(tdHygfJpInverterWarnDto -> tdHygfJpInverterWarnDto.getCreatedTime()).collect(Collectors.toList()); List<Long> waringIds = maps.stream().map(tdHygfJpInverterWarnDto -> tdHygfJpInverterWarnDto.getCreatedTime()).collect(Collectors.toList());
if (waringIds.size() == 0) { if (waringIds.size() == 0) {
waringIds = Arrays.asList(0L); waringIds = Arrays.asList(0L);
...@@ -321,12 +325,20 @@ public class TdHygfJpInverterWarnController extends BaseController { ...@@ -321,12 +325,20 @@ public class TdHygfJpInverterWarnController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "户用光伏逆变器报警表统计数据查询", notes = "户用光伏逆变器报警表统计数据查询") @ApiOperation(httpMethod = "GET", value = "户用光伏逆变器报警表统计数据查询", notes = "户用光伏逆变器报警表统计数据查询")
@GetMapping(value = "/queryAlarmNumber") @GetMapping(value = "/queryAlarmNumber")
@UserLimits @UserLimits
public ResponseModel<Map<String, Object>> queryAlarmNumber(@RequestParam(required = false) String regionalCompaniesCode, public ResponseModel<Map<String, Object>> queryAlarmNumber(String regionalCompaniesCode,
@RequestParam(required = false) String amosCompanyCode, String amosCompanyCode,
@RequestParam(required = false) String thirdStationId, String thirdStationId,
@RequestParam(required = false) String type String type
) { ) {
Map<String, Object> result = tdHygfJpInverterWarnServiceImpl.queryAlarmNumber(regionalCompaniesCode, amosCompanyCode, thirdStationId, type); // Map<String, Object> result = tdHygfJpInverterWarnServiceImpl.queryAlarmNumber(regionalCompaniesCode, amosCompanyCode, thirdStationId, type);
Map<String, Object> result = new HashMap<>();
int wcl = tdHygfJpInverterWarnServiceImpl.selectWarnTotal(Arrays.asList("未处理"), regionalCompaniesCode, amosCompanyCode, thirdStationId, type);
int ycl = tdHygfJpInverterWarnServiceImpl.selectWarnTotal(Arrays.asList("已处理", "已恢复"), regionalCompaniesCode, amosCompanyCode, thirdStationId, type);
result.put("wcl", wcl);
result.put("ycl", ycl);
return ResponseHelper.buildResponse(result); return ResponseHelper.buildResponse(result);
} }
......
...@@ -172,8 +172,8 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -172,8 +172,8 @@ public class TdHygfJpInverterWarnServiceImpl
return tdHygfJpInverterWarnDto; return tdHygfJpInverterWarnDto;
} }
public List<TdHygfJpInverterWarnDto> selectWarnList(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName) { public List<TdHygfJpInverterWarnDto> selectWarnList(List<String> state,String regionalCompaniesCode,String amosCompanyCode,String thirdStationId,String type, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, Integer current, Integer size, String handlerStatus, String stationName) {
List<TdHygfJpInverterWarnDto> list = tdHygfJpInverterWarnMapper.selectWarnList(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, (current - 1) * size, size, handlerStatus, stationName); List<TdHygfJpInverterWarnDto> list = tdHygfJpInverterWarnMapper.selectWarnList(state,regionalCompaniesCode,amosCompanyCode,thirdStationId,type, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, (current - 1) * size, size, handlerStatus, stationName);
list.forEach(i -> { list.forEach(i -> {
JpStation jpStation = jpStationServiceImpl.getOne(new LambdaQueryWrapper<JpStation>() JpStation jpStation = jpStationServiceImpl.getOne(new LambdaQueryWrapper<JpStation>()
.eq(JpStation::getThirdStationId, i.getThirdStationId())); .eq(JpStation::getThirdStationId, i.getThirdStationId()));
...@@ -186,8 +186,15 @@ public class TdHygfJpInverterWarnServiceImpl ...@@ -186,8 +186,15 @@ public class TdHygfJpInverterWarnServiceImpl
return list; return list;
} }
public int selectWarnListTotal(List<String> state, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName) { public int selectWarnListTotal(List<String> state,String regionalCompaniesCode, String amosCompanyCode, String thirdStationId, String type, String level, String minvalue, String maxValue, String snCode, List<String> stationId, String startTime, String endTime, String content, String handlerStatus, String stationName) {
return tdHygfJpInverterWarnMapper.selectWarnListTotal(state, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName); return tdHygfJpInverterWarnMapper.selectWarnListTotal(state,regionalCompaniesCode,amosCompanyCode,thirdStationId,type, level, minvalue, maxValue, snCode, stationId, startTime, endTime, content, handlerStatus, stationName);
}
public int selectWarnTotal(List<String> state, String regionalCompaniesCode,
String amosCompanyCode,
String thirdStationId,
String type) {
return tdHygfJpInverterWarnMapper.selectWarnTotal(state, regionalCompaniesCode, amosCompanyCode, thirdStationId, type);
} }
public Map<String, Object> queryAlarmNumber(String regionalCompaniesCode, String amosCompanyCode, String thirdStationId, String type) { public Map<String, Object> queryAlarmNumber(String regionalCompaniesCode, String amosCompanyCode, String thirdStationId, String type) {
......
...@@ -78,6 +78,7 @@ public class IdxBizFanWeightController extends BaseController { ...@@ -78,6 +78,7 @@ public class IdxBizFanWeightController extends BaseController {
List<IdxBizFanWeight> formattedDates = list.stream().map(e-> { List<IdxBizFanWeight> formattedDates = list.stream().map(e-> {
e.setValue(e.getValue()!=null?Float.parseFloat(new DecimalFormat("0.000").format(e.getValue())):null); e.setValue(e.getValue()!=null?Float.parseFloat(new DecimalFormat("0.000").format(e.getValue())):null);
e.setValueS(e.getValue()!=null?new DecimalFormat("0.000").format(e.getValue()):null);
switch(e.getType()){ switch(e.getType()){
case "1": case "1":
e.setType("片区"); e.setType("片区");
...@@ -95,7 +96,6 @@ public class IdxBizFanWeightController extends BaseController { ...@@ -95,7 +96,6 @@ public class IdxBizFanWeightController extends BaseController {
e.setType("变量"); e.setType("变量");
break; break;
} }
return e; return e;
} }
).collect(Collectors.toList()); ).collect(Collectors.toList());
...@@ -313,8 +313,10 @@ public class IdxBizFanWeightController extends BaseController { ...@@ -313,8 +313,10 @@ public class IdxBizFanWeightController extends BaseController {
for (IdxBizFanWeight listdatum : listdata) { for (IdxBizFanWeight listdatum : listdata) {
for (IdxBizFanWeight idxBizPvWeight : list) { for (IdxBizFanWeight idxBizPvWeight : list) {
listdatum.setValue(formattedNum); listdatum.setValue(formattedNum);
listdatum.setFlag(null);
if (idxBizPvWeight.getSequenceNbr().equals(listdatum.getSequenceNbr())) { if (idxBizPvWeight.getSequenceNbr().equals(listdatum.getSequenceNbr())) {
listdatum.setValue(Float.valueOf(value.get("data").toString())); listdatum.setValue(Float.valueOf(value.get("data").toString()));
listdatum.setFlag("是");
break; break;
} }
} }
......
...@@ -83,6 +83,7 @@ public class IdxBizPvWeightController extends BaseController { ...@@ -83,6 +83,7 @@ public class IdxBizPvWeightController extends BaseController {
List<IdxBizPvWeight> formattedDates = list.stream().map(e-> { List<IdxBizPvWeight> formattedDates = list.stream().map(e-> {
e.setValue(e.getValue()!=null?Float.parseFloat(new DecimalFormat("0.000").format(e.getValue())):null); e.setValue(e.getValue()!=null?Float.parseFloat(new DecimalFormat("0.000").format(e.getValue())):null);
e.setValueS(e.getValue()!=null?new DecimalFormat("0.000").format(e.getValue()):null);
switch(e.getType()){ switch(e.getType()){
case "1": case "1":
e.setType("片区"); e.setType("片区");
...@@ -320,8 +321,10 @@ public class IdxBizPvWeightController extends BaseController { ...@@ -320,8 +321,10 @@ public class IdxBizPvWeightController extends BaseController {
for (IdxBizPvWeight listdatum : listdata) { for (IdxBizPvWeight listdatum : listdata) {
for (IdxBizPvWeight idxBizPvWeight : list) { for (IdxBizPvWeight idxBizPvWeight : list) {
listdatum.setValue(formattedNum); listdatum.setValue(formattedNum);
listdatum.setFlag(null);
if (idxBizPvWeight.getSequenceNbr().equals(listdatum.getSequenceNbr())) { if (idxBizPvWeight.getSequenceNbr().equals(listdatum.getSequenceNbr())) {
listdatum.setValue(Float.valueOf(value.get("data").toString())); listdatum.setValue(Float.valueOf(value.get("data").toString()));
listdatum.setFlag("是");
break; break;
} }
} }
......
...@@ -140,8 +140,10 @@ public class TDBigScreenAnalyseController extends BaseController { ...@@ -140,8 +140,10 @@ public class TDBigScreenAnalyseController extends BaseController {
StationBasic stationBasic = stationBasicMapper.selectById(stationCode); StationBasic stationBasic = stationBasicMapper.selectById(stationCode);
stationCode = stationBasic.getFanGatewayId(); stationCode = stationBasic.getFanGatewayId();
} else if (StrUtil.isNotEmpty(station)) { } else if (StrUtil.isNotEmpty(station)) {
//由于命名不统一
StationBasic stationBasic = stationBasicMapper.selectOne(new LambdaQueryWrapper<StationBasic>() StationBasic stationBasic = stationBasicMapper.selectOne(new LambdaQueryWrapper<StationBasic>()
.like(StationBasic::getStationName, station.substring(0, station.length() - 1))); .eq(StationBasic::getStationName, station.substring(0, station.length() - 1)+'场')
.or().eq(StationBasic::getStationName, station.substring(0, station.length() - 1)+'站'));
stationCode = stationBasic.getFanGatewayId(); stationCode = stationBasic.getFanGatewayId();
} }
if (StrUtil.isNotEmpty(areaCode)) { if (StrUtil.isNotEmpty(areaCode)) {
......
package com.yeejoin.amos.boot.module.jxiop.biz.entity; package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
...@@ -64,6 +66,12 @@ public class IdxBizFanWeight { ...@@ -64,6 +66,12 @@ public class IdxBizFanWeight {
*/ */
@TableField("VALUE") @TableField("VALUE")
private Float value; private Float value;
/**
* 权重值字符串
*/
@TableField(exist=false)
private String valueS;
/** /**
* orgCode * orgCode
...@@ -71,6 +79,7 @@ public class IdxBizFanWeight { ...@@ -71,6 +79,7 @@ public class IdxBizFanWeight {
@TableField("ORG_CODE") @TableField("ORG_CODE")
private String orgCode; private String orgCode;
@TableField(exist=false)
private String Symbol_key; @TableField(value = "FLAG", updateStrategy=FieldStrategy.IGNORED)
private String flag;
} }
package com.yeejoin.amos.boot.module.jxiop.biz.entity; package com.yeejoin.amos.boot.module.jxiop.biz.entity;
import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
...@@ -65,6 +66,12 @@ public class IdxBizPvWeight { ...@@ -65,6 +66,12 @@ public class IdxBizPvWeight {
*/ */
@TableField("VALUE") @TableField("VALUE")
private Float value; private Float value;
/**
* 权重值字符串
*/
@TableField(exist=false)
private String valueS;
/** /**
* orgCode * orgCode
...@@ -72,6 +79,6 @@ public class IdxBizPvWeight { ...@@ -72,6 +79,6 @@ public class IdxBizPvWeight {
@TableField("ORG_CODE") @TableField("ORG_CODE")
private String orgCode; private String orgCode;
@TableField(exist=false) @TableField(value = "FLAG", updateStrategy=FieldStrategy.IGNORED)
private String Symbol_key; private String flag;
} }
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