Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 1 year ago
parent
commit
772d159862
  1. 4
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java
  2. 6
      hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java
  3. 9
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java
  4. 5
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/OperationTicketService.java
  5. 37
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/StandardTicketInfoServiceImpl.java
  6. 36
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketCountController.java
  7. 15
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/TicketCount.java
  8. 51
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketCountServiceImpl.java
  9. 8
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  10. 34
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/TicketCountQueryVo.java
  11. 106
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/ticket/TicketCountResponseVo.java
  12. 3
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/ticket/TicketCountVo.java
  13. 9
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java
  14. 49
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java
  15. 1
      hzims-service/ticket/src/main/resources/db/2.0.2.sql
  16. 18
      hzims-service/ticket/src/main/resources/db/2.0.3.sql
  17. 2
      hzims-service/ticket/src/main/resources/db/2.0.4.sql

4
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/service/impl/StatisticsServiceImpl.java

@ -13,6 +13,7 @@ import com.hnac.hzims.middle.systemlog.vo.StatisticsVo;
import com.hnac.hzims.middle.systemlog.vo.SysLogStatisticsVo;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.xmlbeans.StringEnumAbstractBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -91,6 +92,9 @@ public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statist
*/
@Override
public IPage<StatisticsResponseVo> selectPage(Page<StatisticsResponseVo> page1, StatisticsVo statistics) {
statistics.setCreateTime(statistics.getCreateTime().substring(0, 10));
statistics.setEndTime(statistics.getEndTime().substring(0, 10));
return baseMapper.selectPages(page1, statistics);
}
}

6
hzims-service/hzims-middle/src/main/java/com/hnac/hzims/middle/systemlog/vo/StatisticsVo.java

@ -20,7 +20,7 @@ public class StatisticsVo {
/**
* key
*/
public String keyword;
private String keyword;
/**
@ -34,7 +34,7 @@ public class StatisticsVo {
* 开始时间
*/
//@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING)
@DateTimeFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String createTime;
/**
@ -42,7 +42,7 @@ public class StatisticsVo {
*
*/
//@JsonFormat(pattern="yyyy-MM-dd",shape = JsonFormat.Shape.STRING)
@DateTimeFormat(pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private String endTime;
}

9
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/IStandardTicketInfoService.java

@ -9,6 +9,7 @@ import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import com.hnac.hzims.ticket.twoTicket.vo.TicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.workTicket.vo.TicketMonthVO;
import org.springblade.core.mp.base.BaseService;
@ -126,4 +127,12 @@ public interface IStandardTicketInfoService extends BaseService<StandardTicketIn
* @return
*/
List<StandardTicketInfoEntity> selectStandardTicketByDeptIdWithTicketType(List<Long> createDept, String ticketType, String dateTime);
/**
* 查看操作票
* @param ticketCountQueryVo
* @return
*/
List<StandardTicketInfoEntity> listByOperationTicketWithKeyword(TicketCountQueryVo ticketCountQueryVo);
}

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

@ -2,6 +2,7 @@ package com.hnac.hzims.ticket.standardTicket.service;
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.twoTicket.vo.TicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import javax.servlet.http.HttpServletResponse;
@ -36,4 +37,8 @@ public interface OperationTicketService {
* @param response 扩展 ServletResponse 接口以在发送响应时提供特定于 HTTP 的功能例如它具有访问HTTP标头和cookie的方法
*/
void newPreview(Long ticketId, Integer status, HttpServletResponse response);
}

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

