Browse Source

Merge branch 'master' into innerDevelop

gaodm 4 years ago
parent
commit
dc0f2f8532

+ 4 - 2
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -108,6 +108,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/tran/transfusionConfig/exportExcelModule").permitAll()
                 //.antMatchers("/tran/hospitalInfo/saveRecord").permitAll()
                 .antMatchers("/tran/hospitalInfo/getHospitalInfo").permitAll()
+                .antMatchers("/tran/hospitalInfo/getAllHospitalInfo").permitAll()
                 .antMatchers("/tran/hospitalInfo/getHospitalInfoById").permitAll()
                 .antMatchers("/sys/versionInfo/getVersionInfoAlls").permitAll()
                 .antMatchers("/sys/disclaimerInfo/getDisclaimerInfo").permitAll()
@@ -139,8 +140,8 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/graph/conceptInfo/getStaticKnowledge").permitAll()
                 .antMatchers("/graph/conceptInfo/getStaticKnowledgeForHIS").permitAll()
                 .antMatchers("/graph/conceptInfo/getPage").permitAll()
-                .antMatchers("/graph/conceptInfo/saveOrUpdateRecord").permitAll()
-                .antMatchers("/graph/conceptInfo/changeStatus").permitAll()
+                //.antMatchers("/graph/conceptInfo/saveOrUpdateRecord").permitAll()
+                //.antMatchers("/graph/conceptInfo/changeStatus").permitAll()
                 .antMatchers("/graph/conceptInfo/isExist").permitAll()
                 .antMatchers("/graph/conceptInfo/getRecordById").permitAll()
                 .antMatchers("/sys/planDetail/getPlanDetailDatas").permitAll()
@@ -154,6 +155,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/sys/file/uploadImage").permitAll()
                 .antMatchers("/sys/file/deleteRemoteFile").permitAll()
                 .antMatchers("/sys/mrqc/caseWritingPrompt").permitAll()
+                .antMatchers("/demo/testcaseInfo/testcaseProcess").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

+ 4 - 2
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -151,6 +151,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/tran/transfusionConfig/exportExcelModule", request)
                 //|| matchers("/tran/hospitalInfo/saveRecord", request)
                 || matchers("/tran/hospitalInfo/getHospitalInfo", request)
+                || matchers("/tran/hospitalInfo/getAllHospitalInfo", request)
                 || matchers("/tran/hospitalInfo/getHospitalInfoById", request)
                 || matchers("/sys/versionInfo/getVersionInfoAlls", request)
                 || matchers("/sys/disclaimerInfo/getDisclaimerInfo", request)
@@ -181,8 +182,8 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/graph/conceptInfo/getStaticKnowledge", request)
                 || matchers("/graph/conceptInfo/getStaticKnowledgeForHIS", request)
                 || matchers("/graph/conceptInfo/getPage", request)
-                || matchers("/graph/conceptInfo/saveOrUpdateRecord", request)
-                || matchers("/graph/conceptInfo/changeStatus", request)
+                //|| matchers("/graph/conceptInfo/saveOrUpdateRecord", request)
+                //|| matchers("/graph/conceptInfo/changeStatus", request)
                 || matchers("/graph/conceptInfo/isExist", request)
                 || matchers("/graph/conceptInfo/getRecordById", request)
                 || matchers("/sys/planDetail/getPlanDetailDatas", request)
@@ -196,6 +197,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/sys/file/uploadImage", request)
                 || matchers("/sys/file/deleteRemoteFile", request)
                 || matchers("/sys/mrqc/caseWritingPrompt", request)
+                || matchers("/demo/testcaseInfo/testcaseProcess", request)
                 || matchers("/", request)) {
             return true;
         }

+ 0 - 5
src/main/java/com/diagbot/dto/StaticKnowledgeDTO.java

@@ -42,9 +42,4 @@ public class StaticKnowledgeDTO {
      * 静态知识明细
      */
     private Map<String, List<StaticKnowledgeDetailDTO>> details;
-
-    /**
-     * 剂型
-     */
-    private String form;
 }

