Browse Source

添加开单测试接口

zhoutg 3 years ago
parent
commit
08db4d41ce

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -132,6 +132,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/klDisease/searchConceptRuleClass").permitAll()
                 .antMatchers("/cache/clearRuleAll").permitAll()
                 .antMatchers("/term/termMatching").permitAll()
+                .antMatchers("/sys/mr/testIndication").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -174,6 +174,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/klDisease/searchConceptRuleClass", request)
                 || matchers("/cache/clearRuleAll", request)
                 || matchers("/term/termMatching", request)
+                || matchers("/sys/mr/testIndication", request)
                 || matchers("/", request)) {
             return true;
         }

+ 18 - 0
src/main/java/com/diagbot/web/MrController.java

@@ -5,6 +5,9 @@ import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.TcmDTO;
 import com.diagbot.facade.MrFacade;
+import com.diagbot.facade.PushFacade;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.MrVO;
 import com.diagbot.vo.PushJoinVO;
 import io.swagger.annotations.Api;
@@ -30,6 +33,8 @@ public class MrController {
 
 	@Autowired
 	private MrFacade mrFacade;
+	@Autowired
+	private PushFacade pushFacade;
 
 	@ApiOperation(value = "保存病历信息:[by:gaodm]",
 			notes = "")
@@ -62,4 +67,17 @@ public class MrController {
 	public RespDTO<IndicationDTO> getIndicationMr(@RequestBody @Valid MrVO mrVO) {
 		return RespDTO.onSuc(mrFacade.getIndicationMr(mrVO));
 	}
+
+	@ApiOperation(value = "根据病历编号测试开单 :[by:zhoutg]",
+			notes = "mrId: 病历编号,必填<br>")
+	@PostMapping("/testIndication")
+	@SysLogger("testIndication")
+	public RespDTO<IndicationDTO> testIndication(@RequestBody @Valid MrVO mrVO) {
+		PushJoinVO pushJoinVO = mrFacade.getMr(mrVO.getMrId());
+		IndicationPushVO indicationPushVO = new IndicationPushVO();
+		BeanUtil.copyProperties(pushJoinVO, indicationPushVO);
+		indicationPushVO.setRuleType("1,2,3,4");
+		IndicationDTO indicationDTO = pushFacade.indicationPush(indicationPushVO);
+		return RespDTO.onSuc(indicationDTO);
+	}
 }