@ -27,6 +27,7 @@ import com.hnac.hzims.ticket.standardTicket.vo.OperateTicketStatisticVO;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketMeasureVO;
import com.hnac.hzims.ticket.standardTicket.wrapper.StandardTicketInfoWrapper;
import com.hnac.hzims.ticket.twoTicket.vo.TicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketMeasureVo;
import com.hnac.hzims.ticket.utils.ExcelUtil;
@ -39,6 +40,7 @@ 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.BaseEntity;
import org.springblade.core.mp.base.BaseServiceImpl;
import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Condition;
@ -700,4 +702,39 @@ public class StandardTicketInfoServiceImpl extends BaseServiceImpl<StandardTicke
queryWrapper.apply("date_format(CREATE_TIME,'%Y-%m') = {0}", dateTime);
return baseMapper.selectList(queryWrapper);
}
/**
* 查看操作票
*
* @param ticketCountQueryVo
* @return
*/
@Override
public List<StandardTicketInfoEntity> listByOperationTicketWithKeyword(TicketCountQueryVo ticketCountQueryVo) {
String flowTaskName = ticketCountQueryVo.getFlowTaskName();
String type = ticketCountQueryVo.getType();
QueryWrapper<StandardTicketInfoEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(StringUtils.isNotBlank(type), StandardTicketInfoEntity::getTicketType, type);
if (StringUtils.isNotEmpty(flowTaskName)) {
if ("开票".equals(flowTaskName)) {
queryWrapper.lambda().isNotNull(StandardTicketInfoEntity::getFlowTaskName);
} else {
queryWrapper.lambda().eq(StandardTicketInfoEntity::getFlowTaskName, flowTaskName);
}
}
String qualified = ticketCountQueryVo.getQualified();
if (StringUtils.isNoneBlank(qualified) && "合格".equals(qualified)) {
List<StandardTicketInfoEntity> workTicketInfoEntities = baseMapper.selectList(null);
List<Long> ticketIdList = workTicketInfoEntities.stream().map(BaseEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper<TicketInfoEvaluateEntity> evaluateEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
evaluateEntityLambdaQueryWrapper.in(TicketInfoEvaluateEntity::getTicketId, ticketIdList);
evaluateEntityLambdaQueryWrapper.eq(BaseEntity::getStatus, 1);
List<TicketInfoEvaluateEntity> evaluateEntities = ticketInfoEvaluateService.list(evaluateEntityLambdaQueryWrapper);
List<Long> idList =
evaluateEntities.stream().map(TicketInfoEvaluateEntity::getTicketId).collect(Collectors.toList());
queryWrapper.lambda().in(BaseEntity::getId, idList);
}
return baseMapper.selectList(queryWrapper);
}
}

36
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketCountController.java

@ -1,9 +1,16 @@
package com.hnac.hzims.ticket.twoTicket.controller;
import cn.hutool.http.server.HttpServerResponse;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService;
import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.TicketCountService;
import com.hnac.hzims.ticket.twoTicket.vo.TicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.ticket.TicketCountResponseVo;
import com.hnac.hzims.ticket.twoTicket.vo.ticket.TicketCountVo;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
import com.hnac.hzims.ticket.workTicket.service.IWorkTicketInfoService;
import lombok.RequiredArgsConstructor;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
@ -28,6 +35,12 @@ public class TicketCountController {
private final TicketCountService ticketCountService;
private final IWorkTicketInfoService workTicketService;
private final IStandardTicketInfoService standardTicketInfoService;
/**
* 两票生成月报统计
*
@ -53,6 +66,7 @@ public class TicketCountController {
/**
* 两票统计分析导出
*
* @param dateTime 月份
*/
@GetMapping("/export")
@ -62,4 +76,26 @@ public class TicketCountController {
}
/**
* 查看工作票
*/
@GetMapping("/listByTicketWithKeyword")
public R listByTicketWithKeyword(TicketCountQueryVo ticketCountQueryVo) {
List<WorkTicketInfoEntity> workTicketInfoEntities =
workTicketService.listByTicketWithKeyword(ticketCountQueryVo);
return R.data(workTicketInfoEntities);
}
/**
* 查看操作票
*/
@GetMapping("/listByOperationTicketWithKeyword")
public R listByOperationTicketWithKeyword(TicketCountQueryVo ticketCountQueryVo) {
List<StandardTicketInfoEntity> ticketInfoEntities =
standardTicketInfoService.listByOperationTicketWithKeyword(ticketCountQueryVo);
return R.data(ticketInfoEntities);
}
}

15
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/entity/TicketCount.java

