Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
ty 8 months ago
parent
commit
bc47af3a26
  1. 2
      hzims-service-api/message-api/src/main/java/com/hnac/hzims/message/MessageConstants.java
  2. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessPlanV4Controller.java
  3. 8
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/AccessTaskV4Controller.java
  4. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/ConstructionController.java
  5. 1
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessBaseMaterialController.java
  6. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryController.java
  7. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessLibraryDetailController.java
  8. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessMaterialController.java
  9. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessStatisticsController.java
  10. 14
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskController.java
  11. 11
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/access/controller/OperAccessTaskDetailController.java
  12. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/MaintenanceTaskRemindHandler.java
  13. 4
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/MaintenanceTaskQueryServiceImpl.java
  14. 39
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/service/impl/WorkTaskServiceImpl.java

2
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","检修任务"), OVERHAUL_TASK("overhaul-task","检修任务"),
WORK_TASK("work_task","工作任务单"),
; ;
private String key; private String key;
@Getter @Getter

11
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.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; 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.AccessPlanV4DTO;
import com.hnac.hzims.operational.access.dto.OperAccessPlanListDTO; import com.hnac.hzims.operational.access.dto.OperAccessPlanListDTO;
import com.hnac.hzims.operational.access.service.AccessPlanV4Service; import com.hnac.hzims.operational.access.service.AccessPlanV4Service;
import com.hnac.hzims.operational.access.vo.OperAccessPlanVO; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -25,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/overhaul_plan") @RequestMapping("/overhaul_plan")
@Api(tags = "v4检修计划流程") @Api(tags = "v4检修计划流程")
@Business(module = OperationalConstants.APP_NAME,value = "检修计划",ignore = false)
public class AccessPlanV4Controller extends BladeController { public class AccessPlanV4Controller extends BladeController {
@ -33,6 +39,7 @@ public class AccessPlanV4Controller extends BladeController {
@PostMapping("/overhaul_start_v4") @PostMapping("/overhaul_start_v4")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "v4检修计划流程开启") @ApiOperation(value = "v4检修计划流程开启")
@Operate(label = "检修计划流程开启",type = BusinessType.INSERT,risk = Risk.NO,ignore = false)
public R startV4(@RequestBody AccessPlanV4DTO entity) { public R startV4(@RequestBody AccessPlanV4DTO entity) {
return R.status(service.startProcessV4(entity)); return R.status(service.startProcessV4(entity));
} }
@ -42,6 +49,7 @@ public class AccessPlanV4Controller extends BladeController {
@GetMapping("/pages") @GetMapping("/pages")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "检修计划分页查询") @ApiOperation(value = "检修计划分页查询")
@Operate(label = "检修计划分页查询",type = BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<OperAccessPlanVO>> list(OperAccessPlanListDTO param, Query query) { public R<IPage<OperAccessPlanVO>> list(OperAccessPlanListDTO param, Query query) {
return R.data(service.pages(Condition.getPage(query),param)); return R.data(service.pages(Condition.getPage(query),param));
} }
@ -50,7 +58,8 @@ public class AccessPlanV4Controller extends BladeController {
@ApiLog @ApiLog
@GetMapping("/export") @GetMapping("/export")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "检修计划导出") @ApiOperation(value = "检修任务导出")
@Operate(label = "检修计划分页导出",type = BusinessType.EXPORT,risk = Risk.NO,ignore = false)
public void export(@RequestParam("id") Long id) { public void export(@RequestParam("id") Long id) {
service.export(id); service.export(id);
} }

8
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.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; 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.service.AccessTaskV4Service;
import com.hnac.hzims.operational.access.vo.MyAccessTaskVO; import com.hnac.hzims.operational.access.vo.MyAccessTaskVO;
import com.hnac.hzims.operational.access.vo.OperAccessTaskVO; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -24,6 +30,7 @@ import org.springframework.web.bind.annotation.RestController;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/overhaul_task") @RequestMapping("/overhaul_task")
@Api(tags = "v4检修计划流程") @Api(tags = "v4检修计划流程")
@Business(module = OperationalConstants.APP_NAME,value = "检修任务",ignore = false)
public class AccessTaskV4Controller extends BladeController { public class AccessTaskV4Controller extends BladeController {
private final AccessTaskV4Service accessTaskV4Service; private final AccessTaskV4Service accessTaskV4Service;
@ -32,6 +39,7 @@ public class AccessTaskV4Controller extends BladeController {
@GetMapping("/myAccessTasks") @GetMapping("/myAccessTasks")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "我的检修任务") @ApiOperation(value = "我的检修任务")
@Operate(label = "我的检修任务",type = BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<OperAccessTaskVO>> myAccessTasks(MyAccessTaskVO myAccessTaskVO, Query query) { public R<IPage<OperAccessTaskVO>> myAccessTasks(MyAccessTaskVO myAccessTaskVO, Query query) {
return R.data(accessTaskV4Service.myAccessTasks(myAccessTaskVO.getTaskName(), query)); return R.data(accessTaskV4Service.myAccessTasks(myAccessTaskVO.getTaskName(), query));
} }

11
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.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; 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.entity.OperConstructionEntity;
import com.hnac.hzims.operational.access.service.ConstructionService; import com.hnac.hzims.operational.access.service.ConstructionService;
import com.hnac.hzims.operational.access.vo.ConstructionVo; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -30,6 +34,7 @@ import javax.validation.constraints.NotNull;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/construction") @RequestMapping("/construction")
@Api(tags = "施工日志") @Api(tags = "施工日志")
@Business(module = OperationalConstants.APP_NAME,value = "施工日志",ignore = false)
public class ConstructionController extends BladeController { public class ConstructionController extends BladeController {
@ -38,6 +43,7 @@ public class ConstructionController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "施工日志新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R save(@RequestBody OperConstructionEntity entity) { public R save(@RequestBody OperConstructionEntity entity) {
return R.status(service.accessSave(entity)); return R.status(service.accessSave(entity));
} }
@ -45,6 +51,7 @@ public class ConstructionController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "逻辑删除") @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) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -52,6 +59,7 @@ public class ConstructionController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "详情查询") @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) { public R detail(@ApiParam(value = "主键Id", required = true) @RequestParam Long id) {
return R.data(service.getById(id)); return R.data(service.getById(id));
} }
@ -59,6 +67,7 @@ public class ConstructionController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@Operate(label = "施工日志修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public R update(@Valid @RequestBody OperConstructionEntity entity) { public R update(@Valid @RequestBody OperConstructionEntity entity) {
return R.status(service.updateById(entity)); return R.status(service.updateById(entity));
} }
@ -69,6 +78,7 @@ public class ConstructionController extends BladeController {
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询施工日志") action = "分页查询施工日志")
@ApiOperation(value = "分页") @ApiOperation(value = "分页")
@Operate(label = "施工日志分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<ConstructionVo>> list(ConstructionVo construction, Query query) { public R<IPage<ConstructionVo>> list(ConstructionVo construction, Query query) {
return R.data(service.pageCondition(Condition.getPage(query), construction)); return R.data(service.pageCondition(Condition.getPage(query), construction));
} }
@ -76,6 +86,7 @@ public class ConstructionController extends BladeController {
@GetMapping("/preview") @GetMapping("/preview")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "检修施工日志预览", notes = "检修施工日志预览") @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) { public void preview(@RequestParam @ApiParam("检修施工记录Id") @NotNull @Valid Long id) {
service.preview(id); service.preview(id);
} }

