Browse Source

update: safeproduct添加日志注解

zhongwei
liwen 8 months ago
parent
commit
3c9d6ce3c5
  1. 17
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/AccidentController.java
  2. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/BaseController.java
  3. 43
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java
  4. 16
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckCompanyController.java
  5. 20
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckItemController.java
  6. 15
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckMonthController.java
  7. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckNoticeController.java
  8. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckQuarterController.java
  9. 17
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java
  10. 8
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/DangerSourceLevelRecordController.java
  11. 11
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/EmergencyPlanController.java
  12. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/EmergencyPlanTypeController.java
  13. 19
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java
  14. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ImsMonAlarmInfoController.java
  15. 13
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ImsMonCameraInfoController.java
  16. 19
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java
  17. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ReviewController.java
  18. 12
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafeEquipmentTrialController.java
  19. 10
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafeReportController.java
  20. 16
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolController.java
  21. 7
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolRecheckController.java
  22. 14
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolTypeController.java
  23. 15
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SpecialDeviceController.java
  24. 11
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SystemFileController.java
  25. 13
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SystemFileTypeController.java
  26. 29
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java

17
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/AccidentController.java

@ -6,21 +6,22 @@ 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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.AccidentDTO; import com.hnac.hzims.safeproduct.dto.AccidentDTO;
import com.hnac.hzims.safeproduct.entity.AccidentEntity; import com.hnac.hzims.safeproduct.entity.AccidentEntity;
import com.hnac.hzims.safeproduct.service.IAccidentService; import com.hnac.hzims.safeproduct.service.IAccidentService;
import com.hnac.hzims.safeproduct.vo.AccidentVO; import com.hnac.hzims.safeproduct.vo.AccidentVO;
import com.hnac.hzims.safeproduct.wrapper.AccidentWrapper; import com.hnac.hzims.safeproduct.wrapper.AccidentWrapper;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
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;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.log.annotation.ApiLog; import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.log.exception.ServiceException;
import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.oss.model.BladeFile;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil; import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
@ -29,14 +30,9 @@ import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.resource.feign.IOssClient; import org.springblade.resource.feign.IOssClient;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
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;
import java.util.List; import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
/** /**
* @author hx * @author hx
@ -45,15 +41,18 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
@Slf4j @Slf4j
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/accident") @RequestMapping("/accident")
@Business(module = Constants.APP_NAME, value = "事故管理", ignore = false)
@Api(value = "事故管理", tags = "事故管理") @Api(value = "事故管理", tags = "事故管理")
public class AccidentController extends BladeController { public class AccidentController extends BladeController {
private final IAccidentService accidentService; private final IAccidentService accidentService;
private final IOssClient ossClient; private final IOssClient ossClient;
@PostMapping("/save") @PostMapping("/save")
@ApiOperation("事故管理保存") @ApiOperation("事故管理保存")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增事故", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody @Valid AccidentDTO req) { public R save(@RequestBody @Valid AccidentDTO req) {
AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class); AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class);
accidentService.save(accidentEntity); accidentService.save(accidentEntity);
@ -63,6 +62,7 @@ public class AccidentController extends BladeController {
@GetMapping("/detail/{id}") @GetMapping("/detail/{id}")
@ApiOperation("事故管理查询详情") @ApiOperation("事故管理查询详情")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "事故详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<AccidentVO> detail(@PathVariable(value = "id") Long id) { public R<AccidentVO> detail(@PathVariable(value = "id") Long id) {
AccidentEntity accidentEntity = accidentService.getById(id); AccidentEntity accidentEntity = accidentService.getById(id);
return R.data(AccidentWrapper.build().entityVO(accidentEntity)); return R.data(AccidentWrapper.build().entityVO(accidentEntity));
@ -72,6 +72,7 @@ public class AccidentController extends BladeController {
@ApiOperation("根据ID修改事故") @ApiOperation("根据ID修改事故")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Operate(label = "修改事故", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R updateById(@RequestBody @Valid AccidentDTO req) { public R updateById(@RequestBody @Valid AccidentDTO req) {
AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class); AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class);
return R.status(accidentService.updateById(accidentEntity)); return R.status(accidentService.updateById(accidentEntity));
@ -80,6 +81,7 @@ public class AccidentController extends BladeController {
@PutMapping("/remove/{ids}") @PutMapping("/remove/{ids}")
@ApiOperation("删除事故管理,id按逗号分隔") @ApiOperation("删除事故管理,id按逗号分隔")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "逻辑删除事故", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, ignore = false)
public R remove(@PathVariable(value = "ids") @Valid String ids) { public R remove(@PathVariable(value = "ids") @Valid String ids) {
List<Long> idList = Func.toLongList(ids); List<Long> idList = Func.toLongList(ids);
return R.status(accidentService.deleteLogic(idList)); return R.status(accidentService.deleteLogic(idList));
@ -92,6 +94,7 @@ public class AccidentController 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, ignore = false)
public R<IPage> pageList(AccidentDTO req, Query query) { public R<IPage> pageList(AccidentDTO req, Query query) {
AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class); AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class);
LambdaQueryWrapper<AccidentEntity> queryWrapper = Condition.getQueryWrapper(new AccidentEntity(), accidentEntity); LambdaQueryWrapper<AccidentEntity> queryWrapper = Condition.getQueryWrapper(new AccidentEntity(), accidentEntity);

7
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/BaseController.java

@ -1,7 +1,11 @@
package com.hnac.hzims.safeproduct.controller; package com.hnac.hzims.safeproduct.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.constants.SafeProductConstant; import com.hnac.hzims.safeproduct.constants.SafeProductConstant;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -28,6 +32,7 @@ import java.util.List;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/base") @RequestMapping("/base")
@Business(module = Constants.APP_NAME, value = "公用业务", ignore = false)
@Api(value = "公用业务", tags = "公用业务接口") @Api(value = "公用业务", tags = "公用业务接口")
public class BaseController extends BladeController { public class BaseController extends BladeController {
@ -38,6 +43,7 @@ public class BaseController extends BladeController {
@GetMapping("/getDeptName") @GetMapping("/getDeptName")
@ApiOperation(value = "获取所属机构名") @ApiOperation(value = "获取所属机构名")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "获取所属机构名", type = BusinessType.QUERY, ignore = false)
public R<String> getDeptName() { public R<String> getDeptName() {
BladeUser bladeUser = getUser(); BladeUser bladeUser = getUser();
String deptId = bladeUser.getDeptId(); String deptId = bladeUser.getDeptId();
@ -50,6 +56,7 @@ public class BaseController extends BladeController {
@GetMapping("/getUserList") @GetMapping("/getUserList")
@ApiOperation(value = "获取用户列表") @ApiOperation(value = "获取用户列表")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "获取用户列表", type = BusinessType.QUERY, ignore = false)
public R<List<User>> getUserList(@RequestParam String name) { public R<List<User>> getUserList(@RequestParam String name) {
return userClient.userListByCodeAndNameAndAccount(SafeProductConstant.TENANT_ID, null, name, null); return userClient.userListByCodeAndNameAndAccount(SafeProductConstant.TENANT_ID, null, name, null);
} }

43
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CarController.java

@ -3,12 +3,16 @@ package com.hnac.hzims.safeproduct.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.common.utils.Condition; import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CarCheckRecordDTO; import com.hnac.hzims.safeproduct.dto.CarCheckRecordDTO;
import com.hnac.hzims.safeproduct.dto.CarMaintenanceConfirmationDTO; import com.hnac.hzims.safeproduct.dto.CarMaintenanceConfirmationDTO;
import com.hnac.hzims.safeproduct.dto.CarUsedRecordConfirmationDTO; import com.hnac.hzims.safeproduct.dto.CarUsedRecordConfirmationDTO;
import com.hnac.hzims.safeproduct.entity.*; import com.hnac.hzims.safeproduct.entity.*;
import com.hnac.hzims.safeproduct.service.*; import com.hnac.hzims.safeproduct.service.*;
import com.hnac.hzims.safeproduct.vo.*; import com.hnac.hzims.safeproduct.vo.*;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -34,6 +38,7 @@ import java.util.Map;
@RestController @RestController
@RequestMapping("/car") @RequestMapping("/car")
@AllArgsConstructor @AllArgsConstructor
@Business(module = Constants.APP_NAME, value = "车辆管理", ignore = false)
@Api(value = "车辆管理", tags = "车辆管理接口") @Api(value = "车辆管理", tags = "车辆管理接口")
public class CarController extends BladeController { public class CarController extends BladeController {
@ -52,6 +57,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCar") @PostMapping("/saveCar")
@ApiOperation(value = "新增车辆") @ApiOperation(value = "新增车辆")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增车辆", type = BusinessType.INSERT, ignore = false)
public R saveCar(@Valid @RequestBody CarEntity carEntity) { public R saveCar(@Valid @RequestBody CarEntity carEntity) {
return carService.saveCar(carEntity); return carService.saveCar(carEntity);
} }
@ -59,6 +65,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCar") @PostMapping("/updateCar")
@ApiOperation(value = "修改车辆") @ApiOperation(value = "修改车辆")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "修改车辆", type = BusinessType.UPDATE, ignore = false)
public R updateCar(@Valid @RequestBody CarEntity carEntity) { public R updateCar(@Valid @RequestBody CarEntity carEntity) {
return carService.updateCar(carEntity); return carService.updateCar(carEntity);
} }
@ -66,6 +73,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCar") @PostMapping("/removeCar")
@ApiOperation(value = "删除车辆") @ApiOperation(value = "删除车辆")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "删除车辆", type = BusinessType.DELETE, ignore = false)
public R removeCar(@RequestParam Long id) { public R removeCar(@RequestParam Long id) {
return R.status(carService.removeCar(id)); return R.status(carService.removeCar(id));
} }
@ -73,6 +81,7 @@ public class CarController extends BladeController {
@GetMapping("/carDetail") @GetMapping("/carDetail")
@ApiOperation(value = "车辆详情") @ApiOperation(value = "车辆详情")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "车辆详情", type = BusinessType.QUERY, ignore = false)
public R<CarEntity> carDetail(@RequestParam Long id) { public R<CarEntity> carDetail(@RequestParam Long id) {
return R.data(carService.getById(id)); return R.data(carService.getById(id));
} }
@ -84,6 +93,7 @@ public class CarController extends BladeController {
}) })
@ApiOperation(value = "车辆分页") @ApiOperation(value = "车辆分页")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@Operate(label = "车辆分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarEntity>> carPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<CarEntity>> carPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarEntity> page = carService.page(Condition.getPage(query), Condition.getQueryWrapper(param, CarEntity.class) IPage<CarEntity> page = carService.page(Condition.getPage(query), Condition.getQueryWrapper(param, CarEntity.class)
.lambda().orderByDesc(CarEntity::getCreateTime)); .lambda().orderByDesc(CarEntity::getCreateTime));
@ -93,6 +103,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarMaintenance") @PostMapping("/saveCarMaintenance")
@ApiOperation(value = "新增车辆维保记录") @ApiOperation(value = "新增车辆维保记录")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Operate(label = "新增车辆维保记录", type = BusinessType.INSERT, ignore = false)
public R saveCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) { public R saveCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) {
return R.status(carMaintenanceService.saveCarMaintenance(carMaintenanceEntity)); return R.status(carMaintenanceService.saveCarMaintenance(carMaintenanceEntity));
} }
@ -100,6 +111,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarMaintenance") @PostMapping("/updateCarMaintenance")
@ApiOperation(value = "修改车辆维保记录") @ApiOperation(value = "修改车辆维保记录")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@Operate(label = "修改车辆维保记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) { public R updateCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) {
return carMaintenanceService.updateCarMaintenance(carMaintenanceEntity); return carMaintenanceService.updateCarMaintenance(carMaintenanceEntity);
} }
@ -107,6 +119,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarMaintenance") @PostMapping("/removeCarMaintenance")
@ApiOperation(value = "删除车辆维保记录") @ApiOperation(value = "删除车辆维保记录")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@Operate(label = "删除车辆维保记录", type = BusinessType.DELETE, ignore = false)
public R removeCarMaintenance(@RequestParam Long id) { public R removeCarMaintenance(@RequestParam Long id) {
return R.status(carMaintenanceService.removeById(id)); return R.status(carMaintenanceService.removeById(id));
} }
@ -114,6 +127,7 @@ public class CarController extends BladeController {
@GetMapping("/carMaintenanceDetail") @GetMapping("/carMaintenanceDetail")
@ApiOperation(value = "车辆维保记录详情") @ApiOperation(value = "车辆维保记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@Operate(label = "车辆维保记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarMaintenanceDetailVO> carMaintenanceDetail(@RequestParam Long id) { public R<CarMaintenanceDetailVO> carMaintenanceDetail(@RequestParam Long id) {
return R.data(carMaintenanceService.getCarMaintenance(id)); return R.data(carMaintenanceService.getCarMaintenance(id));
} }
@ -128,6 +142,7 @@ public class CarController extends BladeController {
}) })
@ApiOperation(value = "车辆维保记录分页") @ApiOperation(value = "车辆维保记录分页")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@Operate(label = "车辆维保记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarMaintenancePageVO>> carMaintenancePage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<CarMaintenancePageVO>> carMaintenancePage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarMaintenancePageVO> page = carMaintenanceService.getCarMaintenancePage(param, query); IPage<CarMaintenancePageVO> page = carMaintenanceService.getCarMaintenancePage(param, query);
return R.data(page); return R.data(page);
@ -136,6 +151,7 @@ public class CarController extends BladeController {
@PostMapping("/confirmCarMaintenance") @PostMapping("/confirmCarMaintenance")
@ApiOperation(value = "车辆维保记录确认") @ApiOperation(value = "车辆维保记录确认")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 11)
@Operate(label = "车辆维保记录确认", type = BusinessType.UPDATE, ignore = false)
public R confirmCarMaintenance(@Valid @RequestBody CarMaintenanceConfirmationDTO confirmationDTO) { public R confirmCarMaintenance(@Valid @RequestBody CarMaintenanceConfirmationDTO confirmationDTO) {
return carMaintenanceService.confirmCarMaintenance(confirmationDTO); return carMaintenanceService.confirmCarMaintenance(confirmationDTO);
} }
@ -143,6 +159,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarUsedRecord") @PostMapping("/saveCarUsedRecord")
@ApiOperation(value = "新增用车记录") @ApiOperation(value = "新增用车记录")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
@Operate(label = "新增用车记录", type = BusinessType.INSERT, ignore = false)
public R saveCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) { public R saveCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) {
return R.status(carUsedRecordService.saveCarUsedRecord(carUsedRecordEntity)); return R.status(carUsedRecordService.saveCarUsedRecord(carUsedRecordEntity));
} }
@ -150,6 +167,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarUsedRecord") @PostMapping("/updateCarUsedRecord")
@ApiOperation(value = "修改用车记录") @ApiOperation(value = "修改用车记录")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
@Operate(label = "修改用车记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) { public R updateCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) {
return carUsedRecordService.updateCarUsedRecord(carUsedRecordEntity); return carUsedRecordService.updateCarUsedRecord(carUsedRecordEntity);
} }
@ -157,6 +175,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarUsedRecord") @PostMapping("/removeCarUsedRecord")
@ApiOperation(value = "删除用车记录") @ApiOperation(value = "删除用车记录")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 14)
@Operate(label = "删除用车记录", type = BusinessType.DELETE, ignore = false)
public R removeCarUsedRecord(@RequestParam Long id) { public R removeCarUsedRecord(@RequestParam Long id) {
return R.status(carUsedRecordService.removeById(id)); return R.status(carUsedRecordService.removeById(id));
} }
@ -164,6 +183,7 @@ public class CarController extends BladeController {
@GetMapping("/carUsedRecordDetail") @GetMapping("/carUsedRecordDetail")
@ApiOperation(value = "用车记录详情") @ApiOperation(value = "用车记录详情")
@ApiOperationSupport(order = 15) @ApiOperationSupport(order = 15)
@Operate(label = "用车记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarUsedRecordDetailVO> carUsedRecordDetail(@RequestParam Long id) { public R<CarUsedRecordDetailVO> carUsedRecordDetail(@RequestParam Long id) {
return R.data(carUsedRecordService.getCarUsedRecord(id)); return R.data(carUsedRecordService.getCarUsedRecord(id));
} }
@ -178,6 +198,7 @@ public class CarController extends BladeController {
}) })
@ApiOperation(value = "用车记录分页") @ApiOperation(value = "用车记录分页")
@ApiOperationSupport(order = 16) @ApiOperationSupport(order = 16)
@Operate(label = "用车记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarUsedRecordPageVO>> carUsedRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<CarUsedRecordPageVO>> carUsedRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarUsedRecordPageVO> page = carUsedRecordService.getCarUsedRecordPage(param, query); IPage<CarUsedRecordPageVO> page = carUsedRecordService.getCarUsedRecordPage(param, query);
return R.data(page); return R.data(page);
@ -186,6 +207,7 @@ public class CarController extends BladeController {
@PostMapping("/confirmCarUsedRecord") @PostMapping("/confirmCarUsedRecord")
@ApiOperation(value = "用车记录确认") @ApiOperation(value = "用车记录确认")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 17)
@Operate(label = "用车记录确认", type = BusinessType.UPDATE, ignore = false)
public R confirmCarUsedRecord(@Valid @RequestBody CarUsedRecordConfirmationDTO confirmationDTO) { public R confirmCarUsedRecord(@Valid @RequestBody CarUsedRecordConfirmationDTO confirmationDTO) {
return carUsedRecordService.confirmCarUsedRecord(confirmationDTO); return carUsedRecordService.confirmCarUsedRecord(confirmationDTO);
} }
@ -193,6 +215,7 @@ public class CarController extends BladeController {
@GetMapping("/milesDataByYear") @GetMapping("/milesDataByYear")
@ApiOperation(value = "年度里程数据") @ApiOperation(value = "年度里程数据")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 18)
@Operate(label = "年度里程数据", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarMilesYearVO>> milesDataByYear(@RequestParam String year, String unit, Query query) { public R<IPage<CarMilesYearVO>> milesDataByYear(@RequestParam String year, String unit, Query query) {
IPage<CarMilesYearVO> page = carService.milesDataByYear(year, unit, query); IPage<CarMilesYearVO> page = carService.milesDataByYear(year, unit, query);
return R.data(page); return R.data(page);
@ -201,6 +224,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarCheckRecord") @PostMapping("/saveCarCheckRecord")
@ApiOperation(value = "新增车检记录") @ApiOperation(value = "新增车检记录")
@ApiOperationSupport(order = 19) @ApiOperationSupport(order = 19)
@Operate(label = "新增车检记录", type = BusinessType.INSERT, ignore = false)
public R saveCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) { public R saveCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) {
return R.status(carCheckRecordService.saveCarCheckRecord(carCheckRecordDTO)); return R.status(carCheckRecordService.saveCarCheckRecord(carCheckRecordDTO));
} }
@ -208,6 +232,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarCheckRecord") @PostMapping("/updateCarCheckRecord")
@ApiOperation(value = "修改车检记录") @ApiOperation(value = "修改车检记录")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@Operate(label = "修改车检记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) { public R updateCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) {
return R.status(carCheckRecordService.updateCarCheckRecord(carCheckRecordDTO)); return R.status(carCheckRecordService.updateCarCheckRecord(carCheckRecordDTO));
} }
@ -215,6 +240,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarCheckRecord") @PostMapping("/removeCarCheckRecord")
@ApiOperation(value = "删除车检记录") @ApiOperation(value = "删除车检记录")
@ApiOperationSupport(order = 21) @ApiOperationSupport(order = 21)
@Operate(label = "删除车检记录", type = BusinessType.DELETE, ignore = false)
public R removeCarCheckRecord(@RequestParam Long id) { public R removeCarCheckRecord(@RequestParam Long id) {
return R.status(carCheckRecordService.removeCarCheckRecord(id)); return R.status(carCheckRecordService.removeCarCheckRecord(id));
} }
@ -222,6 +248,7 @@ public class CarController extends BladeController {
@GetMapping("/carCheckRecordDetail") @GetMapping("/carCheckRecordDetail")
@ApiOperation(value = "车检记录详情") @ApiOperation(value = "车检记录详情")
@ApiOperationSupport(order = 22) @ApiOperationSupport(order = 22)
@Operate(label = "车检记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarCheckRecordDetailVO> carCheckRecordDetail(@RequestParam Long id) { public R<CarCheckRecordDetailVO> carCheckRecordDetail(@RequestParam Long id) {
return R.data(carCheckRecordService.getCarCheckRecord(id)); return R.data(carCheckRecordService.getCarCheckRecord(id));
} }
@ -236,6 +263,7 @@ public class CarController extends BladeController {
}) })
@ApiOperation(value = "车检记录分页") @ApiOperation(value = "车检记录分页")
@ApiOperationSupport(order = 23) @ApiOperationSupport(order = 23)
@Operate(label = "车检记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarCheckRecordPageVO>> carCheckRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<CarCheckRecordPageVO>> carCheckRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarCheckRecordPageVO> page = carCheckRecordService.getCarCheckRecordPage(param, query); IPage<CarCheckRecordPageVO> page = carCheckRecordService.getCarCheckRecordPage(param, query);
return R.data(page); return R.data(page);
@ -244,6 +272,7 @@ public class CarController extends BladeController {
@GetMapping("/exportCarMaintenanceData") @GetMapping("/exportCarMaintenanceData")
@ApiOperation(value = "导出车辆维保记录单") @ApiOperation(value = "导出车辆维保记录单")
@ApiOperationSupport(order = 24) @ApiOperationSupport(order = 24)
@Operate(label = "导出车辆维保记录单", type = BusinessType.EXPORT, ignore = false)
public void exportCarMaintenanceData(@RequestParam Long id, HttpServletResponse response) { public void exportCarMaintenanceData(@RequestParam Long id, HttpServletResponse response) {
carMaintenanceService.exportCarMaintenanceData(id, response); carMaintenanceService.exportCarMaintenanceData(id, response);
} }
@ -251,6 +280,7 @@ public class CarController extends BladeController {
@GetMapping("/exportCarUsedRecordData") @GetMapping("/exportCarUsedRecordData")
@ApiOperation(value = "导出用车记录单") @ApiOperation(value = "导出用车记录单")
@ApiOperationSupport(order = 25) @ApiOperationSupport(order = 25)
@Operate(label = "导出用车记录单", type = BusinessType.EXPORT, ignore = false)
public void exportCarUsedRecordData(@RequestParam Long id, HttpServletResponse response) { public void exportCarUsedRecordData(@RequestParam Long id, HttpServletResponse response) {
carUsedRecordService.exportCarUsedRecordData(id, response); carUsedRecordService.exportCarUsedRecordData(id, response);
} }
@ -258,6 +288,7 @@ public class CarController extends BladeController {
@GetMapping("/exportCarCheckRecordData") @GetMapping("/exportCarCheckRecordData")
@ApiOperation(value = "导出车检记录单") @ApiOperation(value = "导出车检记录单")
@ApiOperationSupport(order = 26) @ApiOperationSupport(order = 26)
@Operate(label = "导出车检记录单", type = BusinessType.EXPORT, ignore = false)
public void exportCarCheckRecordData(@RequestParam Long id, HttpServletResponse response) { public void exportCarCheckRecordData(@RequestParam Long id, HttpServletResponse response) {
carCheckRecordService.exportCarCheckRecordData(id, response); carCheckRecordService.exportCarCheckRecordData(id, response);
} }
@ -269,6 +300,7 @@ public class CarController extends BladeController {
}) })
@ApiOperation(value = "导出年度里程数据") @ApiOperation(value = "导出年度里程数据")
@ApiOperationSupport(order = 27) @ApiOperationSupport(order = 27)
@Operate(label = "导出年度里程数据", type = BusinessType.EXPORT, ignore = false)
public void exportCarMilesData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) { public void exportCarMilesData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) {
carService.exportCarMilesData(param, query, response); carService.exportCarMilesData(param, query, response);
} }
@ -276,6 +308,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarAnnualInspection") @PostMapping("/saveCarAnnualInspection")
@ApiOperation(value = "新增年检记录") @ApiOperation(value = "新增年检记录")
@ApiOperationSupport(order = 28) @ApiOperationSupport(order = 28)
@Operate(label = "新增年检记录", type = BusinessType.INSERT, ignore = false)
public R saveCarAnnualInspection(@Valid @RequestBody CarAnnualInspectionEntity carAnnualInspectionEntity) { public R saveCarAnnualInspection(@Valid @RequestBody CarAnnualInspectionEntity carAnnualInspectionEntity) {
return R.status(carAnnualInspectionService.saveCarAnnualInspection(carAnnualInspectionEntity)); return R.status(carAnnualInspectionService.saveCarAnnualInspection(carAnnualInspectionEntity));
} }
@ -283,6 +316,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarAnnualInspection") @PostMapping("/updateCarAnnualInspection")
@ApiOperation(value = "修改年检记录") @ApiOperation(value = "修改年检记录")
@ApiOperationSupport(order = 29) @ApiOperationSupport(order = 29)
@Operate(label = "修改年检记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarAnnualInspection(@Valid @RequestBody CarAnnualInspectionEntity carAnnualInspectionEntity) { public R updateCarAnnualInspection(@Valid @RequestBody CarAnnualInspectionEntity carAnnualInspectionEntity) {
return R.status(carAnnualInspectionService.updateCarAnnualInspection(carAnnualInspectionEntity)); return R.status(carAnnualInspectionService.updateCarAnnualInspection(carAnnualInspectionEntity));
} }
@ -290,6 +324,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarAnnualInspection") @PostMapping("/removeCarAnnualInspection")
@ApiOperation(value = "删除年检记录") @ApiOperation(value = "删除年检记录")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@Operate(label = "删除年检记录", type = BusinessType.DELETE, ignore = false)
public R removeCarAnnualInspection(@RequestParam Long id) { public R removeCarAnnualInspection(@RequestParam Long id) {
return R.status(carAnnualInspectionService.removeById(id)); return R.status(carAnnualInspectionService.removeById(id));
} }
@ -297,6 +332,7 @@ public class CarController extends BladeController {
@GetMapping("/carAnnualInspectionDetail") @GetMapping("/carAnnualInspectionDetail")
@ApiOperation(value = "年检记录详情") @ApiOperation(value = "年检记录详情")
@ApiOperationSupport(order = 31) @ApiOperationSupport(order = 31)
@Operate(label = "年检记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarAnnualInspectionEntity> carAnnualInspectionDetail(@RequestParam Long id) { public R<CarAnnualInspectionEntity> carAnnualInspectionDetail(@RequestParam Long id) {
return R.data(carAnnualInspectionService.getById(id)); return R.data(carAnnualInspectionService.getById(id));
} }
@ -311,6 +347,7 @@ public class CarController extends BladeController {
}) })
@ApiOperation(value = "年检记录分页") @ApiOperation(value = "年检记录分页")
@ApiOperationSupport(order = 32) @ApiOperationSupport(order = 32)
@Operate(label = "年检记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarAnnualInspectionPageVO>> carAnnualInspectionPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<CarAnnualInspectionPageVO>> carAnnualInspectionPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarAnnualInspectionPageVO> page = carAnnualInspectionService.getCarAnnualInspectionPage(param, query); IPage<CarAnnualInspectionPageVO> page = carAnnualInspectionService.getCarAnnualInspectionPage(param, query);
return R.data(page); return R.data(page);
@ -319,6 +356,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarInsurance") @PostMapping("/saveCarInsurance")
@ApiOperation(value = "新增车保记录") @ApiOperation(value = "新增车保记录")
@ApiOperationSupport(order = 33) @ApiOperationSupport(order = 33)
@Operate(label = "新增车保记录", type = BusinessType.INSERT, ignore = false)
public R saveCarInsurance(@Valid @RequestBody CarInsuranceEntity carInsuranceEntity) { public R saveCarInsurance(@Valid @RequestBody CarInsuranceEntity carInsuranceEntity) {
return R.status(carInsuranceService.saveCarCheckRecord(carInsuranceEntity)); return R.status(carInsuranceService.saveCarCheckRecord(carInsuranceEntity));
} }
@ -326,6 +364,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarInsurance") @PostMapping("/updateCarInsurance")
@ApiOperation(value = "修改车保记录") @ApiOperation(value = "修改车保记录")
@ApiOperationSupport(order = 34) @ApiOperationSupport(order = 34)
@Operate(label = "修改车保记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarInsurance(@Valid @RequestBody CarInsuranceEntity carInsuranceEntity) { public R updateCarInsurance(@Valid @RequestBody CarInsuranceEntity carInsuranceEntity) {
return R.status(carInsuranceService.updateCarCheckRecord(carInsuranceEntity)); return R.status(carInsuranceService.updateCarCheckRecord(carInsuranceEntity));
} }
@ -333,6 +372,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarInsurance") @PostMapping("/removeCarInsurance")
@ApiOperation(value = "删除车保记录") @ApiOperation(value = "删除车保记录")
@ApiOperationSupport(order = 35) @ApiOperationSupport(order = 35)
@Operate(label = "删除车保记录", type = BusinessType.DELETE, ignore = false)
public R removeCarInsurance(@RequestParam Long id) { public R removeCarInsurance(@RequestParam Long id) {
return R.status(carInsuranceService.removeById(id)); return R.status(carInsuranceService.removeById(id));
} }
@ -340,6 +380,7 @@ public class CarController extends BladeController {
@GetMapping("/carInsuranceDetail") @GetMapping("/carInsuranceDetail")
@ApiOperation(value = "车保记录详情") @ApiOperation(value = "车保记录详情")
@ApiOperationSupport(order = 36) @ApiOperationSupport(order = 36)
@Operate(label = "车保记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarInsuranceEntity> carInsuranceDetail(@RequestParam Long id) { public R<CarInsuranceEntity> carInsuranceDetail(@RequestParam Long id) {
return R.data(carInsuranceService.getById(id)); return R.data(carInsuranceService.getById(id));
} }
@ -354,6 +395,7 @@ public class CarController extends BladeController {
}) })
@ApiOperation(value = "车保记录分页") @ApiOperation(value = "车保记录分页")
@ApiOperationSupport(order = 37) @ApiOperationSupport(order = 37)
@Operate(label = "车保记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarInsurancePageVO>> carInsurancePage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<CarInsurancePageVO>> carInsurancePage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarInsurancePageVO> page = carInsuranceService.getCarInsurancePage(param, query); IPage<CarInsurancePageVO> page = carInsuranceService.getCarInsurancePage(param, query);
return R.data(page); return R.data(page);
@ -362,6 +404,7 @@ public class CarController extends BladeController {
@GetMapping("/carList") @GetMapping("/carList")
@ApiOperation(value = "查询车辆列表") @ApiOperation(value = "查询车辆列表")
@ApiOperationSupport(order = 38) @ApiOperationSupport(order = 38)
@Operate(label = "查询车辆列表", type = BusinessType.QUERY, ignore = false)
public R<List<CarEntity>> carList(String plateNumber) { public R<List<CarEntity>> carList(String plateNumber) {
List<CarEntity> list = carService.getCarListByPlateNumber(plateNumber); List<CarEntity> list = carService.getCarListByPlateNumber(plateNumber);
return R.data(list); return R.data(list);

16
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckCompanyController.java

@ -1,11 +1,14 @@
package com.hnac.hzims.safeproduct.controller; package com.hnac.hzims.safeproduct.controller;
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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckCompanyDTO; import com.hnac.hzims.safeproduct.dto.CheckCompanyDTO;
import com.hnac.hzims.safeproduct.entity.CheckCompanyEntity; import com.hnac.hzims.safeproduct.entity.CheckCompanyEntity;
import com.hnac.hzims.safeproduct.service.ICheckCompanyService; import com.hnac.hzims.safeproduct.service.ICheckCompanyService;
import com.hnac.hzims.safeproduct.vo.CheckCompanyVo; import com.hnac.hzims.safeproduct.vo.CheckCompanyVo;
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.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;
@ -14,12 +17,8 @@ import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.BladePage; import org.springblade.core.mp.support.BladePage;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springblade.system.entity.Dept;
import org.springblade.system.feign.ISysClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Optional;
/** /**
* Created by Sam Huang 2022/5/6 8:23 * Created by Sam Huang 2022/5/6 8:23
*/ */
@ -27,6 +26,7 @@ import java.util.Optional;
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/CheckCompany") @RequestMapping("/CheckCompany")
@Api(tags = "公司检查") @Api(tags = "公司检查")
@Business(module = Constants.APP_NAME, value = "公司检查", ignore = false)
public class CheckCompanyController extends BladeController { public class CheckCompanyController extends BladeController {
private final ICheckCompanyService CheckCompanyService; private final ICheckCompanyService CheckCompanyService;
@ -37,6 +37,7 @@ public class CheckCompanyController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckCompanyDTO") @ApiOperation(value = "新增", notes = "传入CheckCompanyDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckCompanyDTO req) { public R save(@RequestBody CheckCompanyDTO req) {
return R.status(CheckCompanyService.doSave(req)); return R.status(CheckCompanyService.doSave(req));
} }
@ -47,6 +48,7 @@ public class CheckCompanyController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckCompanyDTO") @ApiOperation(value = "修改", notes = "传入CheckCompanyDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckCompanyDTO req) { public R update(@RequestBody CheckCompanyDTO req) {
return R.status(CheckCompanyService.doUpdate(req)); return R.status(CheckCompanyService.doUpdate(req));
} }
@ -57,6 +59,7 @@ public class CheckCompanyController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, 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(CheckCompanyService.doDelete(ids)); return R.status(CheckCompanyService.doDelete(ids));
} }
@ -67,6 +70,7 @@ public class CheckCompanyController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id") @ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckCompanyVo> detail(@RequestParam Long id) { public R<CheckCompanyVo> detail(@RequestParam Long id) {
return CheckCompanyService.detail(id); return CheckCompanyService.detail(id);
} }
@ -77,8 +81,8 @@ public class CheckCompanyController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:startDate,endDate,status") @ApiOperation(value = "分页", notes = "查询条件:startDate,endDate,status")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<BladePage<CheckCompanyVo>> list(CheckCompanyEntity req, Query query) { public R<BladePage<CheckCompanyVo>> list(CheckCompanyEntity req, Query query) {
return CheckCompanyService.pageCondition(req, query); return CheckCompanyService.pageCondition(req, query);
} }
} }

