Browse Source

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

zhongwei
yang_shj 3 months ago
parent
commit
927ebb2296
  1. 4
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/duty/constant/DutyRecProcessConstant.java
  2. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/service/impl/TrainPlanServiceImpl.java
  3. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/allTicket/fegin/TicketInfoAllClient.java
  4. 5
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
  5. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java
  6. 2
      pom.xml

4
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_VIDEO = "0";//普通巡检
String INSPECT_PANL_AUTO_CYCLE = "0";//计划周期 String INSPECT_PANL_AUTO_CYCLE = "0";//计划周期
int INSPECT_PANL_TASK_TIMES_A_DAY = 1;//一天任务次数 int INSPECT_PANL_TASK_TIMES_A_DAY = 1;//一天任务次数
int INSPECT_PANL_START_REMIND = 1;//开始前提醒(分钟) int INSPECT_PANL_START_REMIND = 30;//开始前提醒(分钟)
int INSPECT_PANL_END_REMIND = 1;//结束前提醒(分钟) int INSPECT_PANL_END_REMIND = 30;//结束前提醒(分钟)
/** /**

12
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.service.ITrainRecordService;
import com.hnac.hzims.safeproduct.vo.TrainMonthVO; import com.hnac.hzims.safeproduct.vo.TrainMonthVO;
import com.hnac.hzims.safeproduct.vo.TrainYearVO; 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.log.exception.ServiceException;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.tool.utils.DateUtil;
@ -34,10 +35,7 @@ import java.io.IOException;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode; import java.math.RoundingMode;
import java.net.URLEncoder; import java.net.URLEncoder;
import java.util.ArrayList; import java.util.*;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@ -105,7 +103,7 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan
// 查询各单位全年已完成的培训计划数 // 查询各单位全年已完成的培训计划数
List<AnalysisYearDTO> unitMonthDataList = baseMapper.selectFinishedDataByUnit(unitList, year); List<AnalysisYearDTO> unitMonthDataList = baseMapper.selectFinishedDataByUnit(unitList, year);
// 将各单位每个月的培训计划数据写入统计列表 // 将各单位每个月的培训计划数据写入统计列表
List<TrainYearVO> res = new ArrayList<>(); HashedMap<String, TrainYearVO> map = new HashedMap<>();
unitMonthDataList.forEach(data -> { unitMonthDataList.forEach(data -> {
TrainYearVO trainYearVO = records.stream().filter(x -> x.getUnit().equals(data.getUnit())) TrainYearVO trainYearVO = records.stream().filter(x -> x.getUnit().equals(data.getUnit()))
.collect(Collectors.toList()).get(0); .collect(Collectors.toList()).get(0);
@ -161,9 +159,11 @@ public class TrainPlanServiceImpl extends ServiceImpl<TrainPlanMapper, TrainPlan
trainYearVO.setSum(sum + data.getFinishedNum()); trainYearVO.setSum(sum + data.getFinishedNum());
} }
if (trainYearVO.getSum() != 0) { if (trainYearVO.getSum() != 0) {
res.add(trainYearVO); map.put(trainYearVO.getUnit(), trainYearVO);
} }
}); });
List<TrainYearVO> list = new ArrayList<>(map.values());
List<TrainYearVO> res = list.stream().sorted(Comparator.comparing(TrainYearVO::getUnit)).collect(Collectors.toList());
unitPage.setRecords(res); unitPage.setRecords(res);
return unitPage; return unitPage;
} }

2
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 completeNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoCompleteNum).sum();
int invalidatedNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoInvalidatedNum).sum(); int invalidatedNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoInvalidatedNum).sum();
int qualifiedNum = workTicketStatistic.stream().mapToInt(TicketInfoStatisticVO::getTicketInfoQualifiedNum).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(); .multiply(new BigDecimal(100)).setScale(2, RoundingMode.UP).doubleValue();
ticketInfoStatisticVO.setTicketInfoNumber(sum); ticketInfoStatisticVO.setTicketInfoNumber(sum);
ticketInfoStatisticVO.setTicketInfoCompleteNum(completeNum); ticketInfoStatisticVO.setTicketInfoCompleteNum(completeNum);

5
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java

@ -705,7 +705,10 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
//废票数量 //废票数量
int ticketInfoInvalidatedNum = typeOperateTicket.getValue().stream().filter(item -> "作废".equals(item.getFlowTaskName())).collect(Collectors.toList()).size(); int ticketInfoInvalidatedNum = typeOperateTicket.getValue().stream().filter(item -> "作废".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) TicketInfoStatisticVO ticketInfoStatisticVO = TicketInfoStatisticVO.builder().ticketInfoType(type)
.ticketInfoNumber(typeOperateTicket.getValue().size()) .ticketInfoNumber(typeOperateTicket.getValue().size())
.ticketInfoCompleteNum(ticketInfoCompleteNum) .ticketInfoCompleteNum(ticketInfoCompleteNum)

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

@ -1149,7 +1149,9 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
int ticketInfoQualifiedNum = typeWorkTicket.getValue().stream().filter(ticket -> Func.isNotEmpty(ticket.getEvaluation()) && ticket.getEvaluation().intValue() == 1) int ticketInfoQualifiedNum = typeWorkTicket.getValue().stream().filter(ticket -> Func.isNotEmpty(ticket.getEvaluation()) && ticket.getEvaluation().intValue() == 1)
.collect(Collectors.toList()).size(); .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(); .setScale(2, RoundingMode.HALF_UP).doubleValue();
TicketInfoStatisticVO workTicketStatistic = TicketInfoStatisticVO.builder() TicketInfoStatisticVO workTicketStatistic = TicketInfoStatisticVO.builder()
.ticketInfoType(ticketInfoType) .ticketInfoType(ticketInfoType)

2
pom.xml

@ -49,7 +49,7 @@
<dependency> <dependency>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>
<artifactId>blade-system-api</artifactId> <artifactId>blade-system-api</artifactId>
<version>5.1.1.RELEASE.fix.4</version> <version>5.1.1.RELEASE.fix.5</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springblade</groupId> <groupId>org.springblade</groupId>

Loading…
Cancel
Save