Commit b2516cb1 authored by tangwei's avatar tangwei

解决冲突

parents bb1b8702 6fa006bf
...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.api.dto; ...@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.hygf.api.dto;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector; import com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector;
import com.yeejoin.amos.boot.module.hygf.api.entity.JpInverterElectricity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto; import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...@@ -100,6 +101,9 @@ public class JpInverterDto extends BaseDto { ...@@ -100,6 +101,9 @@ public class JpInverterDto extends BaseDto {
private List<JpCollector> jpCollectors; private List<JpCollector> jpCollectors;
private List<JpInverterElectricity> JL;
private List<JpInverterElectricity> ZL;
@ApiModelProperty(value = "所属电站名称") @ApiModelProperty(value = "所属电站名称")
private String name; private String name;
......
...@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; ...@@ -11,6 +11,7 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.hygf.api.dto.*; import com.yeejoin.amos.boot.module.hygf.api.dto.*;
import com.yeejoin.amos.boot.module.hygf.api.entity.*; import com.yeejoin.amos.boot.module.hygf.api.entity.*;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterElectricityServiceImpl;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpStationServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpStationServiceImpl;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
...@@ -65,6 +66,8 @@ public class JpInverterController extends BaseController { ...@@ -65,6 +66,8 @@ public class JpInverterController extends BaseController {
JpStationServiceImpl jpStationServiceImpl; JpStationServiceImpl jpStationServiceImpl;
@Autowired @Autowired
JpCollectorServiceImpl jpCollectorService; JpCollectorServiceImpl jpCollectorService;
@Autowired
JpInverterElectricityServiceImpl jpInverterElectricityService;
@Autowired @Autowired
JpPersonStationMapper pPersonStationMapper; JpPersonStationMapper pPersonStationMapper;
...@@ -401,6 +404,19 @@ public class JpInverterController extends BaseController { ...@@ -401,6 +404,19 @@ public class JpInverterController extends BaseController {
wrapper.eq(BaseEntity::getIsDelete, false); wrapper.eq(BaseEntity::getIsDelete, false);
List<JpCollector> jpCollector = jpCollectorService.getBaseMapper().selectList(wrapper); List<JpCollector> jpCollector = jpCollectorService.getBaseMapper().selectList(wrapper);
String[] names = new String[]{"PV1","PV2","PV3","PV4"};
List<String> list = Arrays.asList(names);
LambdaQueryWrapper<JpInverterElectricity> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JpInverterElectricity::getSnCode,snCode);
queryWrapper.eq(JpInverterElectricity::getThirdStationId,jpInverter.getThirdStationId());
queryWrapper.and(q->q.eq(JpInverterElectricity::getType,"交流").or().in(JpInverterElectricity::getName,list));
List<JpInverterElectricity> jpInverterElectricities = jpInverterElectricityService.getBaseMapper().selectList(queryWrapper);
Map<String, List<JpInverterElectricity>> collect = jpInverterElectricities.stream().collect(Collectors.groupingBy(JpInverterElectricity::getType));
jpInverterDto.setZL(collect.get("直流"));
jpInverterDto.setJL(collect.get("交流"));
BeanUtils.copyProperties(jpInverter,jpInverterDto); BeanUtils.copyProperties(jpInverter,jpInverterDto);
jpInverterDto.setJpCollectors(jpCollector); jpInverterDto.setJpCollectors(jpCollector);
......
...@@ -1201,26 +1201,26 @@ public class TDBigScreenAnalyseController extends BaseController { ...@@ -1201,26 +1201,26 @@ public class TDBigScreenAnalyseController extends BaseController {
throw new RuntimeException("安全的分数上限只能是100"); throw new RuntimeException("安全的分数上限只能是100");
} }
List<IdxBizFanHealthLevel> list = idxBizFanHealthLevelMapper.selectList( List<IdxBizFanHealthLevel> list = idxBizFanHealthLevelMapper.selectList(
new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "注意")); new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, kv.get("ANALYSIS_OBJ_TYPE")));
Map<String, Double> map = list.stream().collect( Map<String, Double> map = list.stream().collect(
Collectors.toMap(IdxBizFanHealthLevel::getHealthLevel, IdxBizFanHealthLevel::getGroupLowerLimit)); Collectors.toMap(IdxBizFanHealthLevel::getHealthLevel, IdxBizFanHealthLevel::getGroupLowerLimit));
if (Double.valueOf(kv.get("GROUP_LOWER_LIMIT").toString()) <= map.get("groupUpperLimit")) { if (Double.valueOf(kv.get("GROUP_LOWER_LIMIT").toString()) <= map.get("注意")) {
throw new RuntimeException("安全的下限和注意的上限不能低于注意的下限"); throw new RuntimeException("安全的下限和注意的上限不能低于注意的下限");
} }
} else if ("注意".equals(kv.get("HEALTH_LEVEL").toString())) { } else if ("注意".equals(kv.get("HEALTH_LEVEL").toString())) {
List<IdxBizFanHealthLevel> list = idxBizFanHealthLevelMapper.selectList( List<IdxBizFanHealthLevel> list = idxBizFanHealthLevelMapper.selectList(
new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "警告")); new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, kv.get("ANALYSIS_OBJ_TYPE")));
Map<String, Double> map = list.stream().collect( Map<String, Double> map = list.stream().collect(
Collectors.toMap(IdxBizFanHealthLevel::getHealthLevel, IdxBizFanHealthLevel::getGroupLowerLimit)); Collectors.toMap(IdxBizFanHealthLevel::getHealthLevel, IdxBizFanHealthLevel::getGroupLowerLimit));
if (Double.valueOf(kv.get("GROUP_LOWER_LIMIT").toString()) <= map.get("groupUpperLimit")) { if (Double.valueOf(kv.get("GROUP_LOWER_LIMIT").toString()) <= map.get("警告")) {
throw new RuntimeException("注意的下限和安全的上限不能低于安全的下限"); throw new RuntimeException("注意的下限和安全的上限不能低于安全的下限");
} }
} else if ("警告".equals(kv.get("HEALTH_LEVEL").toString())) { } else if ("警告".equals(kv.get("HEALTH_LEVEL").toString())) {
List<IdxBizFanHealthLevel> list = idxBizFanHealthLevelMapper.selectList( List<IdxBizFanHealthLevel> list = idxBizFanHealthLevelMapper.selectList(
new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "危险")); new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, kv.get("ANALYSIS_OBJ_TYPE")));
Map<String, Double> map = list.stream().collect( Map<String, Double> map = list.stream().collect(
Collectors.toMap(IdxBizFanHealthLevel::getHealthLevel, IdxBizFanHealthLevel::getGroupLowerLimit)); Collectors.toMap(IdxBizFanHealthLevel::getHealthLevel, IdxBizFanHealthLevel::getGroupLowerLimit));
if (Double.valueOf(kv.get("GROUP_LOWER_LIMIT").toString()) <= map.get("groupUpperLimit")) { if (Double.valueOf(kv.get("GROUP_LOWER_LIMIT").toString()) <= map.get("危险")) {
throw new RuntimeException("警告的下限和注意的上限不能低于注意的下限"); throw new RuntimeException("警告的下限和注意的上限不能低于注意的下限");
} }
} else if ("危险".equals(kv.get("HEALTH_LEVEL").toString())) { } else if ("危险".equals(kv.get("HEALTH_LEVEL").toString())) {
...@@ -1229,7 +1229,7 @@ public class TDBigScreenAnalyseController extends BaseController { ...@@ -1229,7 +1229,7 @@ public class TDBigScreenAnalyseController extends BaseController {
throw new RuntimeException("危险的分数下限只能是0"); throw new RuntimeException("危险的分数下限只能是0");
} }
} }
if (Integer.valueOf(kv.get("GROUP_UPPER_LIMIT").toString()) <= Integer if (Double.valueOf(kv.get("GROUP_UPPER_LIMIT").toString()) <= Double
.valueOf(kv.get("GROUP_LOWER_LIMIT").toString())) { .valueOf(kv.get("GROUP_LOWER_LIMIT").toString())) {
throw new RuntimeException(kv.get("HEALTH_LEVEL").toString() + "的分数上限不能小于或等于本身下限"); throw new RuntimeException(kv.get("HEALTH_LEVEL").toString() + "的分数上限不能小于或等于本身下限");
} }
......
...@@ -41,4 +41,6 @@ public class FanHealthIndexDto implements Serializable { ...@@ -41,4 +41,6 @@ public class FanHealthIndexDto implements Serializable {
private String warningStatus; private String warningStatus;
private String disposotionState; private String disposotionState;
private String subarray; private String subarray;
private String sortOne;
private String sortsString;
} }
...@@ -43,5 +43,7 @@ public class PvHealthIndexDto { ...@@ -43,5 +43,7 @@ public class PvHealthIndexDto {
private Integer current; private Integer current;
private Integer size; private Integer size;
private String orderColumns; private String orderColumns;
private String sortOne;
private String sortsString;
} }
...@@ -28,7 +28,7 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> { ...@@ -28,7 +28,7 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
List<Map<String, Object>> getAllEquipAlarmInfo(); List<Map<String, Object>> getAllEquipAlarmInfo();
List<Map<String,Object>> getInfoByPage(@Param("dto") FanHealthIndexDto dto); List<FanWarningRecord> getInfoByPage(@Param("dto") FanHealthIndexDto dto);
Integer getInfoByPageTotal(@Param("dto") FanHealthIndexDto dto); Integer getInfoByPageTotal(@Param("dto") FanHealthIndexDto dto);
......
...@@ -174,6 +174,9 @@ ...@@ -174,6 +174,9 @@
<if test="dto.orderColumns != null and dto.orderColumns != ''"> <if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns} order by ${dto.orderColumns}
</if> </if>
<if test="(dto.orderColumns == null or dto.orderColumns == '') and dto.sortOne != null and dto.sortOne != ''">
order by ${dto.sortOne}
</if>
limit #{dto.current}, #{dto.size} limit #{dto.current}, #{dto.size}
</select> </select>
......
...@@ -208,7 +208,7 @@ ...@@ -208,7 +208,7 @@
`b`.`EQUIPMENT_NAME` `b`.`EQUIPMENT_NAME`
</select> </select>
<select id="getInfoByPage" resultType="map"> <select id="getInfoByPage" resultType="com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord">
SELECT * FROM fan_warning_record SELECT * FROM fan_warning_record
<where> <where>
<if test="dto.area!= null and dto.area!= ''"> AND arae = #{dto.area} </if> <if test="dto.area!= null and dto.area!= ''"> AND arae = #{dto.area} </if>
...@@ -224,6 +224,9 @@ ...@@ -224,6 +224,9 @@
<if test="dto.orderColumns != null and dto.orderColumns != ''"> <if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns} order by ${dto.orderColumns}
</if> </if>
<if test="(dto.orderColumns == null or dto.orderColumns == '') and dto.sortOne != null and dto.sortOne != ''">
order by ${dto.sortOne}
</if>
limit #{dto.current}, #{dto.size} limit #{dto.current}, #{dto.size}
</select> </select>
......
...@@ -205,6 +205,9 @@ ...@@ -205,6 +205,9 @@
<if test="dto.orderColumns != null and dto.orderColumns != ''"> <if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns} order by ${dto.orderColumns}
</if> </if>
<if test="(dto.orderColumns == null or dto.orderColumns == '') and dto.sortOne != null and dto.sortOne != ''">
order by ${dto.sortOne}
</if>
limit #{dto.current}, #{dto.size} limit #{dto.current}, #{dto.size}
</select> </select>
......
...@@ -243,6 +243,9 @@ ...@@ -243,6 +243,9 @@
<if test="dto.orderColumns != null and dto.orderColumns != ''"> <if test="dto.orderColumns != null and dto.orderColumns != ''">
order by ${dto.orderColumns} order by ${dto.orderColumns}
</if> </if>
<if test="(dto.orderColumns == null or dto.orderColumns == '') and dto.sortOne != null and dto.sortOne != ''">
order by ${dto.sortOne}
</if>
limit #{dto.current}, #{dto.size} limit #{dto.current}, #{dto.size}
</select> </select>
......
...@@ -47,6 +47,11 @@ ...@@ -47,6 +47,11 @@
<version>2.4</version> <version>2.4</version>
<classifier>jdk15</classifier> <classifier>jdk15</classifier>
</dependency> </dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.22</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -140,8 +140,8 @@ public class PersonBasicController extends BaseController { ...@@ -140,8 +140,8 @@ public class PersonBasicController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/{sequenceNbr}") @GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个人员基本信息", notes = "根据sequenceNbr查询单个人员基本信息") @ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询单个人员基本信息", notes = "根据sequenceNbr查询单个人员基本信息")
public ResponseModel<PersonDto> selectOne(@PathVariable Long sequenceNbr) { public ResponseModel<PersonDto> selectOne(@RequestParam Long sequenceNbr,@RequestParam String type) {
return ResponseHelper.buildResponse(personBasicServiceImpl.getPerson(sequenceNbr)); return ResponseHelper.buildResponse(personBasicServiceImpl.getPerson(sequenceNbr,type));
} }
/** /**
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import cn.hutool.core.util.DesensitizedUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...@@ -545,7 +546,7 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -545,7 +546,7 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
} }
@Transactional @Transactional
public PersonDto getPerson(Long sequenceNbr) { public PersonDto getPerson(Long sequenceNbr,String type) {
PersonDto personDto = new PersonDto(); PersonDto personDto = new PersonDto();
PersonUser personUser = new PersonUser(); PersonUser personUser = new PersonUser();
QueryWrapper<PersonBasic> wrapper1 = new QueryWrapper(); QueryWrapper<PersonBasic> wrapper1 = new QueryWrapper();
...@@ -574,8 +575,12 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -574,8 +575,12 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
PersonAccount personAccount = personAccountService.getOne(wrapper4); PersonAccount personAccount = personAccountService.getOne(wrapper4);
personAccount.setPhoneNum(personBasic.getPhone()); personAccount.setPhoneNum(personBasic.getPhone());
//对于密码进行解密 //对于密码进行解密
personAccount.setPassword(DesUtil.decode(personAccount.getPassword(), secretKey)); if("look".equals(type)){
personAccount.setSecondaryPassword(DesUtil.decode(personAccount.getSecondaryPassword(), secretKey)); personAccount.setIdNumber(DesensitizedUtil.idCardNum(personAccount.getIdNumber(),0,4));
}else{
personAccount.setPassword(DesUtil.decode(personAccount.getPassword(), secretKey));
personAccount.setSecondaryPassword(DesUtil.decode(personAccount.getSecondaryPassword(), secretKey));
}
if (personBasic.getNativePlace() != null) { if (personBasic.getNativePlace() != null) {
personUser.setNativePlace(JSON.parseArray(personBasic.getNativePlace(), Integer.class)); personUser.setNativePlace(JSON.parseArray(personBasic.getNativePlace(), Integer.class));
} }
......
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