Browse Source

# 两票模块日志注解添加

zhongwei
haungxing 9 months ago
parent
commit
df17587a98
  1. 19
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/controller/TicketMatterGroupController.java
  2. 11
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java
  3. 22
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java
  4. 9
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/CensController.java
  5. 9
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java
  6. 26
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java

19
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/library/controller/TicketMatterGroupController.java

@ -3,9 +3,7 @@ package com.hnac.hzims.ticket.library.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.ticket.library.dto.TicketMatterGroupDTO; import com.hnac.hzims.ticket.library.dto.TicketMatterGroupDTO;
import com.hnac.hzims.ticket.library.entity.TicketMatterGroupEntity; import com.hnac.hzims.ticket.library.entity.TicketMatterGroupEntity;
import com.hnac.hzims.ticket.library.service.ITicketMatterGroupService; import com.hnac.hzims.ticket.library.service.ITicketMatterGroupService;
@ -13,6 +11,10 @@ import com.hnac.hzims.ticket.library.vo.TicketMatterGroupVO;
import com.hnac.hzims.ticket.library.wrapper.TicketMatterGroupWrapper; import com.hnac.hzims.ticket.library.wrapper.TicketMatterGroupWrapper;
import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto; import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO; import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
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.*; import io.swagger.annotations.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -41,6 +43,7 @@ import java.util.List;
@Slf4j @Slf4j
@Api(value = "安全措施/注意事项分组管理",tags = "安全措施/注意事项分组管理") @Api(value = "安全措施/注意事项分组管理",tags = "安全措施/注意事项分组管理")
@RequestMapping("/ticket/matterGroup") @RequestMapping("/ticket/matterGroup")
@Business(module = TicketConstants.APP_NAME,value = "票据模板管理",ignore = false)
public class TicketMatterGroupController extends BladeController { public class TicketMatterGroupController extends BladeController {
private final ITicketMatterGroupService service; private final ITicketMatterGroupService service;
@ -48,6 +51,7 @@ public class TicketMatterGroupController 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(@RequestParam String ids) { public R remove(@RequestParam String ids) {
return R.status(service.deleteLogic(Func.toLongList(ids))); return R.status(service.deleteLogic(Func.toLongList(ids)));
} }
@ -55,6 +59,7 @@ public class TicketMatterGroupController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增") @ApiOperation(value = "新增")
@Operate(label = "新增票据模板",type = BusinessType.QUERY,ignore = false)
public R save(@Valid @RequestBody TicketMatterGroupDTO req) { public R save(@Valid @RequestBody TicketMatterGroupDTO req) {
return service.doSave(req); return service.doSave(req);
} }
@ -62,6 +67,7 @@ public class TicketMatterGroupController 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 TicketMatterGroupDTO req) { public R update(@Valid @RequestBody TicketMatterGroupDTO req) {
return service.updateById(req); return service.updateById(req);
} }
@ -69,6 +75,7 @@ public class TicketMatterGroupController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "查询票据模板详情",type = BusinessType.QUERY,ignore = false)
public R<TicketMatterGroupVO> detail(@RequestParam Long id) { public R<TicketMatterGroupVO> detail(@RequestParam Long id) {
return service.detail(id); return service.detail(id);
// TicketMatterGroupEntity entity = service.getById(id); // TicketMatterGroupEntity entity = service.getById(id);
@ -82,9 +89,7 @@ public class TicketMatterGroupController extends BladeController {
@GetMapping("/queryList") @GetMapping("/queryList")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页") @ApiOperation(value = "分页")
@OperationAnnotation(moduleName = "两票管理", @Operate(label = "查询票据模板分页列表",type = BusinessType.QUERY,ignore = false)
title = "票据模板",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询票据模板列表")
public R<IPage<TicketMatterGroupVO>> queryList(TicketMatterGroupDTO req, Query query) { public R<IPage<TicketMatterGroupVO>> queryList(TicketMatterGroupDTO req, Query query) {
return service.queryList(req,query); return service.queryList(req,query);
} }
@ -94,6 +99,7 @@ public class TicketMatterGroupController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "查询") @ApiOperation(value = "查询")
@Operate(label = "巡检票据模板列表",type = BusinessType.QUERY,ignore = false)
public R<List<TicketMatterGroupVO>> list(@RequestBody StandardTicketInfoDto req){ public R<List<TicketMatterGroupVO>> list(@RequestBody StandardTicketInfoDto req){
TicketMatterGroupEntity entity = BeanUtil.copy(req,TicketMatterGroupEntity.class); TicketMatterGroupEntity entity = BeanUtil.copy(req,TicketMatterGroupEntity.class);
LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(TicketMatterGroupEntity.class,entity); LambdaQueryWrapper queryWrapper = Condition.getQueryWrapper(TicketMatterGroupEntity.class,entity);
@ -108,6 +114,7 @@ public class TicketMatterGroupController extends BladeController {
@ApiImplicitParam(name = "type", value = "模板类型:2为工作票;1为操作票") @ApiImplicitParam(name = "type", value = "模板类型:2为工作票;1为操作票")
}) })
@ApiOperation(value = "预览") @ApiOperation(value = "预览")
@Operate(label = "票据模板预览",type = BusinessType.QUERY,ignore = false)
public void preview(@RequestParam("id") Long id , HttpServletResponse response) throws Exception { public void preview(@RequestParam("id") Long id , HttpServletResponse response) throws Exception {
service.preview(id, response); service.preview(id, response);
} }

11
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/repair/controller/WorkTaskController.java

@ -2,10 +2,15 @@ package com.hnac.hzims.ticket.repair.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.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity; import com.hnac.hzims.ticket.repair.entity.WorkTaskEntity;
import com.hnac.hzims.ticket.repair.service.IWorkTaskService; import com.hnac.hzims.ticket.repair.service.IWorkTaskService;
import com.hnac.hzims.ticket.repair.vo.WorkTaskVO; import com.hnac.hzims.ticket.repair.vo.WorkTaskVO;
import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity; import com.hnac.hzims.ticket.workTicket.entity.WorkTicketInfoEntity;
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;
@ -29,6 +34,7 @@ import java.util.List;
@RequestMapping("/workTask") @RequestMapping("/workTask")
@Api(value = "工作任务单", tags = "工作任务单") @Api(value = "工作任务单", tags = "工作任务单")
@Validated @Validated
@Business(module = TicketConstants.APP_NAME,value = "工作任务单管理",ignore = false)
public class WorkTaskController extends BladeController { public class WorkTaskController extends BladeController {
private final IWorkTaskService workTaskService; private final IWorkTaskService workTaskService;
@ -36,6 +42,7 @@ public class WorkTaskController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "分页") @ApiOperation(value = "分页")
@Operate(label = "查询工作任务单分页列表", type = BusinessType.QUERY,ignore = false)
public R<IPage<WorkTaskEntity>> pageCondition(WorkTaskVO workTask, Query query) { public R<IPage<WorkTaskEntity>> pageCondition(WorkTaskVO workTask, Query query) {
return R.data(workTaskService.pageCondition(Condition.getPage(query), workTask)); return R.data(workTaskService.pageCondition(Condition.getPage(query), workTask));
} }
@ -43,6 +50,7 @@ public class WorkTaskController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "查询工作任务单详情", type = BusinessType.QUERY,ignore = false)
public R<WorkTaskEntity> detail(@RequestParam Long id) { public R<WorkTaskEntity> detail(@RequestParam Long id) {
return R.data(workTaskService.getById(id)); return R.data(workTaskService.getById(id));
} }
@ -50,6 +58,7 @@ public class WorkTaskController extends BladeController {
@GetMapping("/preview") @GetMapping("/preview")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@ApiOperation(value = "工作任务单预览", notes = "工作任务单预览") @ApiOperation(value = "工作任务单预览", notes = "工作任务单预览")
@Operate(label = "工作任务单预览", type = BusinessType.QUERY,ignore = false)
public void preview(@RequestParam @ApiParam("工作任务单预览主键ID") @NotNull @Valid Long id) { public void preview(@RequestParam @ApiParam("工作任务单预览主键ID") @NotNull @Valid Long id) {
workTaskService.preview(id); workTaskService.preview(id);
} }
@ -57,6 +66,7 @@ public class WorkTaskController extends BladeController {
@GetMapping("/workTicketList") @GetMapping("/workTicketList")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "查询工作票") @ApiOperation(value = "查询工作票")
@Operate(label = "查询工作任务单列表", type = BusinessType.QUERY,ignore = false)
public R<List<WorkTicketInfoEntity>> workTicketList(@RequestParam(value = "ticketCode",required = false) String ticketCode) { public R<List<WorkTicketInfoEntity>> workTicketList(@RequestParam(value = "ticketCode",required = false) String ticketCode) {
return R.data(workTaskService.workTicketList(ticketCode)); return R.data(workTaskService.workTicketList(ticketCode));
} }
@ -64,6 +74,7 @@ public class WorkTaskController extends BladeController {
@PostMapping("/startProcess") @PostMapping("/startProcess")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "工作任务单") @ApiOperation(value = "工作任务单")
@Operate(label = "开启工作任务单流程", type = BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R startV4(@RequestBody WorkTaskVO workTask) { public R startV4(@RequestBody WorkTaskVO workTask) {
return R.status(workTaskService.start(workTask)); return R.status(workTaskService.start(workTask));
} }

22
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/controller/StandardTicketInfoController.java

@ -6,17 +6,19 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; 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.ticket.areamonthly.vo.StandardTicketVo; import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo; import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto; import com.hnac.hzims.ticket.standardTicket.dto.StandardTicketInfoDto;
import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity; import com.hnac.hzims.ticket.standardTicket.entity.StandardTicketInfoEntity;
import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService; import com.hnac.hzims.ticket.standardTicket.service.IStandardTicketInfoService;
import com.hnac.hzims.ticket.standardTicket.vo.OperateVo; import com.hnac.hzims.ticket.standardTicket.vo.OperateVo;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketExportVO; import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketExportVO;
import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO; import com.hnac.hzims.ticket.standardTicket.vo.StandardTicketInfoVO;
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.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@ -54,12 +56,14 @@ import java.util.Map;
@RequestMapping("/standard/ticket") @RequestMapping("/standard/ticket")
@AllArgsConstructor @AllArgsConstructor
@Slf4j @Slf4j
@Business(module = TicketConstants.APP_NAME,value = "操作票管理",ignore = false)
public class StandardTicketInfoController extends BladeController { public class StandardTicketInfoController extends BladeController {
private final IStandardTicketInfoService standardTicketInfoService; private final IStandardTicketInfoService standardTicketInfoService;
@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(@RequestParam Long id, @RequestParam String comment) { public R remove(@RequestParam Long id, @RequestParam String comment) {
return standardTicketInfoService.remove(id, comment); return standardTicketInfoService.remove(id, comment);
} }
@ -67,6 +71,7 @@ public class StandardTicketInfoController 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 StandardTicketInfoDto req) { public R save(@Valid @RequestBody StandardTicketInfoDto req) {
return standardTicketInfoService.doSave(req); return standardTicketInfoService.doSave(req);
} }
@ -74,6 +79,7 @@ public class StandardTicketInfoController 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 StandardTicketInfoDto req) { public R update(@Valid @RequestBody StandardTicketInfoDto req) {
return R.status(standardTicketInfoService.updateById(req)); return R.status(standardTicketInfoService.updateById(req));
} }
@ -81,6 +87,7 @@ public class StandardTicketInfoController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "查询操作票详情",type = BusinessType.QUERY,ignore = false)
public R<StandardTicketInfoVO> detail(@RequestParam Long id) { public R<StandardTicketInfoVO> detail(@RequestParam Long id) {
return standardTicketInfoService.detail(id); return standardTicketInfoService.detail(id);
} }
@ -89,9 +96,7 @@ public class StandardTicketInfoController extends BladeController {
@PostMapping("/queryList") @PostMapping("/queryList")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页") @ApiOperation(value = "分页")
@OperationAnnotation(moduleName = "两票管理", title = "操作票", operatorType = OperatorType.MOBILE, businessType = @Operate(label = "查询操作票分页列表",type = BusinessType.QUERY,ignore = false)
BusinessType.GENCODE,
action = "分页查询操作票列表")
public R<IPage<StandardTicketInfoVO>> queryList(StandardTicketInfoDto req, Query query) { public R<IPage<StandardTicketInfoVO>> queryList(StandardTicketInfoDto req, Query query) {
return standardTicketInfoService.queryList(req, query); return standardTicketInfoService.queryList(req, query);
} }
@ -102,8 +107,7 @@ public class StandardTicketInfoController extends BladeController {
@ApiOperation(value = "操作票导出") @ApiOperation(value = "操作票导出")
@ApiImplicitParams({ @ApiImplicitParams({
}) })
@OperationAnnotation(moduleName = "操作票导出",title = "操作票导出",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action @Operate(label = "导出操作票统计报表",type = BusinessType.EXPORT,ignore = false)
= "操作票导出")
public void exportStandardTicket(HttpServletResponse response,@RequestBody StandardTicketInfoDto req) { public void exportStandardTicket(HttpServletResponse response,@RequestBody StandardTicketInfoDto req) {
try { try {
// if(ObjectUtils.isEmpty(req.getStartTime())&&ObjectUtils.isEmpty(req.getEndTime())){ // if(ObjectUtils.isEmpty(req.getStartTime())&&ObjectUtils.isEmpty(req.getEndTime())){
@ -144,6 +148,7 @@ public class StandardTicketInfoController extends BladeController {
@PostMapping("/list") @PostMapping("/list")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "分页") @ApiOperation(value = "分页")
@Operate(label = "查询操作票列表",type = BusinessType.QUERY,ignore = false)
public R<List<StandardTicketInfoVO>> list(@RequestBody StandardTicketInfoDto req) { public R<List<StandardTicketInfoVO>> list(@RequestBody StandardTicketInfoDto req) {
return R.data(standardTicketInfoService.list(req)); return R.data(standardTicketInfoService.list(req));
} }
@ -195,6 +200,7 @@ public class StandardTicketInfoController extends BladeController {
@GetMapping("/exportOperateTicket") @GetMapping("/exportOperateTicket")
@ApiOperation(value = "导出操作票") @ApiOperation(value = "导出操作票")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
@Operate(label = "预览操作票",type = BusinessType.QUERY,ignore = false)
public void exportOperateTicket(HttpServletResponse response, @RequestParam Long ticketId) throws Exception { public void exportOperateTicket(HttpServletResponse response, @RequestParam Long ticketId) throws Exception {
standardTicketInfoService.exportOperateTicket(response,ticketId); standardTicketInfoService.exportOperateTicket(response,ticketId);
} }

9
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/CensController.java

@ -1,12 +1,16 @@
package com.hnac.hzims.ticket.twoTicket.controller; package com.hnac.hzims.ticket.twoTicket.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.standardTicket.vo.CensParamVo; import com.hnac.hzims.ticket.standardTicket.vo.CensParamVo;
import com.hnac.hzims.ticket.standardTicket.vo.CensVo; import com.hnac.hzims.ticket.standardTicket.vo.CensVo;
import com.hnac.hzims.ticket.standardTicket.vo.CensYearParamVo; import com.hnac.hzims.ticket.standardTicket.vo.CensYearParamVo;
import com.hnac.hzims.ticket.standardTicket.vo.CensYearVo; import com.hnac.hzims.ticket.standardTicket.vo.CensYearVo;
import com.hnac.hzims.ticket.twoTicket.service.CensService; import com.hnac.hzims.ticket.twoTicket.service.CensService;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketInfoVO; import com.hnac.hzims.ticket.workTicket.vo.WorkTicketInfoVO;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
import com.hnac.hzinfo.log.contants.BusinessType;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
@ -22,6 +26,7 @@ import java.util.List;
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@RequestMapping("/bill") @RequestMapping("/bill")
@Business(module = TicketConstants.APP_NAME,value = "两票统计管理",ignore = false)
public class CensController { public class CensController {
private final CensService censService; private final CensService censService;
@ -29,6 +34,7 @@ public class CensController {
@PostMapping("/cens") @PostMapping("/cens")
@ApiOperation("两票统计") @ApiOperation("两票统计")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "查询两票月度统计",type = BusinessType.QUERY,ignore = false)
public R<List<CensVo>> cens(@RequestBody CensParamVo param) { public R<List<CensVo>> cens(@RequestBody CensParamVo param) {
return R.data(censService.cens(param)); return R.data(censService.cens(param));
} }
@ -36,6 +42,7 @@ public class CensController {
@GetMapping ("/censExport") @GetMapping ("/censExport")
@ApiOperation("两票统计导出") @ApiOperation("两票统计导出")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "导出两票月度统计",type = BusinessType.EXPORT,ignore = false)
public void censExport(HttpServletResponse response,CensParamVo param) { public void censExport(HttpServletResponse response,CensParamVo param) {
censService.censExport(response,param); censService.censExport(response,param);
} }
@ -43,6 +50,7 @@ public class CensController {
@PostMapping("/censYear") @PostMapping("/censYear")
@ApiOperation("两票年度统计") @ApiOperation("两票年度统计")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "查询两票年度统计",type = BusinessType.QUERY,ignore = false)
public R<List<CensYearVo>> censYear(@RequestBody CensYearParamVo param) { public R<List<CensYearVo>> censYear(@RequestBody CensYearParamVo param) {
return R.data(censService.censYear(param)); return R.data(censService.censYear(param));
} }
@ -50,6 +58,7 @@ public class CensController {
@GetMapping ("/censYearExport") @GetMapping ("/censYearExport")
@ApiOperation("两票年度统计导出") @ApiOperation("两票年度统计导出")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "导出两票年度统计",type = BusinessType.EXPORT,ignore = false)
public void censYearExport(HttpServletResponse response,CensYearParamVo param) { public void censYearExport(HttpServletResponse response,CensYearParamVo param) {
censService.censYearExport(response,param); censService.censYearExport(response,param);
} }

9
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/controller/TicketProcessController.java

@ -2,8 +2,13 @@ package com.hnac.hzims.ticket.twoTicket.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse; import com.hnac.hzims.middle.process.to.ProcessWorkFlowResponse;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService; import com.hnac.hzims.ticket.twoTicket.service.TicketProcessService;
import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo; import com.hnac.hzims.ticket.twoTicket.vo.process.WorkTicketVo;
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.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -27,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
@RequiredArgsConstructor @RequiredArgsConstructor
@Api(tags = "新工作票") @Api(tags = "新工作票")
@RequestMapping("/ticket-process") @RequestMapping("/ticket-process")
@Business(module = TicketConstants.APP_NAME,value = "工作票流程流程管理",ignore = false)
public class TicketProcessController { public class TicketProcessController {
@ -40,6 +46,7 @@ public class TicketProcessController {
*/ */
@ApiOperation("启动流程") @ApiOperation("启动流程")
@PostMapping("/startUp") @PostMapping("/startUp")
@Operate(label = "工作票开票",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R start(@RequestBody WorkTicketVo workTicketVo) { public R start(@RequestBody WorkTicketVo workTicketVo) {
Long ticketId = ticketProcessService.startUp(workTicketVo); Long ticketId = ticketProcessService.startUp(workTicketVo);
return R.data(ticketId); return R.data(ticketId);
@ -47,6 +54,7 @@ public class TicketProcessController {
@ApiOperation("开启工作票线下流程") @ApiOperation("开启工作票线下流程")
@PostMapping("/startUpOfflineTicket") @PostMapping("/startUpOfflineTicket")
@Operate(label = "线下工作票开票",type = BusinessType.INSERT,risk = Risk.LOW,ignore = false)
public R<Long> startUpOfflineTicket(@RequestBody WorkTicketVo workTicketVo) { public R<Long> startUpOfflineTicket(@RequestBody WorkTicketVo workTicketVo) {
return R.data(ticketProcessService.startUpOfflineTicket(workTicketVo)); return R.data(ticketProcessService.startUpOfflineTicket(workTicketVo));
} }
@ -58,6 +66,7 @@ public class TicketProcessController {
*/ */
@PostMapping("/findPending") @PostMapping("/findPending")
@ApiOperation(value = "工作票待处理") @ApiOperation(value = "工作票待处理")
@Operate(label = "工作票流程处理",type = BusinessType.UPDATE,risk = Risk.LOW,ignore = false)
public Boolean findPending(@RequestBody ProcessWorkFlowResponse response) { public Boolean findPending(@RequestBody ProcessWorkFlowResponse response) {
try { try {
ticketProcessService.findPending(response); ticketProcessService.findPending(response);

26
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/workTicket/controller/WorkTicketInfoController.java

@ -8,12 +8,10 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.invalid.DictInvalid; import com.hnac.hzims.common.invalid.DictInvalid;
import com.hnac.hzims.common.invalid.ObjectRequiredInvalid; import com.hnac.hzims.common.invalid.ObjectRequiredInvalid;
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.ticket.areamonthly.vo.StandardTicketWithAreaVo; import com.hnac.hzims.ticket.areamonthly.vo.StandardTicketWithAreaVo;
import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo; import com.hnac.hzims.ticket.areamonthly.vo.StandardWorkVo;
import com.hnac.hzims.ticket.constants.DictConstants; import com.hnac.hzims.ticket.constants.DictConstants;
import com.hnac.hzims.ticket.constants.TicketConstants;
import com.hnac.hzims.ticket.workTicket.dto.TicketAccessTaskDto; import com.hnac.hzims.ticket.workTicket.dto.TicketAccessTaskDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkInfoFlowDto; import com.hnac.hzims.ticket.workTicket.dto.WorkInfoFlowDto;
import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto; import com.hnac.hzims.ticket.workTicket.dto.WorkTicketInfoDto;
@ -23,6 +21,10 @@ import com.hnac.hzims.ticket.workTicket.vo.WorkTicketBillVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketExportVO; import com.hnac.hzims.ticket.workTicket.vo.WorkTicketExportVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkTicketInfoVO; import com.hnac.hzims.ticket.workTicket.vo.WorkTicketInfoVO;
import com.hnac.hzims.ticket.workTicket.vo.WorkVO; import com.hnac.hzims.ticket.workTicket.vo.WorkVO;
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.*; import io.swagger.annotations.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.log.annotation.ApiLog;
@ -63,6 +65,7 @@ import java.util.Map;
@Api(value = "工作票管理", tags = "工作票管理") @Api(value = "工作票管理", tags = "工作票管理")
@AllArgsConstructor @AllArgsConstructor
@Validated @Validated
@Business(module = TicketConstants.APP_NAME,value = "工作票管理",ignore = false)
public class WorkTicketInfoController { public class WorkTicketInfoController {
private final IWorkTicketInfoService workTicketInfoService; private final IWorkTicketInfoService workTicketInfoService;
@ -72,6 +75,7 @@ public class WorkTicketInfoController {
@GetMapping("/remove") @GetMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除") @ApiOperation(value = "逻辑删除")
@Operate(label = "删除工作票",type = BusinessType.DELETE,risk = Risk.MEDIUM,ignore = false)
public R remove(@RequestParam Long id, @RequestParam String comment) { public R remove(@RequestParam Long id, @RequestParam String comment) {
return workTicketInfoService.remove(id, comment); return workTicketInfoService.remove(id, comment);
} }
@ -102,6 +106,7 @@ public class WorkTicketInfoController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情") @ApiOperation(value = "详情")
@Operate(label = "查询工作票详情",type = BusinessType.QUERY,ignore = false)
public R<WorkTicketInfoVO> detail(@RequestParam Long id) { public R<WorkTicketInfoVO> detail(@RequestParam Long id) {
return workTicketInfoService.detail(id); return workTicketInfoService.detail(id);
} }
@ -113,10 +118,7 @@ public class WorkTicketInfoController {
@PostMapping("/queryList") @PostMapping("/queryList")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页") @ApiOperation(value = "分页")
@OperationAnnotation(moduleName = "两票管理", title = "工作票" @Operate(label = "查询工作票分页列表",type = BusinessType.QUERY,ignore = false)
, operatorType = OperatorType.MOBILE, businessType =
BusinessType.GENCODE,
action = "分页查询工作票列表")
public R<IPage<WorkTicketInfoVO>> queryList(WorkTicketInfoDto req, Query query) { public R<IPage<WorkTicketInfoVO>> queryList(WorkTicketInfoDto req, Query query) {
return workTicketInfoService.queryList(req, query); return workTicketInfoService.queryList(req, query);
} }
@ -125,6 +127,7 @@ public class WorkTicketInfoController {
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiImplicitParam(name = "req", value = "工作票dto对象,导出传参id进入即可") @ApiImplicitParam(name = "req", value = "工作票dto对象,导出传参id进入即可")
@ApiOperation(value = "导出工作票pdf文档") @ApiOperation(value = "导出工作票pdf文档")
@Operate(label = "导出工作票pdf文件",type = BusinessType.EXPORT,ignore = false)
public void exportWorkTicketInfoPdf(@RequestParam Long id, HttpServletResponse response) { public void exportWorkTicketInfoPdf(@RequestParam Long id, HttpServletResponse response) {
workTicketInfoService.exportWorkTicketInfoPdf(id, response); workTicketInfoService.exportWorkTicketInfoPdf(id, response);
} }
@ -134,8 +137,7 @@ public class WorkTicketInfoController {
@ApiOperation(value = "工作票导出") @ApiOperation(value = "工作票导出")
@ApiImplicitParams({ @ApiImplicitParams({
}) })
@OperationAnnotation(moduleName = "工作票导出",title = "工作票导出",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,action @Operate(label = "导出工作票",type = BusinessType.EXPORT,ignore = false)
= "工作票导出")
public void exportWorkTicket(HttpServletResponse response,@RequestBody WorkTicketInfoDto req) { public void exportWorkTicket(HttpServletResponse response,@RequestBody WorkTicketInfoDto req) {
try { try {
// if(ObjectUtils.isEmpty(req.getStartTime())&&ObjectUtils.isEmpty(req.getEndTime())){ // if(ObjectUtils.isEmpty(req.getStartTime())&&ObjectUtils.isEmpty(req.getEndTime())){
@ -187,8 +189,7 @@ public class WorkTicketInfoController {
@PostMapping("/completeTask") @PostMapping("/completeTask")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
@ApiOperation(value = "执行工作流任务") @ApiOperation(value = "执行工作流任务")
public R completeTask(@RequestBody @ObjectRequiredInvalid(attributes = {"req.id", "req.status", "flow.processInstanceId", "flow.taskId", "flow.flag"}) public R completeTask(@RequestBody WorkInfoFlowDto workInfoFlowDto) {
@DictInvalid(dictKey = DictConstants.FIRST_TICKET_FLOW, attribute = "req.status") WorkInfoFlowDto workInfoFlowDto) {
return workTicketInfoService.completeTask(workInfoFlowDto.getReq(), workInfoFlowDto.getFlow()); return workTicketInfoService.completeTask(workInfoFlowDto.getReq(), workInfoFlowDto.getFlow());
} }
@ -216,9 +217,6 @@ public class WorkTicketInfoController {
@ApiLog @ApiLog
@GetMapping("/userListByRoleAlias") @GetMapping("/userListByRoleAlias")
@ApiOperationSupport(order = 100) @ApiOperationSupport(order = 100)
@OperationAnnotation(moduleName = "两票管理",
title = "工作票", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE,
action = "获取某机构下角色的人员列表")
@ApiOperation(value = "获取某机构下角色的人员列表") @ApiOperation(value = "获取某机构下角色的人员列表")
public R userListByRoleAlias(@RequestParam("roleAlias") @ApiParam("角色别称") String roleAlias) { public R userListByRoleAlias(@RequestParam("roleAlias") @ApiParam("角色别称") String roleAlias) {
IUserClient userClient = SpringUtil.getBean(IUserClient.class); IUserClient userClient = SpringUtil.getBean(IUserClient.class);

Loading…
Cancel
Save