Browse Source

修正兩票pdf展示bug:序号展示有问题(启动报错解决)

zhongwei
tyty 1 year ago
parent
commit
d63bb64c24
  1. 2
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/service/impl/TicketMatterGroupServiceImpl.java
  2. 13
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  3. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java

2
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/service/impl/TicketMatterGroupServiceImpl.java

@ -626,7 +626,7 @@ public class TicketMatterGroupServiceImpl extends BaseServiceImpl<TicketMatterGr
}).collect(Collectors.toList()); }).collect(Collectors.toList());
workTicketInfoMap.put("measureMapList", collect); workTicketInfoMap.put("measureMapList", collect);
Map<String, Object> resultMap = OperationWordHelper.resultMap(workTicketInfoMap); Map<String, Object> resultMap = OperationWordHelper.resultMap(workTicketInfoMap);
String workTicketStatus = this.getWorkTicketStatus(status); String workTicketStatus =getWorkTicketStatus(status);
String os = TicketConstant.OS_NAME; String os = TicketConstant.OS_NAME;
//Windows操作系统 //Windows操作系统
if (os != null && os.toLowerCase().startsWith("windows")) { if (os != null && os.toLowerCase().startsWith("windows")) {

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

@ -10,7 +10,6 @@ import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.hnac.hzims.common.logs.utils.StringUtils; import com.hnac.hzims.common.logs.utils.StringUtils;
import com.hnac.hzims.message.MessageConstants; import com.hnac.hzims.message.MessageConstants;
import com.hnac.hzims.message.dto.BusinessMessageDTO; import com.hnac.hzims.message.dto.BusinessMessageDTO;
import com.hnac.hzims.message.dto.MessagePushRecordDto;
import com.hnac.hzims.message.fegin.IMessageClient; import com.hnac.hzims.message.fegin.IMessageClient;
import com.hnac.hzims.middle.process.feign.ProcessDictFeignService; import com.hnac.hzims.middle.process.feign.ProcessDictFeignService;
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
@ -59,7 +58,6 @@ import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache; import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient; import org.springblade.system.user.feign.IUserClient;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -963,7 +961,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
for (WorkTicketSafetyMeasureEntity measureVO : workTicketSafetyMeasureEntities) { for (WorkTicketSafetyMeasureEntity measureVO : workTicketSafetyMeasureEntities) {
String type = measureEnum.getType(); String type = measureEnum.getType();
if (tempIndex != Integer.valueOf(type)) { if (tempIndex != Integer.valueOf(type)) {
index = 1; // index = 1;
tempIndex++; tempIndex++;
} }
log.info("获取安全措施的信息: {}", measureVO); log.info("获取安全措施的信息: {}", measureVO);
@ -984,7 +982,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
//验证工作措施是有有数据 //验证工作措施是有有数据
this.isMatterLibraryList(workTicketInfoMap1); this.isMatterLibraryList(workTicketInfoMap1);
// 工作地点保留带电部位或注意事项 // 工作地点保留带电部位或注意事项
this.matterLibraryListWithMap(workTicketInfoMap1); matterLibraryListWithMap(workTicketInfoMap1);
result.putAll(workTicketInfoMap1); result.putAll(workTicketInfoMap1);
} }
@ -1025,12 +1023,13 @@ public class TicketProcessServiceImpl implements TicketProcessService {
List<TicketInfoDanger> ticketInfoDangers = workTicketVo.getTicketInfoDangers(); List<TicketInfoDanger> ticketInfoDangers = workTicketVo.getTicketInfoDangers();
if (CollectionUtils.isNotEmpty(ticketInfoDangers)) { if (CollectionUtils.isNotEmpty(ticketInfoDangers)) {
Map<String, List<Map<String, Object>>> map = new HashMap<>(); Map<String, List<Map<String, Object>>> map = new HashMap<>();
int index = 1; int[] index = {1};
List<Map<String, Object>> collect = ticketInfoDangers.stream().map(item -> { List<Map<String, Object>> collect = ticketInfoDangers.stream().map(item -> {
Map<String, Object> newItem = new HashMap<>(); Map<String, Object> newItem = new HashMap<>();
newItem.put("index", index); newItem.put("index", index[0]);
newItem.put("maintenance", item.getMaintenance() == null ? "\u00A0" : item.getMaintenance()); newItem.put("maintenance", item.getMaintenance() == null ? "\u00A0" : item.getMaintenance());
newItem.put("dangerousPoint", item.getDangerousPoint() == null ? "\u00A0" : item.getDangerousPoint()); newItem.put("dangerousPoint", item.getDangerousPoint() == null ? "\u00A0" : item.getDangerousPoint());
index[0]++;
return newItem; return newItem;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
@ -1041,7 +1040,7 @@ public class TicketProcessServiceImpl implements TicketProcessService {
WordMapUtils.newMapWithList("ticketInfoDangers", result, true, 4, "maintenance", "dangerousPoint"); WordMapUtils.newMapWithList("ticketInfoDangers", result, true, 4, "maintenance", "dangerousPoint");
//7. 是否包含 //7. 是否包含
this.isExists(result); isExists(result);
//8. 存入新的数据 //8. 存入新的数据
this.addMapPut(result); this.addMapPut(result);

4
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/service/impl/OfflineTicketServiceImpl.java

@ -8,7 +8,6 @@ import com.hnac.hzims.operational.station.entity.StationEntity;
import com.hnac.hzims.operational.station.feign.IStationClient; import com.hnac.hzims.operational.station.feign.IStationClient;
import com.hnac.hzims.ticket.constants.TicketConstants; import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.constants.WorkTicketConstants; import com.hnac.hzims.ticket.constants.WorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto; import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketContentEntity; import com.hnac.hzims.ticket.workTicket.entity.WorkTicketContentEntity;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketFlowEntity; import com.hnac.hzims.ticket.workTicket.entity.WorkTicketFlowEntity;
@ -40,7 +39,6 @@ import java.time.YearMonth;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalAdjusters;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock; import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@ -61,7 +59,7 @@ public class OfflineTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMapp
private final IWorkTicketContentService contentService; private final IWorkTicketContentService contentService;
private final IUserClient userClient; private final IUserClient userClient;
private final IWorkTicketFlowService workTicketFlowService; private final IWorkTicketFlowService workTicketFlowService;
private Lock lock = new ReentrantLock(); private final Lock lock = new ReentrantLock();
/** /**
* 线下工作票开票 * 线下工作票开票

Loading…
Cancel
Save