diff --git a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/constant/DutyRecProcessConstant.java b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/constant/DutyRecProcessConstant.java index c9576da..ab1e3e5 100644 --- a/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/constant/DutyRecProcessConstant.java +++ b/hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/constant/DutyRecProcessConstant.java @@ -40,8 +40,8 @@ public interface DutyRecProcessConstant { String INSPECT_PANL_AUTO_VIDEO = "0";//普通巡检 String INSPECT_PANL_AUTO_CYCLE = "0";//计划周期 int INSPECT_PANL_TASK_TIMES_A_DAY = 1;//一天任务次数 - int INSPECT_PANL_START_REMIND = 1;//开始前提醒(分钟) - int INSPECT_PANL_END_REMIND = 1;//结束前提醒(分钟) + int INSPECT_PANL_START_REMIND = 30;//开始前提醒(分钟) + int INSPECT_PANL_END_REMIND = 30;//结束前提醒(分钟) /** diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java index 40fb225..9987b46 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java @@ -20,6 +20,7 @@ import com.hnac.hzims.safeproduct.service.ITrainPlanService; import com.hnac.hzims.safeproduct.service.ITrainRecordService; import com.hnac.hzims.safeproduct.vo.TrainMonthVO; import com.hnac.hzims.safeproduct.vo.TrainYearVO; +import org.apache.commons.collections4.map.HashedMap; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.utils.DateUtil; @@ -34,10 +35,7 @@ import java.io.IOException; import java.math.BigDecimal; import java.math.RoundingMode; import java.net.URLEncoder; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Optional; +import java.util.*; import java.util.stream.Collectors; /** @@ -105,7 +103,7 @@ public class TrainPlanServiceImpl extends ServiceImpl unitMonthDataList = baseMapper.selectFinishedDataByUnit(unitList, year); // 将各单位每个月的培训计划数据写入统计列表 - List res = new ArrayList<>(); + HashedMap map = new HashedMap<>(); unitMonthDataList.forEach(data -> { TrainYearVO trainYearVO = records.stream().filter(x -> x.getUnit().equals(data.getUnit())) .collect(Collectors.toList()).get(0); @@ -161,9 +159,11 @@ public class TrainPlanServiceImpl extends ServiceImpl list = new ArrayList<>(map.values()); + List res = list.stream().sorted(Comparator.comparing(TrainYearVO::getUnit)).collect(Collectors.toList()); unitPage.setRecords(res); return unitPage; } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java index 0101bfa..caab640 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java @@ -74,7 +74,7 @@ public class TicketInfoAllClient implements ITicketInfoAllClient { int completeNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoCompleteNum).sum(); int invalidatedNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoInvalidatedNum).sum(); int qualifiedNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoQualifiedNum).sum(); - Double proportion = new BigDecimal(qualifiedNum).divide(new BigDecimal(sum),2, RoundingMode.UP) + Double proportion = new BigDecimal(qualifiedNum).divide(new BigDecimal(sum),4, RoundingMode.UP) .multiply(new BigDecimal(100)).setScale(2, RoundingMode.UP).doubleValue(); ticketInfoStatisticVO.setTicketInfoNumber(sum); ticketInfoStatisticVO.setTicketInfoCompleteNum(completeNum); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java index 6094606..96c1e08 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java @@ -705,7 +705,10 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl "作废".equals(item.getFlowTaskName())).collect(Collectors.toList()).size(); //计算合格率 - double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum / (double) operateTicketReportStatistic.size() * 100).setScale(2, RoundingMode.HALF_DOWN).doubleValue(); + Double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum) + .divide(new BigDecimal(typeOperateTicket.getValue().size()),4, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)) + .setScale(2, RoundingMode.HALF_UP).doubleValue(); TicketInfoStatisticVO ticketInfoStatisticVO = TicketInfoStatisticVO.builder().ticketInfoType(type) .ticketInfoNumber(typeOperateTicket.getValue().size()) .ticketInfoCompleteNum(ticketInfoCompleteNum) diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java index c5ac658..5080435 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java @@ -1149,7 +1149,9 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl Func.isNotEmpty(ticket.getEvaluation()) && ticket.getEvaluation().intValue() == 1) .collect(Collectors.toList()).size(); //计算合格率 - Double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum / (double) workTicketReportStatistic.size() *100) + Double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum) + .divide(new BigDecimal(typeWorkTicket.getValue().size()),4, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)) .setScale(2, RoundingMode.HALF_UP).doubleValue(); TicketInfoStatisticVO workTicketStatistic = TicketInfoStatisticVO.builder() .ticketInfoType(ticketInfoType) diff --git a/pom.xml b/pom.xml index 90876d9..ebd1e6b 100644 --- a/pom.xml +++ b/pom.xml @@ -49,7 +49,7 @@ org.springblade blade-system-api - 5.1.1.RELEASE.fix.4 + 5.1.1.RELEASE.fix.5 org.springblade