20
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckItemController.java

@ -2,11 +2,15 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckItemDTO; import com.hnac.hzims.safeproduct.dto.CheckItemDTO;
import com.hnac.hzims.safeproduct.dto.CheckQueryItemDTO; import com.hnac.hzims.safeproduct.dto.CheckQueryItemDTO;
import com.hnac.hzims.safeproduct.entity.CheckItemInstanceEntity; import com.hnac.hzims.safeproduct.entity.CheckItemInstanceEntity;
import com.hnac.hzims.safeproduct.service.ICheckItemService; import com.hnac.hzims.safeproduct.service.ICheckItemService;
import com.hnac.hzims.safeproduct.vo.CheckItemVo; import com.hnac.hzims.safeproduct.vo.CheckItemVo;
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.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;
@ -14,7 +18,6 @@ import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query; 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.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
@ -26,6 +29,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/checkItem") @RequestMapping("/checkItem")
@Business(module = Constants.APP_NAME, value = "检查项管理", ignore = false)
@Api(tags = "检查项管理") @Api(tags = "检查项管理")
public class CheckItemController extends BladeController { public class CheckItemController extends BladeController {
@ -37,6 +41,7 @@ public class CheckItemController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckItemDTO") @ApiOperation(value = "新增", notes = "传入CheckItemDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckItemDTO req) { public R save(@RequestBody CheckItemDTO req) {
return R.status(checkItemService.doSave(req)); return R.status(checkItemService.doSave(req));
} }
@ -47,28 +52,29 @@ public class CheckItemController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckItemDTO") @ApiOperation(value = "修改", notes = "传入CheckItemDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckItemDTO req) { public R update(@RequestBody CheckItemDTO req) {
return R.status(checkItemService.doUpdate(req)); return R.status(checkItemService.doUpdate(req));
} }
/** /**
* 启用/停用 * 启用/停用
*/ */
@PostMapping("/enable") @PostMapping("/enable")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
@ApiOperation(value = "启用/停用", notes = "传入CheckItemDTO") @ApiOperation(value = "启用/停用", notes = "传入CheckItemDTO")
@Operate(label = "启用/停用", type = BusinessType.UPDATE, ignore = false)
public R enable(@RequestBody CheckItemDTO req) { public R enable(@RequestBody CheckItemDTO req) {
return R.status(checkItemService.enable(req)); return R.status(checkItemService.enable(req));
} }
/** /**
* 删除 * 删除
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
// checkItemService.deleteLogic(Func.toLongList(ids)) // checkItemService.deleteLogic(Func.toLongList(ids))
return R.status(checkItemService.remove(ids)); return R.status(checkItemService.remove(ids));
@ -80,6 +86,7 @@ public class CheckItemController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id") @ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckItemVo> detail(@RequestParam Long id) { public R<CheckItemVo> detail(@RequestParam Long id) {
return checkItemService.detail(id); return checkItemService.detail(id);
} }
@ -90,6 +97,7 @@ public class CheckItemController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "列表", notes = "查询条件:item") @ApiOperation(value = "列表", notes = "查询条件:item")
@Operate(label = "列表", type = BusinessType.QUERY, ignore = false)
public R<List<CheckItemInstanceEntity>> list(CheckQueryItemDTO req) throws Exception { public R<List<CheckItemInstanceEntity>> list(CheckQueryItemDTO req) throws Exception {
return checkItemService.getItems(req); return checkItemService.getItems(req);
} }
@ -100,6 +108,7 @@ public class CheckItemController extends BladeController {
@GetMapping("/listCompany") @GetMapping("/listCompany")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "列表", notes = "查询条件:item") @ApiOperation(value = "列表", notes = "查询条件:item")
@Operate(label = "公司检查-列表", type = BusinessType.QUERY, ignore = false)
public R<List<Map<String, Object>>> listCompany(CheckQueryItemDTO req) throws Exception { public R<List<Map<String, Object>>> listCompany(CheckQueryItemDTO req) throws Exception {
return checkItemService.getCompanyCheckItems(req); return checkItemService.getCompanyCheckItems(req);
} }
@ -110,20 +119,19 @@ public class CheckItemController extends BladeController {
@GetMapping("/pageList") @GetMapping("/pageList")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "分页", notes = "查询条件:item") @ApiOperation(value = "分页", notes = "查询条件:item")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckItemVo>> page(CheckItemDTO req, Query query) { public R<IPage<CheckItemVo>> page(CheckItemDTO req, Query query) {
return checkItemService.pageCondition(req, query); return checkItemService.pageCondition(req, query);
} }
/** /**
* 树形列表 * 树形列表
*/ */
@GetMapping("/treeList") @GetMapping("/treeList")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "树形列表", notes = "查询条件:item") @ApiOperation(value = "树形列表", notes = "查询条件:item")
@Operate(label = "树形列表", type = BusinessType.QUERY, ignore = false)
public R<List<CheckItemVo>> treeList(CheckItemDTO req) { public R<List<CheckItemVo>> treeList(CheckItemDTO req) {
return checkItemService.getTreeList(req); return checkItemService.getTreeList(req);
} }
} }

