|
@@ -1,25 +1,26 @@
|
|
|
package com.diagbot.web;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
|
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.diagbot.annotation.SysLogger;
|
|
|
-import com.diagbot.dto.RelationDTO;
|
|
|
-import com.diagbot.dto.RespDTO;
|
|
|
-import com.diagbot.entity.LexiconRelationship;
|
|
|
-import com.diagbot.facade.RelationFacade;
|
|
|
-import com.diagbot.facade.RelationshipFacade;
|
|
|
-import com.diagbot.vo.AllRelationVo;
|
|
|
-import com.diagbot.vo.RelationVo;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
-import javax.validation.Valid;
|
|
|
-import java.util.List;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.diagbot.annotation.SysLogger;
|
|
|
+import com.diagbot.dto.GetRelationInfoDetailDTO;
|
|
|
+import com.diagbot.dto.GetRelationInfoListDTO;
|
|
|
+import com.diagbot.dto.RespDTO;
|
|
|
+import com.diagbot.facade.RelationFacade;
|
|
|
+import com.diagbot.vo.GetRelationInfoDetailVO;
|
|
|
+import com.diagbot.vo.GetRelationInfoListVO;
|
|
|
+import com.diagbot.vo.RemoveRelationInfoVO;
|
|
|
+
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -27,56 +28,79 @@ import java.util.List;
|
|
|
* </p>
|
|
|
*
|
|
|
* @author Weixuan Huang
|
|
|
- * @since 2019-01-16
|
|
|
+ * @since 2019-01-30
|
|
|
*/
|
|
|
@RestController
|
|
|
@RequestMapping("/relation")
|
|
|
-@Api(value = "标准术语关系API", tags = { "标准术语关系API" })
|
|
|
-
|
|
|
+@SuppressWarnings("unchecked")
|
|
|
+@Api(value = "医学术语关系维护相关API", tags = { "医学术语关系维护相关API" })
|
|
|
public class RelationController {
|
|
|
+
|
|
|
@Autowired
|
|
|
- RelationFacade relationFacade;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- RelationshipFacade relationshipFacade;
|
|
|
-
|
|
|
- @ApiOperation(value = "按标准术语查询关系",
|
|
|
- notes = "Term:术语名称, 必填<br>Type:术语类型, 必填<br>")
|
|
|
- @PostMapping("/getConceptRelation")
|
|
|
- @SysLogger("getConceptRelation")
|
|
|
- public RespDTO<List<RelationDTO>> getConceptRelation(@Valid @RequestBody RelationVo relationVo) {
|
|
|
- List<RelationDTO> data = relationFacade.getRelations(relationVo);
|
|
|
-
|
|
|
- return RespDTO.onSuc(data);
|
|
|
+ private RelationFacade relationFacade;
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取医学术语关系列表[by:rengb]")
|
|
|
+ @PostMapping("/getRelationInfoList")
|
|
|
+ @SysLogger("getRelationInfoList")
|
|
|
+ public RespDTO<IPage<GetRelationInfoListDTO>> getRelationInfoList(@RequestBody GetRelationInfoListVO getRelationInfoListVO) {
|
|
|
+ return RespDTO.onSuc(relationFacade.getRelationInfoList(getRelationInfoListVO));
|
|
|
}
|
|
|
-
|
|
|
- @ApiOperation(value = "所有术语关系查询")
|
|
|
- @PostMapping("/getAllRelation")
|
|
|
- @SysLogger("getAllRelation")
|
|
|
- public RespDTO<IPage<RelationDTO>> getAllRelation(@RequestBody AllRelationVo allrelationVo) {
|
|
|
- IPage<RelationDTO> data = relationFacade.getAllRelations(allrelationVo);
|
|
|
-
|
|
|
- return RespDTO.onSuc(data);
|
|
|
+
|
|
|
+ @ApiOperation(value = "医学术语关系删除[by:rengb]")
|
|
|
+ @PostMapping("/removeRelationInfo")
|
|
|
+ @SysLogger("removeRelationInfo")
|
|
|
+ @Transactional
|
|
|
+ public RespDTO<Boolean> removeRelationInfo(@Valid @RequestBody RemoveRelationInfoVO removeRelationInfoVO) {
|
|
|
+ return RespDTO.onSuc(relationFacade.removeRelationInfo(removeRelationInfoVO));
|
|
|
}
|
|
|
-
|
|
|
- @ApiOperation(value = "标准术语关系删除",
|
|
|
- notes = "StartTerm:起始术语名称, 必填<br>StartType:起始术语类型, 必填<br>Relation:关系名称, 必填<br>" +
|
|
|
- "EndTerm:终点术语名称, 必填<br>EndType:终点术语类型, 必填<br>")
|
|
|
- @PostMapping("/removeRelation")
|
|
|
- @SysLogger("removeRelation")
|
|
|
- public RespDTO<RelationDTO> removeRelation(@Valid @RequestBody RelationVo relationVo) {
|
|
|
- RelationDTO data = relationFacade.removeRelations(relationVo);
|
|
|
-
|
|
|
- return RespDTO.onSuc(data);
|
|
|
+
|
|
|
+ @ApiOperation(value = "获取医学术语关系详情[by:rengb]")
|
|
|
+ @PostMapping("/getRelationInfoDetail")
|
|
|
+ @SysLogger("getRelationInfoDetail")
|
|
|
+ public RespDTO<GetRelationInfoDetailDTO> getRelationInfoDetail(@Valid @RequestBody GetRelationInfoDetailVO getRelationInfoDetailVO) {
|
|
|
+ return RespDTO.onSuc(relationFacade.getRelationInfoDetail(getRelationInfoDetailVO));
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- @ApiOperation(value = "所有关系名称查询")
|
|
|
- @PostMapping("/getRelationName")
|
|
|
- @SysLogger("getRelationName")
|
|
|
- public RespDTO<IPage<LexiconRelationship>> getAllRelationName(@RequestBody AllRelationVo allrelationVo) {
|
|
|
- IPage<LexiconRelationship> data = relationshipFacade.getRelationName(allrelationVo);
|
|
|
-
|
|
|
- return RespDTO.onSuc(data);
|
|
|
- }
|
|
|
+// @ApiOperation(value = "按标准术语查询关系",
|
|
|
+// notes = "Term:术语名称, 必填<br>Type:术语类型, 必填<br>")
|
|
|
+// @PostMapping("/getConceptRelation")
|
|
|
+// @SysLogger("getConceptRelation")
|
|
|
+// public RespDTO<List<RelationDTO>> getConceptRelation(@Valid @RequestBody RelationVo relationVo) {
|
|
|
+// List<RelationDTO> data = relationFacade.getRelations(relationVo);
|
|
|
+//
|
|
|
+// return RespDTO.onSuc(data);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @ApiOperation(value = "所有术语关系查询")
|
|
|
+// @PostMapping("/getAllRelation")
|
|
|
+// @SysLogger("getAllRelation")
|
|
|
+// public RespDTO<IPage<RelationDTO>> getAllRelation(@RequestBody AllRelationVo allrelationVo) {
|
|
|
+// IPage<RelationDTO> data = relationFacade.getAllRelations(allrelationVo);
|
|
|
+//
|
|
|
+// return RespDTO.onSuc(data);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @ApiOperation(value = "标准术语关系删除",
|
|
|
+// notes = "StartTerm:起始术语名称, 必填<br>StartType:起始术语类型, 必填<br>Relation:关系名称, 必填<br>" +
|
|
|
+// "EndTerm:终点术语名称, 必填<br>EndType:终点术语类型, 必填<br>")
|
|
|
+// @PostMapping("/removeRelation")
|
|
|
+// @SysLogger("removeRelation")
|
|
|
+// public RespDTO<RelationDTO> removeRelation(@Valid @RequestBody RelationVo relationVo) {
|
|
|
+// RelationDTO data = relationFacade.removeRelations(relationVo);
|
|
|
+//
|
|
|
+// return RespDTO.onSuc(data);
|
|
|
+// }
|
|
|
+//
|
|
|
+// @ApiOperation(value = "所有关系名称查询")
|
|
|
+// @PostMapping("/getRelationName")
|
|
|
+// @SysLogger("getRelationName")
|
|
|
+// public RespDTO<IPage<LexiconRelationship>> getAllRelationName(@RequestBody AllRelationVo allrelationVo) {
|
|
|
+// IPage<LexiconRelationship> data = relationshipFacade.getRelationName(allrelationVo);
|
|
|
+//
|
|
|
+// return RespDTO.onSuc(data);
|
|
|
+// }
|
|
|
|
|
|
}
|