Commit 4605cf84 authored by chenzhao's avatar chenzhao

制单时间及座舱接口

parent 5524fec2
......@@ -49,7 +49,7 @@ public class SurveyInformationDto extends BaseDto {
@ApiModelProperty(value = "制单人")
private String creator;
@JsonFormat(pattern="yyyy-MM-dd HH:ss:mm")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "制单时间")
private Date creatorTime;
......
......@@ -449,7 +449,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
surveyInfoAllDto.getSurveyInformation().setIsPermanent("1");
}
surveyInfoAllDto.getSurveyInformation().setSequenceNbr(surveyInformation.getSequenceNbr());
surveyInfoAllDto.getSurveyInformation().setCreatorTime(new Date());
QueryWrapper<SurveyDetails> surveyDetailsQueryWrapper = new QueryWrapper<>();
surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId);
SurveyDetails surveyDetails = surveyDetailsService.getBaseMapper().selectOne(surveyDetailsQueryWrapper);
......@@ -605,7 +604,6 @@ public class WorkOrderServiceImpl extends BaseService<WorkOrderDto,WorkOrder,Wor
surveyInfoAllDto.getSurveyInformation().setIsPermanent("1");
}
surveyInfoAllDto.getSurveyInformation().setSequenceNbr(surveyInformation.getSequenceNbr());
surveyInfoAllDto.getSurveyInformation().setCreatorTime(new Date());
QueryWrapper<SurveyDetails> surveyDetailsQueryWrapper = new QueryWrapper<>();
surveyDetailsQueryWrapper.eq("survey_information_id", surveyInformationId);
SurveyDetails surveyDetails = surveyDetailsService.getBaseMapper().selectOne(surveyDetailsQueryWrapper);
......
......@@ -42,9 +42,15 @@ public interface IdxFeign {
@RequestMapping(value = "/jxIopAnalysis/stationRanking", method = RequestMethod.GET, consumes = "application/json")
FeignClientResult<Map<String, Object>> stationRanking(@RequestParam("pageNumber") Long pageNumber,
@RequestParam("pageSize") Long pageSize,
@RequestParam(required = false, value = "sortType") String sortType,
@RequestParam(required = false, value = "stationType") String type,
@RequestParam(required = false, value = "parentCode") String parentCode);
@RequestMapping(value = "/jxIopAnalysis/assessIndexMap", method = RequestMethod.GET, consumes = "application/json")
Map<String, Object> assessIndexMap(@RequestParam(required = false, value = "sortType") String sortType,
@RequestParam(required = false, value = "stationType") String stationType,
@RequestParam(required = false, value = "parentCode") String parentCode);
}
......@@ -196,14 +196,14 @@ public class AppletMonitorServiceImpl {
stations.removeAll(fdz);
List<Map<String,Object>> list = new ArrayList<>();
Map<String, Object> data = new HashMap<>();
data.put("type","风电");
data.put("type","光伏");
data.put("installedCapacity",String.format("%.2f",fdz.stream().mapToDouble(StationBasicDto::getInstalledCapacity).sum()));
data.put("num",stations.size());
data.put("activePower",String.format("%.2f", result2.get(0).getValueF()));
list.add(data);
Map<String, Object> data2 = new HashMap<>();
data2.put("type","光伏");
data2.put("type","风电");
data2.put("installedCapacity",String.format("%.2f",stations.stream().mapToDouble(StationBasicDto::getInstalledCapacity).sum()));
data2.put("num",fdz.size());
data2.put("activePower",String.format("%.2f", commonService.getSumByEquipmentIndxName(result1, "南瑞光差保护_313P") * CommonConstans.kwToMv));
......@@ -216,18 +216,14 @@ public class AppletMonitorServiceImpl {
result.put("load",load);
String areaCompanyCode = companyMapper.getAreaCompanyCode(code);
Map<String, Object> stationMark = idxFeign.getStationMarkList(areaCompanyCode,"1","4");
List<String> params = Arrays.asList("P1", "S1", "H2", "V1");
// P1 工况管控分数 S1 设备管控分数 H2 其他分数 V1 人员管控分数
params.forEach(e->{
result.put(e,stationMark.get(e));
});
result.put("value",stationMark.get("value"));
Map<String, Object> stationMark = idxFeign.assessIndexMap("asc",null,areaCompanyCode);
// P1 工况管控分数 S1 设备管控分数 H2 其他分数 V1 人员管控分数
result.putAll(stationMark);
//获取区域场站排名
FeignClientResult<Map<String, Object>> map = idxFeign.stationRanking(1L, Long.MAX_VALUE, "FDZ", areaCompanyCode);
FeignClientResult<Map<String, Object>> map1 = idxFeign.stationRanking(1L, Long.MAX_VALUE, "JZSGFDZ", areaCompanyCode);;
FeignClientResult<Map<String, Object>> map = idxFeign.stationRanking(1L, Long.MAX_VALUE,"DESC", "FDZ", areaCompanyCode);
FeignClientResult<Map<String, Object>> map1 = idxFeign.stationRanking(1L, Long.MAX_VALUE, "DESC","JZSGFDZ", areaCompanyCode);;
Map<String, Object> result3 = map.getResult();
Map<String, Object> result4 = map1.getResult();
result.put("rankingFD", result3.get("records"));
......
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