+ 22 - 0
src/main/java/com/diagbot/dto/StaticKnowledgeHISDTO.java

@@ -0,0 +1,22 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/9/27 17:29
+ */
+@Getter
+@Setter
+public class StaticKnowledgeHISDTO extends StaticKnowledgeDTO {
+    /**
+     * his名称
+     */
+    private String hisName;
+    /**
+     * his明细名称
+     */
+    private String hisDetailName;
+}

+ 15 - 0
src/main/java/com/diagbot/dto/TestcaseInfoDTO.java

@@ -0,0 +1,15 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/9/27 17:18
+ */
+@Setter
+@Getter
+public class TestcaseInfoDTO {
+    private String msg;
+}

+ 211 - 0
src/main/java/com/diagbot/entity/TestcaseInfo.java

@@ -0,0 +1,211 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 测试用例表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-09-28
+ */
+@TableName("demo_testcase_info")
+public class TestcaseInfo implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院id
+     */
+    private Long hospitalId;
+
+    /**
+     * 接口类型 1:开单提醒,2:推理接口
+     */
+    private Integer type;
+
+    /**
+     * 入参
+     */
+    private String input;
+
+    /**
+     * 出参
+     */
+    private String output;
+
+    /**
+     * 预想结果
+     */
+    private String potentialResult;
+
+    /**
+     * 是否通过 0:未通过,1:未通过
+     */
+    private Integer pass;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public String getInput() {
+        return input;
+    }
+
+    public void setInput(String input) {
+        this.input = input;
+    }
+
+    public String getOutput() {
+        return output;
+    }
+
+    public void setOutput(String output) {
+        this.output = output;
+    }
+
+    public String getPotentialResult() {
+        return potentialResult;
+    }
+
+    public void setPotentialResult(String potentialResult) {
+        this.potentialResult = potentialResult;
+    }
+
+    public Integer getPass() {
+        return pass;
+    }
+
+    public void setPass(Integer pass) {
+        this.pass = pass;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "TestcaseInfo{" +
+                "id=" + id +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                ", hospitalId=" + hospitalId +
+                ", type=" + type +
+                ", input=" + input +
+                ", output=" + output +
+                ", potentialResult=" + potentialResult +
+                ", pass=" + pass +
+                ", remark=" + remark +
+                "}";
+    }
+}

+ 8 - 5
src/main/java/com/diagbot/facade/ConceptInfoFacade.java

@@ -10,6 +10,7 @@ import com.diagbot.dto.DictionaryInfoDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.StaticKnowledgeDTO;
 import com.diagbot.dto.StaticKnowledgeDetailDTO;
+import com.diagbot.dto.StaticKnowledgeHISDTO;
 import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.entity.ConceptDetail;
 import com.diagbot.entity.ConceptInfo;
@@ -319,9 +320,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
      * @param staticKnowledgeHISVO
      * @return
      */
-    public List<StaticKnowledgeDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
+    public List<StaticKnowledgeHISDTO> getStaticKnowledgeForHIS(StaticKnowledgeHISVO staticKnowledgeHISVO) {
 
-        List<StaticKnowledgeDTO> retList = Lists.newArrayList();
+        List<StaticKnowledgeHISDTO> retList = Lists.newArrayList();
         String typeName = StaticTypeEnum.getName(staticKnowledgeHISVO.getType());
         List<DictionaryInfoDTO> dicList = dictionaryFacade.getListByGroupType(8);
         typeName = convertTypeName(typeName, 1, dicList);
@@ -335,7 +336,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
         QueryWrapper<ConceptInfo> conceptInfoQueryWrapper = new QueryWrapper<>();
         conceptInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
                 .in("name", uniqueNameList)
-                .eq("status",StatusEnum.Enable.getKey())
+                .eq("status", StatusEnum.Enable.getKey())
                 .eq("type", typeName);
         List<ConceptInfo> conceptInfoList = this.list(conceptInfoQueryWrapper);
 
@@ -343,7 +344,7 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
             return retList;
         }
 