15
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckMonthController.java

@ -6,10 +6,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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckMonthDTO; import com.hnac.hzims.safeproduct.dto.CheckMonthDTO;
import com.hnac.hzims.safeproduct.entity.CheckMonthEntity; import com.hnac.hzims.safeproduct.entity.CheckMonthEntity;
import com.hnac.hzims.safeproduct.service.ICheckMonthService; import com.hnac.hzims.safeproduct.service.ICheckMonthService;
import com.hnac.hzims.safeproduct.vo.CheckMonthVo; import com.hnac.hzims.safeproduct.vo.CheckMonthVo;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
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 +33,7 @@ import java.util.Optional;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/checkMonth") @RequestMapping("/checkMonth")
@Business(module = Constants.APP_NAME, value = "月度检查", ignore = false)
@Api(tags = "月度检查") @Api(tags = "月度检查")
public class CheckMonthController extends BladeController { public class CheckMonthController extends BladeController {
@ -43,6 +47,7 @@ public class CheckMonthController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckMonthDTO") @ApiOperation(value = "新增", notes = "传入CheckMonthDTO")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckMonthDTO req) { public R save(@RequestBody CheckMonthDTO req) {
return checkMonthlyService.doSave(req); return checkMonthlyService.doSave(req);
} }
@ -53,6 +58,7 @@ public class CheckMonthController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckMonthDTO") @ApiOperation(value = "修改", notes = "传入CheckMonthDTO")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckMonthDTO req) { public R update(@RequestBody CheckMonthDTO req) {
return R.status(checkMonthlyService.doUpdate(req)); return R.status(checkMonthlyService.doUpdate(req));
} }
@ -63,6 +69,7 @@ public class CheckMonthController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, 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(checkMonthlyService.doDelete(ids)); return R.status(checkMonthlyService.doDelete(ids));
} }
@ -73,6 +80,7 @@ public class CheckMonthController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id") @ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<CheckMonthVo> detail(@RequestParam Long id) { public R<CheckMonthVo> detail(@RequestParam Long id) {
return checkMonthlyService.detail(id); return checkMonthlyService.detail(id);
} }
@ -83,6 +91,7 @@ public class CheckMonthController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:month,status,createDept") @ApiOperation(value = "分页", notes = "查询条件:month,status,createDept")
@Operate(label = "分页", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage<CheckMonthVo>> list(CheckMonthEntity req, Query query) { public R<IPage<CheckMonthVo>> list(CheckMonthEntity req, Query query) {
R<IPage<CheckMonthVo>> pageR = checkMonthlyService.pageCondition(req, query); R<IPage<CheckMonthVo>> pageR = checkMonthlyService.pageCondition(req, query);
IPage<CheckMonthVo> page = pageR.getData(); IPage<CheckMonthVo> page = pageR.getData();
@ -104,6 +113,7 @@ public class CheckMonthController 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, ignore = false)
public R<IPage<CheckMonthVo>> listNotDataScope(CheckMonthEntity req, Query query) { public R<IPage<CheckMonthVo>> listNotDataScope(CheckMonthEntity req, Query query) {
R<IPage<CheckMonthVo>> pageR = checkMonthlyService.pageNotDataScope(req, query); R<IPage<CheckMonthVo>> pageR = checkMonthlyService.pageNotDataScope(req, query);
IPage<CheckMonthVo> page = pageR.getData(); IPage<CheckMonthVo> page = pageR.getData();
@ -116,15 +126,13 @@ public class CheckMonthController extends BladeController {
return R.data(page); return R.data(page);
} }
/** /**
* 分页查询安全生产会议次数 * 分页查询安全生产会议次数
*/ */
@GetMapping("/listconferenceScope/{page}/{size}") @GetMapping("/listconferenceScope/{page}/{size}")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:month,status,createDept") @ApiOperation(value = "分页", notes = "查询条件:month,status,createDept")
@Operate(label = "分页-查询安全生产会议次数", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<BladePage<CheckMonthVo>> listconferenceScope( public R<BladePage<CheckMonthVo>> listconferenceScope(
@PathVariable Long page, @PathVariable Long size, @PathVariable Long page, @PathVariable Long size,
CheckMonthEntity req) { CheckMonthEntity req) {
@ -140,5 +148,4 @@ public class CheckMonthController extends BladeController {
BladePage<CheckMonthVo> bladePage = BladePage.of(pages); BladePage<CheckMonthVo> bladePage = BladePage.of(pages);
return R.data(bladePage); return R.data(bladePage);
} }
} }

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckNoticeController.java

@ -2,9 +2,13 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckNoticeDTO; import com.hnac.hzims.safeproduct.dto.CheckNoticeDTO;
import com.hnac.hzims.safeproduct.service.ICheckNoticeService; import com.hnac.hzims.safeproduct.service.ICheckNoticeService;
import com.hnac.hzims.safeproduct.vo.CheckNoticeVo; import com.hnac.hzims.safeproduct.vo.CheckNoticeVo;
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.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;
@ -21,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/CheckNotice") @RequestMapping("/CheckNotice")
@Business(module = Constants.APP_NAME, value = "季度检查通知", ignore = false)
@Api(tags = "季度检查通知") @Api(tags = "季度检查通知")
public class CheckNoticeController extends BladeController { public class CheckNoticeController extends BladeController {
@ -32,6 +37,7 @@ public class CheckNoticeController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckNoticeDTO") @ApiOperation(value = "新增", notes = "传入CheckNoticeDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckNoticeDTO req) { public R save(@RequestBody CheckNoticeDTO req) {
return R.status(CheckNoticeService.doSave(req)); return R.status(CheckNoticeService.doSave(req));
} }
@ -42,6 +48,7 @@ public class CheckNoticeController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckNoticeDTO") @ApiOperation(value = "修改", notes = "传入CheckNoticeDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckNoticeDTO req) { public R update(@RequestBody CheckNoticeDTO req) {
return R.status(CheckNoticeService.doUpdate(req)); return R.status(CheckNoticeService.doUpdate(req));
} }
@ -52,6 +59,7 @@ public class CheckNoticeController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, 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(CheckNoticeService.deleteLogic(Func.toLongList(ids))); return R.status(CheckNoticeService.deleteLogic(Func.toLongList(ids)));
} }
@ -62,19 +70,19 @@ public class CheckNoticeController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id") @ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckNoticeVo> detail(@RequestParam Long id) { public R<CheckNoticeVo> detail(@RequestParam Long id) {
return CheckNoticeService.detail(id); return CheckNoticeService.detail(id);
} }
/** /**
* 分页 * 分页
*/ */
@GetMapping("/pageList") @GetMapping("/pageList")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "分页", notes = "查询条件:item") @ApiOperation(value = "分页", notes = "查询条件:item")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckNoticeVo>> page(CheckNoticeDTO req, Query query) { public R<IPage<CheckNoticeVo>> page(CheckNoticeDTO req, Query query) {
return CheckNoticeService.pageCondition(req, query); return CheckNoticeService.pageCondition(req, query);
} }
} }

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/CheckQuarterController.java

@ -2,10 +2,14 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckQuarterDTO; import com.hnac.hzims.safeproduct.dto.CheckQuarterDTO;
import com.hnac.hzims.safeproduct.entity.CheckQuarterEntity; import com.hnac.hzims.safeproduct.entity.CheckQuarterEntity;
import com.hnac.hzims.safeproduct.service.ICheckQuarterService; import com.hnac.hzims.safeproduct.service.ICheckQuarterService;
import com.hnac.hzims.safeproduct.vo.CheckQuarterVo; import com.hnac.hzims.safeproduct.vo.CheckQuarterVo;
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.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;
@ -25,6 +29,7 @@ import java.util.Optional;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/checkQuarter") @RequestMapping("/checkQuarter")
@Business(module = Constants.APP_NAME, value = "季度检查", ignore = false)
@Api(tags = "季度检查") @Api(tags = "季度检查")
public class CheckQuarterController extends BladeController { public class CheckQuarterController extends BladeController {
@ -38,6 +43,7 @@ public class CheckQuarterController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckQuarterDTO") @ApiOperation(value = "新增", notes = "传入CheckQuarterDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckQuarterDTO req) { public R save(@RequestBody CheckQuarterDTO req) {
return CheckQuarterService.doSave(req); return CheckQuarterService.doSave(req);
} }
@ -48,6 +54,7 @@ public class CheckQuarterController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckQuarterDTO") @ApiOperation(value = "修改", notes = "传入CheckQuarterDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckQuarterDTO req) { public R update(@RequestBody CheckQuarterDTO req) {
return R.status(CheckQuarterService.doUpdate(req)); return R.status(CheckQuarterService.doUpdate(req));
} }
@ -58,6 +65,7 @@ public class CheckQuarterController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, 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(CheckQuarterService.doDelete(ids)); return R.status(CheckQuarterService.doDelete(ids));
} }
@ -68,6 +76,7 @@ public class CheckQuarterController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id") @ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckQuarterVo> detail(@RequestParam Long id) { public R<CheckQuarterVo> detail(@RequestParam Long id) {
return CheckQuarterService.detail(id); return CheckQuarterService.detail(id);
} }
@ -78,6 +87,7 @@ public class CheckQuarterController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:quarter,status,createDept") @ApiOperation(value = "分页", notes = "查询条件:quarter,status,createDept")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckQuarterVo>> list(CheckQuarterEntity req, Query query) { public R<IPage<CheckQuarterVo>> list(CheckQuarterEntity req, Query query) {
R<IPage<CheckQuarterVo>> pageR = CheckQuarterService.pageCondition(req, query); R<IPage<CheckQuarterVo>> pageR = CheckQuarterService.pageCondition(req, query);
IPage<CheckQuarterVo> page = pageR.getData(); IPage<CheckQuarterVo> page = pageR.getData();
@ -96,6 +106,7 @@ public class CheckQuarterController extends BladeController {
@GetMapping("/listNotDataScope") @GetMapping("/listNotDataScope")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:quarter,status,createDept") @ApiOperation(value = "分页", notes = "查询条件:quarter,status,createDept")
@Operate(label = "分页-无数据权限控制", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckQuarterVo>> listNotDataScope(CheckQuarterEntity req, Query query) { public R<IPage<CheckQuarterVo>> listNotDataScope(CheckQuarterEntity req, Query query) {
R<IPage<CheckQuarterVo>> pageR = CheckQuarterService.pageNotDataScope(req, query); R<IPage<CheckQuarterVo>> pageR = CheckQuarterService.pageNotDataScope(req, query);
IPage<CheckQuarterVo> page = pageR.getData(); IPage<CheckQuarterVo> page = pageR.getData();
@ -107,5 +118,4 @@ public class CheckQuarterController extends BladeController {
}); });
return R.data(page); return R.data(page);
} }
} }

17
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ConferenceController.java

@ -2,12 +2,16 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity; import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity; import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.service.IConferencePlanService; import com.hnac.hzims.safeproduct.service.IConferencePlanService;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService; import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO; import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordVO; import com.hnac.hzims.safeproduct.vo.ConferenceRecordVO;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -32,6 +36,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/conference") @RequestMapping("/conference")
@Business(module = Constants.APP_NAME, value = "会议管理", ignore = false)
@Api(value = "会议管理", tags = "会议管理接口") @Api(value = "会议管理", tags = "会议管理接口")
public class ConferenceController extends BladeController { public class ConferenceController extends BladeController {
@ -42,6 +47,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/savePlan") @PostMapping("/savePlan")
@ApiOperation(value = "新增会议计划") @ApiOperation(value = "新增会议计划")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增会议计划", type = BusinessType.INSERT, ignore = false)
public R savePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) { public R savePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) {
return R.status(conferencePlanService.save(conferencePlan)); return R.status(conferencePlanService.save(conferencePlan));
} }
@ -49,6 +55,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/updatePlan") @PostMapping("/updatePlan")
@ApiOperation(value = "修改会议计划") @ApiOperation(value = "修改会议计划")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "修改会议计划", type = BusinessType.UPDATE, ignore = false)
public R updatePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) { public R updatePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) {
return R.status(conferencePlanService.updateById(conferencePlan)); return R.status(conferencePlanService.updateById(conferencePlan));
} }
@ -56,6 +63,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/removePlan") @PostMapping("/removePlan")
@ApiOperation(value = "删除会议计划") @ApiOperation(value = "删除会议计划")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "删除会议计划", type = BusinessType.DELETE, ignore = false)
public R removePlan(@RequestParam Long id) { public R removePlan(@RequestParam Long id) {
return R.status(conferencePlanService.removePlan(id)); return R.status(conferencePlanService.removePlan(id));
} }
@ -63,6 +71,7 @@ public class ConferenceController extends BladeController {
@GetMapping("/planDetail") @GetMapping("/planDetail")
@ApiOperation(value = "会议计划详情") @ApiOperation(value = "会议计划详情")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "会议计划详情", type = BusinessType.QUERY, ignore = false)
public R<ConferencePlanEntity> planDetail(@RequestParam Long id) { public R<ConferencePlanEntity> planDetail(@RequestParam Long id) {
return R.data(conferencePlanService.getById(id)); return R.data(conferencePlanService.getById(id));
} }
@ -75,6 +84,7 @@ public class ConferenceController extends BladeController {
}) })
@ApiOperation(value = "会议计划分页") @ApiOperation(value = "会议计划分页")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@Operate(label = "会议计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<ConferencePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<ConferencePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<ConferencePlanEntity> page = conferencePlanService.planPage(param, query); IPage<ConferencePlanEntity> page = conferencePlanService.planPage(param, query);
return R.data(page); return R.data(page);
@ -83,6 +93,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/saveRecord") @PostMapping("/saveRecord")
@ApiOperation(value = "新增会议记录") @ApiOperation(value = "新增会议记录")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Operate(label = "新增会议记录", type = BusinessType.INSERT, ignore = false)
public R saveRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) { public R saveRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) {
return R.status(conferenceRecordService.saveRecord(conferenceRecord)); return R.status(conferenceRecordService.saveRecord(conferenceRecord));
} }
@ -90,6 +101,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/updateRecord") @PostMapping("/updateRecord")
@ApiOperation(value = "修改会议记录") @ApiOperation(value = "修改会议记录")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@Operate(label = "修改会议记录", type = BusinessType.UPDATE, ignore = false)
public R updateRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) { public R updateRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) {
return R.status(conferenceRecordService.updateById(conferenceRecord)); return R.status(conferenceRecordService.updateById(conferenceRecord));
} }
@ -97,6 +109,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/removeRecord") @PostMapping("/removeRecord")
@ApiOperation(value = "删除会议记录") @ApiOperation(value = "删除会议记录")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@Operate(label = "删除会议记录", type = BusinessType.DELETE, ignore = false)
public R removeRecord(@RequestParam Long id) { public R removeRecord(@RequestParam Long id) {
return R.status(conferenceRecordService.removeById(id)); return R.status(conferenceRecordService.removeById(id));
} }
@ -104,6 +117,7 @@ public class ConferenceController extends BladeController {
@GetMapping("/recordDetail") @GetMapping("/recordDetail")
@ApiOperation(value = "会议记录详情") @ApiOperation(value = "会议记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@Operate(label = "会议记录详情", type = BusinessType.QUERY, ignore = false)
public R<ConferenceRecordDetailVO> recordDetail(@RequestParam Long id) { public R<ConferenceRecordDetailVO> recordDetail(@RequestParam Long id) {
return R.data(conferenceRecordService.getConferenceRecordDetailById(id)); return R.data(conferenceRecordService.getConferenceRecordDetailById(id));
} }
@ -117,6 +131,7 @@ public class ConferenceController extends BladeController {
}) })
@ApiOperation(value = "会议记录分页") @ApiOperation(value = "会议记录分页")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@Operate(label = "会议记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<ConferenceRecordVO>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<ConferenceRecordVO>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<ConferenceRecordVO> page = conferenceRecordService.recordPage(param, query); IPage<ConferenceRecordVO> page = conferenceRecordService.recordPage(param, query);
return R.data(page); return R.data(page);
@ -130,6 +145,7 @@ public class ConferenceController extends BladeController {
}) })
@ApiOperation(value = "会议数据导出") @ApiOperation(value = "会议数据导出")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 11)
@Operate(label = "会议数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
conferencePlanService.exportConferenceData(param, response); conferencePlanService.exportConferenceData(param, response);
} }
@ -137,6 +153,7 @@ public class ConferenceController extends BladeController {
@GetMapping("/exportConferenceRecordData") @GetMapping("/exportConferenceRecordData")
@ApiOperation(value = "会议记录表导出") @ApiOperation(value = "会议记录表导出")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
@Operate(label = "会议记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportConferenceRecordData(@RequestParam Long id, HttpServletResponse response) { public void exportConferenceRecordData(@RequestParam Long id, HttpServletResponse response) {
conferenceRecordService.exportConferenceRecordData(id, response); conferenceRecordService.exportConferenceRecordData(id, response);
} }

