diff --git a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java index 8623cd0..a467e14 100644 --- a/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java +++ b/hzims-service/equipment/src/main/java/com/hnac/hzims/equipment/service/impl/EmInfoServiceImpl.java @@ -558,8 +558,8 @@ public class EmInfoServiceImpl extends BaseServiceImpl implements IFdpTaskService { private final IOperPhenomenonClient operPhenomenonClient; diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java index 4fc8e15..2a35f1e 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/ProjectService.java @@ -2,6 +2,7 @@ package com.hnac.hzinfo.inspect.obj.services; import java.util.List; +import java.util.Map; import com.hnac.hzinfo.inspect.obj.dto.ContentDTO; import com.hnac.hzinfo.inspect.obj.dto.ProjectDTO; @@ -41,4 +42,11 @@ public interface ProjectService extends BaseService{ * @return */ ProjectVO getProjectAndContentByEmCode(String emCode, ContentDTO content, Query query); + + /** + * 根据多个设备编号(逗号分隔)获取项目以及内容列表(分页展示) + * @param emCodes 设备编号(逗号分隔) + * @return Map key-emCode value-projectVO + */ + Map getProjectAndContentByEmCodes(String emCodes); } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java index d2ecc0c..ab8b620 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/services/impl/ProjectServiceImpl.java @@ -32,7 +32,9 @@ import org.springframework.stereotype.Service; import org.springframework.util.Assert; import java.util.Collection; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -129,4 +131,17 @@ public class ProjectServiceImpl extends BaseServiceImpl getProjectAndContentByEmCodes(String emCodes) { + Query query = new Query(); + query.setCurrent(1); + query.setSize(-1); + Map result = new HashMap<>(); + Stream.of(emCodes.split(",")).forEach(emCode -> { + ProjectVO project = this.getProjectAndContentByEmCode(emCode,new ContentDTO(),query); + result.put(emCode,project); + }); + return result; + } } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java index 7a95a9b..5962c07 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/obj/web/ProjectController.java @@ -22,6 +22,7 @@ import com.hnac.hzinfo.inspect.utils.Condition; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; +import org.apache.ibatis.annotations.Mapper; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; @@ -34,8 +35,11 @@ import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import javax.validation.constraints.NotNull; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.stream.Collectors; +import java.util.stream.Stream; /** * 巡检项目 @@ -157,4 +161,11 @@ public class ProjectController { public R getProjectAndContentByEmCode(String emCode, ContentDTO content, Query query) { return R.data(projectService.getProjectAndContentByEmCode(emCode,content,query)); } + + @GetMapping("/getProjectAndContentByEmCodes") + @ApiOperation(value = "根据多个设备编号(逗号分隔)获取项目以及内容列表(分页展示)") + @ApiOperationSupport(order = 8) + public R> getProjectAndContentByEmCodes(@RequestParam String emCodes) { + return R.data(projectService.getProjectAndContentByEmCodes(emCodes)); + } } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java index d1f8095..9598773 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java @@ -47,6 +47,7 @@ import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.math.NumberUtils; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.springblade.core.log.exception.ServiceException; +import org.springblade.core.log.logger.BladeLogger; import org.springblade.core.secure.utils.AuthUtil; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.CollectionUtil; @@ -151,6 +152,8 @@ public class TicketProcessServiceImpl implements TicketProcessService { private final ISysClient sysClient; + private final BladeLogger logger; + /** * 启动开票流程 @@ -161,6 +164,7 @@ public class TicketProcessServiceImpl implements TicketProcessService { @Override @Transactional public Long startUp(WorkTicketVo workTicketVo) { + logger.info("ticket:start:request",JSON.toJSONString(workTicketVo)); log.info("执行 com.hnac.hzims.ticket.twoTicket.service.impl【startUp】 。。。方法"); if (workTicketVo.getWorkTicket().getSignage() == null) { throw new ServiceException("票据抬头未配置,请您到站点管理配置"); @@ -198,6 +202,7 @@ public class TicketProcessServiceImpl implements TicketProcessService { } workTicketVo.getWorkTicket().setCode(code); //3 .保存工作对象 + logger.info("ticket:start:vo",JSON.toJSONString(workTicketVo.getWorkTicket())); this.saveWorkTicketInfo(workTicketVo.getWorkTicket()); //4. 保存安全措施 this.saveSafetyMeasures(workTicketVo.getSafetyMeasuresList(), workTicketVo.getWorkTicket()); @@ -744,6 +749,7 @@ public class TicketProcessServiceImpl implements TicketProcessService { workTicket.setIsRailway(false); workTicket.setIsLimited(false); boolean isSave = firstWorkTicketService.save(workTicket); + logger.info("ticket:start:save",JSON.toJSONString(workTicket)); if (!isSave) { throw new IllegalArgumentException("保存工作对象错误"); }