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; 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.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.dto.UserMapperDto;
import com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic; 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 com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -45,10 +43,12 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> { ...@@ -45,10 +43,12 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
@Param("accountName") String accountName, @Param("accountName") String accountName,
@Param("projectName") String projectName, @Param("projectName") String projectName,
@Param("orgCode") String orgCode, @Param("orgCode") String orgCode,
@Param("ids") String [] ids @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, List<Map<String, Object>> getPersonYardByPage(@Param("current") Integer current,
...@@ -56,12 +56,16 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> { ...@@ -56,12 +56,16 @@ public interface PersonBasicMapper extends BaseMapper<PersonBasic> {
@Param("parentCode") String parentCode, @Param("parentCode") String parentCode,
@Param("date") String date, @Param("date") String date,
@Param("qrCodeColor") String qrCodeColor, @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, Integer getPersonYardByPageCount(@Param("parentCode") String parentCode,
@Param("date") String date, @Param("date") String date,
@Param("qrCodeColor") String qrCodeColor, @Param("qrCodeColor") String qrCodeColor,
@Param("ne") String ne); @Param("ne") String ne,
@Param("areaCode") String areaCode,
@Param("platformStationId") String platformStationId);
List<StationQrCodeStatistics> getPersonStatistics(); List<StationQrCodeStatistics> getPersonStatistics();
......
...@@ -205,6 +205,12 @@ ...@@ -205,6 +205,12 @@
<if test="parentCode != null and parentCode != ''"> <if test="parentCode != null and parentCode != ''">
AND a.project_org_code like concat(#{parentCode},'%') AND a.project_org_code like concat(#{parentCode},'%')
</if> </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> </where>
GROUP BY GROUP BY
a.qrcode_color a.qrcode_color
...@@ -240,6 +246,12 @@ ...@@ -240,6 +246,12 @@
<if test="ne != null and ne != ''"> <if test="ne != null and ne != ''">
AND a.qrcode_color != #{ne} AND a.qrcode_color != #{ne}
</if> </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> </where>
ORDER BY sort asc,a.rec_date DESC ORDER BY sort asc,a.rec_date DESC
limit #{current},#{size} limit #{current},#{size}
...@@ -266,6 +278,12 @@ ...@@ -266,6 +278,12 @@
<if test="ne != null and ne != ''"> <if test="ne != null and ne != ''">
AND a.qrcode_color != #{ne} AND a.qrcode_color != #{ne}
</if> </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> </where>
</select> </select>
......
...@@ -1129,7 +1129,7 @@ public class MonitorFanIdxController extends BaseController { ...@@ -1129,7 +1129,7 @@ public class MonitorFanIdxController extends BaseController {
@ApiOperation(value = "运维数据 ") @ApiOperation(value = "运维数据 ")
@GetMapping("/operationData") @GetMapping("/operationData")
public ResponseModel<IPage<Map<String, Object>>> operationData(@RequestParam(value = "areaCode", required = false) String areaCode, 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(); // List<StationCacheInfoDto> list = commonServiceImpl.getListStationCacheInfoDto();
...@@ -1153,14 +1153,14 @@ public class MonitorFanIdxController extends BaseController { ...@@ -1153,14 +1153,14 @@ public class MonitorFanIdxController extends BaseController {
// result.setRecords(mapList); // result.setRecords(mapList);
// result.setCurrent(1); // result.setCurrent(1);
// result.setTotal(mapList.size()); // result.setTotal(mapList.size());
return ResponseHelper.buildResponse(monitorService.operationData(areaCode,stationId)); return ResponseHelper.buildResponse(monitorService.operationData(areaCode,platformStationId));
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
@ApiOperation(value = "全国新能源接入情况 ") @ApiOperation(value = "全国新能源接入情况 ")
@GetMapping("/getAccessSituation") @GetMapping("/getAccessSituation")
public ResponseModel<Map<String, Object>> getAccessSituation(@RequestParam(value = "areaCode", required = false) String areaCode, public ResponseModel<Map<String, Object>> getAccessSituation(@RequestParam(value = "areaCode", required = false) String areaCode,
@RequestParam(value = "stationId", required = false) String stationId) { @RequestParam(value = "platformStationId", required = false) String platformStationId) {
return ResponseHelper.buildResponse(monitorService.getAccessSituation(areaCode,stationId)); return ResponseHelper.buildResponse(monitorService.getAccessSituation(areaCode,platformStationId));
} }
@TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY) @TycloudOperation(needAuth = false, ApiLevel = UserType.AGENCY)
......
...@@ -68,12 +68,14 @@ public class PersonQrCodeController extends BaseController { ...@@ -68,12 +68,14 @@ public class PersonQrCodeController extends BaseController {
@GetMapping(value = "/getPersonYardStatistics") @GetMapping(value = "/getPersonYardStatistics")
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码环形图查询", notes = "评估大屏 - 人员赋码环形图查询") @ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码环形图查询", notes = "评估大屏 - 人员赋码环形图查询")
public ResponseModel<List<Map<String, Object>>> getPersonYardStatistics(@RequestParam(required = false, value = "parentCode") String parentCode, 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<>(); List<Map<String, Object>> resultList = new ArrayList<>();
if (StringUtils.isNotEmpty(dataType) && dataType.equals("person")) { 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")) { } else if (StringUtils.isNotEmpty(dataType) && dataType.equals("equip")) {
resultList = sjglZsjZsbtzMapper.getEquipYardStatistics(parentCode); resultList = sjglZsjZsbtzMapper.getEquipYardStatistics(parentCode);
} else if (StringUtils.isNotEmpty(dataType) && dataType.equals("job")) { } else if (StringUtils.isNotEmpty(dataType) && dataType.equals("job")) {
...@@ -104,11 +106,13 @@ public class PersonQrCodeController extends BaseController { ...@@ -104,11 +106,13 @@ public class PersonQrCodeController extends BaseController {
@RequestParam(value = "size") Integer size, @RequestParam(value = "size") Integer size,
@RequestParam(required = false, value = "dataType") String dataType, @RequestParam(required = false, value = "dataType") String dataType,
@RequestParam(required = false) String date, @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<>(); Page<Map<String, Object>> resultList = new Page<>();
if ("person".equals(dataType)) { 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)) { } else if ("equip".equals(dataType)) {
List<Map<String, Object>> equipYardByPage = sjglZsjZsbtzMapper.getEquipYardByPage((current - 1) * size, size, parentCode, date, qrCodeColor, null); List<Map<String, Object>> equipYardByPage = sjglZsjZsbtzMapper.getEquipYardByPage((current - 1) * size, size, parentCode, date, qrCodeColor, null);
Integer equipYardByPageCount = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, date, qrCodeColor, null); Integer equipYardByPageCount = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, date, qrCodeColor, null);
...@@ -144,7 +148,9 @@ public class PersonQrCodeController extends BaseController { ...@@ -144,7 +148,9 @@ public class PersonQrCodeController extends BaseController {
@GetMapping(value = "/getQrCodeCount") @GetMapping(value = "/getQrCodeCount")
@ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码数量等统计", notes = "评估大屏 - 人员赋码数量等统计") @ApiOperation(httpMethod = "GET", value = "评估大屏 - 人员赋码数量等统计", notes = "评估大屏 - 人员赋码数量等统计")
public ResponseModel<Map<String, Object>> getQrCodeCount(@RequestParam(required = false, value = "parentCode") String parentCode, 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; FeignClientResult<Map<String, Object>> sevenEntity = null;
try { try {
...@@ -160,7 +166,7 @@ public class PersonQrCodeController extends BaseController { ...@@ -160,7 +166,7 @@ public class PersonQrCodeController extends BaseController {
String yellowToGreen = result.get("yellowToGreen").toString(); String yellowToGreen = result.get("yellowToGreen").toString();
Integer countAll = 0; Integer countAll = 0;
if ("RYFM".equals(dataType) || "person".equals(dataType)) { 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)) { } else if ("equip".equals(dataType)) {
countAll = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, null, null, null); countAll = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, null, null, null);
} else if ("job".equals(dataType)) { } else if ("job".equals(dataType)) {
...@@ -273,10 +279,12 @@ public class PersonQrCodeController extends BaseController { ...@@ -273,10 +279,12 @@ public class PersonQrCodeController extends BaseController {
@RequestParam(required = false, value = "score") BigDecimal score, @RequestParam(required = false, value = "score") BigDecimal score,
@RequestParam(value = "current") Integer current, @RequestParam(value = "current") Integer current,
@RequestParam(value = "size") Integer size, @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<>(); Page<Map<String, Object>> resultList = new Page<>();
if ("V1".equals(column)) { 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)) { } else if ("S1".equals(column)) {
List<Map<String, Object>> equipYardByPage = sjglZsjZsbtzMapper.getEquipYardByPage((current - 1) * size, size, parentCode, date, null, "green"); List<Map<String, Object>> equipYardByPage = sjglZsjZsbtzMapper.getEquipYardByPage((current - 1) * size, size, parentCode, date, null, "green");
Integer equipYardByPageCount = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, date, null, "green"); Integer equipYardByPageCount = sjglZsjZsbtzMapper.getEquipYardByPageCount(parentCode, date, null, "green");
...@@ -330,8 +338,8 @@ public class PersonQrCodeController extends BaseController { ...@@ -330,8 +338,8 @@ public class PersonQrCodeController extends BaseController {
if ("V1".equals(column)) { if ("V1".equals(column)) {
resultMap = personBasicServiceImpl.getPersonDetailInfoByObjectId(objectId); resultMap = personBasicServiceImpl.getPersonDetailInfoByObjectId(objectId);
if (resultMap.get("recDate").equals("")){ if (resultMap.get("recDate").equals("")) {
resultMap.put("recDate",resultMap.get("qrcodeDate")); resultMap.put("recDate", resultMap.get("qrcodeDate"));
} }
} else if ("S1".equals(column)) { } else if ("S1".equals(column)) {
resultMap = sjglZsjZsbtzMapper.getEquipDetailInfoByObjectId(objectId); resultMap = sjglZsjZsbtzMapper.getEquipDetailInfoByObjectId(objectId);
......
...@@ -9,6 +9,8 @@ public class StationCacheInfoDto implements Serializable { ...@@ -9,6 +9,8 @@ public class StationCacheInfoDto implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
//场站id //场站id
private String stationId; private String stationId;
//平台场站id
private String platformStationId;
//场站名称 //场站名称
private String stationName; private String stationName;
//场站类型 //场站类型
......
...@@ -15,11 +15,11 @@ import java.util.Map; ...@@ -15,11 +15,11 @@ import java.util.Map;
public interface MonitorService { public interface MonitorService {
/** /**
* @param areaCode 区域编码 * @param areaCode 区域编码
* @param stationId 场站id * @param platformStationId 场站id
* @return 全国运维数据 * @return 全国运维数据
* @Description 根据区域编码动态运维数据 * @Description 根据区域编码动态运维数据
*/ */
IPage<Map<String, Object>> operationData(String areaCode,String stationId); IPage<Map<String, Object>> operationData(String areaCode,String platformStationId);
/** /**
* @return Map<String, Object> * @return Map<String, Object>
...@@ -123,8 +123,8 @@ public interface MonitorService { ...@@ -123,8 +123,8 @@ public interface MonitorService {
/** /**
* 获取接入情况 * 获取接入情况
* @param areaCode * @param areaCode
* @param stationId * @param platformStationId
* @return * @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 { ...@@ -61,13 +61,13 @@ public class MonitorServiceImpl implements MonitorService {
private Resource overviewGF; private Resource overviewGF;
@Override @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(); List<StationCacheInfoDto> list = getListStationCacheInfoDto();
if (null != areaCode) { if (null != areaCode) {
list = list.stream().filter(e -> e.getAreaCode().toUpperCase(Locale.ROOT).equals(areaCode.toUpperCase(Locale.ROOT))).collect(Collectors.toList()); list = list.stream().filter(e -> e.getAreaCode().toUpperCase(Locale.ROOT).equals(areaCode.toUpperCase(Locale.ROOT))).collect(Collectors.toList());
} }
if (!StringUtils.isEmpty(stationId)) { if (!StringUtils.isEmpty(platformStationId)) {
list = list.stream().filter(e -> e.getStationId().toUpperCase(Locale.ROOT).equals(stationId.toUpperCase(Locale.ROOT))).collect(Collectors.toList()); 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<>(); List<Map<String, Object>> mapList = new ArrayList<>();
Map<String, List<StationCacheInfoDto>> listMap = list.stream().collect(Collectors.groupingBy(StationCacheInfoDto::getStationType, Collectors.toList())); Map<String, List<StationCacheInfoDto>> listMap = list.stream().collect(Collectors.groupingBy(StationCacheInfoDto::getStationType, Collectors.toList()));
...@@ -160,6 +160,7 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -160,6 +160,7 @@ public class MonitorServiceImpl implements MonitorService {
stationCacheInfoDto.setBoosterGatewayId(stationBasic.getBoosterGatewayId()); stationCacheInfoDto.setBoosterGatewayId(stationBasic.getBoosterGatewayId());
stationCacheInfoDto.setBoosterCoreName(stationBasic.getBoosterCoreName()); stationCacheInfoDto.setBoosterCoreName(stationBasic.getBoosterCoreName());
stationCacheInfoDto.setStationCoreName(stationBasic.getStationCoreName()); stationCacheInfoDto.setStationCoreName(stationBasic.getStationCoreName());
stationCacheInfoDto.setPlatformStationId(stationBasic.getPlatformStationId());
stationCacheInfoDtos.add(stationCacheInfoDto); stationCacheInfoDtos.add(stationCacheInfoDto);
} }
...@@ -948,8 +949,8 @@ public class MonitorServiceImpl implements MonitorService { ...@@ -948,8 +949,8 @@ public class MonitorServiceImpl implements MonitorService {
} }
@Override @Override
public Map<String, Object> getAccessSituation(String areaCode, String stationId) { public Map<String, Object> getAccessSituation(String areaCode, String platformStationId) {
IPage<Map<String, Object>> page = operationData(areaCode,stationId); IPage<Map<String, Object>> page = operationData(areaCode,platformStationId);
List<Map<String, Object>> records = page.getRecords(); List<Map<String, Object>> records = page.getRecords();
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
if (!CollectionUtils.isEmpty(records)) { if (!CollectionUtils.isEmpty(records)) {
......
...@@ -124,9 +124,11 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -124,9 +124,11 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
String date, String date,
String qrCodeColor, String qrCodeColor,
String ne, String ne,
BigDecimal score) { BigDecimal score,
List<Map<String, Object>> resultList = personBasicMapper.getPersonYardByPage((current - 1) * size, size , parentCode, date, qrCodeColor, ne); String areaCode,
Integer count = personBasicMapper.getPersonYardByPageCount(parentCode, date, qrCodeColor, ne); 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 -> { resultList.forEach(item -> {
String name = QrcodeColorEnum.getName(String.valueOf(item.get("qrCodeColor"))); String name = QrcodeColorEnum.getName(String.valueOf(item.get("qrCodeColor")));
......
...@@ -7,14 +7,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -7,14 +7,12 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.fasterxml.jackson.core.type.TypeReference; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService; import com.yeejoin.amos.boot.biz.common.feign.AmosFeignService;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils; import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jxiop.api.Enum.QrcodeColorEnum; import com.yeejoin.amos.boot.module.jxiop.api.Enum.QrcodeColorEnum;
import com.yeejoin.amos.boot.module.jxiop.api.dto.*; import com.yeejoin.amos.boot.module.jxiop.api.dto.*;
import com.yeejoin.amos.boot.module.jxiop.api.entity.PersonBasic;
import com.yeejoin.amos.boot.module.jxiop.api.entity.*; import com.yeejoin.amos.boot.module.jxiop.api.entity.*;
import com.yeejoin.amos.boot.module.jxiop.api.feign.AgencyuserFeign; import com.yeejoin.amos.boot.module.jxiop.api.feign.AgencyuserFeign;
import com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonAccountFedMapper; import com.yeejoin.amos.boot.module.jxiop.api.mapper.PersonAccountFedMapper;
...@@ -36,19 +34,15 @@ import lombok.extern.slf4j.Slf4j; ...@@ -36,19 +34,15 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
import org.typroject.tyboot.component.emq.EmqKeeper; import org.typroject.tyboot.component.emq.EmqKeeper;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import springfox.documentation.spring.web.json.Json;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.text.ParseException; import java.text.ParseException;
import java.util.*; import java.util.*;
...@@ -65,9 +59,18 @@ import java.util.stream.Collectors; ...@@ -65,9 +59,18 @@ import java.util.stream.Collectors;
public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBasic, PersonBasicMapper> public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBasic, PersonBasicMapper>
implements IPersonBasicService { implements IPersonBasicService {
/**
* 人员赋码触发风险模型
*/
public static final String RYFM_DATA_MQTT_TOPIC = "ryfm/data/analysis";
/**
* 人员红黄码恢复为绿码
*/
public static final String RYFM_GREEN = "ryfm/person/green";
@Autowired
protected EmqKeeper emqKeeper;
@Autowired @Autowired
PersonBasicMapper personBasicMapper; PersonBasicMapper personBasicMapper;
// 人员账号信息service // 人员账号信息service
@Autowired @Autowired
PersonAccountServiceImpl personAccountService; PersonAccountServiceImpl personAccountService;
...@@ -84,36 +87,18 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -84,36 +87,18 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
String secretKey; String secretKey;
@Autowired @Autowired
QuerueProduce querueProduce; QuerueProduce querueProduce;
@Autowired
PersonAccountFedMapper personAccountFedMapper;
@Autowired @Autowired
private AmosFeignService amosFeignService; private AmosFeignService amosFeignService;
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;
@Autowired
protected EmqKeeper emqKeeper;
@Autowired @Autowired
private AgencyuserFeign agencyuserFeign; private AgencyuserFeign agencyuserFeign;
@Autowired @Autowired
private UserEmpowerMapper userEmpowerMapper; private UserEmpowerMapper userEmpowerMapper;
/**
* 人员赋码触发风险模型
*/
public static final String RYFM_DATA_MQTT_TOPIC = "ryfm/data/analysis";
/**
* 人员红黄码恢复为绿码
*/
public static final String RYFM_GREEN = "ryfm/person/green";
private String UPDATE = "UPDATE"; private String UPDATE = "UPDATE";
private String INSERT = "INSERT"; private String INSERT = "INSERT";
@Autowired
PersonAccountFedMapper personAccountFedMapper;
/** /**
* 分页查询 * 分页查询
...@@ -960,8 +945,8 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa ...@@ -960,8 +945,8 @@ public class PersonBasicServiceImpl extends BaseService<PersonBasicDto, PersonBa
return page; return page;
} }
public List<Map<String, Object>> getPersonYardStatistics(String parentCode) { public List<Map<String, Object>> getPersonYardStatistics(String parentCode, String areaCode, String platformStationId) {
List<Map<String, Object>> resultList = personBasicMapper.getPersonYardStatistics(parentCode); List<Map<String, Object>> resultList = personBasicMapper.getPersonYardStatistics(parentCode,areaCode,platformStationId);
resultList.forEach(item -> { resultList.forEach(item -> {
String name = QrcodeColorEnum.getName(String.valueOf(item.get("qrCodeColor"))); String name = QrcodeColorEnum.getName(String.valueOf(item.get("qrCodeColor")));
item.put("name", name); item.put("name", name);
......
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