diff --git a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java index ac86971..66a0048 100644 --- a/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java +++ b/hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java @@ -68,6 +68,8 @@ public class MessageConstants { OVERHAUL_TASK("overhaul-task","检修任务"), + WORK_TASK("work_task","工作任务单"), + ; private String key; @Getter diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessPlanV4Controller.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessPlanV4Controller.java index 045776f..2debf7c 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessPlanV4Controller.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessPlanV4Controller.java @@ -2,10 +2,15 @@ package com.hnac.hzims.operational.access.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.dto.AccessPlanV4DTO; import com.hnac.hzims.operational.access.dto.OperAccessPlanListDTO; import com.hnac.hzims.operational.access.service.AccessPlanV4Service; import com.hnac.hzims.operational.access.vo.OperAccessPlanVO; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.BusinessType; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -25,6 +30,7 @@ import org.springframework.web.bind.annotation.*; @AllArgsConstructor @RequestMapping("/overhaul_plan") @Api(tags = "v4检修计划流程") +@Business(module = OperationalConstants.APP_NAME,value = "检修计划",ignore = false) public class AccessPlanV4Controller extends BladeController { @@ -33,6 +39,7 @@ public class AccessPlanV4Controller extends BladeController { @PostMapping("/overhaul_start_v4") @ApiOperationSupport(order = 1) @ApiOperation(value = "v4检修计划流程开启") + @Operate(label = "检修计划流程开启",type = BusinessType.INSERT,risk = Risk.NO,ignore = false) public R startV4(@RequestBody AccessPlanV4DTO entity) { return R.status(service.startProcessV4(entity)); } @@ -42,6 +49,7 @@ public class AccessPlanV4Controller extends BladeController { @GetMapping("/pages") @ApiOperationSupport(order = 2) @ApiOperation(value = "检修计划分页查询") + @Operate(label = "检修计划分页查询",type = BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(OperAccessPlanListDTO param, Query query) { return R.data(service.pages(Condition.getPage(query),param)); } @@ -50,7 +58,8 @@ public class AccessPlanV4Controller extends BladeController { @ApiLog @GetMapping("/export") @ApiOperationSupport(order = 3) - @ApiOperation(value = "检修计划导出") + @ApiOperation(value = "检修任务导出") + @Operate(label = "检修计划分页导出",type = BusinessType.EXPORT,risk = Risk.NO,ignore = false) public void export(@RequestParam("id") Long id) { service.export(id); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessTaskV4Controller.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessTaskV4Controller.java index 257a87e..3172153 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessTaskV4Controller.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessTaskV4Controller.java @@ -2,9 +2,15 @@ package com.hnac.hzims.operational.access.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.service.AccessTaskV4Service; import com.hnac.hzims.operational.access.vo.MyAccessTaskVO; import com.hnac.hzims.operational.access.vo.OperAccessTaskVO; +import com.hnac.hzims.ticket.constants.TicketConstants; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.BusinessType; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; @@ -24,6 +30,7 @@ import org.springframework.web.bind.annotation.RestController; @AllArgsConstructor @RequestMapping("/overhaul_task") @Api(tags = "v4检修计划流程") +@Business(module = OperationalConstants.APP_NAME,value = "检修任务",ignore = false) public class AccessTaskV4Controller extends BladeController { private final AccessTaskV4Service accessTaskV4Service; @@ -32,6 +39,7 @@ public class AccessTaskV4Controller extends BladeController { @GetMapping("/myAccessTasks") @ApiOperationSupport(order = 1) @ApiOperation(value = "我的检修任务") + @Operate(label = "我的检修任务",type = BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> myAccessTasks(MyAccessTaskVO myAccessTaskVO, Query query) { return R.data(accessTaskV4Service.myAccessTasks(myAccessTaskVO.getTaskName(), query)); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java index 99bbf37..85a2a11 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java @@ -5,9 +5,13 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.entity.OperConstructionEntity; import com.hnac.hzims.operational.access.service.ConstructionService; import com.hnac.hzims.operational.access.vo.ConstructionVo; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -30,6 +34,7 @@ import javax.validation.constraints.NotNull; @AllArgsConstructor @RequestMapping("/construction") @Api(tags = "施工日志") +@Business(module = OperationalConstants.APP_NAME,value = "施工日志",ignore = false) public class ConstructionController extends BladeController { @@ -38,6 +43,7 @@ public class ConstructionController extends BladeController { @PostMapping("/save") @ApiOperationSupport(order = 1) @ApiOperation(value = "新增") + @Operate(label = "施工日志新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@RequestBody OperConstructionEntity entity) { return R.status(service.accessSave(entity)); } @@ -45,6 +51,7 @@ public class ConstructionController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 2) @ApiOperation(value = "逻辑删除") + @Operate(label = "施工日志删除",type = com.hnac.hzinfo.log.contants.BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(service.deleteLogic(Func.toLongList(ids))); } @@ -52,6 +59,7 @@ public class ConstructionController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 3) @ApiOperation(value = "详情查询") + @Operate(label = "施工日志详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.LOW,ignore = false) public R detail(@ApiParam(value = "主键Id", required = true) @RequestParam Long id) { return R.data(service.getById(id)); } @@ -59,6 +67,7 @@ public class ConstructionController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 4) @ApiOperation(value = "修改") + @Operate(label = "施工日志修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@Valid @RequestBody OperConstructionEntity entity) { return R.status(service.updateById(entity)); } @@ -69,6 +78,7 @@ public class ConstructionController extends BladeController { BusinessType.GENCODE, action = "分页查询施工日志") @ApiOperation(value = "分页") + @Operate(label = "施工日志分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(ConstructionVo construction, Query query) { return R.data(service.pageCondition(Condition.getPage(query), construction)); } @@ -76,6 +86,7 @@ public class ConstructionController extends BladeController { @GetMapping("/preview") @ApiOperationSupport(order = 6) @ApiOperation(value = "检修施工日志预览", notes = "检修施工日志预览") + @Operate(label = "施工日志预览",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public void preview(@RequestParam @ApiParam("检修施工记录Id") @NotNull @Valid Long id) { service.preview(id); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessBaseMaterialController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessBaseMaterialController.java index 73c44ed..7e290f5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessBaseMaterialController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessBaseMaterialController.java @@ -15,7 +15,6 @@ import org.springblade.core.mp.support.Query; import org.springblade.core.tool.api.R; import org.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; import javax.validation.Valid; diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryController.java index ff76a0b..c0f6e98 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryController.java @@ -5,10 +5,14 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.dto.OperAccessLibraryDTO; import com.hnac.hzims.operational.access.dto.OperAccessLibraryListDTO; import com.hnac.hzims.operational.access.service.IOperAccessLibraryService; import com.hnac.hzims.operational.access.vo.OperAccessLibraryVO; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -33,6 +37,7 @@ import javax.validation.Valid; @AllArgsConstructor @RequestMapping("/access/library") @Api(tags = "检修库") +@Business(module = OperationalConstants.APP_NAME,value = "检修库",ignore = false) public class OperAccessLibraryController extends BladeController { private final IOperAccessLibraryService service; @@ -43,6 +48,7 @@ public class OperAccessLibraryController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 1) @ApiOperation(value = "逻辑删除") + @Operate(label = "检修库删除",type = com.hnac.hzinfo.log.contants.BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(service.deleteLogic(Func.toLongList(ids))); } @@ -53,6 +59,7 @@ public class OperAccessLibraryController extends BladeController { @PostMapping("/save") @ApiOperationSupport(order = 2) @ApiOperation(value = "新增") + @Operate(label = "检修库新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@Valid @RequestBody OperAccessLibraryDTO req) { return service.doSave(req); } @@ -63,6 +70,7 @@ public class OperAccessLibraryController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 3) @ApiOperation(value = "修改") + @Operate(label = "检修库修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@Valid @RequestBody OperAccessLibraryDTO req) { return service.doUpdateById(req); } @@ -74,6 +82,7 @@ public class OperAccessLibraryController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 4) @ApiOperation(value = "详情") + @Operate(label = "检修库详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R detail(@RequestParam Long id) { return service.detail(id); } @@ -88,6 +97,8 @@ public class OperAccessLibraryController extends BladeController { @OperationAnnotation(moduleName = "检修管理",title = "检修库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, action = "分页 查询参数:emCode,gradeCode") + + @Operate(label = "检修库分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(OperAccessLibraryListDTO req, Query query) { return service.list(req, query); } @@ -102,6 +113,7 @@ public class OperAccessLibraryController extends BladeController { @ApiOperation(value = "检修库导入") @ApiOperationSupport(order = 7) @PostMapping(value = "/import") + @Operate(label = "检修库导入",type = com.hnac.hzinfo.log.contants.BusinessType.IMPORT,risk = Risk.LOW,ignore = false) public void libraryImport(@RequestParam MultipartFile file) { service.libraryImport(file); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java index e8ca7bb..17719f6 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java @@ -5,9 +5,13 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.dto.OperAccessLibraryDetailDTO; import com.hnac.hzims.operational.access.service.IOperAccessLibraryDetailService; import com.hnac.hzims.operational.access.vo.OperAccessLibraryDetailVO; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -31,6 +35,7 @@ import javax.validation.Valid; @AllArgsConstructor @RequestMapping("/access/library/detail") @Api(tags = "检修库明细") +@Business(module = OperationalConstants.APP_NAME,value = "检修库明细",ignore = false) public class OperAccessLibraryDetailController extends BladeController { private final IOperAccessLibraryDetailService service; @@ -41,6 +46,7 @@ public class OperAccessLibraryDetailController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 10) @ApiOperation(value = "逻辑删除") + @Operate(label = "检修库明细删除",type = com.hnac.hzinfo.log.contants.BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(service.deleteLogic(Func.toLongList(ids))); } @@ -51,6 +57,7 @@ public class OperAccessLibraryDetailController extends BladeController { @PostMapping("/save") @ApiOperationSupport(order = 20) @ApiOperation(value = "新增") + @Operate(label = "检修库明细新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@Valid @RequestBody OperAccessLibraryDetailDTO req) { return service.doSave(req); } @@ -61,6 +68,7 @@ public class OperAccessLibraryDetailController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 30) @ApiOperation(value = "修改") + @Operate(label = "检修库明细修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@Valid @RequestBody OperAccessLibraryDetailDTO req) { return R.status(service.updateById(req)); } @@ -72,6 +80,7 @@ public class OperAccessLibraryDetailController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 40) @ApiOperation(value = "详情") + @Operate(label = "检修库明细详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R detail(@RequestParam Long id) { return service.detail(id); } @@ -86,6 +95,7 @@ public class OperAccessLibraryDetailController extends BladeController { @OperationAnnotation(moduleName = "检修管理", title = "检修库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, action = "分页检修库列表") + @Operate(label = "检修库明细分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(OperAccessLibraryDetailDTO req, Query query) { return service.list(req, query); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessMaterialController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessMaterialController.java index e47713b..b49fd65 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessMaterialController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessMaterialController.java @@ -2,9 +2,14 @@ package com.hnac.hzims.operational.access.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.dto.OperAccessMaterialDTO; import com.hnac.hzims.operational.access.service.IOperAccessMaterialService; import com.hnac.hzims.operational.access.vo.OperAccessMaterialVO; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.BusinessType; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -28,6 +33,7 @@ import javax.validation.Valid; @AllArgsConstructor @RequestMapping("/access/material") @Api(tags = "检修材料") +@Business(module = OperationalConstants.APP_NAME,value = "检修材料",ignore = false) public class OperAccessMaterialController extends BladeController { private final IOperAccessMaterialService service; @@ -38,6 +44,7 @@ public class OperAccessMaterialController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 10) @ApiOperation(value = "逻辑删除") + @Operate(label = "检修材料删除",type = BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(service.deleteLogic(Func.toLongList(ids))); } @@ -48,6 +55,7 @@ public class OperAccessMaterialController extends BladeController { @PostMapping("/save") @ApiOperationSupport(order = 20) @ApiOperation(value = "新增") + @Operate(label = "检修材料新增",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@Valid @RequestBody OperAccessMaterialDTO req) { return service.doSave(req); } @@ -58,6 +66,7 @@ public class OperAccessMaterialController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 30) @ApiOperation(value = "修改") + @Operate(label = "检修材料修改",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@Valid @RequestBody OperAccessMaterialDTO req) { return R.status(service.updateById(req)); } @@ -69,6 +78,7 @@ public class OperAccessMaterialController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 40) @ApiOperation(value = "详情") + @Operate(label = "检修材料详情",type = BusinessType.QUERY,risk = Risk.NO,ignore = false) public R detail(@RequestParam Long id) { return service.detail(id); } @@ -80,6 +90,7 @@ public class OperAccessMaterialController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 50) @ApiOperation(value = "分页 查询参数:materialId,planId") + @Operate(label = "检修材料分页查询",type = BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(OperAccessMaterialDTO req, Query query) { return service.list(req, query); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessStatisticsController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessStatisticsController.java index 13b9364..ba3f2a3 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessStatisticsController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessStatisticsController.java @@ -5,9 +5,13 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.dto.OperAccessStatisticsDTO; import com.hnac.hzims.operational.access.service.IOperAccessStatisticsService; import com.hnac.hzims.operational.access.vo.OperAccessStatisticsVO; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -32,6 +36,7 @@ import javax.validation.Valid; @AllArgsConstructor @RequestMapping("/access/statistics") @Api(tags = "检修台账") +@Business(module = OperationalConstants.APP_NAME,value = "检修台账",ignore = false) public class OperAccessStatisticsController extends BladeController { private final IOperAccessStatisticsService service; @@ -42,6 +47,7 @@ public class OperAccessStatisticsController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 10) @ApiOperation(value = "逻辑删除") + @Operate(label = "检修台账删除",type = com.hnac.hzinfo.log.contants.BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(service.deleteLogic(Func.toLongList(ids))); } @@ -52,6 +58,7 @@ public class OperAccessStatisticsController extends BladeController { @PostMapping("/save") @ApiOperationSupport(order = 20) @ApiOperation(value = "新增") + @Operate(label = "检修台账新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@Valid @RequestBody OperAccessStatisticsDTO req) { return service.doSave(req); } @@ -62,6 +69,7 @@ public class OperAccessStatisticsController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 30) @ApiOperation(value = "修改") + @Operate(label = "检修台账修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@Valid @RequestBody OperAccessStatisticsDTO req) { return R.status(service.updateById(req)); } @@ -72,6 +80,7 @@ public class OperAccessStatisticsController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 40) @ApiOperation(value = "详情") + @Operate(label = "检修台账详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R detail(@RequestParam Long id) { return service.detail(id); } @@ -86,6 +95,7 @@ public class OperAccessStatisticsController extends BladeController { @OperationAnnotation(moduleName = "检修管理",title = "检修记录",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, action = "分页查询检修记录列表") + @Operate(label = "分页查询检修记录列表",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(OperAccessStatisticsDTO req, Query query) { return service.list(req, Condition.getPage(query)); } @@ -96,6 +106,7 @@ public class OperAccessStatisticsController extends BladeController { @ApiOperation(value = "导出Excel,查询条件参考list接口") @ApiOperationSupport(order = 60) @GetMapping(value = "/exportExcel") + @Operate(label = "检修记录导出",type = com.hnac.hzinfo.log.contants.BusinessType.EXPORT,risk = Risk.NO,ignore = false) public void exportExcel(OperAccessStatisticsDTO req) { service.exportExcel(req); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java index 2ebc882..b0403c4 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java @@ -6,12 +6,16 @@ import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.dto.OperAccessTaskDTO; import com.hnac.hzims.operational.access.dto.OperAccessTaskFlowDTO; import com.hnac.hzims.operational.access.service.IOperAccessTaskService; import com.hnac.hzims.operational.access.vo.OperAccessTaskVO; import com.hnac.hzims.operational.access.vo.RepairBillVO; import com.hnac.hzims.vo.VoteChartVo; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -42,6 +46,7 @@ import java.util.List; @AllArgsConstructor @RequestMapping("/access/task") @Api(tags = "检修任务") +@Business(module = OperationalConstants.APP_NAME,value = "检修任务",ignore = false) public class OperAccessTaskController extends BladeController { private final IOperAccessTaskService service; @@ -52,6 +57,7 @@ public class OperAccessTaskController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 10) @ApiOperation(value = "逻辑删除") + @Operate(label = "检修任务删除",type = com.hnac.hzinfo.log.contants.BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(service.deleteLogic(Func.toLongList(ids))); } @@ -62,6 +68,7 @@ public class OperAccessTaskController extends BladeController { @PostMapping("/save") @ApiOperationSupport(order = 20) @ApiOperation(value = "新增") + @Operate(label = "检修任务删除",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@Valid @RequestBody OperAccessTaskDTO req) { return service.doSave(req); } @@ -72,6 +79,7 @@ public class OperAccessTaskController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 30) @ApiOperation(value = "修改") + @Operate(label = "检修任务修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@Valid @RequestBody OperAccessTaskFlowDTO dto) { return service.doUpdateById(dto.getOperAccessTaskDTO(), dto.getComleteTask(),null); } @@ -83,6 +91,7 @@ public class OperAccessTaskController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 40) @ApiOperation(value = "详情") + @Operate(label = "检修任务详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R detail(@RequestParam Long id) { return service.detail(id); } @@ -98,6 +107,7 @@ public class OperAccessTaskController extends BladeController { BusinessType.GENCODE, action = "分页查询我的检修任务列表") @ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode") + @Operate(label = "检修任务分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(OperAccessTaskDTO req, Query query) { return service.list(req, query); } @@ -112,6 +122,7 @@ public class OperAccessTaskController extends BladeController { BusinessType.GENCODE, action = "分页查询我的检修任务列表") @ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode") + @Operate(label = "检修任务列表分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(@RequestBody OperAccessTaskDTO req) { Query query=new Query(); query.setCurrent(req.getCurrent()); @@ -126,6 +137,7 @@ public class OperAccessTaskController extends BladeController { @GetMapping("/getRepairBill") @ApiOperationSupport(order = 60) @ApiOperation(value = "获取检修台账") + @Operate(label = "获取检修台账",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> getAccessTaskByEmCode(String emCode, String startTime, String endTime) { return R.data(service.getRepairBill(emCode, startTime, endTime)); } @@ -135,6 +147,7 @@ public class OperAccessTaskController extends BladeController { */ @GetMapping("/getAccessListStatistics") @ApiOperation(value = "检修计划统计", notes = "传入时间") + @Operate(label = "检修计划统计",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> getAccessListStatistics(String startTime, String endTime,Long deptId) { if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){ return R.fail("暂无权限查看,请稍后重试"); @@ -148,6 +161,7 @@ public class OperAccessTaskController extends BladeController { */ @GetMapping("/importAccessListStatistics") @ApiOperation(value = "导出", notes = "传入时间") + @Operate(label = "检修计划导出",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false) public void importAccessListStatistics(HttpServletResponse response, String startTime, String endTime,Long deptId) { if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){ throw new ServiceException("暂无权限查看,请稍后重试"); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskDetailController.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskDetailController.java index 6c0c55e..baa10ea 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskDetailController.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskDetailController.java @@ -2,9 +2,14 @@ package com.hnac.hzims.operational.access.controller; import com.baomidou.mybatisplus.core.metadata.IPage; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.operational.OperationalConstants; import com.hnac.hzims.operational.access.dto.OperAccessTaskDetailDTO; import com.hnac.hzims.operational.access.service.IOperAccessTaskDetailService; import com.hnac.hzims.operational.access.vo.OperAccessTaskDetailVO; +import com.hnac.hzinfo.log.annotation.Business; +import com.hnac.hzinfo.log.annotation.Operate; +import com.hnac.hzinfo.log.contants.BusinessType; +import com.hnac.hzinfo.log.contants.Risk; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -28,6 +33,7 @@ import javax.validation.Valid; @AllArgsConstructor @RequestMapping("/access/task/detail") @Api(tags = "检修任务明细") +@Business(module = OperationalConstants.APP_NAME,value = "检修任务明细",ignore = false) public class OperAccessTaskDetailController extends BladeController { private final IOperAccessTaskDetailService service; @@ -38,6 +44,7 @@ public class OperAccessTaskDetailController extends BladeController { @PostMapping("/remove") @ApiOperationSupport(order = 10) @ApiOperation(value = "逻辑删除") + @Operate(label = "检修任务明细删除",type = BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false) public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(service.deleteLogic(Func.toLongList(ids))); } @@ -48,6 +55,7 @@ public class OperAccessTaskDetailController extends BladeController { @PostMapping("/save") @ApiOperationSupport(order = 20) @ApiOperation(value = "新增") + @Operate(label = "检修任务明细新增",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false) public R save(@Valid @RequestBody OperAccessTaskDetailDTO req) { return service.doSave(req); } @@ -58,6 +66,7 @@ public class OperAccessTaskDetailController extends BladeController { @PostMapping("/update") @ApiOperationSupport(order = 30) @ApiOperation(value = "修改") + @Operate(label = "检修任务明细修改",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false) public R update(@Valid @RequestBody OperAccessTaskDetailDTO req) { return R.status(service.updateById(req)); } @@ -68,6 +77,7 @@ public class OperAccessTaskDetailController extends BladeController { @GetMapping("/detail") @ApiOperationSupport(order = 40) @ApiOperation(value = "详情") + @Operate(label = "检修任务明细详情",type = BusinessType.QUERY,risk = Risk.NO,ignore = false) public R detail(@RequestParam Long id) { return service.detail(id); } @@ -79,6 +89,7 @@ public class OperAccessTaskDetailController extends BladeController { @GetMapping("/list") @ApiOperationSupport(order = 50) @ApiOperation(value = "分页 查询参数:taskId,name") + @Operate(label = "检修任务明细分页查询",type = BusinessType.QUERY,risk = Risk.NO,ignore = false) public R> list(OperAccessTaskDetailDTO req, Query query) { return service.list(req, query); } diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java index caf12ae..5c38569 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java @@ -49,14 +49,14 @@ public class MaintenanceTaskRemindHandler { if(CollectionUtil.isNotEmpty(taskEntitySet)) { taskEntitySet.forEach(operMaintenanceTaskEntity -> { OperMaintenanceTaskEntity taskEntity = taskService.getById(operMaintenanceTaskEntity.getId()); - if(ObjectUtil.isNotEmpty(taskEntity) || StringUtil.isBlank(taskEntity.getFlowTaskName())) { + if(ObjectUtil.isEmpty(taskEntity) || StringUtil.isBlank(taskEntity.getFlowTaskName())) { redisTemplate.opsForZSet().remove(RedisKeyConstants.REMIND_TASK_END_LIST,operMaintenanceTaskEntity); } //如果任务仍在待执行则自动结束 else if(Lists.newArrayList("待领用","待执行").contains(taskEntity.getFlowTaskName())) { XxlJobLogger.log("开始执行id为{}的任务", Optional.ofNullable(operMaintenanceTaskEntity.getId()).orElse(0L)); //日常维护任务到期消息提醒,提醒对象:执行人、项目经理角色 取出 - this.sendMessage(taskEntity); + //this.sendMessage(taskEntity); redisTemplate.opsForZSet().remove(RedisKeyConstants.MAINTENANCE_TASK_DELAY_LIST,operMaintenanceTaskEntity); } }); diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceTaskQueryServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceTaskQueryServiceImpl.java index 11c2053..2892717 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceTaskQueryServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceTaskQueryServiceImpl.java @@ -67,7 +67,7 @@ public class MaintenanceTaskQueryServiceImpl implements IMaintenanceTaskQuerySer LambdaQueryWrapper wq = Wrappers.lambdaQuery() .like(OperMaintenanceTaskEntity::getDisposeTime, month) .like(Func.isNotEmpty(deptId),OperMaintenanceTaskEntity::getCreateDept,deptId) - .orderByAsc(OperMaintenanceTaskEntity::getDisposeTime); + .orderByDesc(OperMaintenanceTaskEntity::getDisposeTime); IPage page = maintenanceTaskService.page(Condition.getPage(query), wq); page.setRecords(this.fillTaskQuery(page.getRecords())); return page; @@ -78,7 +78,7 @@ public class MaintenanceTaskQueryServiceImpl implements IMaintenanceTaskQuerySer LambdaQueryWrapper wq = Wrappers.lambdaQuery() .like(OperMaintenanceTaskEntity::getDisposeTime, month) .like(Func.isNotEmpty(deptId),OperMaintenanceTaskEntity::getCreateDept,deptId) - .orderByAsc(OperMaintenanceTaskEntity::getDisposeTime); + .orderByDesc(OperMaintenanceTaskEntity::getDisposeTime); List taskList = maintenanceTaskService.list(wq); if(CollectionUtil.isEmpty(taskList)) { return Lists.newArrayList(); diff --git a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java index d6ef6df..a4b6ff4 100644 --- a/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java +++ b/hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java @@ -6,6 +6,10 @@ import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.TypeReference; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.hnac.hzims.common.constant.CommonConstant; +import com.hnac.hzims.message.MessageConstants; +import com.hnac.hzims.message.dto.BusinessMessageDTO; +import com.hnac.hzims.message.fegin.IMessageClient; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity; import com.hnac.hzims.ticket.repair.mapper.WorkTaskMapper; @@ -66,6 +70,8 @@ public class WorkTaskServiceImpl extends BaseServiceImpl result = sysClient.getDeptName(entity.getCreateDept()); + if (result.isSuccess()) { + message.setDeptName(result.getData()); + } + // 内容 + message.setContent(content); + message.setTenantId(CommonConstant.TENANT_ID); + message.setCreateUser(CommonConstant.SYSTEM_USER); + message.setUserIds(userId); + messageClient.sendAppAndWsMsgByUsers(message); + } } \ No newline at end of file