1
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.api.R;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid; import javax.validation.Valid;

12
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.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; 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.OperAccessLibraryDTO;
import com.hnac.hzims.operational.access.dto.OperAccessLibraryListDTO; import com.hnac.hzims.operational.access.dto.OperAccessLibraryListDTO;
import com.hnac.hzims.operational.access.service.IOperAccessLibraryService; import com.hnac.hzims.operational.access.service.IOperAccessLibraryService;
import com.hnac.hzims.operational.access.vo.OperAccessLibraryVO; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -33,6 +37,7 @@ import javax.validation.Valid;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/access/library") @RequestMapping("/access/library")
@Api(tags = "检修库") @Api(tags = "检修库")
@Business(module = OperationalConstants.APP_NAME,value = "检修库",ignore = false)
public class OperAccessLibraryController extends BladeController { public class OperAccessLibraryController extends BladeController {
private final IOperAccessLibraryService service; private final IOperAccessLibraryService service;
@ -43,6 +48,7 @@ public class OperAccessLibraryController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "逻辑删除") @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) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -53,6 +59,7 @@ public class OperAccessLibraryController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "检修库新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R save(@Valid @RequestBody OperAccessLibraryDTO req) { public R save(@Valid @RequestBody OperAccessLibraryDTO req) {
return service.doSave(req); return service.doSave(req);
} }
@ -63,6 +70,7 @@ public class OperAccessLibraryController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@Operate(label = "检修库修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public R update(@Valid @RequestBody OperAccessLibraryDTO req) { public R update(@Valid @RequestBody OperAccessLibraryDTO req) {
return service.doUpdateById(req); return service.doUpdateById(req);
} }
@ -74,6 +82,7 @@ public class OperAccessLibraryController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "检修库详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<OperAccessLibraryVO> detail(@RequestParam Long id) { public R<OperAccessLibraryVO> detail(@RequestParam Long id) {
return service.detail(id); return service.detail(id);
} }
@ -88,6 +97,8 @@ public class OperAccessLibraryController extends BladeController {
@OperationAnnotation(moduleName = "检修管理",title = "检修库",operatorType = OperatorType.MOBILE,businessType = @OperationAnnotation(moduleName = "检修管理",title = "检修库",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页 查询参数:emCode,gradeCode") action = "分页 查询参数:emCode,gradeCode")
@Operate(label = "检修库分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<OperAccessLibraryVO>> list(OperAccessLibraryListDTO req, Query query) { public R<IPage<OperAccessLibraryVO>> list(OperAccessLibraryListDTO req, Query query) {
return service.list(req, query); return service.list(req, query);
} }
@ -102,6 +113,7 @@ public class OperAccessLibraryController extends BladeController {
@ApiOperation(value = "检修库导入") @ApiOperation(value = "检修库导入")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@PostMapping(value = "/import") @PostMapping(value = "/import")
@Operate(label = "检修库导入",type = com.hnac.hzinfo.log.contants.BusinessType.IMPORT,risk = Risk.LOW,ignore = false)
public void libraryImport(@RequestParam MultipartFile file) { public void libraryImport(@RequestParam MultipartFile file) {
service.libraryImport(file); service.libraryImport(file);
} }

10
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.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; 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.dto.OperAccessLibraryDetailDTO;
import com.hnac.hzims.operational.access.service.IOperAccessLibraryDetailService; import com.hnac.hzims.operational.access.service.IOperAccessLibraryDetailService;
import com.hnac.hzims.operational.access.vo.OperAccessLibraryDetailVO; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -31,6 +35,7 @@ import javax.validation.Valid;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/access/library/detail") @RequestMapping("/access/library/detail")
@Api(tags = "检修库明细") @Api(tags = "检修库明细")
@Business(module = OperationalConstants.APP_NAME,value = "检修库明细",ignore = false)
public class OperAccessLibraryDetailController extends BladeController { public class OperAccessLibraryDetailController extends BladeController {
private final IOperAccessLibraryDetailService service; private final IOperAccessLibraryDetailService service;
@ -41,6 +46,7 @@ public class OperAccessLibraryDetailController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除") @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) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -51,6 +57,7 @@ public class OperAccessLibraryDetailController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "检修库明细新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R save(@Valid @RequestBody OperAccessLibraryDetailDTO req) { public R save(@Valid @RequestBody OperAccessLibraryDetailDTO req) {
return service.doSave(req); return service.doSave(req);
} }
@ -61,6 +68,7 @@ public class OperAccessLibraryDetailController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@Operate(label = "检修库明细修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public R update(@Valid @RequestBody OperAccessLibraryDetailDTO req) { public R update(@Valid @RequestBody OperAccessLibraryDetailDTO req) {
return R.status(service.updateById(req)); return R.status(service.updateById(req));
} }
@ -72,6 +80,7 @@ public class OperAccessLibraryDetailController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "检修库明细详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<OperAccessLibraryDetailVO> detail(@RequestParam Long id) { public R<OperAccessLibraryDetailVO> detail(@RequestParam Long id) {
return service.detail(id); return service.detail(id);
} }
@ -86,6 +95,7 @@ public class OperAccessLibraryDetailController extends BladeController {
@OperationAnnotation(moduleName = "检修管理", @OperationAnnotation(moduleName = "检修管理",
title = "检修库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, title = "检修库",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页检修库列表") action = "分页检修库列表")
@Operate(label = "检修库明细分页查询",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<OperAccessLibraryDetailVO>> list(OperAccessLibraryDetailDTO req, Query query) { public R<IPage<OperAccessLibraryDetailVO>> list(OperAccessLibraryDetailDTO req, Query query) {
return service.list(req, query); return service.list(req, query);
} }

11
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.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; 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.dto.OperAccessMaterialDTO;
import com.hnac.hzims.operational.access.service.IOperAccessMaterialService; import com.hnac.hzims.operational.access.service.IOperAccessMaterialService;
import com.hnac.hzims.operational.access.vo.OperAccessMaterialVO; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -28,6 +33,7 @@ import javax.validation.Valid;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/access/material") @RequestMapping("/access/material")
@Api(tags = "检修材料") @Api(tags = "检修材料")
@Business(module = OperationalConstants.APP_NAME,value = "检修材料",ignore = false)
public class OperAccessMaterialController extends BladeController { public class OperAccessMaterialController extends BladeController {
private final IOperAccessMaterialService service; private final IOperAccessMaterialService service;
@ -38,6 +44,7 @@ public class OperAccessMaterialController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除") @ApiOperation(value = "逻辑删除")
@Operate(label = "检修材料删除",type = BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -48,6 +55,7 @@ public class OperAccessMaterialController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "检修材料新增",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R save(@Valid @RequestBody OperAccessMaterialDTO req) { public R save(@Valid @RequestBody OperAccessMaterialDTO req) {
return service.doSave(req); return service.doSave(req);
} }
@ -58,6 +66,7 @@ public class OperAccessMaterialController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@Operate(label = "检修材料修改",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public R update(@Valid @RequestBody OperAccessMaterialDTO req) { public R update(@Valid @RequestBody OperAccessMaterialDTO req) {
return R.status(service.updateById(req)); return R.status(service.updateById(req));
} }
@ -69,6 +78,7 @@ public class OperAccessMaterialController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "检修材料详情",type = BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<OperAccessMaterialVO> detail(@RequestParam Long id) { public R<OperAccessMaterialVO> detail(@RequestParam Long id) {
return service.detail(id); return service.detail(id);
} }
@ -80,6 +90,7 @@ public class OperAccessMaterialController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页 查询参数:materialId,planId") @ApiOperation(value = "分页 查询参数:materialId,planId")
@Operate(label = "检修材料分页查询",type = BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<OperAccessMaterialVO>> list(OperAccessMaterialDTO req, Query query) { public R<IPage<OperAccessMaterialVO>> list(OperAccessMaterialDTO req, Query query) {
return service.list(req, query); return service.list(req, query);
} }

11
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.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; 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.dto.OperAccessStatisticsDTO;
import com.hnac.hzims.operational.access.service.IOperAccessStatisticsService; import com.hnac.hzims.operational.access.service.IOperAccessStatisticsService;
import com.hnac.hzims.operational.access.vo.OperAccessStatisticsVO; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -32,6 +36,7 @@ import javax.validation.Valid;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/access/statistics") @RequestMapping("/access/statistics")
@Api(tags = "检修台账") @Api(tags = "检修台账")
@Business(module = OperationalConstants.APP_NAME,value = "检修台账",ignore = false)
public class OperAccessStatisticsController extends BladeController { public class OperAccessStatisticsController extends BladeController {
private final IOperAccessStatisticsService service; private final IOperAccessStatisticsService service;
@ -42,6 +47,7 @@ public class OperAccessStatisticsController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除") @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) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -52,6 +58,7 @@ public class OperAccessStatisticsController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "检修台账新增",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R save(@Valid @RequestBody OperAccessStatisticsDTO req) { public R save(@Valid @RequestBody OperAccessStatisticsDTO req) {
return service.doSave(req); return service.doSave(req);
} }
@ -62,6 +69,7 @@ public class OperAccessStatisticsController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@Operate(label = "检修台账修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public R update(@Valid @RequestBody OperAccessStatisticsDTO req) { public R update(@Valid @RequestBody OperAccessStatisticsDTO req) {
return R.status(service.updateById(req)); return R.status(service.updateById(req));
} }
@ -72,6 +80,7 @@ public class OperAccessStatisticsController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "检修台账详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<OperAccessStatisticsVO> detail(@RequestParam Long id) { public R<OperAccessStatisticsVO> detail(@RequestParam Long id) {
return service.detail(id); return service.detail(id);
} }
@ -86,6 +95,7 @@ public class OperAccessStatisticsController extends BladeController {
@OperationAnnotation(moduleName = "检修管理",title = "检修记录",operatorType = OperatorType.MOBILE,businessType = @OperationAnnotation(moduleName = "检修管理",title = "检修记录",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询检修记录列表") action = "分页查询检修记录列表")
@Operate(label = "分页查询检修记录列表",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<OperAccessStatisticsVO>> list(OperAccessStatisticsDTO req, Query query) { public R<IPage<OperAccessStatisticsVO>> list(OperAccessStatisticsDTO req, Query query) {
return service.list(req, Condition.getPage(query)); return service.list(req, Condition.getPage(query));
} }
@ -96,6 +106,7 @@ public class OperAccessStatisticsController extends BladeController {
@ApiOperation(value = "导出Excel,查询条件参考list接口") @ApiOperation(value = "导出Excel,查询条件参考list接口")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@GetMapping(value = "/exportExcel") @GetMapping(value = "/exportExcel")
@Operate(label = "检修记录导出",type = com.hnac.hzinfo.log.contants.BusinessType.EXPORT,risk = Risk.NO,ignore = false)
public void exportExcel(OperAccessStatisticsDTO req) { public void exportExcel(OperAccessStatisticsDTO req) {
service.exportExcel(req); service.exportExcel(req);
} }

14
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.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType; 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.OperAccessTaskDTO;
import com.hnac.hzims.operational.access.dto.OperAccessTaskFlowDTO; import com.hnac.hzims.operational.access.dto.OperAccessTaskFlowDTO;
import com.hnac.hzims.operational.access.service.IOperAccessTaskService; import com.hnac.hzims.operational.access.service.IOperAccessTaskService;
import com.hnac.hzims.operational.access.vo.OperAccessTaskVO; import com.hnac.hzims.operational.access.vo.OperAccessTaskVO;
import com.hnac.hzims.operational.access.vo.RepairBillVO; import com.hnac.hzims.operational.access.vo.RepairBillVO;
import com.hnac.hzims.vo.VoteChartVo; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -42,6 +46,7 @@ import java.util.List;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/access/task") @RequestMapping("/access/task")
@Api(tags = "检修任务") @Api(tags = "检修任务")
@Business(module = OperationalConstants.APP_NAME,value = "检修任务",ignore = false)
public class OperAccessTaskController extends BladeController { public class OperAccessTaskController extends BladeController {
private final IOperAccessTaskService service; private final IOperAccessTaskService service;
@ -52,6 +57,7 @@ public class OperAccessTaskController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除") @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) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -62,6 +68,7 @@ public class OperAccessTaskController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "检修任务删除",type = com.hnac.hzinfo.log.contants.BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R save(@Valid @RequestBody OperAccessTaskDTO req) { public R save(@Valid @RequestBody OperAccessTaskDTO req) {
return service.doSave(req); return service.doSave(req);
} }
@ -72,6 +79,7 @@ public class OperAccessTaskController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@Operate(label = "检修任务修改",type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public R update(@Valid @RequestBody OperAccessTaskFlowDTO dto) { public R update(@Valid @RequestBody OperAccessTaskFlowDTO dto) {
return service.doUpdateById(dto.getOperAccessTaskDTO(), dto.getComleteTask(),null); return service.doUpdateById(dto.getOperAccessTaskDTO(), dto.getComleteTask(),null);
} }
@ -83,6 +91,7 @@ public class OperAccessTaskController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "检修任务详情",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<OperAccessTaskVO> detail(@RequestParam Long id) { public R<OperAccessTaskVO> detail(@RequestParam Long id) {
return service.detail(id); return service.detail(id);
} }
@ -98,6 +107,7 @@ public class OperAccessTaskController extends BladeController {
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询我的检修任务列表") action = "分页查询我的检修任务列表")
@ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode") @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<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query) { public R<IPage<OperAccessTaskVO>> list(OperAccessTaskDTO req, Query query) {
return service.list(req, query); return service.list(req, query);
} }
@ -112,6 +122,7 @@ public class OperAccessTaskController extends BladeController {
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询我的检修任务列表") action = "分页查询我的检修任务列表")
@ApiOperation(value = "分页 查询参数:name,code,handler,status,planId,planCode") @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<IPage<OperAccessTaskVO>> list(@RequestBody OperAccessTaskDTO req) { public R<IPage<OperAccessTaskVO>> list(@RequestBody OperAccessTaskDTO req) {
Query query=new Query(); Query query=new Query();
query.setCurrent(req.getCurrent()); query.setCurrent(req.getCurrent());
@ -126,6 +137,7 @@ public class OperAccessTaskController extends BladeController {
@GetMapping("/getRepairBill") @GetMapping("/getRepairBill")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "获取检修台账") @ApiOperation(value = "获取检修台账")
@Operate(label = "获取检修台账",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<List<RepairBillVO>> getAccessTaskByEmCode(String emCode, String startTime, String endTime) { public R<List<RepairBillVO>> getAccessTaskByEmCode(String emCode, String startTime, String endTime) {
return R.data(service.getRepairBill(emCode, startTime, endTime)); return R.data(service.getRepairBill(emCode, startTime, endTime));
} }
@ -135,6 +147,7 @@ public class OperAccessTaskController extends BladeController {
*/ */
@GetMapping("/getAccessListStatistics") @GetMapping("/getAccessListStatistics")
@ApiOperation(value = "检修计划统计", notes = "传入时间") @ApiOperation(value = "检修计划统计", notes = "传入时间")
@Operate(label = "检修计划统计",type = com.hnac.hzinfo.log.contants.BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<List<VoteChartVo>> getAccessListStatistics(String startTime, String endTime,Long deptId) { public R<List<VoteChartVo>> getAccessListStatistics(String startTime, String endTime,Long deptId) {
if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){ if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){
return R.fail("暂无权限查看,请稍后重试"); return R.fail("暂无权限查看,请稍后重试");
@ -148,6 +161,7 @@ public class OperAccessTaskController extends BladeController {
*/ */
@GetMapping("/importAccessListStatistics") @GetMapping("/importAccessListStatistics")
@ApiOperation(value = "导出", notes = "传入时间") @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) { public void importAccessListStatistics(HttpServletResponse response, String startTime, String endTime,Long deptId) {
if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){ if(ObjectUtil.isEmpty(AuthUtil.getUser())||ObjectUtil.isEmpty(AuthUtil.getUser().getUserId())){
throw new ServiceException("暂无权限查看,请稍后重试"); throw new ServiceException("暂无权限查看,请稍后重试");

11
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.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; 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.dto.OperAccessTaskDetailDTO;
import com.hnac.hzims.operational.access.service.IOperAccessTaskDetailService; import com.hnac.hzims.operational.access.service.IOperAccessTaskDetailService;
import com.hnac.hzims.operational.access.vo.OperAccessTaskDetailVO; 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.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
@ -28,6 +33,7 @@ import javax.validation.Valid;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/access/task/detail") @RequestMapping("/access/task/detail")
@Api(tags = "检修任务明细") @Api(tags = "检修任务明细")
@Business(module = OperationalConstants.APP_NAME,value = "检修任务明细",ignore = false)
public class OperAccessTaskDetailController extends BladeController { public class OperAccessTaskDetailController extends BladeController {
private final IOperAccessTaskDetailService service; private final IOperAccessTaskDetailService service;
@ -38,6 +44,7 @@ public class OperAccessTaskDetailController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除") @ApiOperation(value = "逻辑删除")
@Operate(label = "检修任务明细删除",type = BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -48,6 +55,7 @@ public class OperAccessTaskDetailController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "检修任务明细新增",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R save(@Valid @RequestBody OperAccessTaskDetailDTO req) { public R save(@Valid @RequestBody OperAccessTaskDetailDTO req) {
return service.doSave(req); return service.doSave(req);
} }
@ -58,6 +66,7 @@ public class OperAccessTaskDetailController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改") @ApiOperation(value = "修改")
@Operate(label = "检修任务明细修改",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public R update(@Valid @RequestBody OperAccessTaskDetailDTO req) { public R update(@Valid @RequestBody OperAccessTaskDetailDTO req) {
return R.status(service.updateById(req)); return R.status(service.updateById(req));
} }
@ -68,6 +77,7 @@ public class OperAccessTaskDetailController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "检修任务明细详情",type = BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<OperAccessTaskDetailVO> detail(@RequestParam Long id) { public R<OperAccessTaskDetailVO> detail(@RequestParam Long id) {
return service.detail(id); return service.detail(id);
} }
@ -79,6 +89,7 @@ public class OperAccessTaskDetailController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页 查询参数:taskId,name") @ApiOperation(value = "分页 查询参数:taskId,name")
@Operate(label = "检修任务明细分页查询",type = BusinessType.QUERY,risk = Risk.NO,ignore = false)
public R<IPage<OperAccessTaskDetailVO>> list(OperAccessTaskDetailDTO req, Query query) { public R<IPage<OperAccessTaskDetailVO>> list(OperAccessTaskDetailDTO req, Query query) {
return service.list(req, query); return service.list(req, query);
} }

4
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)) { if(CollectionUtil.isNotEmpty(taskEntitySet)) {
taskEntitySet.forEach(operMaintenanceTaskEntity -> { taskEntitySet.forEach(operMaintenanceTaskEntity -> {
OperMaintenanceTaskEntity taskEntity = taskService.getById(operMaintenanceTaskEntity.getId()); 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); redisTemplate.opsForZSet().remove(RedisKeyConstants.REMIND_TASK_END_LIST,operMaintenanceTaskEntity);
} }
//如果任务仍在待执行则自动结束 //如果任务仍在待执行则自动结束
else if(Lists.newArrayList("待领用","待执行").contains(taskEntity.getFlowTaskName())) { else if(Lists.newArrayList("待领用","待执行").contains(taskEntity.getFlowTaskName())) {
XxlJobLogger.log("开始执行id为{}的任务", Optional.ofNullable(operMaintenanceTaskEntity.getId()).orElse(0L)); XxlJobLogger.log("开始执行id为{}的任务", Optional.ofNullable(operMaintenanceTaskEntity.getId()).orElse(0L));
//日常维护任务到期消息提醒,提醒对象:执行人、项目经理角色 取出 //日常维护任务到期消息提醒,提醒对象:执行人、项目经理角色 取出
this.sendMessage(taskEntity); //this.sendMessage(taskEntity);
redisTemplate.opsForZSet().remove(RedisKeyConstants.MAINTENANCE_TASK_DELAY_LIST,operMaintenanceTaskEntity); redisTemplate.opsForZSet().remove(RedisKeyConstants.MAINTENANCE_TASK_DELAY_LIST,operMaintenanceTaskEntity);
} }
}); });

4
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<OperMaintenanceTaskEntity> wq = Wrappers.<OperMaintenanceTaskEntity>lambdaQuery() LambdaQueryWrapper<OperMaintenanceTaskEntity> wq = Wrappers.<OperMaintenanceTaskEntity>lambdaQuery()
.like(OperMaintenanceTaskEntity::getDisposeTime, month) .like(OperMaintenanceTaskEntity::getDisposeTime, month)
.like(Func.isNotEmpty(deptId),OperMaintenanceTaskEntity::getCreateDept,deptId) .like(Func.isNotEmpty(deptId),OperMaintenanceTaskEntity::getCreateDept,deptId)
.orderByAsc(OperMaintenanceTaskEntity::getDisposeTime); .orderByDesc(OperMaintenanceTaskEntity::getDisposeTime);
IPage page = maintenanceTaskService.page(Condition.getPage(query), wq); IPage page = maintenanceTaskService.page(Condition.getPage(query), wq);
page.setRecords(this.fillTaskQuery(page.getRecords())); page.setRecords(this.fillTaskQuery(page.getRecords()));
return page; return page;
@ -78,7 +78,7 @@ public class MaintenanceTaskQueryServiceImpl implements IMaintenanceTaskQuerySer
LambdaQueryWrapper<OperMaintenanceTaskEntity> wq = Wrappers.<OperMaintenanceTaskEntity>lambdaQuery() LambdaQueryWrapper<OperMaintenanceTaskEntity> wq = Wrappers.<OperMaintenanceTaskEntity>lambdaQuery()
.like(OperMaintenanceTaskEntity::getDisposeTime, month) .like(OperMaintenanceTaskEntity::getDisposeTime, month)
.like(Func.isNotEmpty(deptId),OperMaintenanceTaskEntity::getCreateDept,deptId) .like(Func.isNotEmpty(deptId),OperMaintenanceTaskEntity::getCreateDept,deptId)
.orderByAsc(OperMaintenanceTaskEntity::getDisposeTime); .orderByDesc(OperMaintenanceTaskEntity::getDisposeTime);
List<OperMaintenanceTaskEntity> taskList = maintenanceTaskService.list(wq); List<OperMaintenanceTaskEntity> taskList = maintenanceTaskService.list(wq);
if(CollectionUtil.isEmpty(taskList)) { if(CollectionUtil.isEmpty(taskList)) {
return Lists.newArrayList(); return Lists.newArrayList();

39
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.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; 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.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity; import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
import com.hnac.hzims.ticket.repair.mapper.WorkTaskMapper; import com.hnac.hzims.ticket.repair.mapper.WorkTaskMapper;
@ -66,6 +70,8 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
private final IUserClient userClient; private final IUserClient userClient;
private final IMessageClient messageClient;
@Value("${hzims.ticket.workTask.saveWrokTask.work}") @Value("${hzims.ticket.workTask.saveWrokTask.work}")
private String saveWrokTaskWorkPath; private String saveWrokTaskWorkPath;
@ -150,12 +156,18 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
entity.setWorkEndTime(new Date()); entity.setWorkEndTime(new Date());
entity.setTaskName("结束"); entity.setTaskName("结束");
entity.setNextStepOperator("流程结束,无需人员处理"); entity.setNextStepOperator("流程结束,无需人员处理");
return this.updateById(entity);
} }
if(StringUtil.isNotBlank(entity.getLicensorName())){ if(StringUtil.isNotBlank(entity.getLicensorName())){
entity.setLicensorTime(new Date()); entity.setLicensorTime(new Date());
} }
// 更新工作任务单信息 // 更新工作任务单信息
this.updateById(entity); this.updateById(entity);
String content = "您有一条工作任务单待处理!工作任务单编号:".concat(entity.getCode())
.concat(",当前环节:")
.concat(processWorkFlowResponse.getTaskName());
// 发送业务消息
this.sendMessage(entity,processWorkFlowResponse.getUserId(),content);
return true; return true;
} }
@ -325,4 +337,31 @@ public class WorkTaskServiceImpl extends BaseServiceImpl<WorkTaskMapper, WorkTas
queryWrapper.lambda().like(WorkTicketInfoEntity::getCode,ticketCode); queryWrapper.lambda().like(WorkTicketInfoEntity::getCode,ticketCode);
return workTicketInfoService.list(queryWrapper); return workTicketInfoService.list(queryWrapper);
} }
/**
* 推送业务流程消息
* @param entity
* @param userId
* @param content
*/
private void sendMessage(WorkTaskVO entity, String userId, String content) {
BusinessMessageDTO message = new BusinessMessageDTO();
// 计划Id
message.setTaskId(entity.getId());
message.setBusinessClassify(MessageConstants.BusinessClassifyEnum.BUSINESS.getKey());
message.setBusinessKey(MessageConstants.BusinessClassifyEnum.WORK_TASK.getKey());
// 主题
message.setSubject(MessageConstants.BusinessClassifyEnum.WORK_TASK.getDescription());
message.setDeptId(entity.getCreateDept());
R<String> 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);
}
} }
Loading…
Cancel
Save