diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java index 8f653a1..48a8d83 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/fdp/service/impl/FdpMonitorServiceImpl.java @@ -611,6 +611,7 @@ public class FdpMonitorServiceImpl extends ServiceImpl r = null; + R r; try { r = putFile(file); if (!r.isSuccess()) { - throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错:" + r); + throw new RuntimeException("上传文件["+fileName+"]失败,bladex-resource报错" ); } BladeFile bladeFile = r.getData(); return bladeFile != null ? bladeFile.getLink() : null; } 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()); bo.setFiles(urls); diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java index 8ecc34d..3ee36ca 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/task/service/impl/TaskServiceImpl.java @@ -1192,7 +1192,8 @@ public class TaskServiceImpl extends ServiceImpl impleme if (CollectionUtil.isEmpty(list)||CollectionUtil.isEmpty(undoneIds)){ voteChartVo.setFinishRate(0.00d); }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()); } return voteChartVo; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java index 57b8824..19b1525 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/duty/service/impl/ImsAnalyseExampleServiceImpl.java @@ -148,7 +148,7 @@ public class ImsAnalyseExampleServiceImpl extends ServiceImpl> head=new ArrayList<>(); List title = new ArrayList<>(Collections.singletonList("时间")); head.add(title); diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java index c7cf1d9..1f5ef35 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/controller/HazardLibraryController.java +++ b/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; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.safeproduct.hazard.dto.HazardLibraryDTO; @@ -40,7 +41,9 @@ public class HazardLibraryController extends BladeController { @ApiOperationSupport(order = 2) public R> list(HazardLibraryDTO req) { HazardLibraryEntity library = BeanUtil.copy(req, HazardLibraryEntity.class); - List list = hazardLibraryService.list(hazardLibraryService.getQueryWrapper(library)); + LambdaQueryWrapper queryWrapper = hazardLibraryService.getQueryWrapper(library); + queryWrapper.orderByDesc(HazardLibraryEntity::getCreateTime); + List list = hazardLibraryService.list(queryWrapper); return R.data(HazardLibraryWrapper.build().listVO(list)); } diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java index 55799b4..13bbb90 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/hazard/wrapper/HazardLibraryWrapper.java +++ b/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.tool.utils.BeanUtil; +/** + * @author huangxing + */ public class HazardLibraryWrapper extends BaseEntityWrapper { public static HazardLibraryWrapper build() { @@ -13,7 +16,6 @@ public class HazardLibraryWrapper extends BaseEntityWrapper source.setCategoryId(entity.getId())).collect(Collectors.toList())); + return sourceService.saveOrUpdateBatch(entity.getSources().stream().peek(source-> source.setCategoryId(entity.getId())).collect(Collectors.toList())); } /**