8
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/DangerSourceLevelRecordController.java

@ -2,9 +2,13 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.DangerSourceLevelRecordEntity; import com.hnac.hzims.safeproduct.entity.DangerSourceLevelRecordEntity;
import com.hnac.hzims.safeproduct.service.IDangerSourceLevelRecordService; import com.hnac.hzims.safeproduct.service.IDangerSourceLevelRecordService;
import com.hnac.hzims.safeproduct.vo.DangerSourceLevelRecordVO; import com.hnac.hzims.safeproduct.vo.DangerSourceLevelRecordVO;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -15,7 +19,6 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
/** /**
* @author xiashandong * @author xiashandong
* @created 2020/9/2 10:53 * @created 2020/9/2 10:53
@ -23,6 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/dangerSourceLevelRecord") @RequestMapping("/dangerSourceLevelRecord")
@Business(module = Constants.APP_NAME, value = "危险级别变更记录", ignore = false)
@Api(tags = "危险级别变更记录") @Api(tags = "危险级别变更记录")
public class DangerSourceLevelRecordController extends BladeController { public class DangerSourceLevelRecordController extends BladeController {
@ -34,8 +38,8 @@ public class DangerSourceLevelRecordController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "查询条件:sourceId,type") @ApiOperation(value = "分页", notes = "查询条件:sourceId,type")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<DangerSourceLevelRecordVO>> list(DangerSourceLevelRecordEntity req, Query query) { public R<IPage<DangerSourceLevelRecordVO>> list(DangerSourceLevelRecordEntity req, Query query) {
return dangerSourceLevelRecordService.pageCondition(req, query); return dangerSourceLevelRecordService.pageCondition(req, query);
} }
} }

11
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/EmergencyPlanController.java

@ -5,10 +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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.EmergencyPlanDTO; import com.hnac.hzims.safeproduct.dto.EmergencyPlanDTO;
import com.hnac.hzims.safeproduct.dto.EmergencyPlanListDTO; import com.hnac.hzims.safeproduct.dto.EmergencyPlanListDTO;
import com.hnac.hzims.safeproduct.service.IEmergencyPlanService; import com.hnac.hzims.safeproduct.service.IEmergencyPlanService;
import com.hnac.hzims.safeproduct.vo.EmergencyPlanVO; import com.hnac.hzims.safeproduct.vo.EmergencyPlanVO;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
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;
@ -20,7 +23,6 @@ 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.*;
/** /**
* @author xiashandong * @author xiashandong
* @created 2020/9/9 13:50 * @created 2020/9/9 13:50
@ -28,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/emergencyPlan") @RequestMapping("/emergencyPlan")
@Business(module = Constants.APP_NAME, value = "应急预案文件", ignore = false)
@Api(tags = "应急预案文件") @Api(tags = "应急预案文件")
public class EmergencyPlanController extends BladeController { public class EmergencyPlanController extends BladeController {
@ -39,6 +42,7 @@ public class EmergencyPlanController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, 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(emergencyPlanService.deleteLogic(Func.toLongList(ids))); return R.status(emergencyPlanService.deleteLogic(Func.toLongList(ids)));
} }
@ -49,6 +53,7 @@ public class EmergencyPlanController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入emergencyPlan") @ApiOperation(value = "新增", notes = "传入emergencyPlan")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody EmergencyPlanDTO req) { public R save(@RequestBody EmergencyPlanDTO req) {
return R.status(emergencyPlanService.save(req)); return R.status(emergencyPlanService.save(req));
} }
@ -59,6 +64,7 @@ public class EmergencyPlanController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入emergencyPlan") @ApiOperation(value = "修改", notes = "传入emergencyPlan")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody EmergencyPlanDTO req) { public R update(@RequestBody EmergencyPlanDTO req) {
return R.status(emergencyPlanService.updateById(req)); return R.status(emergencyPlanService.updateById(req));
} }
@ -69,6 +75,7 @@ public class EmergencyPlanController 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, ignore = false)
public R<EmergencyPlanVO> detail(@RequestParam Long id) { public R<EmergencyPlanVO> detail(@RequestParam Long id) {
return emergencyPlanService.detail(id); return emergencyPlanService.detail(id);
} }
@ -83,8 +90,8 @@ public class EmergencyPlanController extends BladeController {
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询应急预案文件列表") action = "分页查询应急预案文件列表")
@ApiOperation(value = "分页", notes = "查询条件:typeId,fileStatus,fileName") @ApiOperation(value = "分页", notes = "查询条件:typeId,fileStatus,fileName")
@Operate(label = "分页", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage<EmergencyPlanVO>> list(EmergencyPlanListDTO req, Query query) { public R<IPage<EmergencyPlanVO>> list(EmergencyPlanListDTO req, Query query) {
return emergencyPlanService.pageCondition(req, query); return emergencyPlanService.pageCondition(req, query);
} }
} }

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/EmergencyPlanTypeController.java

@ -2,11 +2,15 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.EmergencyPlanTypeDTO; import com.hnac.hzims.safeproduct.dto.EmergencyPlanTypeDTO;
import com.hnac.hzims.safeproduct.dto.EmergencyPlanTypeListDTO; import com.hnac.hzims.safeproduct.dto.EmergencyPlanTypeListDTO;
import com.hnac.hzims.safeproduct.service.IEmergencyPlanTypeService; import com.hnac.hzims.safeproduct.service.IEmergencyPlanTypeService;
import com.hnac.hzims.safeproduct.vo.EmergencyPlanTypeTreeVO; import com.hnac.hzims.safeproduct.vo.EmergencyPlanTypeTreeVO;
import com.hnac.hzims.safeproduct.vo.EmergencyPlanTypeVO; import com.hnac.hzims.safeproduct.vo.EmergencyPlanTypeVO;
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.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;
@ -14,10 +18,8 @@ import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query; import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R; import org.springblade.core.tool.api.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
/** /**
* @author xiashandong * @author xiashandong
* @created 2020/9/9 13:51 * @created 2020/9/9 13:51
@ -25,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/emergencyPlanType") @RequestMapping("/emergencyPlanType")
@Business(module = Constants.APP_NAME, value = "应急预案文件类型", ignore = false)
@Api(tags = "应急预案文件类型") @Api(tags = "应急预案文件类型")
public class EmergencyPlanTypeController extends BladeController { public class EmergencyPlanTypeController extends BladeController {
@ -36,6 +39,7 @@ public class EmergencyPlanTypeController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入id") @ApiOperation(value = "逻辑删除", notes = "传入id")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键", required = true) @RequestParam Long id) { public R remove(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
return R.status(emergencyPlanTypeService.remove(id)); return R.status(emergencyPlanTypeService.remove(id));
} }
@ -46,6 +50,7 @@ public class EmergencyPlanTypeController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入emergencyPlanType") @ApiOperation(value = "新增", notes = "传入emergencyPlanType")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody EmergencyPlanTypeDTO req) { public R save(@RequestBody EmergencyPlanTypeDTO req) {
return R.status(emergencyPlanTypeService.save(req)); return R.status(emergencyPlanTypeService.save(req));
} }
@ -56,6 +61,7 @@ public class EmergencyPlanTypeController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入emergencyPlanType") @ApiOperation(value = "修改", notes = "传入emergencyPlanType")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody EmergencyPlanTypeDTO req) { public R update(@RequestBody EmergencyPlanTypeDTO req) {
return R.status(emergencyPlanTypeService.updateById(req)); return R.status(emergencyPlanTypeService.updateById(req));
} }
@ -66,6 +72,7 @@ public class EmergencyPlanTypeController 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<EmergencyPlanTypeVO> detail(@RequestParam Long id) { public R<EmergencyPlanTypeVO> detail(@RequestParam Long id) {
return emergencyPlanTypeService.detail(id); return emergencyPlanTypeService.detail(id);
} }
@ -76,6 +83,7 @@ public class EmergencyPlanTypeController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:idOrParentId,name") @ApiOperation(value = "分页", notes = "查询条件:idOrParentId,name")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<EmergencyPlanTypeVO>> list(EmergencyPlanTypeListDTO req, Query query) { public R<IPage<EmergencyPlanTypeVO>> list(EmergencyPlanTypeListDTO req, Query query) {
return emergencyPlanTypeService.pageCondition(req, query); return emergencyPlanTypeService.pageCondition(req, query);
} }
@ -86,8 +94,8 @@ public class EmergencyPlanTypeController extends BladeController {
@GetMapping("/getTree") @GetMapping("/getTree")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "获取树结构", notes = "查询条件:name") @ApiOperation(value = "获取树结构", notes = "查询条件:name")
@Operate(label = "获取树结构", type = BusinessType.QUERY, ignore = false)
public R<EmergencyPlanTypeTreeVO> getTree(EmergencyPlanTypeDTO req) { public R<EmergencyPlanTypeTreeVO> getTree(EmergencyPlanTypeDTO req) {
return emergencyPlanTypeService.getTree(req); return emergencyPlanTypeService.getTree(req);
} }
} }

19
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/HygieneController.java

@ -2,6 +2,7 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.HygienePlanDTO; import com.hnac.hzims.safeproduct.dto.HygienePlanDTO;
import com.hnac.hzims.safeproduct.dto.HygieneRecordDTO; import com.hnac.hzims.safeproduct.dto.HygieneRecordDTO;
import com.hnac.hzims.safeproduct.entity.HygienePlanEntity; import com.hnac.hzims.safeproduct.entity.HygienePlanEntity;
@ -11,6 +12,9 @@ import com.hnac.hzims.safeproduct.vo.HygienePlanDetailVO;
import com.hnac.hzims.safeproduct.vo.HygieneMonthVO; import com.hnac.hzims.safeproduct.vo.HygieneMonthVO;
import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO; import com.hnac.hzims.safeproduct.vo.HygieneRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.HygieneRecordPageVO; import com.hnac.hzims.safeproduct.vo.HygieneRecordPageVO;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -35,6 +39,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/hygiene") @RequestMapping("/hygiene")
@Business(module = Constants.APP_NAME, value = "卫生自查", ignore = false)
@Api(value = "卫生自查", tags = "卫生自查接口") @Api(value = "卫生自查", tags = "卫生自查接口")
public class HygieneController extends BladeController { public class HygieneController extends BladeController {
@ -45,6 +50,7 @@ public class HygieneController extends BladeController {
@PostMapping("/savePlan") @PostMapping("/savePlan")
@ApiOperation(value = "新增卫生自查计划") @ApiOperation(value = "新增卫生自查计划")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增卫生自查计划", type = BusinessType.INSERT, ignore = false)
public R savePlan(@Valid @RequestBody HygienePlanDTO hygienePlanDTO) { public R savePlan(@Valid @RequestBody HygienePlanDTO hygienePlanDTO) {
return hygienePlanService.savePlan(hygienePlanDTO); return hygienePlanService.savePlan(hygienePlanDTO);
} }
@ -52,6 +58,7 @@ public class HygieneController extends BladeController {
@PostMapping("/updatePlan") @PostMapping("/updatePlan")
@ApiOperation(value = "修改卫生自查计划") @ApiOperation(value = "修改卫生自查计划")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "修改卫生自查计划", type = BusinessType.UPDATE, ignore = false)
public R updatePlan(@Valid @RequestBody HygienePlanDTO hygienePlanDTO) { public R updatePlan(@Valid @RequestBody HygienePlanDTO hygienePlanDTO) {
return hygienePlanService.updatePlan(hygienePlanDTO); return hygienePlanService.updatePlan(hygienePlanDTO);
} }
@ -59,6 +66,7 @@ public class HygieneController extends BladeController {
@PostMapping("/removePlan") @PostMapping("/removePlan")
@ApiOperation(value = "删除卫生自查计划") @ApiOperation(value = "删除卫生自查计划")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "删除卫生自查计划", type = BusinessType.DELETE, ignore = false)
public R removePlan(@RequestParam Long id) { public R removePlan(@RequestParam Long id) {
return R.status(hygienePlanService.removePlan(id)); return R.status(hygienePlanService.removePlan(id));
} }
@ -66,6 +74,7 @@ public class HygieneController extends BladeController {
@GetMapping("/planDetail") @GetMapping("/planDetail")
@ApiOperation(value = "卫生自查计划详情") @ApiOperation(value = "卫生自查计划详情")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "卫生自查计划详情", type = BusinessType.QUERY, ignore = false)
public R<HygienePlanDetailVO> planDetail(@RequestParam Long id) { public R<HygienePlanDetailVO> planDetail(@RequestParam Long id) {
return R.data(hygienePlanService.getPlan(id)); return R.data(hygienePlanService.getPlan(id));
} }
@ -79,6 +88,7 @@ public class HygieneController extends BladeController {
}) })
@ApiOperation(value = "卫生自查计划分页") @ApiOperation(value = "卫生自查计划分页")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@Operate(label = "卫生自查计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<HygienePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<HygienePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<HygienePlanEntity> page = hygienePlanService.planPage(param, query); IPage<HygienePlanEntity> page = hygienePlanService.planPage(param, query);
return R.data(page); return R.data(page);
@ -87,6 +97,7 @@ public class HygieneController extends BladeController {
@PostMapping("/saveRecord") @PostMapping("/saveRecord")
@ApiOperation(value = "新增卫生自查记录") @ApiOperation(value = "新增卫生自查记录")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Operate(label = "新增卫生自查记录", type = BusinessType.INSERT, ignore = false)
public R saveRecord(@Valid @RequestBody HygieneRecordDTO hygieneRecordDTO) { public R saveRecord(@Valid @RequestBody HygieneRecordDTO hygieneRecordDTO) {
return hygieneRecordService.saveRecord(hygieneRecordDTO); return hygieneRecordService.saveRecord(hygieneRecordDTO);
} }
@ -94,6 +105,7 @@ public class HygieneController extends BladeController {
@PostMapping("/updateRecord") @PostMapping("/updateRecord")
@ApiOperation(value = "修改卫生自查记录") @ApiOperation(value = "修改卫生自查记录")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@Operate(label = "修改卫生自查记录", type = BusinessType.UPDATE, ignore = false)
public R updateRecord(@Valid @RequestBody HygieneRecordDTO hygieneRecordDTO) { public R updateRecord(@Valid @RequestBody HygieneRecordDTO hygieneRecordDTO) {
return hygieneRecordService.updateRecord(hygieneRecordDTO); return hygieneRecordService.updateRecord(hygieneRecordDTO);
} }
@ -101,6 +113,7 @@ public class HygieneController extends BladeController {
@PostMapping("/removeRecord") @PostMapping("/removeRecord")
@ApiOperation(value = "删除卫生自查记录") @ApiOperation(value = "删除卫生自查记录")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@Operate(label = "删除卫生自查记录", type = BusinessType.DELETE, ignore = false)
public R removeRecord(@RequestParam Long id) { public R removeRecord(@RequestParam Long id) {
return R.status(hygieneRecordService.removeById(id)); return R.status(hygieneRecordService.removeById(id));
} }
@ -108,6 +121,7 @@ public class HygieneController extends BladeController {
@GetMapping("/recordDetail") @GetMapping("/recordDetail")
@ApiOperation(value = "卫生自查记录详情") @ApiOperation(value = "卫生自查记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@Operate(label = "卫生自查记录详情", type = BusinessType.QUERY, ignore = false)
public R<HygieneRecordDetailVO> recordDetail(@RequestParam Long id) { public R<HygieneRecordDetailVO> recordDetail(@RequestParam Long id) {
return R.data(hygieneRecordService.getRecordDetail(id)); return R.data(hygieneRecordService.getRecordDetail(id));
} }
@ -121,6 +135,7 @@ public class HygieneController extends BladeController {
}) })
@ApiOperation(value = "卫生自查记录分页") @ApiOperation(value = "卫生自查记录分页")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@Operate(label = "卫生自查记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<HygieneRecordPageVO>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<HygieneRecordPageVO>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<HygieneRecordPageVO> page = hygieneRecordService.recordPage(param, query); IPage<HygieneRecordPageVO> page = hygieneRecordService.recordPage(param, query);
return R.data(page); return R.data(page);
@ -129,6 +144,7 @@ public class HygieneController extends BladeController {
@GetMapping("/dataByMonth") @GetMapping("/dataByMonth")
@ApiOperation(value = "月度统计表") @ApiOperation(value = "月度统计表")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 11)
@Operate(label = "月度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<HygieneMonthVO>> dataByMonth(@RequestParam String month, String unit, Query query) { public R<IPage<HygieneMonthVO>> dataByMonth(@RequestParam String month, String unit, Query query) {
IPage<HygieneMonthVO> page = hygienePlanService.dataByMonth(month, unit, query); IPage<HygieneMonthVO> page = hygienePlanService.dataByMonth(month, unit, query);
return R.data(page); return R.data(page);
@ -137,6 +153,7 @@ public class HygieneController extends BladeController {
@GetMapping("/exportHygieneRecordData") @GetMapping("/exportHygieneRecordData")
@ApiOperation(value = "卫生自查记录表导出") @ApiOperation(value = "卫生自查记录表导出")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
@Operate(label = "卫生自查记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportHygieneRecordData(@RequestParam Long id, HttpServletResponse response) { public void exportHygieneRecordData(@RequestParam Long id, HttpServletResponse response) {
hygieneRecordService.exportHygieneRecordData(id, response); hygieneRecordService.exportHygieneRecordData(id, response);
} }
@ -148,6 +165,7 @@ public class HygieneController extends BladeController {
}) })
@ApiOperation(value = "月度数据导出") @ApiOperation(value = "月度数据导出")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
@Operate(label = "月度数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportMonthData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) { public void exportMonthData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) {
hygienePlanService.exportMonthData(param, query, response); hygienePlanService.exportMonthData(param, query, response);
} }
@ -161,6 +179,7 @@ public class HygieneController extends BladeController {
}) })
@ApiOperation(value = "卫生自查计划导出") @ApiOperation(value = "卫生自查计划导出")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 14)
@Operate(label = "卫生自查计划导出", type = BusinessType.EXPORT, ignore = false)
public void exportHygienePlanData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { public void exportHygienePlanData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
hygienePlanService.exportHygienePlanData(param, response); hygienePlanService.exportHygienePlanData(param, response);
} }

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ImsMonAlarmInfoController.java

@ -3,10 +3,14 @@ package com.hnac.hzims.safeproduct.controller;
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.ImsMonAlarmInfoEntity; import com.hnac.hzims.safeproduct.entity.ImsMonAlarmInfoEntity;
import com.hnac.hzims.safeproduct.service.IImsMonAlarmInfoService; import com.hnac.hzims.safeproduct.service.IImsMonAlarmInfoService;
import com.hnac.hzims.safeproduct.vo.ImsMonAlarmInfoVO; import com.hnac.hzims.safeproduct.vo.ImsMonAlarmInfoVO;
import com.hnac.hzims.safeproduct.wrapper.ImsMonAlarmInfoWrapper; import com.hnac.hzims.safeproduct.wrapper.ImsMonAlarmInfoWrapper;
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.*; import io.swagger.annotations.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
@ -28,6 +32,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/alarmInfo") @RequestMapping("/alarmInfo")
@Business(module = Constants.APP_NAME, value = "视频监控告警信息表", ignore = false)
@Api(value = "视频监控告警信息表", tags = "视频监控告警信息表") @Api(value = "视频监控告警信息表", tags = "视频监控告警信息表")
public class ImsMonAlarmInfoController extends BladeController { public class ImsMonAlarmInfoController extends BladeController {
@ -39,6 +44,7 @@ public class ImsMonAlarmInfoController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入alarmInfo") @ApiOperation(value = "详情", notes = "传入alarmInfo")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<ImsMonAlarmInfoVO> detail(ImsMonAlarmInfoEntity alarmInfo) { public R<ImsMonAlarmInfoVO> detail(ImsMonAlarmInfoEntity alarmInfo) {
ImsMonAlarmInfoEntity detail = alarmInfoService.getOne(Condition.getQueryWrapper(alarmInfo)); ImsMonAlarmInfoEntity detail = alarmInfoService.getOne(Condition.getQueryWrapper(alarmInfo));
ImsMonAlarmInfoVO vo = ImsMonAlarmInfoWrapper.build().entityVO(detail); ImsMonAlarmInfoVO vo = ImsMonAlarmInfoWrapper.build().entityVO(detail);
@ -60,6 +66,7 @@ public class ImsMonAlarmInfoController extends BladeController {
@ApiImplicitParam(name = "alarmTimeStart", value = "告警时间开始", paramType = "query", dataType = "LocalDateTime"), @ApiImplicitParam(name = "alarmTimeStart", value = "告警时间开始", paramType = "query", dataType = "LocalDateTime"),
@ApiImplicitParam(name = "alarmTimeEnd", value = "告警时间结束", paramType = "query", dataType = "LocalDateTime"), @ApiImplicitParam(name = "alarmTimeEnd", value = "告警时间结束", paramType = "query", dataType = "LocalDateTime"),
}) })
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<ImsMonAlarmInfoEntity>> list(@ApiIgnore @RequestParam Map<String,Object> alarmInfo, Query query) { public R<IPage<ImsMonAlarmInfoEntity>> list(@ApiIgnore @RequestParam Map<String,Object> alarmInfo, Query query) {
QueryWrapper<ImsMonAlarmInfoEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<ImsMonAlarmInfoEntity> queryWrapper = new QueryWrapper<>();
if (!Func.isEmpty(alarmInfo.get("tenantId"))) { if (!Func.isEmpty(alarmInfo.get("tenantId"))) {
@ -97,6 +104,7 @@ public class ImsMonAlarmInfoController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入alarmInfo") @ApiOperation(value = "新增", notes = "传入alarmInfo")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody ImsMonAlarmInfoEntity alarmInfo) { public R save(@Valid @RequestBody ImsMonAlarmInfoEntity alarmInfo) {
return R.status(alarmInfoService.save(alarmInfo)); return R.status(alarmInfoService.save(alarmInfo));
} }
@ -107,19 +115,19 @@ public class ImsMonAlarmInfoController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入alarmInfo") @ApiOperation(value = "修改", notes = "传入alarmInfo")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody ImsMonAlarmInfoEntity alarmInfo) { public R update(@Valid @RequestBody ImsMonAlarmInfoEntity alarmInfo) {
return R.status(alarmInfoService.updateById(alarmInfo)); return R.status(alarmInfoService.updateById(alarmInfo));
} }
/** /**
* 删除 代码自定义代号 * 删除 代码自定义代号
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, 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(alarmInfoService.deleteLogic(Func.toLongList(ids))); return R.status(alarmInfoService.deleteLogic(Func.toLongList(ids)));
} }
} }

13
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ImsMonCameraInfoController.java

@ -6,8 +6,11 @@ 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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.ImsMonCameraInfoEntity; import com.hnac.hzims.safeproduct.entity.ImsMonCameraInfoEntity;
import com.hnac.hzims.safeproduct.service.IImsMonCameraInfoService; import com.hnac.hzims.safeproduct.service.IImsMonCameraInfoService;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.boot.ctrl.BladeController;
@ -31,6 +34,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/cameraInfo") @RequestMapping("/cameraInfo")
@Business(module = Constants.APP_NAME, value = "视频监控告警摄像头信息", ignore = false)
@Api(value = "视频监控告警摄像头信息", tags = "视频监控告警摄像头信息") @Api(value = "视频监控告警摄像头信息", tags = "视频监控告警摄像头信息")
public class ImsMonCameraInfoController extends BladeController { public class ImsMonCameraInfoController extends BladeController {
@ -42,6 +46,7 @@ public class ImsMonCameraInfoController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入cameraInfo") @ApiOperation(value = "详情", notes = "传入cameraInfo")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<ImsMonCameraInfoEntity> detail(ImsMonCameraInfoEntity cameraInfo) { public R<ImsMonCameraInfoEntity> detail(ImsMonCameraInfoEntity cameraInfo) {
ImsMonCameraInfoEntity detail = cameraInfoService.getOne(Condition.getQueryWrapper(cameraInfo)); ImsMonCameraInfoEntity detail = cameraInfoService.getOne(Condition.getQueryWrapper(cameraInfo));
return R.data(detail); return R.data(detail);
@ -53,6 +58,7 @@ public class ImsMonCameraInfoController extends BladeController {
@GetMapping("/list-no-page") @GetMapping("/list-no-page")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@ApiOperation(value = "不分页获取list", notes = "不分页获取list") @ApiOperation(value = "不分页获取list", notes = "不分页获取list")
@Operate(label = "不分页获取list", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<List<ImsMonCameraInfoEntity>> listNoPage(ImsMonCameraInfoEntity entity) { public R<List<ImsMonCameraInfoEntity>> listNoPage(ImsMonCameraInfoEntity entity) {
QueryWrapper<ImsMonCameraInfoEntity> queryWrapper = Condition.getQueryWrapper(entity); QueryWrapper<ImsMonCameraInfoEntity> queryWrapper = Condition.getQueryWrapper(entity);
queryWrapper.isNotNull("MONITOR_ITEMS"); queryWrapper.isNotNull("MONITOR_ITEMS");
@ -83,6 +89,7 @@ public class ImsMonCameraInfoController extends BladeController {
operatorType = OperatorType.MOBILE, operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE, businessType = BusinessType.GENCODE,
action = "分页") action = "分页")
@Operate(label = "分页-代码自定义代号", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage<ImsMonCameraInfoEntity>> list(@ApiIgnore @RequestParam Map<String,Object> cameraInfo, Query query) { public R<IPage<ImsMonCameraInfoEntity>> list(@ApiIgnore @RequestParam Map<String,Object> cameraInfo, Query query) {
QueryWrapper<ImsMonCameraInfoEntity> queryWrapper = new QueryWrapper<>(); QueryWrapper<ImsMonCameraInfoEntity> queryWrapper = new QueryWrapper<>();
if (!Func.isEmpty(cameraInfo.get("tenantId"))) { if (!Func.isEmpty(cameraInfo.get("tenantId"))) {
@ -130,6 +137,7 @@ public class ImsMonCameraInfoController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入cameraInfo") @ApiOperation(value = "新增", notes = "传入cameraInfo")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) { public R save(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) {
return R.status(cameraInfoService.save(cameraInfo)); return R.status(cameraInfoService.save(cameraInfo));
} }
@ -140,6 +148,7 @@ public class ImsMonCameraInfoController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入cameraInfo") @ApiOperation(value = "修改", notes = "传入cameraInfo")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) { public R update(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) {
return R.status(cameraInfoService.updateById(cameraInfo)); return R.status(cameraInfoService.updateById(cameraInfo));
} }
@ -150,19 +159,19 @@ public class ImsMonCameraInfoController extends BladeController {
@PostMapping("/submit") @PostMapping("/submit")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入cameraInfo") @ApiOperation(value = "新增或修改", notes = "传入cameraInfo")
@Operate(label = "新增或修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R submit(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) { public R submit(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) {
return R.status(cameraInfoService.saveOrUpdate(cameraInfo)); return R.status(cameraInfoService.saveOrUpdate(cameraInfo));
} }
/** /**
* 删除 代码自定义代号 * 删除 代码自定义代号
*/ */
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, 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(cameraInfoService.deleteLogic(Func.toLongList(ids))); return R.status(cameraInfoService.deleteLogic(Func.toLongList(ids)));
} }
} }