@ -73,4 +73,19 @@ public class TicketCount extends TenantEntity implements Serializable {
*/
private Integer ticketProportionNum;
/**
* 废票数量
*/
private Integer invalidatedTicketNum;
/**
* 错票数量
*/
private Integer wrongTicketNum;
/**
* 合格率
*/
private String percentPassTicket;
}

51
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketCountServiceImpl.java

@ -27,6 +27,7 @@ import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.apache.poi.ss.usermodel.BorderStyle;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.VerticalAlignment;
@ -149,9 +150,11 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
//获取keyword
String keyword = ticketCountVo.getKeyword();
String dateTime = ticketCountVo.getDateTime();
String deptId = ticketCountVo.getDeptId();
QueryWrapper<TicketCount> ticketCountQueryWrapper = new QueryWrapper<>();
ticketCountQueryWrapper.like(StringUtils.isNotBlank(keyword), "dept_name", keyword);
ticketCountQueryWrapper.eq(StringUtils.isNotBlank(dateTime), "date_time", dateTime);
ticketCountQueryWrapper.eq(StringUtils.isNotBlank(deptId), "dept_id", deptId);
List<TicketCount> ticketCounts = baseMapper.selectList(ticketCountQueryWrapper);
List<TicketCountResponseVo> result = getTicketCountResponseList(ticketCounts);
return result;
@ -330,6 +333,8 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
ticketCountResponseVo.setFourTicketProportionNum(this.getCount(ticketCount.getTicketProportionNum()));
ticketCountResponseVo.setFourTicketCompleteNum(this.getCount(ticketCount.getTicketCompleteNum()));
ticketCountResponseVo.setFourTicketDelayNum(this.getCount(ticketCount.getTicketDelayNum()));
ticketCountResponseVo.setFourPercentPassTicket(ticketCount.getPercentPassTicket());
}
if ("6".equals(ticketCount.getTicketType())) {
@ -337,6 +342,9 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
ticketCountResponseVo.setOneTicketProportionNum(this.getCount(ticketCount.getTicketProportionNum()));
ticketCountResponseVo.setOneTicketCompleteNum(this.getCount(ticketCount.getTicketCompleteNum()));
ticketCountResponseVo.setOneTicketDelayNum(this.getCount(ticketCount.getTicketDelayNum()));
ticketCountResponseVo.setOneInvalidatedTicketNumNum(this.getCount(ticketCount.getInvalidatedTicketNum()));
ticketCountResponseVo.setOneWrongTicketNum(this.getCount(ticketCount.getWrongTicketNum()));
ticketCountResponseVo.setOnePercentPassTicket(ticketCount.getPercentPassTicket());
}
@ -345,6 +353,9 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
ticketCountResponseVo.setTwoTicketProportionNum(this.getCount(ticketCount.getTicketProportionNum()));
ticketCountResponseVo.setTwoTicketCompleteNum(this.getCount(ticketCount.getTicketCompleteNum()));
ticketCountResponseVo.setTwoTicketDelayNum(this.getCount(ticketCount.getTicketDelayNum()));
ticketCountResponseVo.setTwoInvalidatedTicketNumNum(this.getCount(ticketCount.getInvalidatedTicketNum()));
ticketCountResponseVo.setTwoWrongTicketNum(this.getCount(ticketCount.getWrongTicketNum()));
ticketCountResponseVo.setTwoPercentPassTicket(ticketCount.getPercentPassTicket());
}
@ -353,6 +364,9 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
ticketCountResponseVo.setThreeTicketProportionNum(this.getCount(ticketCount.getTicketProportionNum()));
ticketCountResponseVo.setThreeTicketCompleteNum(this.getCount(ticketCount.getTicketCompleteNum()));
ticketCountResponseVo.setThreeTicketDelayNum(this.getCount(ticketCount.getTicketDelayNum()));
ticketCountResponseVo.setThreeInvalidatedTicketNumNum(this.getCount(ticketCount.getInvalidatedTicketNum()));
ticketCountResponseVo.setThreeWrongTicketNum(this.getCount(ticketCount.getWrongTicketNum()));
ticketCountResponseVo.setThreePercentPassTicket(ticketCount.getPercentPassTicket());
}
}
@ -382,7 +396,8 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
return null;
}
//根据站点分组
Map<Long, List<StandardTicketInfoEntity>> createDeptTickets = ticketInfoEntities.stream().collect(Collectors.groupingBy(StandardTicketInfoEntity::getCreateDept));
Map<String, List<StandardTicketInfoEntity>> createDeptTickets =
ticketInfoEntities.stream().collect(Collectors.groupingBy(StandardTicketInfoEntity::getSignageCode));
//获取 操作票的id,删除
if (CollectionUtils.isNotEmpty(items)) {
List<Long> collect =
@ -391,19 +406,19 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
baseMapper.deleteBatchIds(collect);
}
}
Set<Map.Entry<Long, List<StandardTicketInfoEntity>>> entries = createDeptTickets.entrySet();
Set<Map.Entry<String, List<StandardTicketInfoEntity>>> entries = createDeptTickets.entrySet();
List<TicketCount> ticketCountList = new ArrayList<>();
for (Map.Entry<Long, List<StandardTicketInfoEntity>> entry : entries) {
for (Map.Entry<String, List<StandardTicketInfoEntity>> entry : entries) {
TicketCount ticketCount = new TicketCount();
ticketCount.setDateTime(dateTime);
ticketCount.setDeptId(entry.getKey());
ticketCount.setTenantId(user.getTenantId());
ticketCount.setCreateDept(Long.valueOf(user.getDeptId()));
ticketCount.setCreateUser(user.getUserId());
log.info("getStandardTicketCountList entry.getKey() ================================================> " + entry.getKey());
if (ObjectUtils.isNotEmpty(entry.getKey())) {
ticketCount.setDeptId(NumberUtils.toLong(entry.getKey()));
//根据id获取部门名称
R<String> deptName = systemClient.getDeptName(entry.getKey());
R<String> deptName = systemClient.getDeptName(NumberUtils.toLong(entry.getKey()));
if (deptName.isSuccess()) {
ticketCount.setDeptName(deptName.getData() == null ? "" : deptName.getData());
}
@ -452,7 +467,8 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
return null;
}
//根据站点分组
Map<Long, List<WorkTicketInfoEntity>> createDeptTickets = ticketInfoEntities.stream().collect(Collectors.groupingBy(BaseEntity::getCreateDept));
Map<String, List<WorkTicketInfoEntity>> createDeptTickets =
ticketInfoEntities.stream().collect(Collectors.groupingBy(WorkTicketInfoEntity::getSignageCode));
if (CollectionUtils.isNotEmpty(items)) {
//获取工作票的id,删除
List<Long> collect =
@ -461,17 +477,17 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
baseMapper.deleteBatchIds(collect);
}
}
Set<Map.Entry<Long, List<WorkTicketInfoEntity>>> entries = createDeptTickets.entrySet();
Set<Map.Entry<String, List<WorkTicketInfoEntity>>> entries = createDeptTickets.entrySet();
List<TicketCount> ticketCountList = new ArrayList<>();
for (Map.Entry<Long, List<WorkTicketInfoEntity>> entry : entries) {
for (Map.Entry<String, List<WorkTicketInfoEntity>> entry : entries) {
TicketCount ticketCount = new TicketCount();
ticketCount.setDeptId(entry.getKey());
ticketCount.setDateTime(dateTime);
log.info("getTicketCountList entry.getKey() ================================================> " + entry.getKey());
if (ObjectUtils.isNotEmpty(entry.getKey())) {
ticketCount.setDeptId(NumberUtils.toLong(entry.getKey()));
//根据id获取部门名称
R<String> deptName = systemClient.getDeptName(entry.getKey());
R<String> deptName = systemClient.getDeptName(NumberUtils.toLong(entry.getKey()));
if (deptName.isSuccess()) {
ticketCount.setDeptName(deptName.getData() == null ? "" : deptName.getData());
}
@ -500,6 +516,21 @@ public class TicketCountServiceImpl extends BaseServiceImpl<TicketCountMapper, T
evaluateEntityLambdaQueryWrapper.eq(BaseEntity::getStatus, 1);
List<TicketInfoEvaluateEntity> evaluateEntities = ticketInfoEvaluateService.list(evaluateEntityLambdaQueryWrapper);
ticketCount.setTicketProportionNum(evaluateEntities.size());
//5.废弃数量
List<WorkTicketInfoEntity> invalidatedTicketNums =
values.stream().filter(item -> "废弃".equals(item.getFlowTaskName())).collect(Collectors.toList());
ticketCount.setInvalidatedTicketNum(invalidatedTicketNums.size());
//6.错票数量
List<WorkTicketInfoEntity> wrongTicketNums =
values.stream().filter(item -> "错票".equals(item.getFlowTaskName())).collect(Collectors.toList());
ticketCount.setWrongTicketNum(wrongTicketNums.size());
//7.合格率
String percentPassTicketNum = (1 / evaluateEntities.size()) == 0 ? "0" : (1 / evaluateEntities.size()) +
"%";
ticketCount.setPercentPassTicket(percentPassTicketNum);
ticketCountList.add(ticketCount);
}
return ticketCountList;

8
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -537,8 +537,8 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//如果签发人为false
if (workTicket.getSignFlag() != null) {
if (!workTicket.getSignFlag()) {
workTicket.setFlowDescription("作废");
workTicket.setFlowTaskName("作废");
workTicket.setFlowDescription("errancy");
workTicket.setFlowTaskName("errancy");
workTicket.setNextStepOperator(" ");
workTicket.setStepOperator(" ");
}
@ -548,8 +548,8 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//运行人员false
if (workTicket.getRecieveFlag() != null) {
if (!workTicket.getRecieveFlag()) {
workTicket.setFlowDescription("作废");
workTicket.setFlowTaskName("作废");
workTicket.setFlowDescription("errancy");
workTicket.setFlowTaskName("errancy");
workTicket.setNextStepOperator(" ");
workTicket.setStepOperator(" ");
}

34
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/TicketCountQueryVo.java

@ -0,0 +1,34 @@
package com.hnac.hzims.ticket.twoTicket.vo;
import lombok.Data;
/**
* @Author WL
* @Version v1.0
* @Serial 1.0
* @Date 2023/7/24 8:32
*/
@Data
public class TicketCountQueryVo {
/**
* 票据类型
*/
private String type;
/**
* 延期
*/
private String input;
/**
* 结束 作废
*/
private String flowTaskName;
/**
* 合格
*/
private String qualified;
}

106
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/ticket/TicketCountResponseVo.java

@ -44,10 +44,26 @@ public class TicketCountResponseVo {
/**
* 第一种工作票错票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "错票数量", index = 3)
private Integer oneWrongTicketNum = 0;
/**
* 第一种工作票废票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "废票数量", index = 4)
private Integer oneInvalidatedTicketNumNum = 0;
/**
* 第一种工作票延期数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "延期数量",index = 3)
@ExcelProperty(value = "延期数量", index = 5)
private Integer oneTicketDelayNum = 0;
@ -55,15 +71,22 @@ public class TicketCountResponseVo {
* 第一种工作票合格数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格数量",index = 4)
@ExcelProperty(value = "合格数量", index = 6)
private Integer oneTicketProportionNum = 0;
/**
* 第一种工作票合格率
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格率", index = 7)
private String onePercentPassTicket = "0";
/**
* 第二种工作票开票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "开票数量",index = 5)
@ExcelProperty(value = "开票数量", index = 8)
private Integer twoTicketNumber = 0;
@ -71,15 +94,30 @@ public class TicketCountResponseVo {
* 第二种工作票完成数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "完成数量",index = 6)
@ExcelProperty(value = "完成数量", index = 9)
private Integer twoTicketCompleteNum = 0;
/**
* 第二种工作票错票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "错票数量", index = 10)
private Integer twoWrongTicketNum = 0;
/**
* 第二种工作票废票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "废票数量", index = 11)
private Integer twoInvalidatedTicketNumNum = 0;
/**
* 第二种工作票延期数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "延期数量",index = 7)
@ExcelProperty(value = "延期数量", index = 11)
private Integer twoTicketDelayNum = 0;
@ -87,15 +125,24 @@ public class TicketCountResponseVo {
* 第二种工作票合格数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格数量",index = 8)
@ExcelProperty(value = "合格数量", index = 12)
private Integer twoTicketProportionNum = 0;
/**
* 第二种工作票合格率
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格率", index = 13)
private String twoPercentPassTicket = "0";
/**
* 水力机械工作票开票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "开票数量",index = 9)
@ExcelProperty(value = "开票数量", index = 14)
private Integer threeTicketNumber = 0;
@ -103,15 +150,30 @@ public class TicketCountResponseVo {
* 水力机械工作票完成数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "完成数量",index = 10)
@ExcelProperty(value = "完成数量", index = 15)
private Integer threeTicketCompleteNum = 0;
/**
*水力机械工作票错票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "错票数量", index = 16)
private Integer threeWrongTicketNum = 0;
/**
* 水力机械工作废票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "废票数量", index = 17)
private Integer threeInvalidatedTicketNumNum = 0;
/**
* 水力机械工作票延期数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "延期数量",index = 11)
@ExcelProperty(value = "延期数量", index = 18)
private Integer threeTicketDelayNum = 0;
@ -119,15 +181,24 @@ public class TicketCountResponseVo {
* 水力机械工作票合格数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格数量",index = 12)
@ExcelProperty(value = "合格数量", index = 19)
private Integer threeTicketProportionNum = 0;
/**
*水力机械工作票票合格率
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格率", index = 20)
private String threePercentPassTicket = "0";
/**
* 操作票开票数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "开票数量",index = 13)
@ExcelProperty(value = "开票数量", index = 21)
private Integer fourTicketNumber = 0;
@ -135,7 +206,7 @@ public class TicketCountResponseVo {
* 操作票开票完成数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "完成数量",index = 14)
@ExcelProperty(value = "完成数量", index = 22)
private Integer fourTicketCompleteNum = 0;
@ -150,8 +221,17 @@ public class TicketCountResponseVo {
* 操作票作票合格数量
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格数量",index = 15)
@ExcelProperty(value = "合格数量", index = 23)
private Integer fourTicketProportionNum = 0;
/**
* 操作票合格率
*/
@ColumnWidth(14)
@ExcelProperty(value = "合格数量", index = 24)
private String fourPercentPassTicket = "0";
}

3
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/ticket/TicketCountVo.java

@ -16,4 +16,7 @@ public class TicketCountVo {
private String dateTime;
private String deptId;
}

9
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/IWorkTicketInfoService.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hnac.hzims.ticket.areamonthly.vo.AreaMonthlyVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo;
import com.hnac.hzims.ticket.twoTicket.vo.TicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.workTicket.dto.TicketAccessTaskDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
@ -168,4 +169,12 @@ public interface IWorkTicketInfoService extends BaseService<WorkTicketInfoEntity
List<WorkTicketInfoEntity> selectTicketByDeptIdWithTicketType(List<Long> createDept, String ticketType, String dateTime);
List<WorkTicketBillVO> getWorkTicketBill(String emCode, String startTime, String endTime);
/**
* 查看工作票
* @param ticketCountQueryVo
* @return
*/
List<WorkTicketInfoEntity> listByTicketWithKeyword(TicketCountQueryVo ticketCountQueryVo);
}

49
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/WorkTicketInfoServiceImpl.java

@ -26,10 +26,12 @@ import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo;
import com.hnac.hzims.ticket.aspect.AroundFlow;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.twoTicket.service.TicketInfoDangerService;
import com.hnac.hzims.ticket.twoTicket.service.impl.WorkTicketFinishServiceImpl;
import com.hnac.hzims.ticket.twoTicket.vo.TicketCountQueryVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.utils.ExcelUtil;
import com.hnac.hzims.ticket.workTicket.dto.*;
@ -1128,4 +1130,51 @@ public class WorkTicketInfoServiceImpl extends BaseServiceImpl<WorkTicketInfoMap
List<WorkTicketBillVO> workTicketBillList = baseMapper.getWorkTicketBill(emInfo.getPath(), startTime, endTime);
return workTicketBillList;
}
/**
* 查看工作票
*
* @param ticketCountQueryVo
* @return
*/
@Override
public List<WorkTicketInfoEntity> listByTicketWithKeyword(TicketCountQueryVo ticketCountQueryVo) {
//延期
String input = ticketCountQueryVo.getInput();
//开票 结束 作废
String flowTaskName = ticketCountQueryVo.getFlowTaskName();
//合格
String qualified = ticketCountQueryVo.getQualified();
String type = ticketCountQueryVo.getType();
//查询
QueryWrapper<WorkTicketInfoEntity> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(StringUtils.isNotBlank(type), WorkTicketInfoEntity::getType,
type);
queryWrapper.lambda().eq(StringUtils.isNotEmpty(input), WorkTicketInfoEntity::getInput, input);
if (StringUtils.isNotEmpty(flowTaskName)) {
if ("开票".equals(flowTaskName)) {
queryWrapper.lambda().isNotNull(WorkTicketInfoEntity::getFlowTaskName);
} else {
queryWrapper.lambda().eq(WorkTicketInfoEntity::getFlowTaskName, flowTaskName);
}
}
//合格
if (StringUtils.isNoneBlank(qualified) && "合格".equals(qualified)) {
List<WorkTicketInfoEntity> workTicketInfoEntities = baseMapper.selectList(null);
List<Long> ticketIdList = workTicketInfoEntities.stream().map(BaseEntity::getId).collect(Collectors.toList());
LambdaQueryWrapper<TicketInfoEvaluateEntity> evaluateEntityLambdaQueryWrapper = new LambdaQueryWrapper<>();
evaluateEntityLambdaQueryWrapper.in(TicketInfoEvaluateEntity::getTicketId, ticketIdList);
evaluateEntityLambdaQueryWrapper.eq(BaseEntity::getStatus, 1);
List<TicketInfoEvaluateEntity> evaluateEntities = ticketInfoEvaluateService.list(evaluateEntityLambdaQueryWrapper);
List<Long> idList =
evaluateEntities.stream().map(TicketInfoEvaluateEntity::getTicketId).collect(Collectors.toList());
queryWrapper.lambda().in(BaseEntity::getId, idList);
}
return baseMapper.selectList(queryWrapper);
}
}

1
hzims-service/ticket/src/main/resources/db/2.0.2.sql

@ -0,0 +1 @@
alter table hzims_ticket_count add invalidated_ticket_num int null comment '废票数量';

18
hzims-service/ticket/src/main/resources/db/2.0.3.sql

@ -0,0 +1,18 @@
# 工作票更新
update hzims_work_ticket_info set flow_task_name = '签发' where status = 1;
update hzims_work_ticket_info set flow_task_name = '收到工作票' where status = 2;
update hzims_work_ticket_info set flow_task_name = '许可人许可' where status = 3;
update hzims_work_ticket_info set flow_task_name = '确认条件具备' where status = 4;
update hzims_work_ticket_info set flow_task_name = '工作负责人确认工作' where status = 5;
update hzims_work_ticket_info set flow_task_name = '许可人确认工作结束' where status = 6;
update hzims_work_ticket_info set flow_task_name = '工作票终结' where status = 7;
update hzims_work_ticket_info set flow_task_name = '许可人延期确认' where status = 9;
update hzims_work_ticket_info set flow_task_name = '负责人延期确认' where status = 10;
update hzims_work_ticket_info set flow_task_name = '作废' where status = 11;
update hzims_work_ticket_info set flow_task_name = '逾期' where status = 12;
# 操作票更新
update hzims_standard_ticket_info set flow_task_name = '待监护人确认' where status = 1;
update hzims_standard_ticket_info set flow_task_name = '待值班负责人确认' where status = 2;
update hzims_standard_ticket_info set flow_task_name = '结束' where status = 3;
update hzims_standard_ticket_info set flow_task_name = '终止' where status = 4;

2
hzims-service/ticket/src/main/resources/db/2.0.4.sql

@ -0,0 +1,2 @@
alter table hzims_ticket_count add wrong_ticket_num int null comment '错票数量';
alter table hzims_ticket_count add percent_pass_ticket varchar(50) null comment '合格率';
Loading…
Cancel
Save