Browse Source

Merge remote-tracking branch 'origin/prod-5.1.3' into prod-5.1.3

zhongwei
haungxing 4 months ago
parent
commit
e000daa790
  1. 1
      hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java
  2. 6
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java
  3. 3
      hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java
  4. 2
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java
  5. 5
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java
  6. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java
  7. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/EstimateServiceImpl.java
  8. 2
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/HazardCategoryServiceImpl.java

1
hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java

@ -611,6 +611,7 @@ public class FdpMonitorServiceImpl extends ServiceImpl<FdpMonitorMapper, FdpMoni
faultAllReq.setStationId(diagnoseFaultReq.getTenantId()); faultAllReq.setStationId(diagnoseFaultReq.getTenantId());
diagnoseFaultReq.setLifeTime(24*3);//一旦用户进行修改,智能诊断时效性刷新为3天 diagnoseFaultReq.setLifeTime(24*3);//一旦用户进行修改,智能诊断时效性刷新为3天
diagnoseFaultReq.setCreateUser(AuthUtil.getUserName());
faultAllReq.setManualData(diagnoseFaultReq); faultAllReq.setManualData(diagnoseFaultReq);
String jsonString = JSONObject.toJSONString(faultAllReq); String jsonString = JSONObject.toJSONString(faultAllReq);
HttpResponse r = HttpClientUtils.post(updateFaultStateAll, JSONObject.toJSONString(faultAllReq)); HttpResponse r = HttpClientUtils.post(updateFaultStateAll, JSONObject.toJSONString(faultAllReq));

6
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/offline/service/impl/InspectOfflineServiceImpl.java

@ -948,17 +948,17 @@ public class InspectOfflineServiceImpl implements IOfflineDataService {
if (!file.exists()) { if (!file.exists()) {
throw new RuntimeException("文件名称为:" + fileName + "不存在,上传失败!"); throw new RuntimeException("文件名称为:" + fileName + "不存在,上传失败!");
} }
R<BladeFile> r = null; R<BladeFile> r;
try { try {
r = putFile(file); r = putFile(file);
if (!r.isSuccess()) { if (!r.isSuccess()) {
throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错" + r); throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错" );
} }
BladeFile bladeFile = r.getData(); BladeFile bladeFile = r.getData();
return bladeFile != null ? bladeFile.getLink() : null; return bladeFile != null ? bladeFile.getLink() : null;
} catch (Exception ex) { } catch (Exception ex) {
throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r.toString(), ex); throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:", ex);
} }
}).filter(StringUtils::isNotBlank).collect(Collectors.toList()); }).filter(StringUtils::isNotBlank).collect(Collectors.toList());
bo.setFiles(urls); bo.setFiles(urls);

3
hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java

@ -1192,7 +1192,8 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, TaskEntity> impleme
if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){ if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){
voteChartVo.setFinishRate(0.00d); voteChartVo.setFinishRate(0.00d);
}else { }else {
BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),2, RoundingMode.HALF_UP).setScale(2,RoundingMode.HALF_UP); BigDecimal divide = new BigDecimal(finishIds.size()).divide(new BigDecimal(list.size()),4, RoundingMode.HALF_UP)
.multiply(new BigDecimal(100)).setScale(2,RoundingMode.HALF_UP);
voteChartVo.setFinishRate(divide.doubleValue()); voteChartVo.setFinishRate(divide.doubleValue());
} }
return voteChartVo; return voteChartVo;

2
hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java