19
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/RehearsalController.java

@ -2,6 +2,7 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity; import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity;
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity; import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity;
import com.hnac.hzims.safeproduct.service.IRehearsalPlanService; import com.hnac.hzims.safeproduct.service.IRehearsalPlanService;
@ -10,6 +11,9 @@ import com.hnac.hzims.safeproduct.vo.RehearsalRecordDetailVO;
import com.hnac.hzims.safeproduct.vo.RehearsalMonthVO; import com.hnac.hzims.safeproduct.vo.RehearsalMonthVO;
import com.hnac.hzims.safeproduct.vo.RehearsalRecordlVO; import com.hnac.hzims.safeproduct.vo.RehearsalRecordlVO;
import com.hnac.hzims.safeproduct.vo.RehearsalYearVO; import com.hnac.hzims.safeproduct.vo.RehearsalYearVO;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -34,6 +38,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/rehearsal") @RequestMapping("/rehearsal")
@Business(module = Constants.APP_NAME, value = "演练管理", ignore = false)
@Api(value = "演练管理", tags = "演练管理接口") @Api(value = "演练管理", tags = "演练管理接口")
public class RehearsalController extends BladeController { public class RehearsalController extends BladeController {
@ -44,6 +49,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperation(value = "新增演练计划") @ApiOperation(value = "新增演练计划")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增演练计划", type = BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody RehearsalPlanEntity rehearsalPlan) { public R save(@Valid @RequestBody RehearsalPlanEntity rehearsalPlan) {
return R.status(rehearsalPlanService.save(rehearsalPlan)); return R.status(rehearsalPlanService.save(rehearsalPlan));
} }
@ -51,6 +57,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperation(value = "修改演练计划") @ApiOperation(value = "修改演练计划")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "修改演练计划", type = BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody RehearsalPlanEntity rehearsalPlan) { public R update(@Valid @RequestBody RehearsalPlanEntity rehearsalPlan) {
return R.status(rehearsalPlanService.updateById(rehearsalPlan)); return R.status(rehearsalPlanService.updateById(rehearsalPlan));
} }
@ -58,6 +65,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperation(value = "删除演练计划") @ApiOperation(value = "删除演练计划")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "删除演练计划", type = BusinessType.DELETE, ignore = false)
public R remove(@RequestParam Long id) { public R remove(@RequestParam Long id) {
return R.status(rehearsalPlanService.removeRehearsalPlan(id)); return R.status(rehearsalPlanService.removeRehearsalPlan(id));
} }
@ -65,6 +73,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperation(value = "演练计划详情") @ApiOperation(value = "演练计划详情")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "演练计划详情", type = BusinessType.QUERY, ignore = false)
public R<RehearsalPlanEntity> detail(@RequestParam Long id) { public R<RehearsalPlanEntity> detail(@RequestParam Long id) {
return R.data(rehearsalPlanService.getById(id)); return R.data(rehearsalPlanService.getById(id));
} }
@ -77,6 +86,7 @@ public class RehearsalController extends BladeController {
}) })
@ApiOperation(value = "演练计划分页") @ApiOperation(value = "演练计划分页")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@Operate(label = "演练计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalPlanEntity>> page(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<RehearsalPlanEntity>> page(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<RehearsalPlanEntity> page = rehearsalPlanService.rehearsalPlanPage(param, query); IPage<RehearsalPlanEntity> page = rehearsalPlanService.rehearsalPlanPage(param, query);
return R.data(page); return R.data(page);
@ -85,6 +95,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/saveRehearsalRecord") @PostMapping("/saveRehearsalRecord")
@ApiOperation(value = "新增演练记录") @ApiOperation(value = "新增演练记录")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Operate(label = "新增演练记录", type = BusinessType.INSERT, ignore = false)
public R saveRehearsalRecord(@Valid @RequestBody RehearsalRecordEntity rehearsalRecord) { public R saveRehearsalRecord(@Valid @RequestBody RehearsalRecordEntity rehearsalRecord) {
return R.status(rehearsalRecordService.saveRehearsalRecord(rehearsalRecord)); return R.status(rehearsalRecordService.saveRehearsalRecord(rehearsalRecord));
} }
@ -92,6 +103,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/updateRehearsalRecord") @PostMapping("/updateRehearsalRecord")
@ApiOperation(value = "修改演练记录") @ApiOperation(value = "修改演练记录")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@Operate(label = "修改演练记录", type = BusinessType.UPDATE, ignore = false)
public R updateRehearsalRecord(@Valid @RequestBody RehearsalRecordEntity rehearsalRecord) { public R updateRehearsalRecord(@Valid @RequestBody RehearsalRecordEntity rehearsalRecord) {
return R.status(rehearsalRecordService.updateRehearsalRecord(rehearsalRecord)); return R.status(rehearsalRecordService.updateRehearsalRecord(rehearsalRecord));
} }
@ -99,6 +111,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/removeRehearsalRecord") @PostMapping("/removeRehearsalRecord")
@ApiOperation(value = "删除演练记录") @ApiOperation(value = "删除演练记录")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@Operate(label = "删除演练记录", type = BusinessType.DELETE, ignore = false)
public R removeRehearsalRecord(@RequestParam Long id) { public R removeRehearsalRecord(@RequestParam Long id) {
return R.status(rehearsalRecordService.removeById(id)); return R.status(rehearsalRecordService.removeById(id));
} }
@ -106,6 +119,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/rehearsalRecordDetail") @GetMapping("/rehearsalRecordDetail")
@ApiOperation(value = "演练记录详情") @ApiOperation(value = "演练记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@Operate(label = "演练记录详情", type = BusinessType.QUERY, ignore = false)
public R<RehearsalRecordDetailVO> rehearsalRecordDetail(@RequestParam Long id) { public R<RehearsalRecordDetailVO> rehearsalRecordDetail(@RequestParam Long id) {
return R.data(rehearsalRecordService.getRecordDetailVOById(id)); return R.data(rehearsalRecordService.getRecordDetailVOById(id));
} }
@ -119,6 +133,7 @@ public class RehearsalController extends BladeController {
}) })
@ApiOperation(value = "演练记录分页") @ApiOperation(value = "演练记录分页")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@Operate(label = "演练记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalRecordlVO>> rehearsalRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<RehearsalRecordlVO>> rehearsalRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<RehearsalRecordlVO> page = rehearsalRecordService.rehearsalRecordPage(param, query); IPage<RehearsalRecordlVO> page = rehearsalRecordService.rehearsalRecordPage(param, query);
return R.data(page); return R.data(page);
@ -127,6 +142,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/dataByMonth") @GetMapping("/dataByMonth")
@ApiOperation(value = "月度统计表") @ApiOperation(value = "月度统计表")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 11)
@Operate(label = "月度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalMonthVO>> dataByMonth(@RequestParam String month, String unit, Query query) { public R<IPage<RehearsalMonthVO>> dataByMonth(@RequestParam String month, String unit, Query query) {
IPage<RehearsalMonthVO> page = rehearsalPlanService.dataByMonth(month, unit, query); IPage<RehearsalMonthVO> page = rehearsalPlanService.dataByMonth(month, unit, query);
return R.data(page); return R.data(page);
@ -135,6 +151,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/dataByYear") @GetMapping("/dataByYear")
@ApiOperation(value = "年度统计表") @ApiOperation(value = "年度统计表")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
@Operate(label = "年度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalYearVO>> dataByYear(@RequestParam String year, String unit, Query query) { public R<IPage<RehearsalYearVO>> dataByYear(@RequestParam String year, String unit, Query query) {
IPage<RehearsalYearVO> page = rehearsalPlanService.dataByYear(year, unit, query); IPage<RehearsalYearVO> page = rehearsalPlanService.dataByYear(year, unit, query);
return R.data(page); return R.data(page);
@ -148,6 +165,7 @@ public class RehearsalController extends BladeController {
}) })
@ApiOperation(value = "演练数据导出") @ApiOperation(value = "演练数据导出")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
@Operate(label = "演练数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportRehearsalData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { public void exportRehearsalData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
rehearsalPlanService.exportRehearsalPlanData(param, response); rehearsalPlanService.exportRehearsalPlanData(param, response);
} }
@ -155,6 +173,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/exportRecordDetailData") @GetMapping("/exportRecordDetailData")
@ApiOperation(value = "演练记录表导出") @ApiOperation(value = "演练记录表导出")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 14)
@Operate(label = "演练记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportRehearsalRecordData(@RequestParam Long id, HttpServletResponse response) { public void exportRehearsalRecordData(@RequestParam Long id, HttpServletResponse response) {
rehearsalRecordService.exportRehearsalRecordData(id, response); rehearsalRecordService.exportRehearsalRecordData(id, response);
} }

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/ReviewController.java

