From 286e6b67499d87c2da8d39621837302c56568c33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Thu, 13 Jul 2023 13:50:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=B8=A4=E7=A5=A8=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E7=A5=A8=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ticket/standardTicket/service/impl/OperationTicketServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java index f2e9ca6..7940416 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java @@ -249,7 +249,7 @@ public class OperationTicketServiceImpl implements OperationTicketService { businessMessageDTO.setTenantId("200000"); //您有一张工作票待审批,工作内容:*****,审批环节:*****; String countent = - "您有一张工作票待审批,工作内容:".concat(standardTicketInfoEntity.getTitle()) + "您有一张操作票待审批,工作内容:".concat(standardTicketInfoEntity.getTitle()) .concat(",审批环节:") .concat(response.getTaskName()); businessMessageDTO.setContent(countent); From 923a0de3b00666e06625e0019c9915b408ac32bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Thu, 13 Jul 2023 14:33:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=A4=E7=A5=A8=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=A5=A8=E5=B7=B2=E5=AE=8C=E6=88=90=E7=9A=84=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E7=A5=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java index e1333c2..d153b8d 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java @@ -242,7 +242,10 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl pages = this.page(Condition.getPage(query), lqw); //数据转换 From 31377fa79b8edac46b5061c8073897ab2d0e6b31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Thu, 13 Jul 2023 14:40:33 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=B8=A4=E7=A5=A8=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E7=A5=A8=E5=B7=B2=E5=AE=8C=E6=88=90=E7=9A=84app=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/StandardTicketInfoServiceImpl.java | 54 ++++++++-------------- 1 file changed, 18 insertions(+), 36 deletions(-) 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 eb971a1..54e263f 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 @@ -36,6 +36,7 @@ import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService; import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.apache.poi.ss.usermodel.Workbook; import org.springblade.core.log.exception.ServiceException; import org.springblade.core.mp.base.BaseServiceImpl; @@ -112,6 +113,10 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl queryWrapper = this.getQueryWrapper(req); queryWrapper.eq(Func.isNotEmpty(req.getCreateDept()), StandardTicketInfoEntity::getCreateDept, req.getCreateDept()); queryWrapper.orderByDesc(StandardTicketInfoEntity::getCreateTime); + //操作票已完成的数量 + if (StringUtils.isNoneBlank(req.getFlowTaskName())) { + queryWrapper.eq(StandardTicketInfoEntity::getFlowTaskName, req.getFlowTaskName()); + } IPage pages = super.page(Condition.getPage(query), queryWrapper); return R.data(pages.setRecords(StandardTicketInfoWrapper.build().listVO(pages.getRecords()))); } @@ -144,11 +149,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpllambdaUpdate() - .set(StandardTicketInfoEntity::getProcessInstanceId, processInstanceId) - .eq(StandardTicketInfoEntity::getId, req.getId()) - )); + return R.status(this.update(Wrappers.lambdaUpdate().set(StandardTicketInfoEntity::getProcessInstanceId, processInstanceId).eq(StandardTicketInfoEntity::getId, req.getId()))); } @Override @@ -244,9 +245,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpllambdaUpdate() - .set(StandardTicketInfoEntity::getStatus, TicketConstants.StandardTicketStatusEnum.TERMINATION.getStatus()) - .eq(StandardTicketInfoEntity::getId, id)); + this.update(Wrappers.lambdaUpdate().set(StandardTicketInfoEntity::getStatus, TicketConstants.StandardTicketStatusEnum.TERMINATION.getStatus()).eq(StandardTicketInfoEntity::getId, id)); /**删除工作流**/ R r = flowClient.delProcessInstanceById(ticketInfoEntity.getProcessInstanceId(), comment); if (!r.isSuccess()) { @@ -335,23 +334,18 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl queryWrapper = new QueryWrapper<>(); //开票来源 - queryWrapper.eq(Func.isNotEmpty(areaVo.getTaskType()), "sti.task_type", - areaVo.getTaskType()); + queryWrapper.eq(Func.isNotEmpty(areaVo.getTaskType()), "sti.task_type", areaVo.getTaskType()); //编号 queryWrapper.like(Func.isNotEmpty(areaVo.getCode()), "sti.code", areaVo.getCode()); //状态 - queryWrapper.eq(Func.isNotEmpty(areaVo.getStatus()), "sti.status", - areaVo.getStatus()); + queryWrapper.eq(Func.isNotEmpty(areaVo.getStatus()), "sti.status", areaVo.getStatus()); //开始时间 - queryWrapper.lt(Func.isNotEmpty(areaVo.getStartTime()), "sti.create_time", - areaVo.getStartTime()); + queryWrapper.lt(Func.isNotEmpty(areaVo.getStartTime()), "sti.create_time", areaVo.getStartTime()); //结束时间 - queryWrapper.le(Func.isNotEmpty(areaVo.getEndTime()), "sti.create_time", - areaVo.getEndTime()); + queryWrapper.le(Func.isNotEmpty(areaVo.getEndTime()), "sti.create_time", areaVo.getEndTime()); queryWrapper.eq("sti.CREATE_DEPT", areaVo.getAreaId()); - queryWrapper.eq(areaVo.getYearMonth() != null, - "date_format(sti.create_time,'%Y-%m')", areaVo.getYearMonth()); + queryWrapper.eq(areaVo.getYearMonth() != null, "date_format(sti.create_time,'%Y-%m')", areaVo.getYearMonth()); // queryWrapper.eq("tie.status",1); Page standardTicketInfoEntityPage = baseMapper.selectPages(searchPage, queryWrapper); @@ -450,8 +444,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl ticketInfoEvaluateEntityLambdaQueryWrapper = new LambdaQueryWrapper<>(); ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getTicketId, item.getId()); - ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getStatus, - TicketConstants.TicketQualifiedEnum.Qualified.getCode()); + ticketInfoEvaluateEntityLambdaQueryWrapper.eq(TicketInfoEvaluateEntity::getStatus, TicketConstants.TicketQualifiedEnum.Qualified.getCode()); int count = ticketInfoEvaluateService.count(ticketInfoEvaluateEntityLambdaQueryWrapper); return count > 0; } @@ -580,9 +573,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl operateTicketReportStatistic = this.baseMapper.getOperateTicketReportStatistic(startDate, endDate, deptIdList); if (CollectionUtil.isNotEmpty(operateTicketReportStatistic)) { //已完成数量 - int ticketInfoCompleteNum = operateTicketReportStatistic.stream().filter(ticket -> TicketConstants.StandardTicketStatusEnum.END.getStatus().equals(ticket.getStatus())) - .collect(Collectors.toList()).size(); + int ticketInfoCompleteNum = operateTicketReportStatistic.stream().filter(ticket -> TicketConstants.StandardTicketStatusEnum.END.getStatus().equals(ticket.getStatus())).collect(Collectors.toList()).size(); //合格数量 int ticketInfoQualifiedNum = operateTicketReportStatistic.stream().filter(ticket -> Func.isNotEmpty(ticket.getEvaluation()) && 1 == ticket.getEvaluation().intValue()).collect(Collectors.toList()).size(); //计算合格率 - double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum / (double) operateTicketReportStatistic.size() * 100) - .setScale(2, RoundingMode.HALF_DOWN).doubleValue(); - result = TicketInfoStatisticVO.builder() - .ticketInfoType("操作票") - .ticketInfoNumber(operateTicketReportStatistic.size()) - .ticketInfoCompleteNum(ticketInfoCompleteNum) - .ticketInfoQualifiedNum(ticketInfoQualifiedNum) - .ticketInfoStartNum(operateTicketReportStatistic.size() - ticketInfoCompleteNum) - .ticketInfoProportion(ticketInfoProportion) - .build(); + double ticketInfoProportion = new BigDecimal(ticketInfoQualifiedNum / (double) operateTicketReportStatistic.size() * 100).setScale(2, RoundingMode.HALF_DOWN).doubleValue(); + result = TicketInfoStatisticVO.builder().ticketInfoType("操作票").ticketInfoNumber(operateTicketReportStatistic.size()).ticketInfoCompleteNum(ticketInfoCompleteNum).ticketInfoQualifiedNum(ticketInfoQualifiedNum).ticketInfoStartNum(operateTicketReportStatistic.size() - ticketInfoCompleteNum).ticketInfoProportion(ticketInfoProportion).build(); } return result; } @@ -712,7 +694,7 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl selectStandardTicketByDeptIdWithTicketType(List createDept, String ticketType, String dateTime) { QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.lambda().eq(StandardTicketInfoEntity::getTicketType, ticketType); - if (CollectionUtils.isNotEmpty(createDept)){ + if (CollectionUtils.isNotEmpty(createDept)) { queryWrapper.lambda().in(StandardTicketInfoEntity::getCreateDept, createDept); } queryWrapper.apply("date_format(CREATE_TIME,'%Y-%m') = {0}", dateTime);