|
@@ -0,0 +1,82 @@
|
|
|
+package cn.cslg.pas.controller;
|
|
|
+
|
|
|
+import cn.cslg.pas.common.core.base.Constants;
|
|
|
+import cn.cslg.pas.common.dto.QueryFeatureHistoryDTO;
|
|
|
+import cn.cslg.pas.common.dto.invalidDTO.RemoveGroupFeatureDTO;
|
|
|
+import cn.cslg.pas.common.model.cronModel.Records;
|
|
|
+import cn.cslg.pas.common.utils.Response;
|
|
|
+import cn.cslg.pas.common.dto.invalidDTO.UpdateGroupFeatureDTO;
|
|
|
+import cn.cslg.pas.service.business.invalidReport.AssoGroupFeatureService;
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 特征Controller层
|
|
|
+ *
|
|
|
+ * @Author lrj
|
|
|
+ * @Date 2023/12/5
|
|
|
+ */
|
|
|
+@Slf4j
|
|
|
+@RequestMapping(Constants.API_XiaoSHI + "/groupFeature")
|
|
|
+@RestController
|
|
|
+public class AssoGroupFeatureController {
|
|
|
+ @Autowired
|
|
|
+ private AssoGroupFeatureService assoGroupFeatureService;
|
|
|
+
|
|
|
+ @Operation(summary = "修改特征")
|
|
|
+ @PostMapping("/updateGroupFeature")
|
|
|
+ public Response updateGroupFeature(@RequestBody UpdateGroupFeatureDTO updateGroupFeatureDTO) throws Exception {
|
|
|
+ try {
|
|
|
+ Records records = new Records();
|
|
|
+ records.setData(assoGroupFeatureService.updateGroupFeature(updateGroupFeatureDTO));
|
|
|
+ return Response.success(records);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ return Response.error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Operation(summary = "删除特征")
|
|
|
+ @PostMapping("/removeGroupFeature")
|
|
|
+ public Response removeGroupFeature(@RequestBody RemoveGroupFeatureDTO removeGroupFeatureDTO) throws Exception {
|
|
|
+ try {
|
|
|
+ Records records = new Records();
|
|
|
+ records.setData(assoGroupFeatureService.removeGroupFeature(removeGroupFeatureDTO));
|
|
|
+ return Response.success(records);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ return Response.error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Operation(summary = "查询特征修改历史")
|
|
|
+ @PostMapping("/queryFeatureHistory")
|
|
|
+ public Response queryFeatureHistory(@RequestBody QueryFeatureHistoryDTO queryFeatureHistoryDTO) throws Exception {
|
|
|
+ try {
|
|
|
+ Records records = new Records();
|
|
|
+ records.setData(assoGroupFeatureService.queryFeatureHistory(queryFeatureHistoryDTO));
|
|
|
+ return Response.success(records);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ return Response.error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Operation(summary = "更新特征")
|
|
|
+ @PostMapping("/updateFeature")
|
|
|
+ public Response updateFeature(@RequestBody UpdateGroupFeatureDTO updateGroupFeatureDTO) throws Exception {
|
|
|
+ try {
|
|
|
+ Records records = new Records();
|
|
|
+ records.setData(assoGroupFeatureService.updateFeature(updateGroupFeatureDTO));
|
|
|
+ return Response.success(records);
|
|
|
+
|
|
|
+ } catch (Exception e) {
|
|
|
+ return Response.error(e.getMessage());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|