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.enums.BusinessType;
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.entity.AccidentEntity;
import com.hnac.hzims.safeproduct.service.IAccidentService;
import com.hnac.hzims.safeproduct.vo.AccidentVO;
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.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.boot.ctrl.BladeController;
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.Query;
import org.springblade.core.oss.model.BladeFile;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
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.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.Valid;
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
@ -45,15 +41,18 @@ import java.util.concurrent.locks.ReentrantReadWriteLock;
@Slf4j
@AllArgsConstructor
@RequestMapping("/accident")
@Business(module = Constants.APP_NAME, value = "事故管理", ignore = false)
@Api(value = "事故管理", tags = "事故管理")
public class AccidentController extends BladeController {
private final IAccidentService accidentService;
private final IOssClient ossClient;
@PostMapping("/save")
@ApiOperation("事故管理保存")
@ApiOperationSupport(order = 1)
@Operate(label = "新增事故", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody @Valid AccidentDTO req) {
AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class);
accidentService.save(accidentEntity);
@ -63,6 +62,7 @@ public class AccidentController extends BladeController {
@GetMapping("/detail/{id}")
@ApiOperation("事故管理查询详情")
@ApiOperationSupport(order = 2)
@Operate(label = "事故详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<AccidentVO> detail(@PathVariable(value = "id") Long id) {
AccidentEntity accidentEntity = accidentService.getById(id);
return R.data(AccidentWrapper.build().entityVO(accidentEntity));
@ -72,6 +72,7 @@ public class AccidentController extends BladeController {
@ApiOperation("根据ID修改事故")
@ApiOperationSupport(order = 3)
@Transactional(rollbackFor = Exception.class)
@Operate(label = "修改事故", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R updateById(@RequestBody @Valid AccidentDTO req) {
AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class);
return R.status(accidentService.updateById(accidentEntity));
@ -80,6 +81,7 @@ public class AccidentController extends BladeController {
@PutMapping("/remove/{ids}")
@ApiOperation("删除事故管理,id按逗号分隔")
@ApiOperationSupport(order = 4)
@Operate(label = "逻辑删除事故", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, ignore = false)
public R remove(@PathVariable(value = "ids") @Valid String ids) {
List<Long> idList = Func.toLongList(ids);
return R.status(accidentService.deleteLogic(idList));
@ -92,6 +94,7 @@ public class AccidentController extends BladeController {
@OperationAnnotation(moduleName = "安全管理",
title = "事故管理", operatorType = OperatorType.MOBILE, businessType = BusinessType.GENCODE,
action = "分页查询事故管理列表")
@Operate(label = "事故管理分页", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage> pageList(AccidentDTO req, Query query) {
AccidentEntity accidentEntity = BeanUtil.copy(req, AccidentEntity.class);
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;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
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.ApiOperation;
import lombok.AllArgsConstructor;
@ -28,6 +32,7 @@ import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("/base")
@Business(module = Constants.APP_NAME, value = "公用业务", ignore = false)
@Api(value = "公用业务", tags = "公用业务接口")
public class BaseController extends BladeController {
@ -38,6 +43,7 @@ public class BaseController extends BladeController {
@GetMapping("/getDeptName")
@ApiOperation(value = "获取所属机构名")
@ApiOperationSupport(order = 1)
@Operate(label = "获取所属机构名", type = BusinessType.QUERY, ignore = false)
public R<String> getDeptName() {
BladeUser bladeUser = getUser();
String deptId = bladeUser.getDeptId();
@ -50,6 +56,7 @@ public class BaseController extends BladeController {
@GetMapping("/getUserList")
@ApiOperation(value = "获取用户列表")
@ApiOperationSupport(order = 2)
@Operate(label = "获取用户列表", type = BusinessType.QUERY, ignore = false)
public R<List<User>> getUserList(@RequestParam String name) {
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
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.CarMaintenanceConfirmationDTO;
import com.hnac.hzims.safeproduct.dto.CarUsedRecordConfirmationDTO;
import com.hnac.hzims.safeproduct.entity.*;
import com.hnac.hzims.safeproduct.service.*;
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.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -34,6 +38,7 @@ import java.util.Map;
@RestController
@RequestMapping("/car")
@AllArgsConstructor
@Business(module = Constants.APP_NAME, value = "车辆管理", ignore = false)
@Api(value = "车辆管理", tags = "车辆管理接口")
public class CarController extends BladeController {
@ -52,6 +57,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCar")
@ApiOperation(value = "新增车辆")
@ApiOperationSupport(order = 1)
@Operate(label = "新增车辆", type = BusinessType.INSERT, ignore = false)
public R saveCar(@Valid @RequestBody CarEntity carEntity) {
return carService.saveCar(carEntity);
}
@ -59,6 +65,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCar")
@ApiOperation(value = "修改车辆")
@ApiOperationSupport(order = 2)
@Operate(label = "修改车辆", type = BusinessType.UPDATE, ignore = false)
public R updateCar(@Valid @RequestBody CarEntity carEntity) {
return carService.updateCar(carEntity);
}
@ -66,6 +73,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCar")
@ApiOperation(value = "删除车辆")
@ApiOperationSupport(order = 3)
@Operate(label = "删除车辆", type = BusinessType.DELETE, ignore = false)
public R removeCar(@RequestParam Long id) {
return R.status(carService.removeCar(id));
}
@ -73,6 +81,7 @@ public class CarController extends BladeController {
@GetMapping("/carDetail")
@ApiOperation(value = "车辆详情")
@ApiOperationSupport(order = 4)
@Operate(label = "车辆详情", type = BusinessType.QUERY, ignore = false)
public R<CarEntity> carDetail(@RequestParam Long id) {
return R.data(carService.getById(id));
}
@ -84,6 +93,7 @@ public class CarController extends BladeController {
})
@ApiOperation(value = "车辆分页")
@ApiOperationSupport(order = 5)
@Operate(label = "车辆分页", type = BusinessType.QUERY, ignore = false)
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)
.lambda().orderByDesc(CarEntity::getCreateTime));
@ -93,6 +103,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarMaintenance")
@ApiOperation(value = "新增车辆维保记录")
@ApiOperationSupport(order = 6)
@Operate(label = "新增车辆维保记录", type = BusinessType.INSERT, ignore = false)
public R saveCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) {
return R.status(carMaintenanceService.saveCarMaintenance(carMaintenanceEntity));
}
@ -100,6 +111,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarMaintenance")
@ApiOperation(value = "修改车辆维保记录")
@ApiOperationSupport(order = 7)
@Operate(label = "修改车辆维保记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarMaintenance(@Valid @RequestBody CarMaintenanceEntity carMaintenanceEntity) {
return carMaintenanceService.updateCarMaintenance(carMaintenanceEntity);
}
@ -107,6 +119,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarMaintenance")
@ApiOperation(value = "删除车辆维保记录")
@ApiOperationSupport(order = 8)
@Operate(label = "删除车辆维保记录", type = BusinessType.DELETE, ignore = false)
public R removeCarMaintenance(@RequestParam Long id) {
return R.status(carMaintenanceService.removeById(id));
}
@ -114,6 +127,7 @@ public class CarController extends BladeController {
@GetMapping("/carMaintenanceDetail")
@ApiOperation(value = "车辆维保记录详情")
@ApiOperationSupport(order = 9)
@Operate(label = "车辆维保记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarMaintenanceDetailVO> carMaintenanceDetail(@RequestParam Long id) {
return R.data(carMaintenanceService.getCarMaintenance(id));
}
@ -128,6 +142,7 @@ public class CarController extends BladeController {
})
@ApiOperation(value = "车辆维保记录分页")
@ApiOperationSupport(order = 10)
@Operate(label = "车辆维保记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarMaintenancePageVO>> carMaintenancePage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarMaintenancePageVO> page = carMaintenanceService.getCarMaintenancePage(param, query);
return R.data(page);
@ -136,6 +151,7 @@ public class CarController extends BladeController {
@PostMapping("/confirmCarMaintenance")
@ApiOperation(value = "车辆维保记录确认")
@ApiOperationSupport(order = 11)
@Operate(label = "车辆维保记录确认", type = BusinessType.UPDATE, ignore = false)
public R confirmCarMaintenance(@Valid @RequestBody CarMaintenanceConfirmationDTO confirmationDTO) {
return carMaintenanceService.confirmCarMaintenance(confirmationDTO);
}
@ -143,6 +159,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarUsedRecord")
@ApiOperation(value = "新增用车记录")
@ApiOperationSupport(order = 12)
@Operate(label = "新增用车记录", type = BusinessType.INSERT, ignore = false)
public R saveCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) {
return R.status(carUsedRecordService.saveCarUsedRecord(carUsedRecordEntity));
}
@ -150,6 +167,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarUsedRecord")
@ApiOperation(value = "修改用车记录")
@ApiOperationSupport(order = 13)
@Operate(label = "修改用车记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarUsedRecord(@Valid @RequestBody CarUsedRecordEntity carUsedRecordEntity) {
return carUsedRecordService.updateCarUsedRecord(carUsedRecordEntity);
}
@ -157,6 +175,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarUsedRecord")
@ApiOperation(value = "删除用车记录")
@ApiOperationSupport(order = 14)
@Operate(label = "删除用车记录", type = BusinessType.DELETE, ignore = false)
public R removeCarUsedRecord(@RequestParam Long id) {
return R.status(carUsedRecordService.removeById(id));
}
@ -164,6 +183,7 @@ public class CarController extends BladeController {
@GetMapping("/carUsedRecordDetail")
@ApiOperation(value = "用车记录详情")
@ApiOperationSupport(order = 15)
@Operate(label = "用车记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarUsedRecordDetailVO> carUsedRecordDetail(@RequestParam Long id) {
return R.data(carUsedRecordService.getCarUsedRecord(id));
}
@ -178,6 +198,7 @@ public class CarController extends BladeController {
})
@ApiOperation(value = "用车记录分页")
@ApiOperationSupport(order = 16)
@Operate(label = "用车记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarUsedRecordPageVO>> carUsedRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarUsedRecordPageVO> page = carUsedRecordService.getCarUsedRecordPage(param, query);
return R.data(page);
@ -186,6 +207,7 @@ public class CarController extends BladeController {
@PostMapping("/confirmCarUsedRecord")
@ApiOperation(value = "用车记录确认")
@ApiOperationSupport(order = 17)
@Operate(label = "用车记录确认", type = BusinessType.UPDATE, ignore = false)
public R confirmCarUsedRecord(@Valid @RequestBody CarUsedRecordConfirmationDTO confirmationDTO) {
return carUsedRecordService.confirmCarUsedRecord(confirmationDTO);
}
@ -193,6 +215,7 @@ public class CarController extends BladeController {
@GetMapping("/milesDataByYear")
@ApiOperation(value = "年度里程数据")
@ApiOperationSupport(order = 18)
@Operate(label = "年度里程数据", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarMilesYearVO>> milesDataByYear(@RequestParam String year, String unit, Query query) {
IPage<CarMilesYearVO> page = carService.milesDataByYear(year, unit, query);
return R.data(page);
@ -201,6 +224,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarCheckRecord")
@ApiOperation(value = "新增车检记录")
@ApiOperationSupport(order = 19)
@Operate(label = "新增车检记录", type = BusinessType.INSERT, ignore = false)
public R saveCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) {
return R.status(carCheckRecordService.saveCarCheckRecord(carCheckRecordDTO));
}
@ -208,6 +232,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarCheckRecord")
@ApiOperation(value = "修改车检记录")
@ApiOperationSupport(order = 20)
@Operate(label = "修改车检记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarCheckRecord(@Valid @RequestBody CarCheckRecordDTO carCheckRecordDTO) {
return R.status(carCheckRecordService.updateCarCheckRecord(carCheckRecordDTO));
}
@ -215,6 +240,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarCheckRecord")
@ApiOperation(value = "删除车检记录")
@ApiOperationSupport(order = 21)
@Operate(label = "删除车检记录", type = BusinessType.DELETE, ignore = false)
public R removeCarCheckRecord(@RequestParam Long id) {
return R.status(carCheckRecordService.removeCarCheckRecord(id));
}
@ -222,6 +248,7 @@ public class CarController extends BladeController {
@GetMapping("/carCheckRecordDetail")
@ApiOperation(value = "车检记录详情")
@ApiOperationSupport(order = 22)
@Operate(label = "车检记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarCheckRecordDetailVO> carCheckRecordDetail(@RequestParam Long id) {
return R.data(carCheckRecordService.getCarCheckRecord(id));
}
@ -236,6 +263,7 @@ public class CarController extends BladeController {
})
@ApiOperation(value = "车检记录分页")
@ApiOperationSupport(order = 23)
@Operate(label = "车检记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarCheckRecordPageVO>> carCheckRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarCheckRecordPageVO> page = carCheckRecordService.getCarCheckRecordPage(param, query);
return R.data(page);
@ -244,6 +272,7 @@ public class CarController extends BladeController {
@GetMapping("/exportCarMaintenanceData")
@ApiOperation(value = "导出车辆维保记录单")
@ApiOperationSupport(order = 24)
@Operate(label = "导出车辆维保记录单", type = BusinessType.EXPORT, ignore = false)
public void exportCarMaintenanceData(@RequestParam Long id, HttpServletResponse response) {
carMaintenanceService.exportCarMaintenanceData(id, response);
}
@ -251,6 +280,7 @@ public class CarController extends BladeController {
@GetMapping("/exportCarUsedRecordData")
@ApiOperation(value = "导出用车记录单")
@ApiOperationSupport(order = 25)
@Operate(label = "导出用车记录单", type = BusinessType.EXPORT, ignore = false)
public void exportCarUsedRecordData(@RequestParam Long id, HttpServletResponse response) {
carUsedRecordService.exportCarUsedRecordData(id, response);
}
@ -258,6 +288,7 @@ public class CarController extends BladeController {
@GetMapping("/exportCarCheckRecordData")
@ApiOperation(value = "导出车检记录单")
@ApiOperationSupport(order = 26)
@Operate(label = "导出车检记录单", type = BusinessType.EXPORT, ignore = false)
public void exportCarCheckRecordData(@RequestParam Long id, HttpServletResponse response) {
carCheckRecordService.exportCarCheckRecordData(id, response);
}
@ -269,6 +300,7 @@ public class CarController extends BladeController {
})
@ApiOperation(value = "导出年度里程数据")
@ApiOperationSupport(order = 27)
@Operate(label = "导出年度里程数据", type = BusinessType.EXPORT, ignore = false)
public void exportCarMilesData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) {
carService.exportCarMilesData(param, query, response);
}
@ -276,6 +308,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarAnnualInspection")
@ApiOperation(value = "新增年检记录")
@ApiOperationSupport(order = 28)
@Operate(label = "新增年检记录", type = BusinessType.INSERT, ignore = false)
public R saveCarAnnualInspection(@Valid @RequestBody CarAnnualInspectionEntity carAnnualInspectionEntity) {
return R.status(carAnnualInspectionService.saveCarAnnualInspection(carAnnualInspectionEntity));
}
@ -283,6 +316,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarAnnualInspection")
@ApiOperation(value = "修改年检记录")
@ApiOperationSupport(order = 29)
@Operate(label = "修改年检记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarAnnualInspection(@Valid @RequestBody CarAnnualInspectionEntity carAnnualInspectionEntity) {
return R.status(carAnnualInspectionService.updateCarAnnualInspection(carAnnualInspectionEntity));
}
@ -290,6 +324,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarAnnualInspection")
@ApiOperation(value = "删除年检记录")
@ApiOperationSupport(order = 30)
@Operate(label = "删除年检记录", type = BusinessType.DELETE, ignore = false)
public R removeCarAnnualInspection(@RequestParam Long id) {
return R.status(carAnnualInspectionService.removeById(id));
}
@ -297,6 +332,7 @@ public class CarController extends BladeController {
@GetMapping("/carAnnualInspectionDetail")
@ApiOperation(value = "年检记录详情")
@ApiOperationSupport(order = 31)
@Operate(label = "年检记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarAnnualInspectionEntity> carAnnualInspectionDetail(@RequestParam Long id) {
return R.data(carAnnualInspectionService.getById(id));
}
@ -311,6 +347,7 @@ public class CarController extends BladeController {
})
@ApiOperation(value = "年检记录分页")
@ApiOperationSupport(order = 32)
@Operate(label = "年检记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarAnnualInspectionPageVO>> carAnnualInspectionPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarAnnualInspectionPageVO> page = carAnnualInspectionService.getCarAnnualInspectionPage(param, query);
return R.data(page);
@ -319,6 +356,7 @@ public class CarController extends BladeController {
@PostMapping("/saveCarInsurance")
@ApiOperation(value = "新增车保记录")
@ApiOperationSupport(order = 33)
@Operate(label = "新增车保记录", type = BusinessType.INSERT, ignore = false)
public R saveCarInsurance(@Valid @RequestBody CarInsuranceEntity carInsuranceEntity) {
return R.status(carInsuranceService.saveCarCheckRecord(carInsuranceEntity));
}
@ -326,6 +364,7 @@ public class CarController extends BladeController {
@PostMapping("/updateCarInsurance")
@ApiOperation(value = "修改车保记录")
@ApiOperationSupport(order = 34)
@Operate(label = "修改车保记录", type = BusinessType.UPDATE, ignore = false)
public R updateCarInsurance(@Valid @RequestBody CarInsuranceEntity carInsuranceEntity) {
return R.status(carInsuranceService.updateCarCheckRecord(carInsuranceEntity));
}
@ -333,6 +372,7 @@ public class CarController extends BladeController {
@PostMapping("/removeCarInsurance")
@ApiOperation(value = "删除车保记录")
@ApiOperationSupport(order = 35)
@Operate(label = "删除车保记录", type = BusinessType.DELETE, ignore = false)
public R removeCarInsurance(@RequestParam Long id) {
return R.status(carInsuranceService.removeById(id));
}
@ -340,6 +380,7 @@ public class CarController extends BladeController {
@GetMapping("/carInsuranceDetail")
@ApiOperation(value = "车保记录详情")
@ApiOperationSupport(order = 36)
@Operate(label = "车保记录详情", type = BusinessType.QUERY, ignore = false)
public R<CarInsuranceEntity> carInsuranceDetail(@RequestParam Long id) {
return R.data(carInsuranceService.getById(id));
}
@ -354,6 +395,7 @@ public class CarController extends BladeController {
})
@ApiOperation(value = "车保记录分页")
@ApiOperationSupport(order = 37)
@Operate(label = "车保记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CarInsurancePageVO>> carInsurancePage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<CarInsurancePageVO> page = carInsuranceService.getCarInsurancePage(param, query);
return R.data(page);
@ -362,6 +404,7 @@ public class CarController extends BladeController {
@GetMapping("/carList")
@ApiOperation(value = "查询车辆列表")
@ApiOperationSupport(order = 38)
@Operate(label = "查询车辆列表", type = BusinessType.QUERY, ignore = false)
public R<List<CarEntity>> carList(String plateNumber) {
List<CarEntity> list = carService.getCarListByPlateNumber(plateNumber);
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;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.entity.CheckCompanyEntity;
import com.hnac.hzims.safeproduct.service.ICheckCompanyService;
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.ApiOperation;
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.Query;
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 java.util.Optional;
/**
* Created by Sam Huang 2022/5/6 8:23
*/
@ -27,6 +26,7 @@ import java.util.Optional;
@AllArgsConstructor
@RequestMapping("/CheckCompany")
@Api(tags = "公司检查")
@Business(module = Constants.APP_NAME, value = "公司检查", ignore = false)
public class CheckCompanyController extends BladeController {
private final ICheckCompanyService CheckCompanyService;
@ -37,6 +37,7 @@ public class CheckCompanyController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckCompanyDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckCompanyDTO req) {
return R.status(CheckCompanyService.doSave(req));
}
@ -47,6 +48,7 @@ public class CheckCompanyController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckCompanyDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckCompanyDTO req) {
return R.status(CheckCompanyService.doUpdate(req));
}
@ -57,6 +59,7 @@ public class CheckCompanyController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(CheckCompanyService.doDelete(ids));
}
@ -67,6 +70,7 @@ public class CheckCompanyController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckCompanyVo> detail(@RequestParam Long id) {
return CheckCompanyService.detail(id);
}
@ -77,8 +81,8 @@ public class CheckCompanyController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:startDate,endDate,status")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<BladePage<CheckCompanyVo>> list(CheckCompanyEntity req, Query 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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckItemDTO;
import com.hnac.hzims.safeproduct.dto.CheckQueryItemDTO;
import com.hnac.hzims.safeproduct.entity.CheckItemInstanceEntity;
import com.hnac.hzims.safeproduct.service.ICheckItemService;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -14,7 +18,6 @@ import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -26,6 +29,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/checkItem")
@Business(module = Constants.APP_NAME, value = "检查项管理", ignore = false)
@Api(tags = "检查项管理")
public class CheckItemController extends BladeController {
@ -37,6 +41,7 @@ public class CheckItemController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckItemDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckItemDTO req) {
return R.status(checkItemService.doSave(req));
}
@ -47,28 +52,29 @@ public class CheckItemController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckItemDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckItemDTO req) {
return R.status(checkItemService.doUpdate(req));
}
/**
* 启用/停用
*/
@PostMapping("/enable")
@ApiOperationSupport(order = 70)
@ApiOperation(value = "启用/停用", notes = "传入CheckItemDTO")
@Operate(label = "启用/停用", type = BusinessType.UPDATE, ignore = false)
public R enable(@RequestBody CheckItemDTO req) {
return R.status(checkItemService.enable(req));
}
/**
* 删除
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
// checkItemService.deleteLogic(Func.toLongList(ids))
return R.status(checkItemService.remove(ids));
@ -80,6 +86,7 @@ public class CheckItemController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckItemVo> detail(@RequestParam Long id) {
return checkItemService.detail(id);
}
@ -90,6 +97,7 @@ public class CheckItemController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "列表", notes = "查询条件:item")
@Operate(label = "列表", type = BusinessType.QUERY, ignore = false)
public R<List<CheckItemInstanceEntity>> list(CheckQueryItemDTO req) throws Exception {
return checkItemService.getItems(req);
}
@ -100,6 +108,7 @@ public class CheckItemController extends BladeController {
@GetMapping("/listCompany")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "列表", notes = "查询条件:item")
@Operate(label = "公司检查-列表", type = BusinessType.QUERY, ignore = false)
public R<List<Map<String, Object>>> listCompany(CheckQueryItemDTO req) throws Exception {
return checkItemService.getCompanyCheckItems(req);
}
@ -110,20 +119,19 @@ public class CheckItemController extends BladeController {
@GetMapping("/pageList")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "分页", notes = "查询条件:item")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckItemVo>> page(CheckItemDTO req, Query query) {
return checkItemService.pageCondition(req, query);
}
/**
* 树形列表
*/
@GetMapping("/treeList")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "树形列表", notes = "查询条件:item")
@Operate(label = "树形列表", type = BusinessType.QUERY, ignore = false)
public R<List<CheckItemVo>> treeList(CheckItemDTO 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.enums.BusinessType;
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.entity.CheckMonthEntity;
import com.hnac.hzims.safeproduct.service.ICheckMonthService;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -30,6 +33,7 @@ import java.util.Optional;
@RestController
@AllArgsConstructor
@RequestMapping("/checkMonth")
@Business(module = Constants.APP_NAME, value = "月度检查", ignore = false)
@Api(tags = "月度检查")
public class CheckMonthController extends BladeController {
@ -43,6 +47,7 @@ public class CheckMonthController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckMonthDTO")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckMonthDTO req) {
return checkMonthlyService.doSave(req);
}
@ -53,6 +58,7 @@ public class CheckMonthController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckMonthDTO")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckMonthDTO req) {
return R.status(checkMonthlyService.doUpdate(req));
}
@ -63,6 +69,7 @@ public class CheckMonthController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@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) {
return R.status(checkMonthlyService.doDelete(ids));
}
@ -73,6 +80,7 @@ public class CheckMonthController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<CheckMonthVo> detail(@RequestParam Long id) {
return checkMonthlyService.detail(id);
}
@ -83,6 +91,7 @@ public class CheckMonthController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@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) {
R<IPage<CheckMonthVo>> pageR = checkMonthlyService.pageCondition(req, query);
IPage<CheckMonthVo> page = pageR.getData();
@ -104,6 +113,7 @@ public class CheckMonthController extends BladeController {
@OperationAnnotation(moduleName = "安全管理",
title = "月度自查核查",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询月度自查核查数据")
@Operate(label = "分页-无数据权限控制", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage<CheckMonthVo>> listNotDataScope(CheckMonthEntity req, Query query) {
R<IPage<CheckMonthVo>> pageR = checkMonthlyService.pageNotDataScope(req, query);
IPage<CheckMonthVo> page = pageR.getData();
@ -116,15 +126,13 @@ public class CheckMonthController extends BladeController {
return R.data(page);
}
/**
* 分页查询安全生产会议次数
*/
@GetMapping("/listconferenceScope/{page}/{size}")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:month,status,createDept")
@Operate(label = "分页-查询安全生产会议次数", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<BladePage<CheckMonthVo>> listconferenceScope(
@PathVariable Long page, @PathVariable Long size,
CheckMonthEntity req) {
@ -140,5 +148,4 @@ public class CheckMonthController extends BladeController {
BladePage<CheckMonthVo> bladePage = BladePage.of(pages);
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckNoticeDTO;
import com.hnac.hzims.safeproduct.service.ICheckNoticeService;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -21,6 +25,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@AllArgsConstructor
@RequestMapping("/CheckNotice")
@Business(module = Constants.APP_NAME, value = "季度检查通知", ignore = false)
@Api(tags = "季度检查通知")
public class CheckNoticeController extends BladeController {
@ -32,6 +37,7 @@ public class CheckNoticeController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckNoticeDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckNoticeDTO req) {
return R.status(CheckNoticeService.doSave(req));
}
@ -42,6 +48,7 @@ public class CheckNoticeController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckNoticeDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckNoticeDTO req) {
return R.status(CheckNoticeService.doUpdate(req));
}
@ -52,6 +59,7 @@ public class CheckNoticeController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(CheckNoticeService.deleteLogic(Func.toLongList(ids)));
}
@ -62,19 +70,19 @@ public class CheckNoticeController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckNoticeVo> detail(@RequestParam Long id) {
return CheckNoticeService.detail(id);
}
/**
* 分页
*/
@GetMapping("/pageList")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "分页", notes = "查询条件:item")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckNoticeVo>> page(CheckNoticeDTO req, Query 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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.CheckQuarterDTO;
import com.hnac.hzims.safeproduct.entity.CheckQuarterEntity;
import com.hnac.hzims.safeproduct.service.ICheckQuarterService;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -25,6 +29,7 @@ import java.util.Optional;
@RestController
@AllArgsConstructor
@RequestMapping("/checkQuarter")
@Business(module = Constants.APP_NAME, value = "季度检查", ignore = false)
@Api(tags = "季度检查")
public class CheckQuarterController extends BladeController {
@ -38,6 +43,7 @@ public class CheckQuarterController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入CheckQuarterDTO")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody CheckQuarterDTO req) {
return CheckQuarterService.doSave(req);
}
@ -48,6 +54,7 @@ public class CheckQuarterController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入CheckQuarterDTO")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody CheckQuarterDTO req) {
return R.status(CheckQuarterService.doUpdate(req));
}
@ -58,6 +65,7 @@ public class CheckQuarterController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
return R.status(CheckQuarterService.doDelete(ids));
}
@ -68,6 +76,7 @@ public class CheckQuarterController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入id")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<CheckQuarterVo> detail(@RequestParam Long id) {
return CheckQuarterService.detail(id);
}
@ -78,6 +87,7 @@ public class CheckQuarterController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:quarter,status,createDept")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckQuarterVo>> list(CheckQuarterEntity req, Query query) {
R<IPage<CheckQuarterVo>> pageR = CheckQuarterService.pageCondition(req, query);
IPage<CheckQuarterVo> page = pageR.getData();
@ -96,6 +106,7 @@ public class CheckQuarterController extends BladeController {
@GetMapping("/listNotDataScope")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:quarter,status,createDept")
@Operate(label = "分页-无数据权限控制", type = BusinessType.QUERY, ignore = false)
public R<IPage<CheckQuarterVo>> listNotDataScope(CheckQuarterEntity req, Query query) {
R<IPage<CheckQuarterVo>> pageR = CheckQuarterService.pageNotDataScope(req, query);
IPage<CheckQuarterVo> page = pageR.getData();
@ -107,5 +118,4 @@ public class CheckQuarterController extends BladeController {
});
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.ConferencePlanEntity;
import com.hnac.hzims.safeproduct.entity.ConferenceRecordEntity;
import com.hnac.hzims.safeproduct.service.IConferencePlanService;
import com.hnac.hzims.safeproduct.service.IConferenceRecordService;
import com.hnac.hzims.safeproduct.vo.ConferenceRecordDetailVO;
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.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -32,6 +36,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/conference")
@Business(module = Constants.APP_NAME, value = "会议管理", ignore = false)
@Api(value = "会议管理", tags = "会议管理接口")
public class ConferenceController extends BladeController {
@ -42,6 +47,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/savePlan")
@ApiOperation(value = "新增会议计划")
@ApiOperationSupport(order = 1)
@Operate(label = "新增会议计划", type = BusinessType.INSERT, ignore = false)
public R savePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) {
return R.status(conferencePlanService.save(conferencePlan));
}
@ -49,6 +55,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/updatePlan")
@ApiOperation(value = "修改会议计划")
@ApiOperationSupport(order = 2)
@Operate(label = "修改会议计划", type = BusinessType.UPDATE, ignore = false)
public R updatePlan(@Valid @RequestBody ConferencePlanEntity conferencePlan) {
return R.status(conferencePlanService.updateById(conferencePlan));
}
@ -56,6 +63,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/removePlan")
@ApiOperation(value = "删除会议计划")
@ApiOperationSupport(order = 3)
@Operate(label = "删除会议计划", type = BusinessType.DELETE, ignore = false)
public R removePlan(@RequestParam Long id) {
return R.status(conferencePlanService.removePlan(id));
}
@ -63,6 +71,7 @@ public class ConferenceController extends BladeController {
@GetMapping("/planDetail")
@ApiOperation(value = "会议计划详情")
@ApiOperationSupport(order = 4)
@Operate(label = "会议计划详情", type = BusinessType.QUERY, ignore = false)
public R<ConferencePlanEntity> planDetail(@RequestParam Long id) {
return R.data(conferencePlanService.getById(id));
}
@ -75,6 +84,7 @@ public class ConferenceController extends BladeController {
})
@ApiOperation(value = "会议计划分页")
@ApiOperationSupport(order = 5)
@Operate(label = "会议计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<ConferencePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<ConferencePlanEntity> page = conferencePlanService.planPage(param, query);
return R.data(page);
@ -83,6 +93,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/saveRecord")
@ApiOperation(value = "新增会议记录")
@ApiOperationSupport(order = 6)
@Operate(label = "新增会议记录", type = BusinessType.INSERT, ignore = false)
public R saveRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) {
return R.status(conferenceRecordService.saveRecord(conferenceRecord));
}
@ -90,6 +101,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/updateRecord")
@ApiOperation(value = "修改会议记录")
@ApiOperationSupport(order = 7)
@Operate(label = "修改会议记录", type = BusinessType.UPDATE, ignore = false)
public R updateRecord(@Valid @RequestBody ConferenceRecordEntity conferenceRecord) {
return R.status(conferenceRecordService.updateById(conferenceRecord));
}
@ -97,6 +109,7 @@ public class ConferenceController extends BladeController {
@PostMapping("/removeRecord")
@ApiOperation(value = "删除会议记录")
@ApiOperationSupport(order = 8)
@Operate(label = "删除会议记录", type = BusinessType.DELETE, ignore = false)
public R removeRecord(@RequestParam Long id) {
return R.status(conferenceRecordService.removeById(id));
}
@ -104,6 +117,7 @@ public class ConferenceController extends BladeController {
@GetMapping("/recordDetail")
@ApiOperation(value = "会议记录详情")
@ApiOperationSupport(order = 9)
@Operate(label = "会议记录详情", type = BusinessType.QUERY, ignore = false)
public R<ConferenceRecordDetailVO> recordDetail(@RequestParam Long id) {
return R.data(conferenceRecordService.getConferenceRecordDetailById(id));
}
@ -117,6 +131,7 @@ public class ConferenceController extends BladeController {
})
@ApiOperation(value = "会议记录分页")
@ApiOperationSupport(order = 10)
@Operate(label = "会议记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<ConferenceRecordVO>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<ConferenceRecordVO> page = conferenceRecordService.recordPage(param, query);
return R.data(page);
@ -130,6 +145,7 @@ public class ConferenceController extends BladeController {
})
@ApiOperation(value = "会议数据导出")
@ApiOperationSupport(order = 11)
@Operate(label = "会议数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportConferenceData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
conferencePlanService.exportConferenceData(param, response);
}
@ -137,6 +153,7 @@ public class ConferenceController extends BladeController {
@GetMapping("/exportConferenceRecordData")
@ApiOperation(value = "会议记录表导出")
@ApiOperationSupport(order = 12)
@Operate(label = "会议记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportConferenceRecordData(@RequestParam Long id, HttpServletResponse 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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.DangerSourceLevelRecordEntity;
import com.hnac.hzims.safeproduct.service.IDangerSourceLevelRecordService;
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.ApiOperation;
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.RestController;
/**
* @author xiashandong
* @created 2020/9/2 10:53
@ -23,6 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@AllArgsConstructor
@RequestMapping("/dangerSourceLevelRecord")
@Business(module = Constants.APP_NAME, value = "危险级别变更记录", ignore = false)
@Api(tags = "危险级别变更记录")
public class DangerSourceLevelRecordController extends BladeController {
@ -34,8 +38,8 @@ public class DangerSourceLevelRecordController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 2)
@ApiOperation(value = "分页", notes = "查询条件:sourceId,type")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<DangerSourceLevelRecordVO>> list(DangerSourceLevelRecordEntity req, Query 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.enums.BusinessType;
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.EmergencyPlanListDTO;
import com.hnac.hzims.safeproduct.service.IEmergencyPlanService;
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.ApiOperation;
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.springframework.web.bind.annotation.*;
/**
* @author xiashandong
* @created 2020/9/9 13:50
@ -28,6 +30,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@AllArgsConstructor
@RequestMapping("/emergencyPlan")
@Business(module = Constants.APP_NAME, value = "应急预案文件", ignore = false)
@Api(tags = "应急预案文件")
public class EmergencyPlanController extends BladeController {
@ -39,6 +42,7 @@ public class EmergencyPlanController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@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) {
return R.status(emergencyPlanService.deleteLogic(Func.toLongList(ids)));
}
@ -49,6 +53,7 @@ public class EmergencyPlanController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入emergencyPlan")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody EmergencyPlanDTO req) {
return R.status(emergencyPlanService.save(req));
}
@ -59,6 +64,7 @@ public class EmergencyPlanController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入emergencyPlan")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody EmergencyPlanDTO req) {
return R.status(emergencyPlanService.updateById(req));
}
@ -69,6 +75,7 @@ public class EmergencyPlanController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<EmergencyPlanVO> detail(@RequestParam Long id) {
return emergencyPlanService.detail(id);
}
@ -83,8 +90,8 @@ public class EmergencyPlanController extends BladeController {
BusinessType.GENCODE,
action = "分页查询应急预案文件列表")
@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) {
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.EmergencyPlanTypeDTO;
import com.hnac.hzims.safeproduct.dto.EmergencyPlanTypeListDTO;
import com.hnac.hzims.safeproduct.service.IEmergencyPlanTypeService;
import com.hnac.hzims.safeproduct.vo.EmergencyPlanTypeTreeVO;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -14,10 +18,8 @@ import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @author xiashandong
* @created 2020/9/9 13:51
@ -25,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@AllArgsConstructor
@RequestMapping("/emergencyPlanType")
@Business(module = Constants.APP_NAME, value = "应急预案文件类型", ignore = false)
@Api(tags = "应急预案文件类型")
public class EmergencyPlanTypeController extends BladeController {
@ -36,6 +39,7 @@ public class EmergencyPlanTypeController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入id")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
return R.status(emergencyPlanTypeService.remove(id));
}
@ -46,6 +50,7 @@ public class EmergencyPlanTypeController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入emergencyPlanType")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody EmergencyPlanTypeDTO req) {
return R.status(emergencyPlanTypeService.save(req));
}
@ -56,6 +61,7 @@ public class EmergencyPlanTypeController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入emergencyPlanType")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody EmergencyPlanTypeDTO req) {
return R.status(emergencyPlanTypeService.updateById(req));
}
@ -66,6 +72,7 @@ public class EmergencyPlanTypeController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<EmergencyPlanTypeVO> detail(@RequestParam Long id) {
return emergencyPlanTypeService.detail(id);
}
@ -76,6 +83,7 @@ public class EmergencyPlanTypeController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:idOrParentId,name")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<EmergencyPlanTypeVO>> list(EmergencyPlanTypeListDTO req, Query query) {
return emergencyPlanTypeService.pageCondition(req, query);
}
@ -86,8 +94,8 @@ public class EmergencyPlanTypeController extends BladeController {
@GetMapping("/getTree")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "获取树结构", notes = "查询条件:name")
@Operate(label = "获取树结构", type = BusinessType.QUERY, ignore = false)
public R<EmergencyPlanTypeTreeVO> getTree(EmergencyPlanTypeDTO 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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.HygienePlanDTO;
import com.hnac.hzims.safeproduct.dto.HygieneRecordDTO;
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.HygieneRecordDetailVO;
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.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -35,6 +39,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/hygiene")
@Business(module = Constants.APP_NAME, value = "卫生自查", ignore = false)
@Api(value = "卫生自查", tags = "卫生自查接口")
public class HygieneController extends BladeController {
@ -45,6 +50,7 @@ public class HygieneController extends BladeController {
@PostMapping("/savePlan")
@ApiOperation(value = "新增卫生自查计划")
@ApiOperationSupport(order = 1)
@Operate(label = "新增卫生自查计划", type = BusinessType.INSERT, ignore = false)
public R savePlan(@Valid @RequestBody HygienePlanDTO hygienePlanDTO) {
return hygienePlanService.savePlan(hygienePlanDTO);
}
@ -52,6 +58,7 @@ public class HygieneController extends BladeController {
@PostMapping("/updatePlan")
@ApiOperation(value = "修改卫生自查计划")
@ApiOperationSupport(order = 2)
@Operate(label = "修改卫生自查计划", type = BusinessType.UPDATE, ignore = false)
public R updatePlan(@Valid @RequestBody HygienePlanDTO hygienePlanDTO) {
return hygienePlanService.updatePlan(hygienePlanDTO);
}
@ -59,6 +66,7 @@ public class HygieneController extends BladeController {
@PostMapping("/removePlan")
@ApiOperation(value = "删除卫生自查计划")
@ApiOperationSupport(order = 3)
@Operate(label = "删除卫生自查计划", type = BusinessType.DELETE, ignore = false)
public R removePlan(@RequestParam Long id) {
return R.status(hygienePlanService.removePlan(id));
}
@ -66,6 +74,7 @@ public class HygieneController extends BladeController {
@GetMapping("/planDetail")
@ApiOperation(value = "卫生自查计划详情")
@ApiOperationSupport(order = 4)
@Operate(label = "卫生自查计划详情", type = BusinessType.QUERY, ignore = false)
public R<HygienePlanDetailVO> planDetail(@RequestParam Long id) {
return R.data(hygienePlanService.getPlan(id));
}
@ -79,6 +88,7 @@ public class HygieneController extends BladeController {
})
@ApiOperation(value = "卫生自查计划分页")
@ApiOperationSupport(order = 5)
@Operate(label = "卫生自查计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<HygienePlanEntity>> planPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<HygienePlanEntity> page = hygienePlanService.planPage(param, query);
return R.data(page);
@ -87,6 +97,7 @@ public class HygieneController extends BladeController {
@PostMapping("/saveRecord")
@ApiOperation(value = "新增卫生自查记录")
@ApiOperationSupport(order = 6)
@Operate(label = "新增卫生自查记录", type = BusinessType.INSERT, ignore = false)
public R saveRecord(@Valid @RequestBody HygieneRecordDTO hygieneRecordDTO) {
return hygieneRecordService.saveRecord(hygieneRecordDTO);
}
@ -94,6 +105,7 @@ public class HygieneController extends BladeController {
@PostMapping("/updateRecord")
@ApiOperation(value = "修改卫生自查记录")
@ApiOperationSupport(order = 7)
@Operate(label = "修改卫生自查记录", type = BusinessType.UPDATE, ignore = false)
public R updateRecord(@Valid @RequestBody HygieneRecordDTO hygieneRecordDTO) {
return hygieneRecordService.updateRecord(hygieneRecordDTO);
}
@ -101,6 +113,7 @@ public class HygieneController extends BladeController {
@PostMapping("/removeRecord")
@ApiOperation(value = "删除卫生自查记录")
@ApiOperationSupport(order = 8)
@Operate(label = "删除卫生自查记录", type = BusinessType.DELETE, ignore = false)
public R removeRecord(@RequestParam Long id) {
return R.status(hygieneRecordService.removeById(id));
}
@ -108,6 +121,7 @@ public class HygieneController extends BladeController {
@GetMapping("/recordDetail")
@ApiOperation(value = "卫生自查记录详情")
@ApiOperationSupport(order = 9)
@Operate(label = "卫生自查记录详情", type = BusinessType.QUERY, ignore = false)
public R<HygieneRecordDetailVO> recordDetail(@RequestParam Long id) {
return R.data(hygieneRecordService.getRecordDetail(id));
}
@ -121,6 +135,7 @@ public class HygieneController extends BladeController {
})
@ApiOperation(value = "卫生自查记录分页")
@ApiOperationSupport(order = 10)
@Operate(label = "卫生自查记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<HygieneRecordPageVO>> recordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<HygieneRecordPageVO> page = hygieneRecordService.recordPage(param, query);
return R.data(page);
@ -129,6 +144,7 @@ public class HygieneController extends BladeController {
@GetMapping("/dataByMonth")
@ApiOperation(value = "月度统计表")
@ApiOperationSupport(order = 11)
@Operate(label = "月度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<HygieneMonthVO>> dataByMonth(@RequestParam String month, String unit, Query query) {
IPage<HygieneMonthVO> page = hygienePlanService.dataByMonth(month, unit, query);
return R.data(page);
@ -137,6 +153,7 @@ public class HygieneController extends BladeController {
@GetMapping("/exportHygieneRecordData")
@ApiOperation(value = "卫生自查记录表导出")
@ApiOperationSupport(order = 12)
@Operate(label = "卫生自查记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportHygieneRecordData(@RequestParam Long id, HttpServletResponse response) {
hygieneRecordService.exportHygieneRecordData(id, response);
}
@ -148,6 +165,7 @@ public class HygieneController extends BladeController {
})
@ApiOperation(value = "月度数据导出")
@ApiOperationSupport(order = 13)
@Operate(label = "月度数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportMonthData(@ApiIgnore @RequestParam Map<String, Object> param, Query query, HttpServletResponse response) {
hygienePlanService.exportMonthData(param, query, response);
}
@ -161,6 +179,7 @@ public class HygieneController extends BladeController {
})
@ApiOperation(value = "卫生自查计划导出")
@ApiOperationSupport(order = 14)
@Operate(label = "卫生自查计划导出", type = BusinessType.EXPORT, ignore = false)
public void exportHygienePlanData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse 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.metadata.IPage;
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.service.IImsMonAlarmInfoService;
import com.hnac.hzims.safeproduct.vo.ImsMonAlarmInfoVO;
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 lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
@ -28,6 +32,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/alarmInfo")
@Business(module = Constants.APP_NAME, value = "视频监控告警信息表", ignore = false)
@Api(value = "视频监控告警信息表", tags = "视频监控告警信息表")
public class ImsMonAlarmInfoController extends BladeController {
@ -39,6 +44,7 @@ public class ImsMonAlarmInfoController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入alarmInfo")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<ImsMonAlarmInfoVO> detail(ImsMonAlarmInfoEntity alarmInfo) {
ImsMonAlarmInfoEntity detail = alarmInfoService.getOne(Condition.getQueryWrapper(alarmInfo));
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 = "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) {
QueryWrapper<ImsMonAlarmInfoEntity> queryWrapper = new QueryWrapper<>();
if (!Func.isEmpty(alarmInfo.get("tenantId"))) {
@ -97,6 +104,7 @@ public class ImsMonAlarmInfoController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入alarmInfo")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody ImsMonAlarmInfoEntity alarmInfo) {
return R.status(alarmInfoService.save(alarmInfo));
}
@ -107,19 +115,19 @@ public class ImsMonAlarmInfoController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入alarmInfo")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody ImsMonAlarmInfoEntity alarmInfo) {
return R.status(alarmInfoService.updateById(alarmInfo));
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "逻辑删除", notes = "传入ids")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String 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.enums.BusinessType;
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.service.IImsMonCameraInfoService;
import com.hnac.hzinfo.log.annotation.Business;
import com.hnac.hzinfo.log.annotation.Operate;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import org.springblade.core.boot.ctrl.BladeController;
@ -31,6 +34,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/cameraInfo")
@Business(module = Constants.APP_NAME, value = "视频监控告警摄像头信息", ignore = false)
@Api(value = "视频监控告警摄像头信息", tags = "视频监控告警摄像头信息")
public class ImsMonCameraInfoController extends BladeController {
@ -42,6 +46,7 @@ public class ImsMonCameraInfoController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "详情", notes = "传入cameraInfo")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<ImsMonCameraInfoEntity> detail(ImsMonCameraInfoEntity cameraInfo) {
ImsMonCameraInfoEntity detail = cameraInfoService.getOne(Condition.getQueryWrapper(cameraInfo));
return R.data(detail);
@ -53,6 +58,7 @@ public class ImsMonCameraInfoController extends BladeController {
@GetMapping("/list-no-page")
@ApiOperationSupport(order = 2)
@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) {
QueryWrapper<ImsMonCameraInfoEntity> queryWrapper = Condition.getQueryWrapper(entity);
queryWrapper.isNotNull("MONITOR_ITEMS");
@ -83,6 +89,7 @@ public class ImsMonCameraInfoController extends BladeController {
operatorType = OperatorType.MOBILE,
businessType = BusinessType.GENCODE,
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) {
QueryWrapper<ImsMonCameraInfoEntity> queryWrapper = new QueryWrapper<>();
if (!Func.isEmpty(cameraInfo.get("tenantId"))) {
@ -130,6 +137,7 @@ public class ImsMonCameraInfoController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 4)
@ApiOperation(value = "新增", notes = "传入cameraInfo")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) {
return R.status(cameraInfoService.save(cameraInfo));
}
@ -140,6 +148,7 @@ public class ImsMonCameraInfoController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 5)
@ApiOperation(value = "修改", notes = "传入cameraInfo")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) {
return R.status(cameraInfoService.updateById(cameraInfo));
}
@ -150,19 +159,19 @@ public class ImsMonCameraInfoController extends BladeController {
@PostMapping("/submit")
@ApiOperationSupport(order = 6)
@ApiOperation(value = "新增或修改", notes = "传入cameraInfo")
@Operate(label = "新增或修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R submit(@Valid @RequestBody ImsMonCameraInfoEntity cameraInfo) {
return R.status(cameraInfoService.saveOrUpdate(cameraInfo));
}
/**
* 删除 代码自定义代号
*/
@PostMapping("/remove")
@ApiOperationSupport(order = 7)
@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) {
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.entity.RehearsalPlanEntity;
import com.hnac.hzims.safeproduct.entity.RehearsalRecordEntity;
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.RehearsalRecordlVO;
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.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -34,6 +38,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/rehearsal")
@Business(module = Constants.APP_NAME, value = "演练管理", ignore = false)
@Api(value = "演练管理", tags = "演练管理接口")
public class RehearsalController extends BladeController {
@ -44,6 +49,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/save")
@ApiOperation(value = "新增演练计划")
@ApiOperationSupport(order = 1)
@Operate(label = "新增演练计划", type = BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody RehearsalPlanEntity rehearsalPlan) {
return R.status(rehearsalPlanService.save(rehearsalPlan));
}
@ -51,6 +57,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/update")
@ApiOperation(value = "修改演练计划")
@ApiOperationSupport(order = 2)
@Operate(label = "修改演练计划", type = BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody RehearsalPlanEntity rehearsalPlan) {
return R.status(rehearsalPlanService.updateById(rehearsalPlan));
}
@ -58,6 +65,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/remove")
@ApiOperation(value = "删除演练计划")
@ApiOperationSupport(order = 3)
@Operate(label = "删除演练计划", type = BusinessType.DELETE, ignore = false)
public R remove(@RequestParam Long id) {
return R.status(rehearsalPlanService.removeRehearsalPlan(id));
}
@ -65,6 +73,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/detail")
@ApiOperation(value = "演练计划详情")
@ApiOperationSupport(order = 4)
@Operate(label = "演练计划详情", type = BusinessType.QUERY, ignore = false)
public R<RehearsalPlanEntity> detail(@RequestParam Long id) {
return R.data(rehearsalPlanService.getById(id));
}
@ -77,6 +86,7 @@ public class RehearsalController extends BladeController {
})
@ApiOperation(value = "演练计划分页")
@ApiOperationSupport(order = 5)
@Operate(label = "演练计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalPlanEntity>> page(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<RehearsalPlanEntity> page = rehearsalPlanService.rehearsalPlanPage(param, query);
return R.data(page);
@ -85,6 +95,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/saveRehearsalRecord")
@ApiOperation(value = "新增演练记录")
@ApiOperationSupport(order = 6)
@Operate(label = "新增演练记录", type = BusinessType.INSERT, ignore = false)
public R saveRehearsalRecord(@Valid @RequestBody RehearsalRecordEntity rehearsalRecord) {
return R.status(rehearsalRecordService.saveRehearsalRecord(rehearsalRecord));
}
@ -92,6 +103,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/updateRehearsalRecord")
@ApiOperation(value = "修改演练记录")
@ApiOperationSupport(order = 7)
@Operate(label = "修改演练记录", type = BusinessType.UPDATE, ignore = false)
public R updateRehearsalRecord(@Valid @RequestBody RehearsalRecordEntity rehearsalRecord) {
return R.status(rehearsalRecordService.updateRehearsalRecord(rehearsalRecord));
}
@ -99,6 +111,7 @@ public class RehearsalController extends BladeController {
@PostMapping("/removeRehearsalRecord")
@ApiOperation(value = "删除演练记录")
@ApiOperationSupport(order = 8)
@Operate(label = "删除演练记录", type = BusinessType.DELETE, ignore = false)
public R removeRehearsalRecord(@RequestParam Long id) {
return R.status(rehearsalRecordService.removeById(id));
}
@ -106,6 +119,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/rehearsalRecordDetail")
@ApiOperation(value = "演练记录详情")
@ApiOperationSupport(order = 9)
@Operate(label = "演练记录详情", type = BusinessType.QUERY, ignore = false)
public R<RehearsalRecordDetailVO> rehearsalRecordDetail(@RequestParam Long id) {
return R.data(rehearsalRecordService.getRecordDetailVOById(id));
}
@ -119,6 +133,7 @@ public class RehearsalController extends BladeController {
})
@ApiOperation(value = "演练记录分页")
@ApiOperationSupport(order = 10)
@Operate(label = "演练记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalRecordlVO>> rehearsalRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<RehearsalRecordlVO> page = rehearsalRecordService.rehearsalRecordPage(param, query);
return R.data(page);
@ -127,6 +142,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/dataByMonth")
@ApiOperation(value = "月度统计表")
@ApiOperationSupport(order = 11)
@Operate(label = "月度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalMonthVO>> dataByMonth(@RequestParam String month, String unit, Query query) {
IPage<RehearsalMonthVO> page = rehearsalPlanService.dataByMonth(month, unit, query);
return R.data(page);
@ -135,6 +151,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/dataByYear")
@ApiOperation(value = "年度统计表")
@ApiOperationSupport(order = 12)
@Operate(label = "年度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<RehearsalYearVO>> dataByYear(@RequestParam String year, String unit, Query query) {
IPage<RehearsalYearVO> page = rehearsalPlanService.dataByYear(year, unit, query);
return R.data(page);
@ -148,6 +165,7 @@ public class RehearsalController extends BladeController {
})
@ApiOperation(value = "演练数据导出")
@ApiOperationSupport(order = 13)
@Operate(label = "演练数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportRehearsalData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
rehearsalPlanService.exportRehearsalPlanData(param, response);
}
@ -155,6 +173,7 @@ public class RehearsalController extends BladeController {
@GetMapping("/exportRecordDetailData")
@ApiOperation(value = "演练记录表导出")
@ApiOperationSupport(order = 14)
@Operate(label = "演练记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportRehearsalRecordData(@RequestParam Long id, HttpServletResponse 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.vo.ReviewVo;
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 lombok.AllArgsConstructor;
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.Func;
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.feign.IUserClient;
import org.springframework.transaction.annotation.Transactional;
@ -39,8 +39,6 @@ import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.time.Year;
import java.time.temporal.TemporalAdjuster;
import java.time.temporal.TemporalAdjusters;
import java.util.Arrays;
import java.util.List;
@ -53,16 +51,20 @@ import java.util.Optional;
@Slf4j
@RestController
@RequestMapping("/review")
@Business(module = Constants.APP_NAME, value = "站点安全生产标准化评审管理", ignore = false)
@Api(value = "站点安全生产标准化评审管理",tags = "站点安全生产标准化评审管理")
public class ReviewController extends BladeController {
private final IReviewService reviewService;
private final IUserClient userClient;
private final IReviewStandardService reviewStandardService;
@PostMapping("/save")
@ApiOperation("保存")
@ApiOperationSupport(order = 1)
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R<Boolean> save(@RequestBody ReviewDto req) {
//查询该站点是否已录入站点
LocalDateTime lastDayOfYear = LocalDateTime.now().with(TemporalAdjusters.lastDayOfYear());
@ -91,6 +93,7 @@ public class ReviewController extends BladeController {
@ApiOperation("编辑/提交/评审")
@ApiOperationSupport(order = 2)
@Transactional(rollbackFor = Exception.class)
@Operate(label = "编辑/提交/评审", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R<Boolean> update(@RequestBody ReviewDto req) {
ReviewEntity entity = BeanUtil.copy(req,ReviewEntity.class);
if(Constants.REVIEW_SUBMIT_STATUS == entity.getStatus()){
@ -123,6 +126,7 @@ public class ReviewController extends BladeController {
@GetMapping("/detail/{id}")
@ApiOperation("查看详情")
@ApiOperationSupport(order = 3)
@Operate(label = "查看详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<ReviewVo> detail(@PathVariable @ApiParam("删除id,按逗号分隔") String id) {
ReviewEntity reviewEntity = reviewService.getById(id);
ReviewVo vo = ReviewWrapper.build().entityVO(reviewEntity);
@ -139,6 +143,7 @@ public class ReviewController extends BladeController {
@ApiOperationSupport(order = 4)
@OperationAnnotation(moduleName = "电站安全标准",title = "电站安全标准",operatorType = OperatorType.MOBILE,businessType = BusinessType.GENCODE,
action = "分页查询")
@Operate(label = "分页查询", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage> listPage(ReviewDto req, Query query) {
LambdaQueryWrapper<ReviewEntity> queryWrapper = Condition.getQueryWrapper(new ReviewEntity(),BeanUtil.copy(req,ReviewEntity.class));
if(Func.isNotEmpty(req.getStatus())){
@ -155,6 +160,7 @@ public class ReviewController extends BladeController {
@ApiOperation("删除")
@ApiOperationSupport(order = 5)
@Transactional(rollbackFor = Exception.class)
@Operate(label = "删除", type = com.hnac.hzinfo.log.contants.BusinessType.DELETE, ignore = false)
public R<Boolean> removeByIds(@PathVariable String ids) {
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;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.common.logs.annotation.OperationAnnotation;
import com.hnac.hzims.common.logs.enums.BusinessType;
import com.hnac.hzims.common.logs.enums.OperatorType;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SafeEquipmentTrialDTO;
import com.hnac.hzims.safeproduct.entity.SafeEquipmentTrialEntity;
import com.hnac.hzims.safeproduct.service.SafeEquipmentTrialService;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -26,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@AllArgsConstructor
@RequestMapping("/safeEquimentTrial")
@Business(module = Constants.APP_NAME, value = "设备试验", ignore = false)
@Api(tags = "设备试验")
public class SafeEquipmentTrialController extends BladeController {
@ -37,6 +40,7 @@ public class SafeEquipmentTrialController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@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) {
return R.status(service.deleteLogic(Func.toLongList(ids)));
}
@ -47,6 +51,7 @@ public class SafeEquipmentTrialController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入SafeEquipmentTrialEntity对象")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SafeEquipmentTrialEntity entity) {
return R.status(service.save(entity));
}
@ -60,11 +65,11 @@ public class SafeEquipmentTrialController extends BladeController {
@OperationAnnotation(moduleName = "设备管理",title = "设备试验",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页条件")
@Operate(label = "分页", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<BladePage<SafeEquipmentTrialVO>> list(SafeEquipmentTrialDTO safeEquipmentTrialDTO, Query query) {
return service.pageCondition(safeEquipmentTrialDTO, query);
}
/**
* 设备历史数据
* @return
@ -77,7 +82,6 @@ public class SafeEquipmentTrialController extends BladeController {
return R.success("调用查询设备历史数据成功");
}
/**
* 设备档案
* @return
@ -89,6 +93,4 @@ public class SafeEquipmentTrialController extends BladeController {
public R internaldevice() {
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.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.hazard.service.IDangerSourceService;
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.ApiOperation;
import lombok.AllArgsConstructor;
@ -13,7 +17,6 @@ import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author xiashandong
* @created 2020/9/1 15:15
@ -21,21 +24,20 @@ import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("/safeReport")
@Business(module = Constants.APP_NAME, value = "安全管理统计报表", ignore = false)
@Api(tags = "安全管理统计报表")
public class SafeReportController extends BladeController {
private final IDangerSourceService dangerSourceService;
/**
* 危险源等级统计
*/
@GetMapping("/danger-source-level-count")
@ApiOperationSupport(order = 1)
@ApiOperation(value = "危险源等级统计", notes = "危险源等级统计")
@Operate(label = "危险源等级统计", type = BusinessType.QUERY, ignore = false)
public List<DangerSourceReportVO> 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.enums.BusinessType;
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.SafetyToolDTO;
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.vo.SafeCheckStatisticVO;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -43,6 +46,7 @@ import java.util.List;
@RestController
@AllArgsConstructor
@RequestMapping("/safetyTool")
@Business(module = Constants.APP_NAME, value = "安全工器具", ignore = false)
@Api(tags = "安全工器具")
public class SafetyToolController extends BladeController {
@ -54,6 +58,7 @@ public class SafetyToolController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@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) {
return safetyToolService.remove(Func.toLongList(ids));
}
@ -64,6 +69,7 @@ public class SafetyToolController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入safetyTool")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SafetyToolEntity safetyTool) {
return safetyToolService.doSave(safetyTool);
}
@ -74,6 +80,7 @@ public class SafetyToolController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入safetyTool")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody SafetyToolEntity safetyTool) {
return safetyToolService.doUpdate(safetyTool);
}
@ -84,6 +91,7 @@ public class SafetyToolController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入safetyTool")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<SafetyToolVO> detail(@RequestParam("id") Long id) {
SafetyToolEntity detail = safetyToolService.getOne(Condition.getQueryWrapper(new SafetyToolEntity() {{
setId(id);
@ -101,6 +109,7 @@ public class SafetyToolController extends BladeController {
BusinessType.GENCODE,
action = "分页查询安全工具器列表")
@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) {
return safetyToolService.pageCondition(req, query);
}
@ -111,17 +120,18 @@ public class SafetyToolController extends BladeController {
@GetMapping("/listAll")
@ApiOperationSupport(order = 51)
@ApiOperation(value = "根据条件查询所有记录", notes = "查询条件:请参考分页接口")
@Operate(label = "根据条件查询所有记录", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<List<SafetyToolVO>> queryByCondition(SafetyToolDTO req) {
return safetyToolService.queryByCondition(req);
}
/**
* 审核批量审核
*/
@PostMapping("/batchRecheck")
@ApiOperationSupport(order = 52)
@ApiOperation(value = "复核、批量审核")
@Operate(label = "复核、批量审核", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R batchRecheck(@RequestBody SafetyToolBatchRecheckDTO req) {
safetyToolService.doBatchRecheck(req);
return R.status(true);
@ -133,6 +143,7 @@ public class SafetyToolController extends BladeController {
@ApiOperation(value = "导出Excel", notes = "查询条件:请参考分页接口")
@ApiOperationSupport(order = 60)
@GetMapping(value = "/exportExcel")
@Operate(label = "导出Excel", type = com.hnac.hzinfo.log.contants.BusinessType.EXPORT, ignore = false)
public void exportExcel(SafetyToolDTO req) {
safetyToolService.exportExcel(req);
}
@ -143,6 +154,7 @@ public class SafetyToolController extends BladeController {
@ApiOperation(value = "导入Excel")
@ApiOperationSupport(order = 70)
@PostMapping(value = "/importExcel")
@Operate(label = "导入Excel", type = com.hnac.hzinfo.log.contants.BusinessType.IMPORT, ignore = false)
public R importExcel(MultipartFile file,Long createDept) {
safetyToolService.importExcel(file,createDept);
return R.data(true);
@ -151,6 +163,7 @@ public class SafetyToolController extends BladeController {
@ApiOperationSupport(order = 80)
@ApiOperation(value = "安全工器具导出,下载pdf", notes = "安全工器具导出,下载pdf")
@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 {
List idList = null;
if(Func.isNotEmpty(ids)){
@ -174,6 +187,7 @@ public class SafetyToolController extends BladeController {
}
@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){
IInspectTaskClient taskClient = SpringUtil.getBean(IInspectTaskClient.class);
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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SafetyToolRecheckListDTO;
import com.hnac.hzims.safeproduct.service.ISafetyToolRecheckService;
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.ApiOperation;
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.RestController;
/**
* @author xiashandong
* @created 2020/8/27 17:18
@ -23,6 +26,7 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@AllArgsConstructor
@RequestMapping("/safetyToolRecheck")
@Business(module = Constants.APP_NAME, value = "安全工器具复核记录", ignore = false)
@Api(tags = "安全工器具复核记录")
public class SafetyToolRecheckController extends BladeController {
@ -34,6 +38,7 @@ public class SafetyToolRecheckController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "分页", notes = "查询条件:toolId,checkUserId,checkUserName")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<SafetyToolRecheckVO>> list(SafetyToolRecheckListDTO req, Query 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.enums.BusinessType;
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.SafetyToolTypeDTO;
import com.hnac.hzims.safeproduct.dto.SafetyToolTypeListDTO;
import com.hnac.hzims.safeproduct.service.ISafetyToolTypeService;
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.ApiOperation;
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.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import java.util.Map;
/**
* 控制器
*
@ -34,6 +35,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/safetyToolType")
@Business(module = Constants.APP_NAME, value = "安全工器具类型", ignore = false)
@Api(tags = "安全工器具类型")
public class SafetyToolTypeController extends BladeController {
@ -45,6 +47,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@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) {
return R.status(safetyToolTypeService.deleteLogic(Func.toLongList(ids)));
}
@ -55,6 +58,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入safetyToolType")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SafetyToolTypeDTO safetyToolType) {
return R.data(safetyToolTypeService.doSave(safetyToolType));
}
@ -65,6 +69,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/batchConfig")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "批量配置", notes = "传入safetyToolType")
@Operate(label = "批量配置", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R batchConfig(@Valid @RequestBody SafetyToolTypeBatchConfigDTO req) {
safetyToolTypeService.doBatchConfig(req);
return R.status(true);
@ -76,6 +81,7 @@ public class SafetyToolTypeController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "修改", notes = "传入safetyToolType")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@RequestBody SafetyToolTypeDTO req) {
safetyToolTypeService.doEdit(req);
return R.status(true);
@ -87,6 +93,7 @@ public class SafetyToolTypeController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "详情", notes = "传入safetyToolType")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<SafetyToolTypeVO> detail(@RequestParam("id") Long 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,
action = "分页查询安全工器具类型数据")
@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) {
return R.data(safetyToolTypeService.pageCondition(req, query));
}
@ -110,8 +118,8 @@ public class SafetyToolTypeController extends BladeController {
@GetMapping("/getSelOption")
@ApiOperationSupport(order = 70)
@ApiOperation(value = "获取工器具类型下拉框选项列表")
@Operate(label = "获取工器具类型下拉框选项列表", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<Map<String, String>> 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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
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.SpecialDeviceInspectionEntity;
import com.hnac.hzims.safeproduct.service.ISpecialDeviceInspectionService;
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.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -30,6 +34,7 @@ import java.util.Map;
@RequestMapping("/specialDevice")
@AllArgsConstructor
@RestController
@Business(module = Constants.APP_NAME, value = "特种设备", ignore = false)
@Api(value = "特种设备", tags = "特种设备接口")
public class SpecialDeviceController extends BladeController {
@ -40,6 +45,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/save")
@ApiOperation(value = "新增设备")
@ApiOperationSupport(order = 1)
@Operate(label = "新增设备", type = BusinessType.INSERT, ignore = false)
public R save(@Valid @RequestBody SpecialDeviceEntity specialDeviceEntity) {
return R.status(specialDeviceService.save(specialDeviceEntity));
}
@ -47,6 +53,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/update")
@ApiOperation(value = "修改设备")
@ApiOperationSupport(order = 2)
@Operate(label = "修改设备", type = BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody SpecialDeviceEntity specialDeviceEntity) {
return R.status(specialDeviceService.updateById(specialDeviceEntity));
}
@ -54,6 +61,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/remove")
@ApiOperation(value = "删除设备")
@ApiOperationSupport(order = 3)
@Operate(label = "删除设备", type = BusinessType.DELETE, ignore = false)
public R remove(@RequestParam Long id) {
return R.status(specialDeviceService.removeById(id));
}
@ -61,6 +69,7 @@ public class SpecialDeviceController extends BladeController {
@GetMapping("/detail")
@ApiOperation(value = "设备详情")
@ApiOperationSupport(order = 4)
@Operate(label = "设备详情", type = BusinessType.QUERY, ignore = false)
public R<SpecialDeviceEntity> detail(@RequestParam Long id) {
return R.data(specialDeviceService.getById(id));
}
@ -72,6 +81,7 @@ public class SpecialDeviceController extends BladeController {
})
@ApiOperation(value = "设备分页")
@ApiOperationSupport(order = 5)
@Operate(label = "设备分页", type = BusinessType.QUERY, ignore = false)
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)
.lambda().orderByDesc(SpecialDeviceEntity::getCreateTime));
@ -81,6 +91,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/saveInspection")
@ApiOperation(value = "新增设备检验记录")
@ApiOperationSupport(order = 6)
@Operate(label = "新增设备检验记录", type = BusinessType.INSERT, ignore = false)
public R saveInspection(@Valid @RequestBody SpecialDeviceInspectionEntity specialDeviceInspectionEntity) {
return R.status(specialDeviceInspectionService.saveInspection(specialDeviceInspectionEntity));
}
@ -88,6 +99,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/updateInspection")
@ApiOperation(value = "修改设备检验记录")
@ApiOperationSupport(order = 7)
@Operate(label = "修改设备检验记录", type = BusinessType.UPDATE, ignore = false)
public R updateInspection(@Valid @RequestBody SpecialDeviceInspectionEntity specialDeviceInspectionEntity) {
return R.status(specialDeviceInspectionService.updateInspection(specialDeviceInspectionEntity));
}
@ -95,6 +107,7 @@ public class SpecialDeviceController extends BladeController {
@PostMapping("/removeInspection")
@ApiOperation(value = "删除设备检验记录")
@ApiOperationSupport(order = 8)
@Operate(label = "删除设备检验记录", type = BusinessType.DELETE, ignore = false)
public R removeInspection(@RequestParam Long id) {
return R.status(specialDeviceInspectionService.removeById(id));
}
@ -102,6 +115,7 @@ public class SpecialDeviceController extends BladeController {
@GetMapping("/inspectionDetail")
@ApiOperation(value = "设备检验记录详情")
@ApiOperationSupport(order = 9)
@Operate(label = "设备检验记录详情", type = BusinessType.QUERY, ignore = false)
public R<SpecialDeviceInspectionEntity> inspectionDetail(@RequestParam Long id) {
return R.data(specialDeviceInspectionService.getById(id));
}
@ -114,6 +128,7 @@ public class SpecialDeviceController extends BladeController {
})
@ApiOperation(value = "设备检验记录分页")
@ApiOperationSupport(order = 10)
@Operate(label = "设备检验记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<SpecialDeviceInspectionEntity>> inspectionPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<SpecialDeviceInspectionEntity> page = specialDeviceInspectionService.getInspectionPage(param, query);
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.enums.BusinessType;
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.SystemFileListDTO;
import com.hnac.hzims.safeproduct.entity.SystemFileEntity;
import com.hnac.hzims.safeproduct.service.ISystemFileService;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -23,7 +26,6 @@ import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
/**
* @author xiashandong
* @created 2020/9/8 15:10
@ -31,6 +33,7 @@ import javax.validation.Valid;
@RestController
@AllArgsConstructor
@RequestMapping("/systemFile")
@Business(module = Constants.APP_NAME, value = "体系标准文件", ignore = false)
@Api(tags = "体系标准文件")
public class SystemFileController extends BladeController {
@ -42,6 +45,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@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) {
return R.status(systemFileService.deleteLogic(Func.toLongList(ids)));
}
@ -52,6 +56,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入SystemFile")
@Operate(label = "新增", type = com.hnac.hzinfo.log.contants.BusinessType.INSERT, ignore = false)
public R save(@RequestBody SystemFileDTO req) {
req.setFileStatus(null);
req.setFlowId(null);
@ -64,6 +69,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入SystemFile")
@Operate(label = "修改", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R update(@Valid @RequestBody SystemFileEntity SystemFile) {
return R.status(systemFileService.updateById(SystemFile));
}
@ -74,6 +80,7 @@ public class SystemFileController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情")
@Operate(label = "详情", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<SystemFileVO> detail(@RequestParam Long id) {
return systemFileService.detail(id);
}
@ -88,6 +95,7 @@ public class SystemFileController extends BladeController {
@OperationAnnotation(moduleName = "安全管理",title = "体系文件",operatorType = OperatorType.MOBILE,businessType =
BusinessType.GENCODE,
action = "分页查询体系文件数据")
@Operate(label = "分页", type = com.hnac.hzinfo.log.contants.BusinessType.QUERY, ignore = false)
public R<IPage<SystemFileVO>> list(SystemFileListDTO req, Query query) {
return systemFileService.pageCondition(req, query);
}
@ -95,6 +103,7 @@ public class SystemFileController extends BladeController {
@PostMapping("/submitApproved")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "审批", notes = "查询条件:id,status")
@Operate(label = "审批", type = com.hnac.hzinfo.log.contants.BusinessType.UPDATE, ignore = false)
public R submitApproved(@RequestBody SystemFileListDTO 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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.SystemFileTypeDTO;
import com.hnac.hzims.safeproduct.dto.SystemFileTypeListDTO;
import com.hnac.hzims.safeproduct.service.ISystemFileTypeService;
import com.hnac.hzims.safeproduct.vo.SystemFileTypeTreeVO;
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.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -18,7 +22,6 @@ import org.springblade.core.tool.api.R;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
/**
* @author xiashandong
* @created 2020/9/7 16:33
@ -26,6 +29,7 @@ import org.springframework.web.bind.annotation.*;
@RestController
@AllArgsConstructor
@RequestMapping("/systemFileType")
@Business(module = Constants.APP_NAME, value = "体系标准文件类型", ignore = false)
@Api(tags = "体系标准文件类型")
public class SystemFileTypeController extends BladeController {
@ -37,6 +41,7 @@ public class SystemFileTypeController extends BladeController {
@PostMapping("/remove")
@ApiOperationSupport(order = 10)
@ApiOperation(value = "逻辑删除", notes = "传入id")
@Operate(label = "逻辑删除", type = BusinessType.DELETE, ignore = false)
public R remove(@ApiParam(value = "主键", required = true) @RequestParam Long id) {
return R.status(systemFileTypeService.remove(id));
}
@ -47,6 +52,7 @@ public class SystemFileTypeController extends BladeController {
@PostMapping("/save")
@ApiOperationSupport(order = 20)
@ApiOperation(value = "新增", notes = "传入SystemFileType")
@Operate(label = "新增", type = BusinessType.INSERT, ignore = false)
public R save(@RequestBody SystemFileTypeDTO req, BindingResult br) {
return R.status(systemFileTypeService.save(req));
}
@ -57,6 +63,7 @@ public class SystemFileTypeController extends BladeController {
@PostMapping("/update")
@ApiOperationSupport(order = 30)
@ApiOperation(value = "修改", notes = "传入SystemFileType")
@Operate(label = "修改", type = BusinessType.UPDATE, ignore = false)
public R update(@RequestBody SystemFileTypeDTO req, BindingResult br) {
return R.status(systemFileTypeService.updateById(req));
}
@ -67,6 +74,7 @@ public class SystemFileTypeController extends BladeController {
@GetMapping("/detail")
@ApiOperationSupport(order = 40)
@ApiOperation(value = "详情", notes = "传入SystemFileType")
@Operate(label = "详情", type = BusinessType.QUERY, ignore = false)
public R<SystemFileTypeVO> detail(@RequestParam Long id) {
return systemFileTypeService.detail(id);
}
@ -77,6 +85,7 @@ public class SystemFileTypeController extends BladeController {
@GetMapping("/list")
@ApiOperationSupport(order = 50)
@ApiOperation(value = "分页", notes = "查询条件:idOrParentId,name")
@Operate(label = "分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<SystemFileTypeVO>> list(SystemFileTypeListDTO req, Query query) {
return systemFileTypeService.pageCondition(req, query);
}
@ -88,8 +97,8 @@ public class SystemFileTypeController extends BladeController {
@GetMapping("/getTree")
@ApiOperationSupport(order = 60)
@ApiOperation(value = "获取树结构", notes = "查询条件:name")
@Operate(label = "获取树结构", type = BusinessType.QUERY, ignore = false)
public R<SystemFileTypeTreeVO> getTree(SystemFileTypeListDTO 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.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.hnac.hzims.safeproduct.Constants;
import com.hnac.hzims.safeproduct.dto.TestDTO;
import com.hnac.hzims.safeproduct.dto.TestScoreDTO;
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.ITrainRecordService;
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.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@ -39,6 +43,7 @@ import java.util.Map;
@RestController
@AllArgsConstructor
@RequestMapping("/train")
@Business(module = Constants.APP_NAME, value = "培训管理", ignore = false)
@Api(value = "培训管理", tags = "培训管理接口")
public class TrainController extends BladeController {
@ -53,6 +58,7 @@ public class TrainController extends BladeController {
@PostMapping("/saveTrainPlan")
@ApiOperation(value = "新增培训计划")
@ApiOperationSupport(order = 1)
@Operate(label = "新增培训计划", type = BusinessType.INSERT, ignore = false)
public R saveTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) {
return R.status(trainPlanService.save(trainPlanEntity));
}
@ -60,6 +66,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateTrainPlan")
@ApiOperation(value = "修改培训计划")
@ApiOperationSupport(order = 2)
@Operate(label = "修改培训计划", type = BusinessType.UPDATE, ignore = false)
public R updateTrainPlan(@Valid @RequestBody TrainPlanEntity trainPlanEntity) {
return R.status(trainPlanService.updateById(trainPlanEntity));
}
@ -67,6 +74,7 @@ public class TrainController extends BladeController {
@PostMapping("/removeTrainPlan")
@ApiOperation(value = "删除培训计划")
@ApiOperationSupport(order = 3)
@Operate(label = "删除培训计划", type = BusinessType.DELETE, ignore = false)
public R removeTrainPlan(@RequestParam Long id) {
return R.status(trainPlanService.removeTrainPlan(id));
}
@ -74,6 +82,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainPlanDetail")
@ApiOperation(value = "培训计划详情")
@ApiOperationSupport(order = 4)
@Operate(label = "培训计划详情", type = BusinessType.QUERY, ignore = false)
public R<TrainPlanEntity> trainPlanDetail(@RequestParam Long id) {
return R.data(trainPlanService.getById(id));
}
@ -86,6 +95,7 @@ public class TrainController extends BladeController {
})
@ApiOperation(value = "培训计划分页")
@ApiOperationSupport(order = 5)
@Operate(label = "培训计划分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainPlanEntity>> trainPlanPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TrainPlanEntity> page = trainPlanService.trainPlanPage(param, query);
return R.data(page);
@ -94,6 +104,7 @@ public class TrainController extends BladeController {
@PostMapping("/saveTrainRecord")
@ApiOperation(value = "新增培训记录")
@ApiOperationSupport(order = 6)
@Operate(label = "新增培训记录", type = BusinessType.INSERT, ignore = false)
public R saveTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) {
return R.status(trainRecordService.saveTrainRecord(trainRecordEntity));
}
@ -101,6 +112,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateTrainRecord")
@ApiOperation(value = "修改培训记录")
@ApiOperationSupport(order = 7)
@Operate(label = "修改培训记录", type = BusinessType.UPDATE, ignore = false)
public R updateTrainRecord(@Valid @RequestBody TrainRecordEntity trainRecordEntity) {
return R.status(trainRecordService.updateById(trainRecordEntity));
}
@ -108,6 +120,7 @@ public class TrainController extends BladeController {
@PostMapping("/removeTrainRecord")
@ApiOperation(value = "删除培训记录")
@ApiOperationSupport(order = 8)
@Operate(label = "删除培训记录", type = BusinessType.DELETE, ignore = false)
public R removeTrainRecord(@RequestParam Long id) {
return R.status(trainRecordService.removeTrainRecord(id));
}
@ -115,6 +128,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainRecordDetail")
@ApiOperation(value = "培训记录详情")
@ApiOperationSupport(order = 9)
@Operate(label = "培训记录详情", type = BusinessType.QUERY, ignore = false)
public R<TrainRecordDetailVO> trainRecordDetail(@RequestParam Long id) {
return R.data(trainRecordService.getTrainRecordDetailById(id));
}
@ -128,6 +142,7 @@ public class TrainController extends BladeController {
})
@ApiOperation(value = "培训记录分页")
@ApiOperationSupport(order = 10)
@Operate(label = "培训记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainRecordVO>> trainRecordPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TrainRecordVO> page = trainRecordService.trainRecordPage(param, query);
return R.data(page);
@ -136,6 +151,7 @@ public class TrainController extends BladeController {
@GetMapping("/getTrainRecordNameList")
@ApiOperation(value = "培训记录名称列表")
@ApiOperationSupport(order = 11)
@Operate(label = "培训记录名称列表", type = BusinessType.QUERY, ignore = false)
public R<List<TrainRecordDTO>> getTrainRecordNameList(@RequestParam String trainPlanId) {
List<TrainRecordDTO> list = trainRecordService.getTrainRecordNameList(trainPlanId);
return R.data(list);
@ -144,6 +160,7 @@ public class TrainController extends BladeController {
@PostMapping("/saveTest")
@ApiOperation(value = "新增考试")
@ApiOperationSupport(order = 12)
@Operate(label = "新增考试", type = BusinessType.INSERT, ignore = false)
public R saveTest(@Valid @RequestBody TestDTO testEntity) {
return testService.saveTest(testEntity);
}
@ -151,6 +168,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateTest")
@ApiOperation(value = "修改考试")
@ApiOperationSupport(order = 13)
@Operate(label = "修改考试", type = BusinessType.UPDATE, ignore = false)
public R updateTest(@Valid @RequestBody TestDTO testEntity) {
return R.status(testService.updateTest(testEntity));
}
@ -158,6 +176,7 @@ public class TrainController extends BladeController {
@PostMapping("/removeTest")
@ApiOperation(value = "删除考试")
@ApiOperationSupport(order = 14)
@Operate(label = "删除考试", type = BusinessType.DELETE, ignore = false)
public R removeTest(@RequestParam Long id) {
return R.status(testService.removeTest(id));
}
@ -165,6 +184,7 @@ public class TrainController extends BladeController {
@GetMapping("/testDetail")
@ApiOperation(value = "考试详情")
@ApiOperationSupport(order = 15)
@Operate(label = "考试详情", type = BusinessType.QUERY, ignore = false)
public R<TestEntity> testDetail(@RequestParam Long id) {
return R.data(testService.getById(id));
}
@ -178,6 +198,7 @@ public class TrainController extends BladeController {
})
@ApiOperation(value = "考试记录分页")
@ApiOperationSupport(order = 16)
@Operate(label = "考试记录分页", type = BusinessType.QUERY, ignore = false)
public R<IPage<TestEntity>> testPage(@ApiIgnore @RequestParam Map<String, Object> param, Query query) {
IPage<TestEntity> page = testService.testPage(param, query);
return R.data(page);
@ -186,6 +207,7 @@ public class TrainController extends BladeController {
@GetMapping("/getTestNameList")
@ApiOperation(value = "考试记录名称列表")
@ApiOperationSupport(order = 17)
@Operate(label = "考试记录名称列表", type = BusinessType.QUERY, ignore = false)
public R<List<TestDTO>> getTestNameList(@RequestParam String trainPlanId) {
List<TestDTO> list = testService.getTestNameList(trainPlanId);
return R.data(list);
@ -194,6 +216,7 @@ public class TrainController extends BladeController {
@GetMapping("/testScoreList")
@ApiOperation(value = "考试成绩列表")
@ApiOperationSupport(order = 18)
@Operate(label = "考试成绩列表", type = BusinessType.QUERY, ignore = false)
public R<List<TestScoreEntity>> testScoreList(@RequestParam Long testId, String name) {
List<TestScoreEntity> list = testScoreService.testScoreList(testId, name);
return R.data(list);
@ -201,6 +224,7 @@ public class TrainController extends BladeController {
@GetMapping("/testScoreSum")
@ApiOperation(value = "考试总计")
@ApiOperationSupport(order = 18)
@Operate(label = "考试总计", type = BusinessType.QUERY, ignore = false)
public R<TestScoreSumVO> testScoreSum(@RequestParam Long testId, String name) {
TestScoreSumVO list = testScoreService.testScoreSum(testId, name);
return R.data(list);
@ -208,6 +232,7 @@ public class TrainController extends BladeController {
@PostMapping("/updateBatchScore")
@ApiOperation(value = "批量填写分数")
@ApiOperationSupport(order = 19)
@Operate(label = "批量填写分数", type = BusinessType.UPDATE, ignore = false)
public R updateBatchScore(@RequestBody TestScoreDTO testScoreDTO) {
return R.status(testScoreService.updateBatchScore(testScoreDTO));
}
@ -215,6 +240,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainDataByMonth")
@ApiOperation(value = "培训月度统计表")
@ApiOperationSupport(order = 20)
@Operate(label = "培训月度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainMonthVO>> trainDataByMonth(@RequestParam String month, String unit, Query query) {
IPage<TrainMonthVO> page = trainPlanService.dataByMonth(month, unit, query);
return R.data(page);
@ -223,6 +249,7 @@ public class TrainController extends BladeController {
@GetMapping("/trainDataByYear")
@ApiOperation(value = "培训年度统计表")
@ApiOperationSupport(order = 21)
@Operate(label = "培训年度统计表", type = BusinessType.QUERY, ignore = false)
public R<IPage<TrainYearVO>> trainDataByYear(@RequestParam String year, String unit, Query query) {
IPage<TrainYearVO> page = trainPlanService.dataByYear(year, unit, query);
return R.data(page);
@ -236,6 +263,7 @@ public class TrainController extends BladeController {
})
@ApiOperation(value = "培训计划数据导出")
@ApiOperationSupport(order = 22)
@Operate(label = "培训计划数据导出", type = BusinessType.EXPORT, ignore = false)
public void exportTrainPlanData(@ApiIgnore @RequestParam Map<String, Object> param, HttpServletResponse response) {
trainPlanService.exportTrainPlanData(param, response);
}
@ -243,6 +271,7 @@ public class TrainController extends BladeController {
@GetMapping("/exportTrainRecordData")
@ApiOperation(value = "培训记录表导出")
@ApiOperationSupport(order = 23)
@Operate(label = "培训记录表导出", type = BusinessType.EXPORT, ignore = false)
public void exportTrainRecordData(@RequestParam Long id, HttpServletResponse response) {
trainRecordService.exportTrainRecordData(id, response);
}

Loading…
Cancel
Save