@ -148,7 +148,7 @@ public class ImsAnalyseExampleServiceImpl extends ServiceImpl<ImsAnalyseExampleM
// 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系
String fileName = URLEncoder.encode( name, "UTF-8"); String fileName = URLEncoder.encode( name, "UTF-8");
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx"); response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
if(page.getRecords()!=null){ if(ObjectUtils.isNotEmpty(page.getRecords())){
List<List<String>> head=new ArrayList<>(); List<List<String>> head=new ArrayList<>();
List<String> title = new ArrayList<>(Collections.singletonList("时间")); List<String> title = new ArrayList<>(Collections.singletonList("时间"));
head.add(title); head.add(title);

5
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java

@ -1,6 +1,7 @@
package com.hnac.hzims.safeproduct.hazard.controller; package com.hnac.hzims.safeproduct.hazard.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.hazard.dto.HazardLibraryDTO; import com.hnac.hzims.safeproduct.hazard.dto.HazardLibraryDTO;
@ -40,7 +41,9 @@ public class HazardLibraryController extends BladeController {
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
public R<List<HazardLibraryVO>> list(HazardLibraryDTO req) { public R<List<HazardLibraryVO>> list(HazardLibraryDTO req) {
HazardLibraryEntity library = BeanUtil.copy(req, HazardLibraryEntity.class); HazardLibraryEntity library = BeanUtil.copy(req, HazardLibraryEntity.class);
List<HazardLibraryEntity> list = hazardLibraryService.list(hazardLibraryService.getQueryWrapper(library)); LambdaQueryWrapper<HazardLibraryEntity> queryWrapper = hazardLibraryService.getQueryWrapper(library);
queryWrapper.orderByDesc(HazardLibraryEntity::getCreateTime);
List<HazardLibraryEntity> list = hazardLibraryService.list(queryWrapper);
return R.data(HazardLibraryWrapper.build().listVO(list)); return R.data(HazardLibraryWrapper.build().listVO(list));
} }

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java

@ -5,6 +5,9 @@ import com.hnac.hzims.safeproduct.hazard.vo.HazardLibraryVO;
import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.BeanUtil;
/**
* @author huangxing
*/
public class HazardLibraryWrapper extends BaseEntityWrapper<HazardLibraryEntity, HazardLibraryVO> { public class HazardLibraryWrapper extends BaseEntityWrapper<HazardLibraryEntity, HazardLibraryVO> {
public static HazardLibraryWrapper build() { public static HazardLibraryWrapper build() {
@ -13,7 +16,6 @@ public class HazardLibraryWrapper extends BaseEntityWrapper<HazardLibraryEntity,
@Override @Override
public HazardLibraryVO entityVO(HazardLibraryEntity entity) { public HazardLibraryVO entityVO(HazardLibraryEntity entity) {
HazardLibraryVO hazardLibraryVO = BeanUtil.copy(entity, HazardLibraryVO.class); return BeanUtil.copy(entity, HazardLibraryVO.class);
return hazardLibraryVO;
} }
} }

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/EstimateServiceImpl.java

@ -56,6 +56,7 @@ public class EstimateServiceImpl extends ServiceImpl<EstimateMapper, RiskEstimat
} }
// 站点年度评估保存 // 站点年度评估保存
entity.setStatus(1);
this.save(entity); this.save(entity);
// 站点类型评估危险源绑定 // 站点类型评估危险源绑定
@ -79,6 +80,7 @@ public class EstimateServiceImpl extends ServiceImpl<EstimateMapper, RiskEstimat
point.setEDownLimit(source.getLDownLimit()); point.setEDownLimit(source.getLDownLimit());
point.setCSUpLimit(source.getCSUpLimit()); point.setCSUpLimit(source.getCSUpLimit());
point.setCSDownLimit(source.getCSDownLimit()); point.setCSDownLimit(source.getCSDownLimit());
point.setStatus(1);
return point; return point;
}).collect(Collectors.toList())); }).collect(Collectors.toList()));
} }

2
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/risk/service/impl/HazardCategoryServiceImpl.java

@ -81,7 +81,7 @@ public class HazardCategoryServiceImpl extends ServiceImpl<HazardCategoryMapper,
// 保存危险类别记录 // 保存危险类别记录
this.updateById(entity); this.updateById(entity);
// 保存详情 // 保存详情
return sourceService.updateBatchById(entity.getSources().stream().peek(source-> source.setCategoryId(entity.getId())).collect(Collectors.toList())); return sourceService.saveOrUpdateBatch(entity.getSources().stream().peek(source-> source.setCategoryId(entity.getId())).collect(Collectors.toList()));
} }
/** /**

Loading…
Cancel
Save