Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 1 year ago
parent
commit
1c406389f4
  1. 20
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/service/impl/TicketMatterGroupServiceImpl.java

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

@ -6,9 +6,7 @@ import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.hnac.hzims.common.logs.utils.StringUtils;
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.library.dto.TicketMatterGroupDTO; import com.hnac.hzims.ticket.library.dto.TicketMatterGroupDTO;
@ -21,20 +19,17 @@ import com.hnac.hzims.ticket.standardTicket.service.OperationTicketService;
import com.hnac.hzims.ticket.standardTicket.utils.OperationWordHelper; import com.hnac.hzims.ticket.standardTicket.utils.OperationWordHelper;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO; import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
import com.hnac.hzims.ticket.twoTicket.constant.TicketConstant; 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.entity.WorkTicketFinish;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService; import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.utils.WordHelper; import com.hnac.hzims.ticket.twoTicket.utils.WordHelper;
import com.hnac.hzims.ticket.twoTicket.utils.WordMapUtils; import com.hnac.hzims.ticket.twoTicket.utils.WordMapUtils;
import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo; import com.hnac.hzims.ticket.twoTicket.vo.operation.StandardTicketInfoVo;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
import com.hnac.hzims.ticket.utils.ExcelUtil; import com.hnac.hzims.ticket.utils.ExcelUtil;
import com.hnac.hzims.ticket.utils.PdfUtils; import com.hnac.hzims.ticket.utils.PdfUtils;
import com.hnac.hzims.ticket.workTicket.entity.*; import com.hnac.hzims.ticket.workTicket.entity.*;
import com.hnac.hzims.ticket.workTicket.service.ITwoTicketMatterLibraryService; import com.hnac.hzims.ticket.workTicket.service.ITwoTicketMatterLibraryService;
import com.hnac.hzims.ticket.workTicket.vo.*; import com.hnac.hzims.ticket.workTicket.vo.*;
import com.hnac.hzims.ticket.workTicket.wrapper.TwoTicketMatterLibraryWrapper; import com.hnac.hzims.ticket.workTicket.wrapper.TwoTicketMatterLibraryWrapper;
import com.spire.pdf.PdfNewDocument;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -47,8 +42,6 @@ import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.*; import org.springblade.core.tool.utils.*;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User;
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;
@ -521,11 +514,15 @@ public class TicketMatterGroupServiceImpl extends BaseServiceImpl<TicketMatterGr
WordMapUtils.newMapWithList("matterLibraryList", params, true, 4, null); WordMapUtils.newMapWithList("matterLibraryList", params, true, 4, null);
if (CollectionUtil.isNotEmpty(groupVO.getMatterLibraryListOne())) { if (CollectionUtil.isNotEmpty(groupVO.getMatterLibraryListOne())) {
final int[] index = {1};
List<Map<String, Object>> collect = groupVO.getMatterLibraryListOne().stream().map(library -> { List<Map<String, Object>> collect = groupVO.getMatterLibraryListOne().stream().map(library -> {
try { try {
Map<String, Object> map = PdfUtils.objectToMap(library); Map<String, Object> map = PdfUtils.objectToMap(library);
map.put("status", " "); map.put("status", " ");
map.put("index", index[0]);
index[0]++;
return map; return map;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -536,11 +533,16 @@ public class TicketMatterGroupServiceImpl extends BaseServiceImpl<TicketMatterGr
params.put("matterLibraryListSeven", collect); params.put("matterLibraryListSeven", collect);
params.put("matterLibraryListEight", collect); params.put("matterLibraryListEight", collect);
} }
if (CollectionUtil.isNotEmpty(groupVO.getMatterLibraryListTwo())) { if (CollectionUtil.isNotEmpty(groupVO.getMatterLibraryListTwo())) {
final int[] index = {1};
List<Map<String, Object>> collect = groupVO.getMatterLibraryListTwo().stream().map(library -> { List<Map<String, Object>> collect = groupVO.getMatterLibraryListTwo().stream().map(library -> {
try { try {
Map<String, Object> map = PdfUtils.objectToMap(library); Map<String, Object> map = PdfUtils.objectToMap(library);
map.put("status", " "); map.put("status", " ");
map.put("index", index[0]);
index[0]++;
return map; return map;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -550,12 +552,16 @@ public class TicketMatterGroupServiceImpl extends BaseServiceImpl<TicketMatterGr
params.put("matterLibraryListTwo", collect); params.put("matterLibraryListTwo", collect);
params.put("matterLibraryListNine", collect); params.put("matterLibraryListNine", collect);
} }
if (CollectionUtil.isNotEmpty(groupVO.getMatterLibraryListThree())) { if (CollectionUtil.isNotEmpty(groupVO.getMatterLibraryListThree())) {
final int[] index = {1};
List<Map<String, Object>> collect = groupVO.getMatterLibraryListThree().stream().map(library -> { List<Map<String, Object>> collect = groupVO.getMatterLibraryListThree().stream().map(library -> {
try { try {
Map<String, Object> map = PdfUtils.objectToMap(library); Map<String, Object> map = PdfUtils.objectToMap(library);
map.put("status", " "); map.put("status", " ");
map.put("index", index[0]);
index[0]++;
return map; return map;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();

Loading…
Cancel
Save