@ -16,6 +16,8 @@ import com.hnac.hzims.safeproduct.service.IReviewService;
import com.hnac.hzims.safeproduct.service.IReviewStandardService; import com.hnac.hzims.safeproduct.service.IReviewStandardService;
import com.hnac.hzims.safeproduct.vo.ReviewVo; import com.hnac.hzims.safeproduct.vo.ReviewVo;
import com.hnac.hzims.safeproduct.wrapper.ReviewWrapper; import com.hnac.hzims.safeproduct.wrapper.ReviewWrapper;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -30,8 +32,6 @@ import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.core.tool.utils.CollectionUtil; import org.springblade.core.tool.utils.CollectionUtil;
import org.springblade.core.tool.utils.Func; import org.springblade.core.tool.utils.Func;
import org.springblade.core.tool.utils.ObjectUtil; import org.springblade.core.tool.utils.ObjectUtil;
import org.springblade.system.feign.ISysClient;
import org.springblade.system.user.cache.UserCache;
import org.springblade.system.user.entity.User; import org.springblade.system.user.entity.User;
import org.springblade.system.user.feign.IUserClient; import org.springblade.system.user.feign.IUserClient;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -39,8 +39,6 @@ import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.Year;
import java.time.temporal.TemporalAdjuster;
import java.time.temporal.TemporalAdjusters; import java.time.temporal.TemporalAdjusters;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@ -53,16 +51,20 @@ import java.util.Optional;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping("/review") @RequestMapping("/review")
@Business(module = Constants.APP_NAME, value = "站点安全生产标准化评审管理", ignore = false)
@Api(value = "站点安全生产标准化评审管理",tags = "站点安全生产标准化评审管理") @Api(value = "站点安全生产标准化评审管理",tags = "站点安全生产标准化评审管理")
public class ReviewController extends BladeController { public class ReviewController extends BladeController {
private final IReviewService reviewService; private final IReviewService reviewService;
private final IUserClient userClient; private final IUserClient userClient;
private final IReviewStandardService reviewStandardService; private final IReviewStandardService reviewStandardService;
@PostMapping("/save") @PostMapping("/save")
@ApiOperation("保存") @ApiOperation("保存")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R<Boolean> save(@RequestBody ReviewDto req) { public R<Boolean> save(@RequestBody ReviewDto req) {
//查询该站点是否已录入站点 //查询该站点是否已录入站点
LocalDateTime lastDayOfYear = LocalDateTime.now().with(TemporalAdjusters.lastDayOfYear()); LocalDateTime lastDayOfYear = LocalDateTime.now().with(TemporalAdjusters.lastDayOfYear());
@ -91,6 +93,7 @@ public class ReviewController extends BladeController {
@ApiOperation("编辑/提交/评审") @ApiOperation("编辑/提交/评审")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Operate(label = "编辑/提交/评审", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R<Boolean> update(@RequestBody ReviewDto req) { public R<Boolean> update(@RequestBody ReviewDto req) {
ReviewEntity entity = BeanUtil.copy(req,ReviewEntity.class); ReviewEntity entity = BeanUtil.copy(req,ReviewEntity.class);
if(Constants.REVIEW_SUBMIT_STATUS == entity.getStatus()){ if(Constants.REVIEW_SUBMIT_STATUS == entity.getStatus()){
@ -123,6 +126,7 @@ public class ReviewController extends BladeController {
@GetMapping("/detail/{id}") @GetMapping("/detail/{id}")
@ApiOperation("查看详情") @ApiOperation("查看详情")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "查看详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<ReviewVo> detail(@PathVariable @ApiParam("删除id,按逗号分隔") String id) { public R<ReviewVo> detail(@PathVariable @ApiParam("删除id,按逗号分隔") String id) {
ReviewEntity reviewEntity = reviewService.getById(id); ReviewEntity reviewEntity = reviewService.getById(id);
ReviewVo vo = ReviewWrapper.build().entityVO(reviewEntity); ReviewVo vo = ReviewWrapper.build().entityVO(reviewEntity);
@ -139,6 +143,7 @@ public class ReviewController extends BladeController {
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@OperationAnnotation(moduleName = "电站安全标准",title = "电站安全标准",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, @OperationAnnotation(moduleName = "电站安全标准",title = "电站安全标准",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询") action = "分页查询")
@Operate(label = "分页查询", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage> listPage(ReviewDto req, Query query) { public R<IPage> listPage(ReviewDto req, Query query) {
LambdaQueryWrapper<ReviewEntity> queryWrapper = Condition.getQueryWrapper(new ReviewEntity(),BeanUtil.copy(req,ReviewEntity.class)); LambdaQueryWrapper<ReviewEntity> queryWrapper = Condition.getQueryWrapper(new ReviewEntity(),BeanUtil.copy(req,ReviewEntity.class));
if(Func.isNotEmpty(req.getStatus())){ if(Func.isNotEmpty(req.getStatus())){
@ -155,6 +160,7 @@ public class ReviewController extends BladeController {
@ApiOperation("删除") @ApiOperation("删除")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Operate(label = "删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, ignore = false)
public R<Boolean> removeByIds(@PathVariable String ids) { public R<Boolean> removeByIds(@PathVariable String ids) {
Arrays.stream(ids.split(",")).forEach(id->{ Arrays.stream(ids.split(",")).forEach(id->{
//先删除标准内分数 //先删除标准内分数

12
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafeEquipmentTrialController.java

@ -1,14 +1,16 @@
package com.hnac.hzims.safeproduct.controller; package com.hnac.hzims.safeproduct.controller;
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.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SafeEquipmentTrialDTO; import com.hnac.hzims.safeproduct.dto.SafeEquipmentTrialDTO;
import com.hnac.hzims.safeproduct.entity.SafeEquipmentTrialEntity; import com.hnac.hzims.safeproduct.entity.SafeEquipmentTrialEntity;
import com.hnac.hzims.safeproduct.service.SafeEquipmentTrialService; import com.hnac.hzims.safeproduct.service.SafeEquipmentTrialService;
import com.hnac.hzims.safeproduct.vo.SafeEquipmentTrialVO; import com.hnac.hzims.safeproduct.vo.SafeEquipmentTrialVO;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
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;
@ -26,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/safeEquimentTrial") @RequestMapping("/safeEquimentTrial")
@Business(module = Constants.APP_NAME, value = "设备试验", ignore = false)
@Api(tags = "设备试验") @Api(tags = "设备试验")
public class SafeEquipmentTrialController extends BladeController { public class SafeEquipmentTrialController extends BladeController {
@ -37,6 +40,7 @@ public class SafeEquipmentTrialController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔") @ApiOperation(value = "逻辑删除", notes = "传入id字符串以逗号分隔")
@Operate(label = "逻辑删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, 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)));
} }
@ -47,6 +51,7 @@ public class SafeEquipmentTrialController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入SafeEquipmentTrialEntity对象") @ApiOperation(value = "新增", notes = "传入SafeEquipmentTrialEntity对象")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SafeEquipmentTrialEntity entity) { public R save(@RequestBody SafeEquipmentTrialEntity entity) {
return R.status(service.save(entity)); return R.status(service.save(entity));
} }
@ -60,11 +65,11 @@ public class SafeEquipmentTrialController 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, ignore = false)
public R<BladePage<SafeEquipmentTrialVO>> list(SafeEquipmentTrialDTO safeEquipmentTrialDTO, Query query) { public R<BladePage<SafeEquipmentTrialVO>> list(SafeEquipmentTrialDTO safeEquipmentTrialDTO, Query query) {
return service.pageCondition(safeEquipmentTrialDTO, query); return service.pageCondition(safeEquipmentTrialDTO, query);
} }
/** /**
* 设备历史数据 * 设备历史数据
* @return * @return
@ -77,7 +82,6 @@ public class SafeEquipmentTrialController extends BladeController {
return R.success("调用查询设备历史数据成功"); return R.success("调用查询设备历史数据成功");
} }
/** /**
* 设备档案 * 设备档案
* @return * @return
@ -89,6 +93,4 @@ public class SafeEquipmentTrialController extends BladeController {
public R internaldevice() { public R internaldevice() {
return R.success("调用查询设备档案数据成功"); return R.success("调用查询设备档案数据成功");
} }
} }

10
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafeReportController.java

@ -2,8 +2,12 @@ package com.hnac.hzims.safeproduct.controller;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.hazard.service.IDangerSourceService; import com.hnac.hzims.safeproduct.hazard.service.IDangerSourceService;
import com.hnac.hzims.safeproduct.vo.DangerSourceReportVO; import com.hnac.hzims.safeproduct.vo.DangerSourceReportVO;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -13,7 +17,6 @@ import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
/** /**
* @author xiashandong * @author xiashandong
* @created 2020/9/1 15:15 * @created 2020/9/1 15:15
@ -21,21 +24,20 @@ import java.util.List;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/safeReport") @RequestMapping("/safeReport")
@Business(module = Constants.APP_NAME, value = "安全管理统计报表", ignore = false)
@Api(tags = "安全管理统计报表") @Api(tags = "安全管理统计报表")
public class SafeReportController extends BladeController { public class SafeReportController extends BladeController {
private final IDangerSourceService dangerSourceService; private final IDangerSourceService dangerSourceService;
/** /**
* 危险源等级统计 * 危险源等级统计
*/ */
@GetMapping("/danger-source-level-count") @GetMapping("/danger-source-level-count")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@ApiOperation(value = "危险源等级统计", notes = "危险源等级统计") @ApiOperation(value = "危险源等级统计", notes = "危险源等级统计")
@Operate(label = "危险源等级统计", type = BusinessType.QUERY, ignore = false)
public List<DangerSourceReportVO> getLevelCount() { public List<DangerSourceReportVO> getLevelCount() {
return dangerSourceService.getLevelCount(); return dangerSourceService.getLevelCount();
} }
} }

16
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolController.java

@ -5,6 +5,7 @@ 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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SafetyToolBatchRecheckDTO; import com.hnac.hzims.safeproduct.dto.SafetyToolBatchRecheckDTO;
import com.hnac.hzims.safeproduct.dto.SafetyToolDTO; import com.hnac.hzims.safeproduct.dto.SafetyToolDTO;
import com.hnac.hzims.safeproduct.entity.SafetyToolEntity; import com.hnac.hzims.safeproduct.entity.SafetyToolEntity;
@ -13,6 +14,8 @@ import com.hnac.hzims.safeproduct.vo.SafetyToolVO;
import com.hnac.hzims.safeproduct.wrapper.SafetyToolWrapper; import com.hnac.hzims.safeproduct.wrapper.SafetyToolWrapper;
import com.hnac.hzims.vo.SafeCheckStatisticVO; import com.hnac.hzims.vo.SafeCheckStatisticVO;
import com.hnac.hzinfo.inspect.task.feign.IInspectTaskClient; import com.hnac.hzinfo.inspect.task.feign.IInspectTaskClient;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
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;
@ -43,6 +46,7 @@ import java.util.List;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/safetyTool") @RequestMapping("/safetyTool")
@Business(module = Constants.APP_NAME, value = "安全工器具", ignore = false)
@Api(tags = "安全工器具") @Api(tags = "安全工器具")
public class SafetyToolController extends BladeController { public class SafetyToolController extends BladeController {
@ -54,6 +58,7 @@ public class SafetyToolController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return safetyToolService.remove(Func.toLongList(ids)); return safetyToolService.remove(Func.toLongList(ids));
} }
@ -64,6 +69,7 @@ public class SafetyToolController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入safetyTool") @ApiOperation(value = "新增", notes = "传入safetyTool")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SafetyToolEntity safetyTool) { public R save(@RequestBody SafetyToolEntity safetyTool) {
return safetyToolService.doSave(safetyTool); return safetyToolService.doSave(safetyTool);
} }
@ -74,6 +80,7 @@ public class SafetyToolController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入safetyTool") @ApiOperation(value = "修改", notes = "传入safetyTool")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody SafetyToolEntity safetyTool) { public R update(@RequestBody SafetyToolEntity safetyTool) {
return safetyToolService.doUpdate(safetyTool); return safetyToolService.doUpdate(safetyTool);
} }
@ -84,6 +91,7 @@ public class SafetyToolController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入safetyTool") @ApiOperation(value = "详情", notes = "传入safetyTool")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<SafetyToolVO> detail(@RequestParam("id") Long id) { public R<SafetyToolVO> detail(@RequestParam("id") Long id) {
SafetyToolEntity detail = safetyToolService.getOne(Condition.getQueryWrapper(new SafetyToolEntity() {{ SafetyToolEntity detail = safetyToolService.getOne(Condition.getQueryWrapper(new SafetyToolEntity() {{
setId(id); setId(id);
@ -101,6 +109,7 @@ public class SafetyToolController extends BladeController {
BusinessType.GENCODE, BusinessType.GENCODE,
action = "分页查询安全工具器列表") action = "分页查询安全工具器列表")
@ApiOperation(value = "分页", notes = "查询条件:typeId,toolName,toolCode") @ApiOperation(value = "分页", notes = "查询条件:typeId,toolName,toolCode")
@Operate(label = "分页", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage<SafetyToolVO>> list(SafetyToolDTO req, Query query) { public R<IPage<SafetyToolVO>> list(SafetyToolDTO req, Query query) {
return safetyToolService.pageCondition(req, query); return safetyToolService.pageCondition(req, query);
} }
@ -111,17 +120,18 @@ public class SafetyToolController extends BladeController {
@GetMapping("/listAll") @GetMapping("/listAll")
@ApiOperationSupport(order = 51) @ApiOperationSupport(order = 51)
@ApiOperation(value = "根据条件查询所有记录", notes = "查询条件:请参考分页接口") @ApiOperation(value = "根据条件查询所有记录", notes = "查询条件:请参考分页接口")
@Operate(label = "根据条件查询所有记录", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<List<SafetyToolVO>> queryByCondition(SafetyToolDTO req) { public R<List<SafetyToolVO>> queryByCondition(SafetyToolDTO req) {
return safetyToolService.queryByCondition(req); return safetyToolService.queryByCondition(req);
} }
/** /**
* 审核批量审核 * 审核批量审核
*/ */
@PostMapping("/batchRecheck") @PostMapping("/batchRecheck")
@ApiOperationSupport(order = 52) @ApiOperationSupport(order = 52)
@ApiOperation(value = "复核、批量审核") @ApiOperation(value = "复核、批量审核")
@Operate(label = "复核、批量审核", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R batchRecheck(@RequestBody SafetyToolBatchRecheckDTO req) { public R batchRecheck(@RequestBody SafetyToolBatchRecheckDTO req) {
safetyToolService.doBatchRecheck(req); safetyToolService.doBatchRecheck(req);
return R.status(true); return R.status(true);
@ -133,6 +143,7 @@ public class SafetyToolController extends BladeController {
@ApiOperation(value = "导出Excel", notes = "查询条件:请参考分页接口") @ApiOperation(value = "导出Excel", notes = "查询条件:请参考分页接口")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@GetMapping(value = "/exportExcel") @GetMapping(value = "/exportExcel")
@Operate(label = "导出Excel", type = com.hnac.hzinfo.log.contants.BusinessType.EXPORT, ignore = false)
public void exportExcel(SafetyToolDTO req) { public void exportExcel(SafetyToolDTO req) {
safetyToolService.exportExcel(req); safetyToolService.exportExcel(req);
} }
@ -143,6 +154,7 @@ public class SafetyToolController extends BladeController {
@ApiOperation(value = "导入Excel") @ApiOperation(value = "导入Excel")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
@PostMapping(value = "/importExcel") @PostMapping(value = "/importExcel")
@Operate(label = "导入Excel", type = com.hnac.hzinfo.log.contants.BusinessType.IMPORT, ignore = false)
public R importExcel(MultipartFile file,Long createDept) { public R importExcel(MultipartFile file,Long createDept) {
safetyToolService.importExcel(file,createDept); safetyToolService.importExcel(file,createDept);
return R.data(true); return R.data(true);
@ -151,6 +163,7 @@ public class SafetyToolController extends BladeController {
@ApiOperationSupport(order = 80) @ApiOperationSupport(order = 80)
@ApiOperation(value = "安全工器具导出,下载pdf", notes = "安全工器具导出,下载pdf") @ApiOperation(value = "安全工器具导出,下载pdf", notes = "安全工器具导出,下载pdf")
@RequestMapping(value = "/safetyToolRQExport", method = {RequestMethod.GET, RequestMethod.POST}) @RequestMapping(value = "/safetyToolRQExport", method = {RequestMethod.GET, RequestMethod.POST})
@Operate(label = "安全工器具导出,下载pdf", type = com.hnac.hzinfo.log.contants.BusinessType.EXPORT, ignore = false)
public void safetyToolRQExport(HttpServletResponse response, @ApiParam(value = "导出对象的ids, 通过,隔开。 不传则返回全部对象", required = false) @RequestParam String ids) throws IOException { public void safetyToolRQExport(HttpServletResponse response, @ApiParam(value = "导出对象的ids, 通过,隔开。 不传则返回全部对象", required = false) @RequestParam String ids) throws IOException {
List idList = null; List idList = null;
if(Func.isNotEmpty(ids)){ if(Func.isNotEmpty(ids)){
@ -174,6 +187,7 @@ public class SafetyToolController extends BladeController {
} }
@GetMapping("/getInspectTaskCheck") @GetMapping("/getInspectTaskCheck")
@Operate(label = "获取安全检查巡检任务", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R getInspectTaskCheck(@RequestParam String startDate, @RequestParam String endDate, @RequestParam Long dept){ public R getInspectTaskCheck(@RequestParam String startDate, @RequestParam String endDate, @RequestParam Long dept){
IInspectTaskClient taskClient = SpringUtil.getBean(IInspectTaskClient.class); IInspectTaskClient taskClient = SpringUtil.getBean(IInspectTaskClient.class);
SafeCheckStatisticVO vo = taskClient.getInspectTaskCheck(startDate,endDate,dept,"1").getData(); SafeCheckStatisticVO vo = taskClient.getInspectTaskCheck(startDate,endDate,dept,"1").getData();

7
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolRecheckController.java

@ -2,9 +2,13 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SafetyToolRecheckListDTO; import com.hnac.hzims.safeproduct.dto.SafetyToolRecheckListDTO;
import com.hnac.hzims.safeproduct.service.ISafetyToolRecheckService; import com.hnac.hzims.safeproduct.service.ISafetyToolRecheckService;
import com.hnac.hzims.safeproduct.vo.SafetyToolRecheckVO; import com.hnac.hzims.safeproduct.vo.SafetyToolRecheckVO;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -15,7 +19,6 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
/** /**
* @author xiashandong * @author xiashandong
* @created 2020/8/27 17:18 * @created 2020/8/27 17:18
@ -23,6 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/safetyToolRecheck") @RequestMapping("/safetyToolRecheck")
@Business(module = Constants.APP_NAME, value = "安全工器具复核记录", ignore = false)
@Api(tags = "安全工器具复核记录") @Api(tags = "安全工器具复核记录")
public class SafetyToolRecheckController extends BladeController { public class SafetyToolRecheckController extends BladeController {
@ -34,6 +38,7 @@ public class SafetyToolRecheckController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "分页", notes = "查询条件:toolId,checkUserId,checkUserName") @ApiOperation(value = "分页", notes = "查询条件:toolId,checkUserId,checkUserName")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<SafetyToolRecheckVO>> list(SafetyToolRecheckListDTO req, Query query) { public R<IPage<SafetyToolRecheckVO>> list(SafetyToolRecheckListDTO req, Query query) {
return safetyToolRecheckService.pageCondition(req, query); return safetyToolRecheckService.pageCondition(req, query);
} }

14
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SafetyToolTypeController.java

@ -5,11 +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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SafetyToolTypeBatchConfigDTO; import com.hnac.hzims.safeproduct.dto.SafetyToolTypeBatchConfigDTO;
import com.hnac.hzims.safeproduct.dto.SafetyToolTypeDTO; import com.hnac.hzims.safeproduct.dto.SafetyToolTypeDTO;
import com.hnac.hzims.safeproduct.dto.SafetyToolTypeListDTO; import com.hnac.hzims.safeproduct.dto.SafetyToolTypeListDTO;
import com.hnac.hzims.safeproduct.service.ISafetyToolTypeService; import com.hnac.hzims.safeproduct.service.ISafetyToolTypeService;
import com.hnac.hzims.safeproduct.vo.SafetyToolTypeVO; import com.hnac.hzims.safeproduct.vo.SafetyToolTypeVO;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
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;
@ -19,13 +22,11 @@ import org.springblade.core.log.annotation.ApiLog;
import org.springblade.core.mp.support.Query; 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.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
import java.util.Map; import java.util.Map;
/** /**
* 控制器 * 控制器
* *
@ -34,6 +35,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/safetyToolType") @RequestMapping("/safetyToolType")
@Business(module = Constants.APP_NAME, value = "安全工器具类型", ignore = false)
@Api(tags = "安全工器具类型") @Api(tags = "安全工器具类型")
public class SafetyToolTypeController extends BladeController { public class SafetyToolTypeController extends BladeController {
@ -45,6 +47,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, 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(safetyToolTypeService.deleteLogic(Func.toLongList(ids))); return R.status(safetyToolTypeService.deleteLogic(Func.toLongList(ids)));
} }
@ -55,6 +58,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入safetyToolType") @ApiOperation(value = "新增", notes = "传入safetyToolType")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SafetyToolTypeDTO safetyToolType) { public R save(@RequestBody SafetyToolTypeDTO safetyToolType) {
return R.data(safetyToolTypeService.doSave(safetyToolType)); return R.data(safetyToolTypeService.doSave(safetyToolType));
} }
@ -65,6 +69,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/batchConfig") @PostMapping("/batchConfig")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "批量配置", notes = "传入safetyToolType") @ApiOperation(value = "批量配置", notes = "传入safetyToolType")
@Operate(label = "批量配置", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R batchConfig(@Valid @RequestBody SafetyToolTypeBatchConfigDTO req) { public R batchConfig(@Valid @RequestBody SafetyToolTypeBatchConfigDTO req) {
safetyToolTypeService.doBatchConfig(req); safetyToolTypeService.doBatchConfig(req);
return R.status(true); return R.status(true);
@ -76,6 +81,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "修改", notes = "传入safetyToolType") @ApiOperation(value = "修改", notes = "传入safetyToolType")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody SafetyToolTypeDTO req) { public R update(@RequestBody SafetyToolTypeDTO req) {
safetyToolTypeService.doEdit(req); safetyToolTypeService.doEdit(req);
return R.status(true); return R.status(true);
@ -87,6 +93,7 @@ public class SafetyToolTypeController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "详情", notes = "传入safetyToolType") @ApiOperation(value = "详情", notes = "传入safetyToolType")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<SafetyToolTypeVO> detail(@RequestParam("id") Long id) { public R<SafetyToolTypeVO> detail(@RequestParam("id") Long id) {
return R.data(safetyToolTypeService.detail(id)); return R.data(safetyToolTypeService.detail(id));
} }
@ -100,6 +107,7 @@ public class SafetyToolTypeController extends BladeController {
@OperationAnnotation(moduleName = "安全管理",title = "安全工器具类型",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE, @OperationAnnotation(moduleName = "安全管理",title = "安全工器具类型",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询安全工器具类型数据") action = "分页查询安全工器具类型数据")
@ApiOperation(value = "分页", notes = "查询条件:sendType,name,startSendTime,endSendTime") @ApiOperation(value = "分页", notes = "查询条件:sendType,name,startSendTime,endSendTime")
@Operate(label = "分页", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage<SafetyToolTypeVO>> list(SafetyToolTypeListDTO req, Query query) { public R<IPage<SafetyToolTypeVO>> list(SafetyToolTypeListDTO req, Query query) {
return R.data(safetyToolTypeService.pageCondition(req, query)); return R.data(safetyToolTypeService.pageCondition(req, query));
} }
@ -110,8 +118,8 @@ public class SafetyToolTypeController extends BladeController {
@GetMapping("/getSelOption") @GetMapping("/getSelOption")
@ApiOperationSupport(order = 70) @ApiOperationSupport(order = 70)
@ApiOperation(value = "获取工器具类型下拉框选项列表") @ApiOperation(value = "获取工器具类型下拉框选项列表")
@Operate(label = "获取工器具类型下拉框选项列表", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<Map<String, String>> getSelOption() { public R<Map<String, String>> getSelOption() {
return R.data(safetyToolTypeService.getSelOption()); return R.data(safetyToolTypeService.getSelOption());
} }
} }

15
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SpecialDeviceController.java

@ -3,10 +3,14 @@ package com.hnac.hzims.safeproduct.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.common.utils.Condition; import com.hnac.hzims.common.utils.Condition;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.SpecialDeviceEntity; import com.hnac.hzims.safeproduct.entity.SpecialDeviceEntity;
import com.hnac.hzims.safeproduct.entity.SpecialDeviceInspectionEntity; import com.hnac.hzims.safeproduct.entity.SpecialDeviceInspectionEntity;
import com.hnac.hzims.safeproduct.service.ISpecialDeviceInspectionService; import com.hnac.hzims.safeproduct.service.ISpecialDeviceInspectionService;
import com.hnac.hzims.safeproduct.service.ISpecialDeviceService; import com.hnac.hzims.safeproduct.service.ISpecialDeviceService;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -30,6 +34,7 @@ import java.util.Map;
@RequestMapping("/specialDevice") @RequestMapping("/specialDevice")
@AllArgsConstructor @AllArgsConstructor
@RestController @RestController
@Business(module = Constants.APP_NAME, value = "特种设备", ignore = false)
@Api(value = "特种设备", tags = "特种设备接口") @Api(value = "特种设备", tags = "特种设备接口")
public class SpecialDeviceController extends BladeController { public class SpecialDeviceController extends BladeController {
@ -40,6 +45,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperation(value = "新增设备") @ApiOperation(value = "新增设备")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增设备", type = BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody SpecialDeviceEntity specialDeviceEntity) { public R save(@Valid @RequestBody SpecialDeviceEntity specialDeviceEntity) {
return R.status(specialDeviceService.save(specialDeviceEntity)); return R.status(specialDeviceService.save(specialDeviceEntity));
} }
@ -47,6 +53,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperation(value = "修改设备") @ApiOperation(value = "修改设备")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "修改设备", type = BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody SpecialDeviceEntity specialDeviceEntity) { public R update(@Valid @RequestBody SpecialDeviceEntity specialDeviceEntity) {
return R.status(specialDeviceService.updateById(specialDeviceEntity)); return R.status(specialDeviceService.updateById(specialDeviceEntity));
} }
@ -54,6 +61,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperation(value = "删除设备") @ApiOperation(value = "删除设备")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "删除设备", type = BusinessType.DELETE, ignore = false)
public R remove(@RequestParam Long id) { public R remove(@RequestParam Long id) {
return R.status(specialDeviceService.removeById(id)); return R.status(specialDeviceService.removeById(id));
} }
@ -61,6 +69,7 @@ public class SpecialDeviceController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperation(value = "设备详情") @ApiOperation(value = "设备详情")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "设备详情", type = BusinessType.QUERY, ignore = false)
public R<SpecialDeviceEntity> detail(@RequestParam Long id) { public R<SpecialDeviceEntity> detail(@RequestParam Long id) {
return R.data(specialDeviceService.getById(id)); return R.data(specialDeviceService.getById(id));
} }
@ -72,6 +81,7 @@ public class SpecialDeviceController extends BladeController {
}) })
@ApiOperation(value = "设备分页") @ApiOperation(value = "设备分页")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@Operate(label = "设备分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<SpecialDeviceEntity>> page(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<SpecialDeviceEntity>> page(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<SpecialDeviceEntity> page = specialDeviceService.page(Condition.getPage(query), Condition.getQueryWrapper(param, SpecialDeviceEntity.class) IPage<SpecialDeviceEntity> page = specialDeviceService.page(Condition.getPage(query), Condition.getQueryWrapper(param, SpecialDeviceEntity.class)
.lambda().orderByDesc(SpecialDeviceEntity::getCreateTime)); .lambda().orderByDesc(SpecialDeviceEntity::getCreateTime));
@ -81,6 +91,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/saveInspection") @PostMapping("/saveInspection")
@ApiOperation(value = "新增设备检验记录") @ApiOperation(value = "新增设备检验记录")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Operate(label = "新增设备检验记录", type = BusinessType.INSERT, ignore = false)
public R saveInspection(@Valid @RequestBody SpecialDeviceInspectionEntity specialDeviceInspectionEntity) { public R saveInspection(@Valid @RequestBody SpecialDeviceInspectionEntity specialDeviceInspectionEntity) {
return R.status(specialDeviceInspectionService.saveInspection(specialDeviceInspectionEntity)); return R.status(specialDeviceInspectionService.saveInspection(specialDeviceInspectionEntity));
} }
@ -88,6 +99,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/updateInspection") @PostMapping("/updateInspection")
@ApiOperation(value = "修改设备检验记录") @ApiOperation(value = "修改设备检验记录")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@Operate(label = "修改设备检验记录", type = BusinessType.UPDATE, ignore = false)
public R updateInspection(@Valid @RequestBody SpecialDeviceInspectionEntity specialDeviceInspectionEntity) { public R updateInspection(@Valid @RequestBody SpecialDeviceInspectionEntity specialDeviceInspectionEntity) {
return R.status(specialDeviceInspectionService.updateInspection(specialDeviceInspectionEntity)); return R.status(specialDeviceInspectionService.updateInspection(specialDeviceInspectionEntity));
} }
@ -95,6 +107,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/removeInspection") @PostMapping("/removeInspection")
@ApiOperation(value = "删除设备检验记录") @ApiOperation(value = "删除设备检验记录")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@Operate(label = "删除设备检验记录", type = BusinessType.DELETE, ignore = false)
public R removeInspection(@RequestParam Long id) { public R removeInspection(@RequestParam Long id) {
return R.status(specialDeviceInspectionService.removeById(id)); return R.status(specialDeviceInspectionService.removeById(id));
} }
@ -102,6 +115,7 @@ public class SpecialDeviceController extends BladeController {
@GetMapping("/inspectionDetail") @GetMapping("/inspectionDetail")
@ApiOperation(value = "设备检验记录详情") @ApiOperation(value = "设备检验记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@Operate(label = "设备检验记录详情", type = BusinessType.QUERY, ignore = false)
public R<SpecialDeviceInspectionEntity> inspectionDetail(@RequestParam Long id) { public R<SpecialDeviceInspectionEntity> inspectionDetail(@RequestParam Long id) {
return R.data(specialDeviceInspectionService.getById(id)); return R.data(specialDeviceInspectionService.getById(id));
} }
@ -114,6 +128,7 @@ public class SpecialDeviceController extends BladeController {
}) })
@ApiOperation(value = "设备检验记录分页") @ApiOperation(value = "设备检验记录分页")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@Operate(label = "设备检验记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<SpecialDeviceInspectionEntity>> inspectionPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<SpecialDeviceInspectionEntity>> inspectionPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<SpecialDeviceInspectionEntity> page = specialDeviceInspectionService.getInspectionPage(param, query); IPage<SpecialDeviceInspectionEntity> page = specialDeviceInspectionService.getInspectionPage(param, query);
return R.data(page); return R.data(page);

11
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SystemFileController.java

@ -5,11 +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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SystemFileDTO; import com.hnac.hzims.safeproduct.dto.SystemFileDTO;
import com.hnac.hzims.safeproduct.dto.SystemFileListDTO; import com.hnac.hzims.safeproduct.dto.SystemFileListDTO;
import com.hnac.hzims.safeproduct.entity.SystemFileEntity; import com.hnac.hzims.safeproduct.entity.SystemFileEntity;
import com.hnac.hzims.safeproduct.service.ISystemFileService; import com.hnac.hzims.safeproduct.service.ISystemFileService;
import com.hnac.hzims.safeproduct.vo.SystemFileVO; import com.hnac.hzims.safeproduct.vo.SystemFileVO;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
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;
@ -23,7 +26,6 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.Valid; import javax.validation.Valid;
/** /**
* @author xiashandong * @author xiashandong
* @created 2020/9/8 15:10 * @created 2020/9/8 15:10
@ -31,6 +33,7 @@ import javax.validation.Valid;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/systemFile") @RequestMapping("/systemFile")
@Business(module = Constants.APP_NAME, value = "体系标准文件", ignore = false)
@Api(tags = "体系标准文件") @Api(tags = "体系标准文件")
public class SystemFileController extends BladeController { public class SystemFileController extends BladeController {
@ -42,6 +45,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids") @ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, 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(systemFileService.deleteLogic(Func.toLongList(ids))); return R.status(systemFileService.deleteLogic(Func.toLongList(ids)));
} }
@ -52,6 +56,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入SystemFile") @ApiOperation(value = "新增", notes = "传入SystemFile")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SystemFileDTO req) { public R save(@RequestBody SystemFileDTO req) {
req.setFileStatus(null); req.setFileStatus(null);
req.setFlowId(null); req.setFlowId(null);
@ -64,6 +69,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入SystemFile") @ApiOperation(value = "修改", notes = "传入SystemFile")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody SystemFileEntity SystemFile) { public R update(@Valid @RequestBody SystemFileEntity SystemFile) {
return R.status(systemFileService.updateById(SystemFile)); return R.status(systemFileService.updateById(SystemFile));
} }
@ -74,6 +80,7 @@ public class SystemFileController 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, ignore = false)
public R<SystemFileVO> detail(@RequestParam Long id) { public R<SystemFileVO> detail(@RequestParam Long id) {
return systemFileService.detail(id); return systemFileService.detail(id);
} }
@ -88,6 +95,7 @@ public class SystemFileController 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, ignore = false)
public R<IPage<SystemFileVO>> list(SystemFileListDTO req, Query query) { public R<IPage<SystemFileVO>> list(SystemFileListDTO req, Query query) {
return systemFileService.pageCondition(req, query); return systemFileService.pageCondition(req, query);
} }
@ -95,6 +103,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/submitApproved") @PostMapping("/submitApproved")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "审批", notes = "查询条件:id,status") @ApiOperation(value = "审批", notes = "查询条件:id,status")
@Operate(label = "审批", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R submitApproved(@RequestBody SystemFileListDTO req){ public R submitApproved(@RequestBody SystemFileListDTO req){
return systemFileService.submitApproved(req); return systemFileService.submitApproved(req);
} }

13
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/SystemFileTypeController.java

@ -2,11 +2,15 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SystemFileTypeDTO; import com.hnac.hzims.safeproduct.dto.SystemFileTypeDTO;
import com.hnac.hzims.safeproduct.dto.SystemFileTypeListDTO; import com.hnac.hzims.safeproduct.dto.SystemFileTypeListDTO;
import com.hnac.hzims.safeproduct.service.ISystemFileTypeService; import com.hnac.hzims.safeproduct.service.ISystemFileTypeService;
import com.hnac.hzims.safeproduct.vo.SystemFileTypeTreeVO; import com.hnac.hzims.safeproduct.vo.SystemFileTypeTreeVO;
import com.hnac.hzims.safeproduct.vo.SystemFileTypeVO; import com.hnac.hzims.safeproduct.vo.SystemFileTypeVO;
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.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;
@ -18,7 +22,6 @@ import org.springblade.core.tool.api.R;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
/** /**
* @author xiashandong * @author xiashandong
* @created 2020/9/7 16:33 * @created 2020/9/7 16:33
@ -26,6 +29,7 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/systemFileType") @RequestMapping("/systemFileType")
@Business(module = Constants.APP_NAME, value = "体系标准文件类型", ignore = false)
@Api(tags = "体系标准文件类型") @Api(tags = "体系标准文件类型")
public class SystemFileTypeController extends BladeController { public class SystemFileTypeController extends BladeController {
@ -37,6 +41,7 @@ public class SystemFileTypeController extends BladeController {
@PostMapping("/remove") @PostMapping("/remove")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入id") @ApiOperation(value = "逻辑删除", notes = "传入id")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键", required = true) @RequestParam Long id) { public R remove(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
return R.status(systemFileTypeService.remove(id)); return R.status(systemFileTypeService.remove(id));
} }
@ -47,6 +52,7 @@ public class SystemFileTypeController extends BladeController {
@PostMapping("/save") @PostMapping("/save")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入SystemFileType") @ApiOperation(value = "新增", notes = "传入SystemFileType")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody SystemFileTypeDTO req, BindingResult br) { public R save(@RequestBody SystemFileTypeDTO req, BindingResult br) {
return R.status(systemFileTypeService.save(req)); return R.status(systemFileTypeService.save(req));
} }
@ -57,6 +63,7 @@ public class SystemFileTypeController extends BladeController {
@PostMapping("/update") @PostMapping("/update")
@ApiOperationSupport(order = 30) @ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入SystemFileType") @ApiOperation(value = "修改", notes = "传入SystemFileType")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody SystemFileTypeDTO req, BindingResult br) { public R update(@RequestBody SystemFileTypeDTO req, BindingResult br) {
return R.status(systemFileTypeService.updateById(req)); return R.status(systemFileTypeService.updateById(req));
} }
@ -67,6 +74,7 @@ public class SystemFileTypeController extends BladeController {
@GetMapping("/detail") @GetMapping("/detail")
@ApiOperationSupport(order = 40) @ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入SystemFileType") @ApiOperation(value = "详情", notes = "传入SystemFileType")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<SystemFileTypeVO> detail(@RequestParam Long id) { public R<SystemFileTypeVO> detail(@RequestParam Long id) {
return systemFileTypeService.detail(id); return systemFileTypeService.detail(id);
} }
@ -77,6 +85,7 @@ public class SystemFileTypeController extends BladeController {
@GetMapping("/list") @GetMapping("/list")
@ApiOperationSupport(order = 50) @ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:idOrParentId,name") @ApiOperation(value = "分页", notes = "查询条件:idOrParentId,name")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<SystemFileTypeVO>> list(SystemFileTypeListDTO req, Query query) { public R<IPage<SystemFileTypeVO>> list(SystemFileTypeListDTO req, Query query) {
return systemFileTypeService.pageCondition(req, query); return systemFileTypeService.pageCondition(req, query);
} }
@ -88,8 +97,8 @@ public class SystemFileTypeController extends BladeController {
@GetMapping("/getTree") @GetMapping("/getTree")
@ApiOperationSupport(order = 60) @ApiOperationSupport(order = 60)
@ApiOperation(value = "获取树结构", notes = "查询条件:name") @ApiOperation(value = "获取树结构", notes = "查询条件:name")
@Operate(label = "获取树结构", type = BusinessType.QUERY, ignore = false)
public R<SystemFileTypeTreeVO> getTree(SystemFileTypeListDTO req) { public R<SystemFileTypeTreeVO> getTree(SystemFileTypeListDTO req) {
return systemFileTypeService.getTree(req); return systemFileTypeService.getTree(req);
} }
} }

29
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/controller/TrainController.java

@ -2,6 +2,7 @@ package com.hnac.hzims.safeproduct.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.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.TestDTO; import com.hnac.hzims.safeproduct.dto.TestDTO;
import com.hnac.hzims.safeproduct.dto.TestScoreDTO; import com.hnac.hzims.safeproduct.dto.TestScoreDTO;
import com.hnac.hzims.safeproduct.dto.TrainRecordDTO; import com.hnac.hzims.safeproduct.dto.TrainRecordDTO;
@ -14,6 +15,9 @@ import com.hnac.hzims.safeproduct.service.ITestService;
import com.hnac.hzims.safeproduct.service.ITrainPlanService; import com.hnac.hzims.safeproduct.service.ITrainPlanService;
import com.hnac.hzims.safeproduct.service.ITrainRecordService; import com.hnac.hzims.safeproduct.service.ITrainRecordService;
import com.hnac.hzims.safeproduct.vo.*; import com.hnac.hzims.safeproduct.vo.*;
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.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiImplicitParams;
@ -39,6 +43,7 @@ import java.util.Map;
@RestController @RestController
@AllArgsConstructor @AllArgsConstructor
@RequestMapping("/train") @RequestMapping("/train")
@Business(module = Constants.APP_NAME, value = "培训管理", ignore = false)
@Api(value = "培训管理", tags = "培训管理接口") @Api(value = "培训管理", tags = "培训管理接口")
public class TrainController extends BladeController { public class TrainController extends BladeController {
@ -53,6 +58,7 @@ public class TrainController extends BladeController {
@PostMapping("/saveTrainPlan") @PostMapping("/saveTrainPlan")
@ApiOperation(value = "新增培训计划") @ApiOperation(value = "新增培训计划")
@ApiOperationSupport(order = 1) @ApiOperationSupport(order = 1)
@Operate(label = "新增培训计划", type = BusinessType.INSERT, ignore = false)
public R saveTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) { public R saveTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) {
return R.status(trainPlanService.save(trainPlanEntity)); return R.status(trainPlanService.save(trainPlanEntity));
} }
@ -60,6 +66,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateTrainPlan") @PostMapping("/updateTrainPlan")
@ApiOperation(value = "修改培训计划") @ApiOperation(value = "修改培训计划")
@ApiOperationSupport(order = 2) @ApiOperationSupport(order = 2)
@Operate(label = "修改培训计划", type = BusinessType.UPDATE, ignore = false)
public R updateTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) { public R updateTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) {
return R.status(trainPlanService.updateById(trainPlanEntity)); return R.status(trainPlanService.updateById(trainPlanEntity));
} }
@ -67,6 +74,7 @@ public class TrainController extends BladeController {
@PostMapping("/removeTrainPlan") @PostMapping("/removeTrainPlan")
@ApiOperation(value = "删除培训计划") @ApiOperation(value = "删除培训计划")
@ApiOperationSupport(order = 3) @ApiOperationSupport(order = 3)
@Operate(label = "删除培训计划", type = BusinessType.DELETE, ignore = false)
public R removeTrainPlan(@RequestParam Long id) { public R removeTrainPlan(@RequestParam Long id) {
return R.status(trainPlanService.removeTrainPlan(id)); return R.status(trainPlanService.removeTrainPlan(id));
} }
@ -74,6 +82,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainPlanDetail") @GetMapping("/trainPlanDetail")
@ApiOperation(value = "培训计划详情") @ApiOperation(value = "培训计划详情")
@ApiOperationSupport(order = 4) @ApiOperationSupport(order = 4)
@Operate(label = "培训计划详情", type = BusinessType.QUERY, ignore = false)
public R<TrainPlanEntity> trainPlanDetail(@RequestParam Long id) { public R<TrainPlanEntity> trainPlanDetail(@RequestParam Long id) {
return R.data(trainPlanService.getById(id)); return R.data(trainPlanService.getById(id));
} }
@ -86,6 +95,7 @@ public class TrainController extends BladeController {
}) })
@ApiOperation(value = "培训计划分页") @ApiOperation(value = "培训计划分页")
@ApiOperationSupport(order = 5) @ApiOperationSupport(order = 5)
@Operate(label = "培训计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainPlanEntity>> trainPlanPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<TrainPlanEntity>> trainPlanPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TrainPlanEntity> page = trainPlanService.trainPlanPage(param, query); IPage<TrainPlanEntity> page = trainPlanService.trainPlanPage(param, query);
return R.data(page); return R.data(page);
@ -94,6 +104,7 @@ public class TrainController extends BladeController {
@PostMapping("/saveTrainRecord") @PostMapping("/saveTrainRecord")
@ApiOperation(value = "新增培训记录") @ApiOperation(value = "新增培训记录")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Operate(label = "新增培训记录", type = BusinessType.INSERT, ignore = false)
public R saveTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) { public R saveTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) {
return R.status(trainRecordService.saveTrainRecord(trainRecordEntity)); return R.status(trainRecordService.saveTrainRecord(trainRecordEntity));
} }
@ -101,6 +112,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateTrainRecord") @PostMapping("/updateTrainRecord")
@ApiOperation(value = "修改培训记录") @ApiOperation(value = "修改培训记录")
@ApiOperationSupport(order = 7) @ApiOperationSupport(order = 7)
@Operate(label = "修改培训记录", type = BusinessType.UPDATE, ignore = false)
public R updateTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) { public R updateTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) {
return R.status(trainRecordService.updateById(trainRecordEntity)); return R.status(trainRecordService.updateById(trainRecordEntity));
} }
@ -108,6 +120,7 @@ public class TrainController extends BladeController {
@PostMapping("/removeTrainRecord") @PostMapping("/removeTrainRecord")
@ApiOperation(value = "删除培训记录") @ApiOperation(value = "删除培训记录")
@ApiOperationSupport(order = 8) @ApiOperationSupport(order = 8)
@Operate(label = "删除培训记录", type = BusinessType.DELETE, ignore = false)
public R removeTrainRecord(@RequestParam Long id) { public R removeTrainRecord(@RequestParam Long id) {
return R.status(trainRecordService.removeTrainRecord(id)); return R.status(trainRecordService.removeTrainRecord(id));
} }
@ -115,6 +128,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainRecordDetail") @GetMapping("/trainRecordDetail")
@ApiOperation(value = "培训记录详情") @ApiOperation(value = "培训记录详情")
@ApiOperationSupport(order = 9) @ApiOperationSupport(order = 9)
@Operate(label = "培训记录详情", type = BusinessType.QUERY, ignore = false)
public R<TrainRecordDetailVO> trainRecordDetail(@RequestParam Long id) { public R<TrainRecordDetailVO> trainRecordDetail(@RequestParam Long id) {
return R.data(trainRecordService.getTrainRecordDetailById(id)); return R.data(trainRecordService.getTrainRecordDetailById(id));
} }
@ -128,6 +142,7 @@ public class TrainController extends BladeController {
}) })
@ApiOperation(value = "培训记录分页") @ApiOperation(value = "培训记录分页")
@ApiOperationSupport(order = 10) @ApiOperationSupport(order = 10)
@Operate(label = "培训记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainRecordVO>> trainRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<TrainRecordVO>> trainRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TrainRecordVO> page = trainRecordService.trainRecordPage(param, query); IPage<TrainRecordVO> page = trainRecordService.trainRecordPage(param, query);
return R.data(page); return R.data(page);
@ -136,6 +151,7 @@ public class TrainController extends BladeController {
@GetMapping("/getTrainRecordNameList") @GetMapping("/getTrainRecordNameList")
@ApiOperation(value = "培训记录名称列表") @ApiOperation(value = "培训记录名称列表")
@ApiOperationSupport(order = 11) @ApiOperationSupport(order = 11)
@Operate(label = "培训记录名称列表", type = BusinessType.QUERY, ignore = false)
public R<List<TrainRecordDTO>> getTrainRecordNameList(@RequestParam String trainPlanId) { public R<List<TrainRecordDTO>> getTrainRecordNameList(@RequestParam String trainPlanId) {
List<TrainRecordDTO> list = trainRecordService.getTrainRecordNameList(trainPlanId); List<TrainRecordDTO> list = trainRecordService.getTrainRecordNameList(trainPlanId);
return R.data(list); return R.data(list);
@ -144,6 +160,7 @@ public class TrainController extends BladeController {
@PostMapping("/saveTest") @PostMapping("/saveTest")
@ApiOperation(value = "新增考试") @ApiOperation(value = "新增考试")
@ApiOperationSupport(order = 12) @ApiOperationSupport(order = 12)
@Operate(label = "新增考试", type = BusinessType.INSERT, ignore = false)
public R saveTest(@Valid @RequestBody TestDTO testEntity) { public R saveTest(@Valid @RequestBody TestDTO testEntity) {
return testService.saveTest(testEntity); return testService.saveTest(testEntity);
} }
@ -151,6 +168,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateTest") @PostMapping("/updateTest")
@ApiOperation(value = "修改考试") @ApiOperation(value = "修改考试")
@ApiOperationSupport(order = 13) @ApiOperationSupport(order = 13)
@Operate(label = "修改考试", type = BusinessType.UPDATE, ignore = false)
public R updateTest(@Valid @RequestBody TestDTO testEntity) { public R updateTest(@Valid @RequestBody TestDTO testEntity) {
return R.status(testService.updateTest(testEntity)); return R.status(testService.updateTest(testEntity));
} }
@ -158,6 +176,7 @@ public class TrainController extends BladeController {
@PostMapping("/removeTest") @PostMapping("/removeTest")
@ApiOperation(value = "删除考试") @ApiOperation(value = "删除考试")
@ApiOperationSupport(order = 14) @ApiOperationSupport(order = 14)
@Operate(label = "删除考试", type = BusinessType.DELETE, ignore = false)
public R removeTest(@RequestParam Long id) { public R removeTest(@RequestParam Long id) {
return R.status(testService.removeTest(id)); return R.status(testService.removeTest(id));
} }
@ -165,6 +184,7 @@ public class TrainController extends BladeController {
@GetMapping("/testDetail") @GetMapping("/testDetail")
@ApiOperation(value = "考试详情") @ApiOperation(value = "考试详情")
@ApiOperationSupport(order = 15) @ApiOperationSupport(order = 15)
@Operate(label = "考试详情", type = BusinessType.QUERY, ignore = false)
public R<TestEntity> testDetail(@RequestParam Long id) { public R<TestEntity> testDetail(@RequestParam Long id) {
return R.data(testService.getById(id)); return R.data(testService.getById(id));
} }
@ -178,6 +198,7 @@ public class TrainController extends BladeController {
}) })
@ApiOperation(value = "考试记录分页") @ApiOperation(value = "考试记录分页")
@ApiOperationSupport(order = 16) @ApiOperationSupport(order = 16)
@Operate(label = "考试记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<TestEntity>> testPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) { public R<IPage<TestEntity>> testPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TestEntity> page = testService.testPage(param, query); IPage<TestEntity> page = testService.testPage(param, query);
return R.data(page); return R.data(page);
@ -186,6 +207,7 @@ public class TrainController extends BladeController {
@GetMapping("/getTestNameList") @GetMapping("/getTestNameList")
@ApiOperation(value = "考试记录名称列表") @ApiOperation(value = "考试记录名称列表")
@ApiOperationSupport(order = 17) @ApiOperationSupport(order = 17)
@Operate(label = "考试记录名称列表", type = BusinessType.QUERY, ignore = false)
public R<List<TestDTO>> getTestNameList(@RequestParam String trainPlanId) { public R<List<TestDTO>> getTestNameList(@RequestParam String trainPlanId) {
List<TestDTO> list = testService.getTestNameList(trainPlanId); List<TestDTO> list = testService.getTestNameList(trainPlanId);
return R.data(list); return R.data(list);
@ -194,6 +216,7 @@ public class TrainController extends BladeController {
@GetMapping("/testScoreList") @GetMapping("/testScoreList")
@ApiOperation(value = "考试成绩列表") @ApiOperation(value = "考试成绩列表")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 18)
@Operate(label = "考试成绩列表", type = BusinessType.QUERY, ignore = false)
public R<List<TestScoreEntity>> testScoreList(@RequestParam Long testId, String name) { public R<List<TestScoreEntity>> testScoreList(@RequestParam Long testId, String name) {
List<TestScoreEntity> list = testScoreService.testScoreList(testId, name); List<TestScoreEntity> list = testScoreService.testScoreList(testId, name);
return R.data(list); return R.data(list);
@ -201,6 +224,7 @@ public class TrainController extends BladeController {
@GetMapping("/testScoreSum") @GetMapping("/testScoreSum")
@ApiOperation(value = "考试总计") @ApiOperation(value = "考试总计")
@ApiOperationSupport(order = 18) @ApiOperationSupport(order = 18)
@Operate(label = "考试总计", type = BusinessType.QUERY, ignore = false)
public R<TestScoreSumVO> testScoreSum(@RequestParam Long testId, String name) { public R<TestScoreSumVO> testScoreSum(@RequestParam Long testId, String name) {
TestScoreSumVO list = testScoreService.testScoreSum(testId, name); TestScoreSumVO list = testScoreService.testScoreSum(testId, name);
return R.data(list); return R.data(list);
@ -208,6 +232,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateBatchScore") @PostMapping("/updateBatchScore")
@ApiOperation(value = "批量填写分数") @ApiOperation(value = "批量填写分数")
@ApiOperationSupport(order = 19) @ApiOperationSupport(order = 19)
@Operate(label = "批量填写分数", type = BusinessType.UPDATE, ignore = false)
public R updateBatchScore(@RequestBody TestScoreDTO testScoreDTO) { public R updateBatchScore(@RequestBody TestScoreDTO testScoreDTO) {
return R.status(testScoreService.updateBatchScore(testScoreDTO)); return R.status(testScoreService.updateBatchScore(testScoreDTO));
} }
@ -215,6 +240,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainDataByMonth") @GetMapping("/trainDataByMonth")
@ApiOperation(value = "培训月度统计表") @ApiOperation(value = "培训月度统计表")
@ApiOperationSupport(order = 20) @ApiOperationSupport(order = 20)
@Operate(label = "培训月度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainMonthVO>> trainDataByMonth(@RequestParam String month, String unit, Query query) { public R<IPage<TrainMonthVO>> trainDataByMonth(@RequestParam String month, String unit, Query query) {
IPage<TrainMonthVO> page = trainPlanService.dataByMonth(month, unit, query); IPage<TrainMonthVO> page = trainPlanService.dataByMonth(month, unit, query);
return R.data(page); return R.data(page);
@ -223,6 +249,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainDataByYear") @GetMapping("/trainDataByYear")
@ApiOperation(value = "培训年度统计表") @ApiOperation(value = "培训年度统计表")
@ApiOperationSupport(order = 21) @ApiOperationSupport(order = 21)
@Operate(label = "培训年度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainYearVO>> trainDataByYear(@RequestParam String year, String unit, Query query) { public R<IPage<TrainYearVO>> trainDataByYear(@RequestParam String year, String unit, Query query) {
IPage<TrainYearVO> page = trainPlanService.dataByYear(year, unit, query); IPage<TrainYearVO> page = trainPlanService.dataByYear(year, unit, query);
return R.data(page); return R.data(page);
@ -236,6 +263,7 @@ public class TrainController extends BladeController {
}) })
@ApiOperation(value = "培训计划数据导出") @ApiOperation(value = "培训计划数据导出")
@ApiOperationSupport(order = 22) @ApiOperationSupport(order = 22)
@Operate(label = "培训计划数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportTrainPlanData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) { public void exportTrainPlanData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
trainPlanService.exportTrainPlanData(param, response); trainPlanService.exportTrainPlanData(param, response);
} }
@ -243,6 +271,7 @@ public class TrainController extends BladeController {
@GetMapping("/exportTrainRecordData") @GetMapping("/exportTrainRecordData")
@ApiOperation(value = "培训记录表导出") @ApiOperation(value = "培训记录表导出")
@ApiOperationSupport(order = 23) @ApiOperationSupport(order = 23)
@Operate(label = "培训记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportTrainRecordData(@RequestParam Long id, HttpServletResponse response) { public void exportTrainRecordData(@RequestParam Long id, HttpServletResponse response) {
trainRecordService.exportTrainRecordData(id, response); trainRecordService.exportTrainRecordData(id, response);
} }

Loading…
Cancel
Save