From 9df9761fc8849576e22d1c2b5f8bb1dd105468b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AE=B5=E9=A3=9E=E5=AE=87?= <2684146481@qq.com> Date: Tue, 18 Apr 2023 09:45:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=97=A5=E5=B8=B8=E7=BB=B4?= =?UTF-8?q?=E6=8A=A4=E8=AE=A1=E5=88=92=E5=B7=A1=E6=A3=80=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feign/SafeEquipmentTrialFeignClient.java | 2 +- .../src/main/resources/application.yml | 2 ++ .../web/AreaMonthlyDetailsController.java | 22 ++++++++++++---------- .../scheduled/MaintenanceTaskCreateTask.java | 6 +++++- .../impl/OperMaintenanceTaskServiceImpl.java | 3 ++- .../serviceimpl/MaintenanceTempleServiceImpl.java | 14 ++++++++------ .../controller/StandardTicketInfoController.java | 1 + .../service/impl/TicketProcessServiceImpl.java | 18 +++++++++++------- 8 files changed, 42 insertions(+), 26 deletions(-) diff --git a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/areamonthly/feign/SafeEquipmentTrialFeignClient.java b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/areamonthly/feign/SafeEquipmentTrialFeignClient.java index 1781d1b..7fec8c9 100644 --- a/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/areamonthly/feign/SafeEquipmentTrialFeignClient.java +++ b/hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/areamonthly/feign/SafeEquipmentTrialFeignClient.java @@ -26,7 +26,7 @@ public interface SafeEquipmentTrialFeignClient { /** * 分页 */ - @GetMapping("/list") + @GetMapping("/safeEquimentTrial/list") @ApiOperationSupport(order = 50) @ApiOperation(value = "分页", notes = "查询条件:createDept,fileName,startTime,endTime") public R> list(SafeEquipmentTrialDTO safeEquipmentTrialDTO, Query query) ; diff --git a/hzims-service/hzims-middle/src/main/resources/application.yml b/hzims-service/hzims-middle/src/main/resources/application.yml index 5630ab0..f3bb7f5 100644 --- a/hzims-service/hzims-middle/src/main/resources/application.yml +++ b/hzims-service/hzims-middle/src/main/resources/application.yml @@ -20,6 +20,8 @@ mybatis-plus: mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml #实体扫描,多个package用逗号或者分号分隔 typeAliasesPackage: com.hnac.hzims.**.entity + configuration: + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #swagger扫描路径配置 swagger: diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java index 574821d..1904404 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/main/controller/web/AreaMonthlyDetailsController.java @@ -1,8 +1,6 @@ package com.hnac.hzims.operational.main.controller.web; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.operational.access.dto.OperAccessStatisticsDTO; @@ -33,9 +31,7 @@ import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.support.BladePage; -import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springframework.cloud.openfeign.SpringQueryMap; @@ -132,10 +128,10 @@ public class AreaMonthlyDetailsController { /** - * 根据区域和月份分页查询日志维护列表 + * 根据区域和月份分页查询日常维护列表 */ @ApiOperationSupport(order = 100) - @ApiOperation(value = "根据区域和月份分页查询日志维护列表") + @ApiOperation(value = "根据区域和月份分页查询日常维护列表") @GetMapping("/queryLogMaintenancePageList/{page}/{size}") public R> queryLogMaintenancePageList( @ApiParam(name = "page", value = "当前页", required = true) @PathVariable("page") Long page, @@ -148,11 +144,11 @@ public class AreaMonthlyDetailsController { /** - * 根据区域和月份分页查询日志维护 根据id获取详情 + * 根据区域和月份分页查询日常维护 根据id获取详情 */ @GetMapping("/queryLogMaintenancePageList/detail/{id}") @ApiOperationSupport(order = 40) - @ApiOperation(value = "根据区域和月份分页查询日志维护 根据id获取详情") + @ApiOperation(value = "根据区域和月份分页查询日常维护 根据id获取详情") public R detail(@PathVariable Long id) { return taskService.detail(id); } @@ -163,8 +159,14 @@ public class AreaMonthlyDetailsController { */ @ApiOperationSupport(order = 50) @ApiOperation(value = "根据区域和月份分页查询巡检任务") - @GetMapping("/queryCheckTaskPageList") - public R> queryCheckTaskPageList(TaskListQuery task, Query query) { + @GetMapping("/queryCheckTaskPageList/{page}/{size}") + public R> queryCheckTaskPageList( + @ApiParam(name = "page", value = "当前页", required = true) @PathVariable("page") Long page, + @ApiParam(name = "size", value = "每页记录数", required = true) @PathVariable("size") Long size, + TaskListQuery task) { + Query query = new Query(); + query.setCurrent(page.intValue()); + query.setSize(size.intValue()); BladePage taskVoIPage = areaMonthlyDetailsService.queryCheckTaskPageList(task, query); return R.data(taskVoIPage); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java index f243cc1..6229c71 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskCreateTask.java @@ -162,6 +162,7 @@ public class MaintenanceTaskCreateTask { return; } } + BeanUtil.copyProperties(planEntity, taskEntity); taskService.save(taskEntity); //生成工作流实例 String processInstanceId = this.startProcessInstance(planEntity.getProcDefId(), taskEntity); @@ -169,6 +170,9 @@ public class MaintenanceTaskCreateTask { taskService.updateById(taskEntity); planEntity.setCreateTaskTime(DateUtil.now()); planMapper.updateById(planEntity); + + taskEntity = taskService.getById(taskEntity.getId()); + //taskEntity.setMessageTemplateId(1646694238095732738L); this.pushTaskMessage(taskEntity); } @@ -207,7 +211,7 @@ public class MaintenanceTaskCreateTask { XxlJobLogger.log("开始保存{}的日常维护消息推送记录",taskEntity.getDisposer()); R templateR = messageClient.getMsgTemplateById(taskEntity.getMessageTemplateId()); if(templateR.isSuccess() && ObjectUtil.isNotEmpty(templateR.getData())) { - Func.toLongList("",taskEntity.getDisposer()).forEach(userId -> { + Func.toLongList(",",taskEntity.getDisposer()).forEach(userId -> { // MessagePushRecordDto recordDto = BeanUtil.copy(templateR.getData(),MessagePushRecordDto.class); // recordDto.setTypes(Arrays.asList(Func.split(recordDto.getType(),","))); // recordDto.setDeptId(taskEntity.getCreateDept()); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java index 19c19d7..56ce66b 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceTaskServiceImpl.java @@ -341,7 +341,8 @@ public class OperMaintenanceTaskServiceImpl extends BaseServiceImpl queryLogMaintenancePageList(Page pageParam, MaintenanceTaskWithAreaVo areaMonthlyVo) { + public IPage + queryLogMaintenancePageList(Page pageParam, MaintenanceTaskWithAreaVo areaMonthlyVo) { //1.根据区域查询 QueryWrapper queryWrapper = new QueryWrapper<>(); //维护内容 diff --git a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java index 9c1cce3..44420af 100644 --- a/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java +++ b/hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/template/serviceimpl/MaintenanceTempleServiceImpl.java @@ -5,6 +5,8 @@ import com.hnac.hzims.message.dto.PlanMsgRecordDto; import com.hnac.hzims.message.fegin.IMessageClient; import com.hnac.hzims.safeproduct.template.abstracts.TemplateAbstractService; import com.qiniu.util.Json; +import org.apache.commons.lang3.StringUtils; +import org.springblade.core.secure.utils.AuthUtil; import org.springblade.system.user.cache.UserCache; import org.springblade.system.user.entity.User; import org.springframework.stereotype.Service; @@ -16,6 +18,7 @@ import java.util.Optional; /** * 日常维护计划 + * * @Author WL * @Version v1.0 * @Serial 1.0 @@ -25,7 +28,6 @@ import java.util.Optional; public class MaintenanceTempleServiceImpl extends TemplateAbstractService { - /** * 执行具体的业务场景,推送消息 * @@ -33,23 +35,23 @@ public class MaintenanceTempleServiceImpl extends TemplateAbstractService { */ @Override public PlanMsgRecordDto executeTemplateMessage(PlanMsgRecordDto planMsgRecord) { - Map map = new HashMap<>(); - map.put("one", - Optional.ofNullable(UserCache.getUser(planMsgRecord.getReceiver())).map(User::getName).orElse("")); + Map map = new HashMap<>(); + map.put("one", Optional.ofNullable(UserCache.getUser(planMsgRecord.getReceiver())).map(User::getName).orElse("")); map.put("two", planMsgRecord.getPlanTime()); planMsgRecord.setContent(JSON.toJSONString(map)); + planMsgRecord.setResourceCode("aliyun-safeTool-push"); return planMsgRecord; } /** * 模板状态 + * * @param status */ @Override public Boolean isTemplateStatus(int status) { - return Objects.equals(status,1); + return Objects.equals(status, 1); } - } diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java index 7e44bfa..af1d2bc 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java @@ -123,6 +123,7 @@ public class StandardTicketInfoController extends BladeController { @SpringQueryMap StandardTicketWithAreaVo areaMonthlyVo) { Page searchPage = new Page<>(page, size); + BladePage standardTicketInfoEntity = standardTicketInfoService.areaMonthlyWithOperation(areaMonthlyVo, searchPage); return R.data(standardTicketInfoEntity); 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 94c55ef..164a40c 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 @@ -56,7 +56,7 @@ public class TicketProcessServiceImpl implements TicketProcessService { Map params = new HashMap(2) {{ put("taskId", "1644624168666353665"); - put("signUserIds", AuthUtil.getUserId()); + put("signUserIds", "1377143375838359553"); }}; flowClient.startProcessInstanceContainNameByKey( @@ -64,12 +64,16 @@ public class TicketProcessServiceImpl implements TicketProcessService { "开启工作的任务", params); - R> listR = flowClient.todoList(processDefinitionKey); - listR.getData().forEach(taskList -> { - System.out.println("任务名称:"+taskList); - System.out.println(taskList.getTaskName()); - System.out.println(taskList.getStatus()); - }); + // R> listR = flowClient.todoList(processDefinitionKey); + // listR.getData().forEach(taskList -> { + // System.out.println("任务名称:"+taskList); + // System.out.println(taskList.getTaskName()); + // System.out.println(taskList.getStatus()); + // }); + + + // flowClient.completeTask() + } }