Commit 1a63eee5 by renrui

[add]架构知识文档管理

1 parent 51e3cf4b
......@@ -8,6 +8,9 @@ import io.swagger.annotations.ApiOperation;
import org.arch.base.Result;
import org.arch.common.modules.archoverall.dto.KlReportTplDTO;
import org.arch.common.modules.archoverall.entity.KlReportTpl;
import org.arch.log.annotation.OperLog;
import org.arch.log.logenum.LogOperTypeEnum;
import org.arch.log.logenum.LogTypeEnum;
import org.arch.overall.service.KlReportTplService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
......@@ -38,20 +41,23 @@ public class KlReportTempController {
@PostMapping(value = "/")
@ApiOperation(value = "分页查询", notes = "分页查询")
public ResponseEntity<IPage<KlReportTpl>> gtKlReportTemp(@RequestBody KlReportTplDTO dto) {
@OperLog(value = LogOperTypeEnum.QUERY, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "分页查询", moduleName = "架构知识库-报告模版库-报告模版结构化")
public ResponseEntity<IPage<KlReportTpl>> gtKlReportTemp(@RequestBody KlReportTplDTO dto) {
IPage<KlReportTpl> aPage = klReportTempService.gtKlReportTemp(dto);
return new ResponseEntity<>(aPage, HttpStatus.OK);
}
@PostMapping(value = "/{id}")
@ApiOperation(value = "根据ID查询", notes = "根据ID查询")
public ResponseEntity<KlReportTpl> getById(@PathVariable("id") String id) {
@OperLog(value = LogOperTypeEnum.QUERY, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "根据ID查询", moduleName = "架构知识库-报告模版库-报告模版结构化")
public ResponseEntity<KlReportTpl> getById(@PathVariable("id") String id) {
return new ResponseEntity<>(klReportTempService.getById(id), HttpStatus.OK);
}
@PostMapping("/adKlReportTemp")
@ApiOperation(value = "新增", notes = "新增")
public Result<Object> adKlReportTemp(@RequestBody KlReportTpl params) {
@OperLog(value = LogOperTypeEnum.ADD, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "新增", moduleName = "架构知识库-报告模版库-报告模版结构化")
public Result<Object> adKlReportTemp(@RequestBody KlReportTpl params) {
List<KlReportTpl> list = klReportTempService.gtTplName(params);
if(list.size() > 0) {
return Result.error("已存在此模板名称不可重复添加!");
......@@ -72,7 +78,8 @@ public class KlReportTempController {
@PostMapping(value = "/updKlReportTemp")
@ApiOperation(value = "修改", notes = "修改")
public Result<Object> updKlReportTemp(@RequestBody KlReportTpl params) {
@OperLog(value = LogOperTypeEnum.UPDATE, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "修改", moduleName = "架构知识库-报告模版库-报告模版结构化")
public Result<Object> updKlReportTemp(@RequestBody KlReportTpl params) {
params.setLastUpdateTime(new Date());
klReportTempService.updateById(params);
return Result.success(params);
......@@ -87,6 +94,7 @@ public class KlReportTempController {
*/
@PostMapping(value = "/updKlReportTempBatch")
@ApiOperation(value = "批量删除", notes = "批量删除")
@OperLog(value = LogOperTypeEnum.DELETE, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "批量删除", moduleName = "架构知识库-报告模版库-报告模版结构化")
public Result<Object> updKlTechPolicyBatch(@RequestBody Map<String, Object> requestMap) {
klReportTempService.updKlReportTempBatch(requestMap);
return Result.success();
......@@ -101,7 +109,8 @@ public class KlReportTempController {
*/
@PostMapping("/gtKlReportTemp")
@ApiOperation(value = "不分页获取模板列表", notes = "不分页获取模板列表")
public Result<Object> gtKlReportTemp(@RequestBody KlReportTpl params) {
@OperLog(value = LogOperTypeEnum.QUERY, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "不分页获取模板列表", moduleName = "架构知识库-报告模版库-报告模版结构化")
public Result<Object> gtKlReportTemp(@RequestBody KlReportTpl params) {
List<KlReportTpl> list = klReportTempService.gtTplName(params);
return Result.success(list);
}
......
......@@ -8,6 +8,9 @@ import io.swagger.annotations.ApiOperation;
import org.arch.base.Result;
import org.arch.common.modules.archoverall.dto.KlTechPolicyDTO;
import org.arch.common.modules.archoverall.entity.KlTechPolicy;
import org.arch.log.annotation.OperLog;
import org.arch.log.logenum.LogOperTypeEnum;
import org.arch.log.logenum.LogTypeEnum;
import org.arch.overall.service.KlTechPolicyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
......@@ -37,6 +40,7 @@ public class KlTechPolicyController {
@PostMapping(value = "/")
@ApiOperation(value = "分页查询", notes = "分页查询")
@OperLog(value = LogOperTypeEnum.QUERY, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "不分页获取模板列表", moduleName = "架构知识库-技术政策库-技术政策结构化")
public ResponseEntity<IPage<KlTechPolicy>> gtKlTechPolicyList(@RequestBody KlTechPolicyDTO dto) {
IPage<KlTechPolicy> aPage = klTechPolicyService.gtKlTechPolicyList(dto);
return new ResponseEntity<>(aPage, HttpStatus.OK);
......@@ -44,12 +48,14 @@ public class KlTechPolicyController {
@PostMapping(value = "/{id}")
@ApiOperation(value = "根据ID查询", notes = "根据ID查询")
@OperLog(value = LogOperTypeEnum.QUERY, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "根据ID查询", moduleName = "架构知识库-技术政策库-技术政策结构化")
public ResponseEntity<KlTechPolicy> getById(@PathVariable("id") String id) {
return new ResponseEntity<>(klTechPolicyService.getById(id), HttpStatus.OK);
}
@PostMapping(value = "/add")
@ApiOperation(value = "新增", notes = "新增")
@OperLog(value = LogOperTypeEnum.ADD, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "新增", moduleName = "架构知识库-技术政策库-技术政策结构化")
public Result<Object> addKlTechPolicy(@RequestBody KlTechPolicy params) {
List<KlTechPolicy> list = klTechPolicyService.gtTopName(params);
if(list.size() > 0) {
......@@ -64,6 +70,7 @@ public class KlTechPolicyController {
@PostMapping(value = "/upd")
@ApiOperation(value = "修改", notes = "修改")
@OperLog(value = LogOperTypeEnum.UPDATE, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "修改", moduleName = "架构知识库-技术政策库-技术政策结构化")
public Result<Object> updateKlTechPolicy(@RequestBody KlTechPolicy params) {
params.setLastUpdateTime(new Date());
klTechPolicyService.updateById(params);
......@@ -79,6 +86,7 @@ public class KlTechPolicyController {
*/
@PostMapping(value = "/upd-batch")
@ApiOperation(value = "批量删除", notes = "批量删除")
@OperLog(value = LogOperTypeEnum.DELETE, logTypeValue = LogTypeEnum.BUSI_LOG, operDes = "批量删除", moduleName = "架构知识库-技术政策库-技术政策结构化")
public Result<Object> updateKlTechPolicyBatch(@RequestBody Map<String, Object> requestMap) {
klTechPolicyService.updKlTechPolicyBatch(requestMap);
return Result.success();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!