-        retList = BeanUtil.listCopyTo(conceptInfoList, StaticKnowledgeDTO.class);
+        retList = BeanUtil.listCopyTo(conceptInfoList, StaticKnowledgeHISDTO.class);
         List<Long> conceptIdList = conceptInfoList.stream().map(i -> i.getId()).collect(Collectors.toList());
         QueryWrapper<ConceptDetail> conceptDetailQueryWrapper = new QueryWrapper<>();
         conceptDetailQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -371,7 +372,9 @@ public class ConceptInfoFacade extends ConceptInfoServiceImpl {
                 = BeanUtil.listCopyTo(conceptDetailList, StaticKnowledgeDetailDTO.class);
         Map<Long, List<StaticKnowledgeDetailDTO>> conceptMap
                 = EntityUtil.makeEntityListMap(detailList, "conceptId");
-        for (StaticKnowledgeDTO staticKnowledgeDTO : retList) {
+        for (StaticKnowledgeHISDTO staticKnowledgeDTO : retList) {
+            staticKnowledgeDTO.setHisName(staticKnowledgeHISVO.getHisName());
+            staticKnowledgeDTO.setHisName(staticKnowledgeHISVO.getHisDetailName());
             List<StaticKnowledgeDetailDTO> subDetailList = conceptMap.get(staticKnowledgeDTO.getId());
             if (ListUtil.isNotEmpty(subDetailList)) {
                 List<StaticKnowledgeDetailDTO> introduceList = subDetailList

+ 16 - 0
src/main/java/com/diagbot/facade/HospitalInfoFacade.java

@@ -17,7 +17,9 @@ import com.diagbot.vo.HospitalInfoVO;
 import com.diagbot.vo.HospitalSaveVO;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.List;
 
 /**
  * @author wangfeng
@@ -83,4 +85,18 @@ public class HospitalInfoFacade extends HospitalInfoServiceImpl {
         HospitalInfo hospitalInfo = this.getById(Long.valueOf(hospitalId));
         return hospitalInfo;
     }
+
+    /**
+     * 获取所有医院信息列表
+     *
+     * @return
+     */
+    public List<HospitalInfoDTO> getAllHospitalInfo() {
+        QueryWrapper<HospitalInfo> hospitalInfo = new QueryWrapper<>();
+        hospitalInfo.eq("is_deleted", IsDeleteEnum.N.getKey());
+        List<HospitalInfo> list = list(hospitalInfo);
+        List<HospitalInfoDTO> data = new ArrayList<>();
+        data = BeanUtil.listCopyTo(list, HospitalInfoDTO.class);
+        return data;
+    }
 }

+ 106 - 0
src/main/java/com/diagbot/facade/TestcaseInfoFacade.java

@@ -0,0 +1,106 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.client.CdssCoreClient;
+import com.diagbot.dto.IndicationDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.TestcaseInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.impl.TestcaseInfoServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.GsonUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.vo.IndicationPushVO;
+import com.diagbot.vo.SearchData;
+import com.diagbot.vo.TestcaseInfoVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/9/27 17:16
+ */
+@Component
+public class TestcaseInfoFacade extends TestcaseInfoServiceImpl {
+    @Autowired
+    @Qualifier("testcaseInfoServiceImpl")
+    private TestcaseInfoServiceImpl testcaseInfoService;
+    @Autowired
+    private CdssCoreClient cdssCoreClient;
+    @Autowired
+    private AssembleFacade assembleFacade;
+
+    public Boolean testcaseProcess(TestcaseInfoVO testcaseInfoVO) {
+        List<TestcaseInfo> testcaseInfoList
+                = testcaseInfoService.list(
+                new QueryWrapper<TestcaseInfo>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq((null != testcaseInfoVO && null != testcaseInfoVO.getHospitalId()),
+                                "hospital_id", testcaseInfoVO.getHospitalId())
+        );
+        if (ListUtil.isEmpty(testcaseInfoList)) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS);
+        } else {
+            Date now = DateUtil.now();
+            for (TestcaseInfo testcaseInfo : testcaseInfoList) {
+                if (StringUtil.isNotBlank(testcaseInfo.getInput())) {
+                    if (StringUtil.isBlank(testcaseInfo.getPotentialResult())) {
+                        testcaseInfo.setRemark("预想结果为空");
+                        testcaseInfo.setGmtModified(now);
+                        continue;
+                    } else {
+                        //开单提醒
+                        if (testcaseInfo.getType().equals(1)) {
+                            IndicationPushVO indicationPushVO
+                                    = GsonUtil.toObject(testcaseInfo.getInput(), IndicationPushVO.class);
+                            SearchData searchData = new SearchData();
+                            BeanUtil.copyProperties(indicationPushVO, searchData);
+                            //入参映射
+                            searchData = assembleFacade.assembleData(searchData);
+                            BeanUtil.copyProperties(searchData, indicationPushVO);
+                            RespDTO<IndicationDTO> resp = cdssCoreClient.indication(indicationPushVO);
+                            if (null != resp) {
+                                testcaseInfo.setRemark("");
+                                testcaseInfo.setGmtModified(now);
+                                testcaseInfo.setOutput(GsonUtil.toJson(resp.data));
+                                Integer pass = 0;
+                                if (GsonUtil.toJson(resp.data).contains(testcaseInfo.getPotentialResult())) {
+                                    pass = 1;
+                                }else {
+                                    testcaseInfo.setRemark("与预想结果不同");
+                                }
+                                testcaseInfo.setPass(pass);
+                            } else {
+                                testcaseInfo.setRemark("输出为空");
+                                testcaseInfo.setGmtModified(now);
+                                continue;
+                            }
+                        } else if (testcaseInfo.getType().equals(2)) {
+                            // 推理接口暂时不处理
+
+                        } else {
+                            testcaseInfo.setRemark("类型在范围外");
+                            testcaseInfo.setGmtModified(now);
+                            continue;
+                        }
+                    }
+                } else {
+                    testcaseInfo.setRemark("入参为空");
+                    testcaseInfo.setGmtModified(now);
+                    continue;
+                }
+            }
+            testcaseInfoService.updateBatchById(testcaseInfoList);
+        }
+        return true;
+    }
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/TestcaseInfoMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.TestcaseInfo;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 测试用例表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-09-27
+ */
+public interface TestcaseInfoMapper extends BaseMapper<TestcaseInfo> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/TestcaseInfoService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.TestcaseInfo;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 测试用例表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-09-27
+ */
+public interface TestcaseInfoService extends IService<TestcaseInfo> {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/TestcaseInfoServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.TestcaseInfo;
+import com.diagbot.mapper.TestcaseInfoMapper;
+import com.diagbot.service.TestcaseInfoService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 测试用例表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-09-27
+ */
+@Service
+public class TestcaseInfoServiceImpl extends ServiceImpl<TestcaseInfoMapper, TestcaseInfo> implements TestcaseInfoService {
+
+}

+ 15 - 0
src/main/java/com/diagbot/vo/TestcaseInfoVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/9/27 17:19
+ */
+@Setter
+@Getter
+public class TestcaseInfoVO {
+    private Long hospitalId;
+}

+ 4 - 3
src/main/java/com/diagbot/web/ConceptInfoController.java

@@ -6,6 +6,7 @@ import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.ConceptInfoDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.StaticKnowledgeDTO;
+import com.diagbot.dto.StaticKnowledgeHISDTO;
 import com.diagbot.dto.StaticKnowledgeIndexDTO;
 import com.diagbot.facade.ConceptInfoFacade;
 import com.diagbot.vo.ChangeStatusVO;
@@ -83,8 +84,8 @@ public class ConceptInfoController {
                     "hisDetailName: HIS小项名称<br>")
     @PostMapping("/getStaticKnowledgeForHIS")
     @SysLogger("getStaticKnowledgeForHIS")
-    public RespDTO<List<StaticKnowledgeDTO>> getStaticKnowledgeForHIS(@Valid @RequestBody StaticKnowledgeHISVO staticKnowledgeHISVO) {
-        List<StaticKnowledgeDTO> data = conceptInfoFacade.getStaticKnowledgeForHIS(staticKnowledgeHISVO);
+    public RespDTO<List<StaticKnowledgeHISDTO>> getStaticKnowledgeForHIS(@Valid @RequestBody StaticKnowledgeHISVO staticKnowledgeHISVO) {
+        List<StaticKnowledgeHISDTO> data = conceptInfoFacade.getStaticKnowledgeForHIS(staticKnowledgeHISVO);
         return RespDTO.onSuc(data);
     }
 
@@ -116,7 +117,7 @@ public class ConceptInfoController {
 
     @ApiOperation(value = "静态知识启用禁用[zhaops]",
             notes = "id: 术语id <br>" +
-                    "isDeleted: 启用状态:N-启用中、Y-已删除<br>")
+                    "status: 启用状态(0:禁用,1:启用)<br>")
     @PostMapping("/changeStatus")
     @SysLogger("changeStatus")
     @Transactional

+ 9 - 0
src/main/java/com/diagbot/web/HospitalInfoController.java

@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
 import javax.validation.Valid;
+import java.util.List;
 
 /**
  * <p>
@@ -73,4 +74,12 @@ public class HospitalInfoController {
     public RespDTO<HospitalInfo> getHospitalInfo() {
         return RespDTO.onSuc(hospitalInfoFacade.getHospitalInfo());
     }
+
+    @ApiOperation(value = "获取所有医院信息列表[by:wangfeng]", notes = "")
+    @PostMapping("/getAllHospitalInfo")
+    @SysLogger("getAllHospitalInfo")
+    public RespDTO<List<HospitalInfoDTO>> getAllHospitalInfo() {
+        List<HospitalInfoDTO> data = hospitalInfoFacade.getAllHospitalInfo();
+        return RespDTO.onSuc(data);
+    }
 }

+ 43 - 0
src/main/java/com/diagbot/web/TestcaseInfoController.java

@@ -0,0 +1,43 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.dto.TestcaseInfoDTO;
+import com.diagbot.facade.TestcaseInfoFacade;
+import com.diagbot.vo.TestcaseInfoVO;
+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;
+
+/**
+ * <p>
+ * 测试用例表 前端控制器
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-09-27
+ */
+@RestController
+@RequestMapping("/demo/testcaseInfo")
+@Api(value = "测试用例表API[by:gaodm]", tags = { "测试用例表API" })
+@SuppressWarnings("unchecked")
+public class TestcaseInfoController {
+
+    @Autowired
+    private TestcaseInfoFacade testcaseInfoFacade;
+
+    @ApiOperation(value = "执行测试用例[by:gaodm]",
+            notes = "hospitalId:医院id(可不填);")
+    @PostMapping("/testcaseProcess")
+    @SysLogger("testcaseProcess")
+    @Transactional
+    public RespDTO<TestcaseInfoDTO> testcaseProcess(@RequestBody TestcaseInfoVO testcaseInfoVO) {
+        return RespDTO.onSuc(testcaseInfoFacade.testcaseProcess(testcaseInfoVO));
+    }
+}

+ 21 - 0
src/main/resources/mapper/TestcaseInfoMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.TestcaseInfoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.TestcaseInfo">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="input" property="input" />
+        <result column="output" property="output" />
+        <result column="potential_result" property="potentialResult" />
+        <result column="pass" property="pass" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 2 - 2
src/test/java/com/diagbot/CodeGeneration.java

@@ -33,7 +33,7 @@ public class CodeGeneration {
         gc.setEnableCache(false);// XML 二级缓存
         gc.setBaseResultMap(true);// XML ResultMap
         gc.setBaseColumnList(false);// XML columList
-        gc.setAuthor("zhoutg");// 作者
+        gc.setAuthor("gaodm");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
         strategy.setTablePrefix(new String[] { "demo_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "demo_template_info"}); // 需要生成的表
+        strategy.setInclude(new String[] { "demo_testcase_info"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);