Commit 15a6f2c1 authored by 朱晨阳's avatar 朱晨阳

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

parents 69a29982 34f96856
package com.yeejoin.amos.boot.module.jxiop.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser;
import com.yeejoin.amos.boot.module.jxiop.api.dto.StationBasicDto;
import com.yeejoin.amos.boot.module.jxiop.api.dto.UserMapperDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics;
import org.apache.ibatis.annotations.Param;
......@@ -21,47 +19,53 @@ import java.util.Map;
public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
List<UserMapperDto> queryPage(@Param("current") Long current, @Param("size") Long size,
@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
List<UserMapperDto> queryPage(@Param("current") Long current, @Param("size") Long size,
@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
@Param("orgCode") String orgCode);
List<UserMapperDto> queryPagecount(
@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
@Param("orgCode") String orgCode);
int deleteList(String[] ids);
List<EXPersonUser> getEXPersonUser(@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
@Param("orgCode") String orgCode);
List<EXPersonUser> getEXPersonUser(@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
@Param("orgCode") String orgCode);
List<EXPersonUser> getEXPersonUserAll(@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
@Param("orgCode") String orgCode,
@Param("ids") String [] ids
List<EXPersonUser> getEXPersonUserAll(@Param("name") String name,
@Param("accountName") String accountName,
@Param("projectName") String projectName,
@Param("orgCode") String orgCode,
@Param("ids") String[] ids
);
List<Map<String, Object>> getPersonYardStatistics(@Param("parentCode") String parentCode);
List<Map<String, Object>> getPersonYardStatistics(@Param("parentCode") String parentCode,
@Param("areaCode") String areaCode,
@Param("platformStationId") String platformStationId);
List<Map<String, Object>> getPersonYardByPage(@Param("current") Integer current,
@Param("size") Integer size,
@Param("size") Integer size,
@Param("parentCode") String parentCode,
@Param("date") String date,
@Param("qrCodeColor") String qrCodeColor,
@Param("ne") String ne);
@Param("ne") String ne,
@Param("areaCode") String areaCode,
@Param("platformStationId") String platformStationId);
Integer getPersonYardByPageCount(@Param("parentCode") String parentCode,
@Param("date") String date,
@Param("qrCodeColor") String qrCodeColor,
@Param("ne") String ne);
@Param("ne") String ne,
@Param("areaCode") String areaCode,
@Param("platformStationId") String platformStationId);
List<StationQrCodeStatistics> getPersonStatistics();
......
......@@ -205,6 +205,12 @@
<if test="parentCode != null and parentCode != ''">
AND a.project_org_code like concat(#{parentCode},'%')
</if>
<if test="platformStationId != null and platformStationId != ''">
AND c.platform_station_id = #{platformStationId}
</if>
<if test="areaCode != null and areaCode != ''">
AND c.area_code = #{areaCode}
</if>
</where>
GROUP BY
a.qrcode_color
......@@ -240,6 +246,12 @@
<if test="ne != null and ne != ''">
AND a.qrcode_color != #{ne}
</if>
<if test="platformStationId != null and platformStationId != ''">
AND c.platform_station_id = #{platformStationId}
</if>
<if test="areaCode != null and areaCode != ''">
AND c.area_code = #{areaCode}
</if>
</where>
ORDER BY sort asc,a.rec_date DESC
limit #{current},#{size}
......@@ -266,6 +278,12 @@
<if test="ne != null and ne != ''">
AND a.qrcode_color != #{ne}
</if>
<if test="platformStationId != null and platformStationId != ''">
AND c.platform_station_id = #{platformStationId}
</if>
<if test="areaCode != null and areaCode != ''">
AND c.area_code = #{areaCode}
</if>
</where>
</select>
......
......@@ -1129,7 +1129,7 @@ public class MonitorFanIdxController extends BaseController {
@ApiOperation(value = "运维数据 ")
@GetMapping("/operationData")
public ResponseModel<IPage<Map<String, Object>>> operationData(@RequestParam(value = "areaCode", required = false) String areaCode,
@RequestParam(value = "stationId", required = false) String stationId) {
@RequestParam(value = "platformStationId", required = false) String platformStationId) {
// List<StationCacheInfoDto> list = commonServiceImpl.getListStationCacheInfoDto();
......@@ -1153,14 +1153,14 @@ public class MonitorFanIdxController extends BaseController {
// result.setRecords(mapList);
// result.setCurrent(1);
// result.setTotal(mapList.size());
return ResponseHelper.buildResponse(monitorService.operationData(areaCode,stationId));
return ResponseHelper.buildResponse(monitorService.operationData(areaCode,platformStationId));
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "全国新能源接入情况 ")
@GetMapping("/getAccessSituation")
public ResponseModel<Map<String, Object>> getAccessSituation(@RequestParam(value = "areaCode", required = false) String areaCode,
@RequestParam(value = "stationId", required = false) String stationId) {
return ResponseHelper.buildResponse(monitorService.getAccessSituation(areaCode,stationId));
@RequestParam(value = "platformStationId", required = false) String platformStationId) {
return ResponseHelper.buildResponse(monitorService.getAccessSituation(areaCode,platformStationId));
}
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
......
......@@ -68,12 +68,14 @@ public class PersonQrCodeController extends BaseController {
@GetMapping(value = "/getPersonYardStatistics")
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码环形图查询", notes = "评估大屏 - 人员赋码环形图查询")
public ResponseModel<List<Map<String, Object>>> getPersonYardStatistics(@RequestParam(required = false, value = "parentCode") String parentCode,
@RequestParam(required = false, value = "dataType") String dataType) {
@RequestParam(required = false, value = "dataType") String dataType,
@RequestParam(value = "areaCode", required = false) String areaCode,
@RequestParam(value = "platformStationId", required = false) String platformStationId) {
List<Map<String, Object>> resultList = new ArrayList<>();
if (StringUtils.isNotEmpty(dataType) && dataType.equals("person")) {
resultList = personBasicMapper.getPersonYardStatistics(parentCode);
resultList = personBasicMapper.getPersonYardStatistics(parentCode, areaCode, platformStationId);
} else if (StringUtils.isNotEmpty(dataType) && dataType.equals("equip")) {
resultList = sjglZsjZsbtzMapper.getEquipYardStatistics(parentCode);
} else if (StringUtils.isNotEmpty(dataType) && dataType.equals("job")) {
......@@ -104,11 +106,13 @@ public class PersonQrCodeController extends BaseController {
@RequestParam(value = "size") Integer size,
@RequestParam(required = false, value = "dataType") String dataType,
@RequestParam(required = false) String date,
@RequestParam(required = false) String qrCodeColor) {
@RequestParam(required = false) String qrCodeColor,
@RequestParam(value = "areaCode", required = false) String areaCode,
@RequestParam(value = "platformStationId", required = false) String platformStationId) {
Page<Map<String, Object>> resultList = new Page<>();
if ("person".equals(dataType)) {
resultList = personBasicServiceImpl.getPersonYardByPage(parentCode, current, size, date, qrCodeColor, null, null);
resultList = personBasicServiceImpl.getPersonYardByPage(parentCode, current, size, date, qrCodeColor, null, null, areaCode, platformStationId);
} else if ("equip".equals(dataType)) {
List<Map<String, Object>> equipYardByPage = sjglZsjZsbtzMapper.getEquipYardByPage((current - 1) * size, size, parentCode, date, qrCodeColor, null);
Integer equipYardByPageCount = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, date, qrCodeColor, null);
......@@ -144,7 +148,9 @@ public class PersonQrCodeController extends BaseController {
@GetMapping(value = "/getQrCodeCount")
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码数量等统计", notes = "评估大屏 - 人员赋码数量等统计")
public ResponseModel<Map<String, Object>> getQrCodeCount(@RequestParam(required = false, value = "parentCode") String parentCode,
@RequestParam(required = false, value = "dataType") String dataType) {
@RequestParam(required = false, value = "dataType") String dataType,
@RequestParam(value = "areaCode", required = false) String areaCode,
@RequestParam(value = "platformStationId", required = false) String platformStationId) {
FeignClientResult<Map<String, Object>> sevenEntity = null;
try {
......@@ -160,7 +166,7 @@ public class PersonQrCodeController extends BaseController {
String yellowToGreen = result.get("yellowToGreen").toString();
Integer countAll = 0;
if ("RYFM".equals(dataType) || "person".equals(dataType)) {
countAll = personBasicMapper.getPersonYardByPageCount(parentCode, null, null, null);
countAll = personBasicMapper.getPersonYardByPageCount(parentCode, null, null, null,areaCode,platformStationId);
} else if ("equip".equals(dataType)) {
countAll = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, null, null, null);
} else if ("job".equals(dataType)) {
......@@ -186,7 +192,7 @@ public class PersonQrCodeController extends BaseController {
@GetMapping(value = "/getQrCodeCountByStation")
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 场站 人员赋码数量等统计 【折线图】", notes = "评估大屏 - 场站 人员赋码数量等统计 【折线图】")
public ResponseModel<Map<String, Object>> getQrCodeCountByStation(@RequestParam(required = false, value = "parentCode") String parentCode,
@RequestParam(required = false, value = "dataType") String dataType) {
@RequestParam(required = false, value = "dataType") String dataType) {
List<Map<String, Object>> qrCodeCountByStation = stationQrCodeStatisticsMapper.getQrCodeCountByStation(parentCode, dataType);
List<Object> redNum = qrCodeCountByStation.stream().map(t -> t.get("redNum")).collect(Collectors.toList());
......@@ -273,10 +279,12 @@ public class PersonQrCodeController extends BaseController {
@RequestParam(required = false, value = "score") BigDecimal score,
@RequestParam(value = "current") Integer current,
@RequestParam(value = "size") Integer size,
@RequestParam(required = false, value = "date") String date) {
@RequestParam(required = false, value = "date") String date,
@RequestParam(value = "areaCode", required = false) String areaCode,
@RequestParam(value = "platformStationId", required = false) String platformStationId) {
Page<Map<String, Object>> resultList = new Page<>();
if ("V1".equals(column)) {
resultList = personBasicServiceImpl.getPersonYardByPage(parentCode, current, size, date, null, "green", score);
resultList = personBasicServiceImpl.getPersonYardByPage(parentCode, current, size, date, null, "green", score, areaCode, platformStationId);
} else if ("S1".equals(column)) {
List<Map<String, Object>> equipYardByPage = sjglZsjZsbtzMapper.getEquipYardByPage((current - 1) * size, size, parentCode, date, null, "green");
Integer equipYardByPageCount = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, date, null, "green");
......@@ -330,8 +338,8 @@ public class PersonQrCodeController extends BaseController {
if ("V1".equals(column)) {
resultMap = personBasicServiceImpl.getPersonDetailInfoByObjectId(objectId);
if (resultMap.get("recDate").equals("")){
resultMap.put("recDate",resultMap.get("qrcodeDate"));
if (resultMap.get("recDate").equals("")) {
resultMap.put("recDate", resultMap.get("qrcodeDate"));
}
} else if ("S1".equals(column)) {
resultMap = sjglZsjZsbtzMapper.getEquipDetailInfoByObjectId(objectId);
......
......@@ -9,6 +9,8 @@ public class StationCacheInfoDto implements Serializable {
private static final long serialVersionUID = 1L;
//场站id
private String stationId;
//平台场站id
private String platformStationId;
//场站名称
private String stationName;
//场站类型
......
......@@ -15,11 +15,11 @@ import java.util.Map;
public interface MonitorService {
/**
* @param areaCode 区域编码
* @param stationId 场站id
* @param platformStationId 场站id
* @return 全国运维数据
* @Description 根据区域编码动态运维数据
*/
IPage<Map<String, Object>> operationData(String areaCode,String stationId);
IPage<Map<String, Object>> operationData(String areaCode,String platformStationId);
/**
* @return Map<String, Object>
......@@ -123,8 +123,8 @@ public interface MonitorService {
/**
* 获取接入情况
* @param areaCode
* @param stationId
* @param platformStationId
* @return
*/
Map<String, Object> getAccessSituation(String areaCode,String stationId);
Map<String, Object> getAccessSituation(String areaCode,String platformStationId);
}
......@@ -61,13 +61,13 @@ public class MonitorServiceImpl implements MonitorService {
private Resource overviewGF;
@Override
public IPage<Map<String, Object>> operationData(String areaCode,String stationId) {
public IPage<Map<String, Object>> operationData(String areaCode,String platformStationId) {
List<StationCacheInfoDto> list = getListStationCacheInfoDto();
if (null != areaCode) {
list = list.stream().filter(e -> e.getAreaCode().toUpperCase(Locale.ROOT).equals(areaCode.toUpperCase(Locale.ROOT))).collect(Collectors.toList());
}
if (!StringUtils.isEmpty(stationId)) {
list = list.stream().filter(e -> e.getStationId().toUpperCase(Locale.ROOT).equals(stationId.toUpperCase(Locale.ROOT))).collect(Collectors.toList());
if (!StringUtils.isEmpty(platformStationId)) {
list = list.stream().filter(e -> e.getPlatformStationId().toUpperCase(Locale.ROOT).equals(platformStationId.toUpperCase(Locale.ROOT))).collect(Collectors.toList());
}
List<Map<String, Object>> mapList = new ArrayList<>();
Map<String, List<StationCacheInfoDto>> listMap = list.stream().collect(Collectors.groupingBy(StationCacheInfoDto::getStationType, Collectors.toList()));
......@@ -160,6 +160,7 @@ public class MonitorServiceImpl implements MonitorService {
stationCacheInfoDto.setBoosterGatewayId(stationBasic.getBoosterGatewayId());
stationCacheInfoDto.setBoosterCoreName(stationBasic.getBoosterCoreName());
stationCacheInfoDto.setStationCoreName(stationBasic.getStationCoreName());
stationCacheInfoDto.setPlatformStationId(stationBasic.getPlatformStationId());
stationCacheInfoDtos.add(stationCacheInfoDto);
}
......@@ -948,8 +949,8 @@ public class MonitorServiceImpl implements MonitorService {
}
@Override
public Map<String, Object> getAccessSituation(String areaCode, String stationId) {
IPage<Map<String, Object>> page = operationData(areaCode,stationId);
public Map<String, Object> getAccessSituation(String areaCode, String platformStationId) {
IPage<Map<String, Object>> page = operationData(areaCode,platformStationId);
List<Map<String, Object>> records = page.getRecords();
Map<String, Object> map = new HashMap<>();
if (!CollectionUtils.isEmpty(records)) {
......
......@@ -124,9 +124,11 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
String date,
String qrCodeColor,
String ne,
BigDecimal score) {
List<Map<String, Object>> resultList = personBasicMapper.getPersonYardByPage((current - 1) * size, size , parentCode, date, qrCodeColor, ne);
Integer count = personBasicMapper.getPersonYardByPageCount(parentCode, date, qrCodeColor, ne);
BigDecimal score,
String areaCode,
String platformStationId) {
List<Map<String, Object>> resultList = personBasicMapper.getPersonYardByPage((current - 1) * size, size , parentCode, date, qrCodeColor, ne,areaCode,platformStationId);
Integer count = personBasicMapper.getPersonYardByPageCount(parentCode, date, qrCodeColor, ne,areaCode,platformStationId);
resultList.forEach(item -> {
String name = QrcodeColorEnum.getName(String.valueOf(item.get("qrCodeColor")));
......
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