Browse Source

fix:工作票附表预览补充危险源

zhongwei
haungxing 6 months ago
parent
commit
af7529a008
  1. 12
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/FirstWorkTicketServiceImpl.java

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

@ -24,9 +24,12 @@ import com.hnac.hzims.ticket.allTicket.vo.TicketInfoStatisticVO;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.constants.WorkTicketConstants;
import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant;
import com.hnac.hzims.ticket.twoTicket.entity.TicketInfoDanger;
import com.hnac.hzims.ticket.twoTicket.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.twoTicket.mapper.TicketInfoDangerMapper;
import com.hnac.hzims.ticket.twoTicket.service.IFirstWorkTicketService;
import com.hnac.hzims.ticket.twoTicket.service.IWorkTicketFinishService;
import com.hnac.hzims.ticket.twoTicket.service.TicketInfoDangerService;
import com.hnac.hzims.ticket.utils.*;
import com.hnac.hzims.ticket.workTicket.dto.*;
import com.hnac.hzims.ticket.workTicket.entity.*;
@ -103,6 +106,7 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
private final TicketInfoEvaluateService evaluateService;
private final IWorkTicketContentService contentService;
private final IWorkTicketFinishService workTicketFinishService;
private final TicketInfoDangerService dangerService;
/**工作票流程修改后的key**/
@Value("${hzims.ticket.first-work-flow-key-new}")
@ -366,6 +370,14 @@ public class FirstWorkTicketServiceImpl extends BaseServiceImpl<WorkTicketInfoMa
}).collect(Collectors.toList());
params.put("matterLibraryList",measureList);
}
LambdaQueryWrapper<TicketInfoDanger> qw = Wrappers.<TicketInfoDanger>lambdaQuery().eq(TicketInfoDanger::getTicketId, ticketId);
List<TicketInfoDanger> ticketInfoDangerList = dangerService.list(qw);
List<Map> dangerList = IntStream.iterate(0, index -> index + 1).limit(ticketInfoDangerList.size()).mapToObj(index -> {
Map result = ObjectUtils.obj2Map(ticketInfoDangerList.get(index));
result.put("index",index + 1);
return result;
}).collect(Collectors.toList());
params.put("ticketInfoDangers", dangerList);
params.put("isSafety",workTicketInfoEntity.getIsSafety() ? "☑" : "□");
params.put("isHazard",workTicketInfoEntity.getIsHazard() ? "☑" : "□");
params.put("isRailway",workTicketInfoEntity.getIsRailway() ? "☑" : "□");

Loading…
Cancel
Save