Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/dev/icss' into debug

wangfeng 6 rokov pred
rodič
commit
d207a39f96
30 zmenil súbory, kde vykonal 956 pridanie a 8 odobranie
  1. 55 0
      icss-service/src/main/java/com/diagbot/facade/BuriedSomeStatisticalFacade.java
  2. 2 1
      icss-service/src/main/java/com/diagbot/facade/TemplateInfoFacade.java
  3. 2 2
      icss-service/src/main/java/com/diagbot/vo/TemplateInfosVO.java
  4. 46 0
      icss-service/src/main/java/com/diagbot/web/BuriedSomeStatisticalController.java
  5. 1 0
      icssman-service/src/main/java/com/diagbot/config/ResourceServerConfigurer.java
  6. 1 0
      icssman-service/src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java
  7. 18 0
      icssman-service/src/main/java/com/diagbot/dto/QuestionIndexDTO.java
  8. 182 0
      icssman-service/src/main/java/com/diagbot/entity/QuestionUsual.java
  9. 146 0
      icssman-service/src/main/java/com/diagbot/entity/Retrieval.java
  10. 159 0
      icssman-service/src/main/java/com/diagbot/entity/RetrievalMapping.java
  11. 20 0
      icssman-service/src/main/java/com/diagbot/facade/QuestionInfoFacade.java
  12. 4 1
      icssman-service/src/main/java/com/diagbot/mapper/QuestionInfoMapper.java
  13. 16 0
      icssman-service/src/main/java/com/diagbot/mapper/QuestionUsualMapper.java
  14. 16 0
      icssman-service/src/main/java/com/diagbot/mapper/RetrievalMapper.java
  15. 16 0
      icssman-service/src/main/java/com/diagbot/mapper/RetrievalMappingMapper.java
  16. 12 1
      icssman-service/src/main/java/com/diagbot/service/QuestionInfoService.java
  17. 16 0
      icssman-service/src/main/java/com/diagbot/service/QuestionUsualService.java
  18. 16 0
      icssman-service/src/main/java/com/diagbot/service/RetrievalMappingService.java
  19. 16 0
      icssman-service/src/main/java/com/diagbot/service/RetrievalService.java
  20. 6 0
      icssman-service/src/main/java/com/diagbot/service/impl/QuestionInfoServiceImpl.java
  21. 20 0
      icssman-service/src/main/java/com/diagbot/service/impl/QuestionUsualServiceImpl.java
  22. 20 0
      icssman-service/src/main/java/com/diagbot/service/impl/RetrievalMappingServiceImpl.java
  23. 20 0
      icssman-service/src/main/java/com/diagbot/service/impl/RetrievalServiceImpl.java
  24. 8 3
      icssman-service/src/main/java/com/diagbot/web/QuestionInfoController.java
  25. 21 0
      icssman-service/src/main/java/com/diagbot/web/QuestionUsualController.java
  26. 21 0
      icssman-service/src/main/java/com/diagbot/web/RetrievalController.java
  27. 38 0
      icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml
  28. 21 0
      icssman-service/src/main/resources/mapper/QuestionUsualMapper.xml
  29. 18 0
      icssman-service/src/main/resources/mapper/RetrievalMapper.xml
  30. 19 0
      icssman-service/src/main/resources/mapper/RetrievalMappingMapper.xml

+ 55 - 0
icss-service/src/main/java/com/diagbot/facade/BuriedSomeStatisticalFacade.java

@@ -0,0 +1,55 @@
+package com.diagbot.facade;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.validation.Valid;
+
+import org.springframework.stereotype.Component;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.diagbot.entity.BuriedSomeStatistical;
+import com.diagbot.service.impl.BuriedSomeStatisticalServiceImpl;
+import com.diagbot.util.DateUtil;
+import com.diagbot.vo.BuriedSomeStatisticalVO;
+import com.diagbot.vo.Taggeds;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2018年12月3日 上午9:24:35
+ */
+@Component
+public class BuriedSomeStatisticalFacade extends BuriedSomeStatisticalServiceImpl{
+
+	/**
+	 * 批量保存
+	 * @param buriedSomeStatisticalVO
+	 * @return
+	 */
+	public boolean saveBuriedSomeStatistical(@Valid BuriedSomeStatisticalVO buriedSomeStatisticalVO) {
+		List<BuriedSomeStatistical>  buriedList = new ArrayList<BuriedSomeStatistical>();
+		List<Taggeds> taggeds = buriedSomeStatisticalVO.getTaggeds();
+		for(Taggeds taggedsNew : taggeds){	
+			BuriedSomeStatistical buriedData =new BuriedSomeStatistical();
+			buriedData.setCreator(buriedSomeStatisticalVO.getDoctorId().toString());
+			buriedData.setDoctorId(buriedSomeStatisticalVO.getDoctorId());
+			buriedData.setGmtCreate(DateUtil.now());
+			buriedData.setHospitalDeptId(buriedSomeStatisticalVO.getHospitalDeptId());
+			buriedData.setHospitalId(buriedSomeStatisticalVO.getHospitalId());
+			buriedData.setInquiryCode(buriedSomeStatisticalVO.getInquiryCode());
+			buriedData.setPatientId(buriedSomeStatisticalVO.getPatientId());
+			buriedData.setLabelId(taggedsNew.getLabelId());
+			buriedData.setLabelName(taggedsNew.getLabelName());
+			buriedData.setOperationNum(taggedsNew.getOperationNum());
+			buriedData.setOperationType(taggedsNew.getOperationType());
+			buriedList.add(buriedData);
+		}
+		
+		boolean res = insertCodeBatch(buriedList);
+		return res;
+	}
+
+	
+}

+ 2 - 1
icss-service/src/main/java/com/diagbot/facade/TemplateInfoFacade.java

@@ -13,6 +13,7 @@ import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.TemplateInfoServiceImpl;
 import com.diagbot.util.DateUtil;
+import com.diagbot.util.GsonUtil;
 import com.diagbot.vo.TemplateInfoRevampVO;
 import com.diagbot.vo.TemplateInfoVO;
 import com.diagbot.vo.TemplateInfosIdVO;
@@ -106,7 +107,7 @@ public class TemplateInfoFacade extends TemplateInfoServiceImpl {
 		templateInfo.setGmtCreate(DateUtil.now());//创建时间
 		templateInfo.setHospitalDeptId(templateInfosVO.getHospitalDeptId());//部门id
 		templateInfo.setHospitalId(templateInfosVO.getHospitalId());//医院id
-		templateInfo.setPreview(templateInfosVO.getPreview());//文本的展示
+		templateInfo.setPreview(GsonUtil.toJson(templateInfosVO.getPreview()));//文本的展示
 		templateInfo.setDataJson(templateInfosVO.getDataJson());//页面json
 		templateInfo.setName(templateInfosVO.getModeName());//模板名称
 		templateInfo.setType(templateInfosVO.getModeType());//模板类型

+ 2 - 2
icss-service/src/main/java/com/diagbot/vo/TemplateInfosVO.java

@@ -25,8 +25,8 @@ public class TemplateInfosVO {
 	private Long hospitalDeptId;//部门id
 	@NotBlank(message = "请输入模板类型")
 	private String modeType;//模板类型
-	@NotBlank(message = "请输入预览文本")
-	private String preview;//预览文本
+	@NotNull(message = "请输入预览文本")
+	private ContentsVO preview;//预览文本
 	@NotBlank(message = "请输入模板数据")
 	private String dataJson;//模板数据
 }

+ 46 - 0
icss-service/src/main/java/com/diagbot/web/BuriedSomeStatisticalController.java

@@ -0,0 +1,46 @@
+package com.diagbot.web;
+
+import javax.validation.Valid;
+
+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 com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.BuriedSomeStatisticalFacade;
+import com.diagbot.vo.BuriedSomeStatisticalVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: 数据埋点统计表 前端控制器
+ * @date 2018年12月3日 上午9:24:22
+ */
+@RestController
+@RequestMapping("/buriedSomeStatistical")
+@Api(value = "数据埋点统计API[by:wangfeng]", tags = { "WF——数据埋点统计API" })
+@SuppressWarnings("unchecked")
+public class BuriedSomeStatisticalController {
+
+	@Autowired
+	BuriedSomeStatisticalFacade buriedSomeStatisticalFacade;
+
+	@ApiOperation(value = "数据埋点统计保存[by:wangfeng]", notes = "数据埋点统计保存")
+	@PostMapping("/saveBuriedSomeStatisticals")
+	@SysLogger("saveBuriedSomeStatisticals")
+	@Transactional
+	public RespDTO<Boolean> saveBuriedSomeStatisticals(@Valid @RequestBody BuriedSomeStatisticalVO buriedSomeStatisticalVO) {
+
+		boolean res = buriedSomeStatisticalFacade.saveBuriedSomeStatistical(buriedSomeStatisticalVO);
+
+		return RespDTO.onSuc(res);
+	}
+
+}

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

@@ -29,6 +29,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/file/upload").permitAll()
                 .antMatchers("/introduceInfo/saveIntroduce").permitAll()
                 .antMatchers("/questionInfo/delete").permitAll()
+                .antMatchers("/questionInfo/index").permitAll()
                 .antMatchers("/**").authenticated();
         //        .antMatchers("/**").permitAll();
     }

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

@@ -92,6 +92,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/file/upload", request)
                 || matchers("introduceInfo/saveIntroduce", request)
                 || matchers("/questionInfo/delete", request)
+                || matchers("/questionInfo/index", request)
                 || matchers("/", request)) {
             return true;
         }

+ 18 - 0
icssman-service/src/main/java/com/diagbot/dto/QuestionIndexDTO.java

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2018/11/29 15:09
+ */
+@Getter
+@Setter
+public class QuestionIndexDTO {
+    private String tagName;
+    private Integer sexType;
+    private Integer age;
+    private Integer type;
+}

+ 182 - 0
icssman-service/src/main/java/com/diagbot/entity/QuestionUsual.java

@@ -0,0 +1,182 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 常用标签表
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+@TableName("icss_question_usual")
+public class QuestionUsual implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标签id
+     */
+    private Long questionId;
+
+    /**
+     * 科室id
+     */
+    private Long deptId;
+
+    /**
+     * 1:常见,0:不常见
+     */
+    private String usual;
+
+    private String type;
+
+    /**
+     * 排序号
+     */
+    private Long orderNo;
+
+    /**
+     * 备注
+     */
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime 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 getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+    public String getUsual() {
+        return usual;
+    }
+
+    public void setUsual(String usual) {
+        this.usual = usual;
+    }
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+    public Long getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Long orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QuestionUsual{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", questionId=" + questionId +
+        ", deptId=" + deptId +
+        ", usual=" + usual +
+        ", type=" + type +
+        ", orderNo=" + orderNo +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 146 - 0
icssman-service/src/main/java/com/diagbot/entity/Retrieval.java

@@ -0,0 +1,146 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 同义词检索表
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+@TableName("icss_retrieval")
+public class Retrieval implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 拼音
+     */
+    private String spell;
+
+    /**
+     * 备注
+     */
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime 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 String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getSpell() {
+        return spell;
+    }
+
+    public void setSpell(String spell) {
+        this.spell = spell;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "Retrieval{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", name=" + name +
+        ", spell=" + spell +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 159 - 0
icssman-service/src/main/java/com/diagbot/entity/RetrievalMapping.java

@@ -0,0 +1,159 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 同义词检索映射表
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+@TableName("icss_retrieval_mapping")
+public class RetrievalMapping implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 检索id
+     */
+    private Long retrievalId;
+
+    /**
+     * question_id
+     */
+    private Long questionId;
+
+    /**
+     * 显示类型(1:本体,2:同义词3:组合项目(生命体征-脉搏))
+     */
+    private Integer showType;
+
+    /**
+     * 备注
+     */
+    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 LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime 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 getRetrievalId() {
+        return retrievalId;
+    }
+
+    public void setRetrievalId(Long retrievalId) {
+        this.retrievalId = retrievalId;
+    }
+    public Long getQuestionId() {
+        return questionId;
+    }
+
+    public void setQuestionId(Long questionId) {
+        this.questionId = questionId;
+    }
+    public Integer getShowType() {
+        return showType;
+    }
+
+    public void setShowType(Integer showType) {
+        this.showType = showType;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "RetrievalMapping{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", retrievalId=" + retrievalId +
+        ", questionId=" + questionId +
+        ", showType=" + showType +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 20 - 0
icssman-service/src/main/java/com/diagbot/facade/QuestionInfoFacade.java

@@ -1,5 +1,7 @@
 package com.diagbot.facade;
 
+import com.diagbot.dto.QuestionIndexDTO;
+import com.diagbot.entity.QuestionInfo;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.service.impl.QuestionInfoServiceImpl;
 import com.diagbot.util.DateUtil;
@@ -9,6 +11,7 @@ import org.springframework.stereotype.Component;
 
 import java.util.Arrays;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -58,4 +61,21 @@ public class QuestionInfoFacade extends QuestionInfoServiceImpl {
         moduleDetailFacade.deleteByQuestionIdFac(paramMap);
         return true;
     }
+
+
+    /**
+     * 检索
+     *
+     * @param questionIndexDTO
+     * @return
+     */
+    public List<QuestionInfo> indexFac(QuestionIndexDTO questionIndexDTO) {
+        Map<String, Object> paramMap = new HashMap<>();
+        paramMap.put("isDeleted", IsDeleteEnum.N.getKey());
+        paramMap.put("age", questionIndexDTO.getAge());
+        paramMap.put("sexType", questionIndexDTO.getSexType());
+        paramMap.put("tagName", questionIndexDTO.getTagName());
+        paramMap.put("type", questionIndexDTO.getType());
+        return this.index(paramMap);
+    }
 }

+ 4 - 1
icssman-service/src/main/java/com/diagbot/mapper/QuestionInfoMapper.java

@@ -1,8 +1,9 @@
 package com.diagbot.mapper;
 
-import com.diagbot.entity.QuestionInfo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.QuestionInfo;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -16,4 +17,6 @@ import java.util.Map;
 public interface QuestionInfoMapper extends BaseMapper<QuestionInfo> {
 
     public void deleteByIds(Map map);
+
+    public List<QuestionInfo> index(Map map);
 }

+ 16 - 0
icssman-service/src/main/java/com/diagbot/mapper/QuestionUsualMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QuestionUsual;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 常用标签表 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+public interface QuestionUsualMapper extends BaseMapper<QuestionUsual> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/mapper/RetrievalMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.Retrieval;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 同义词检索表 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+public interface RetrievalMapper extends BaseMapper<Retrieval> {
+
+}

+ 16 - 0
icssman-service/src/main/java/com/diagbot/mapper/RetrievalMappingMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.RetrievalMapping;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 同义词检索映射表 Mapper 接口
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+public interface RetrievalMappingMapper extends BaseMapper<RetrievalMapping> {
+
+}

+ 12 - 1
icssman-service/src/main/java/com/diagbot/service/QuestionInfoService.java

@@ -1,8 +1,9 @@
 package com.diagbot.service;
 
-import com.diagbot.entity.QuestionInfo;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.QuestionInfo;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -22,4 +23,14 @@ public interface QuestionInfoService extends IService<QuestionInfo> {
      * @return
      */
     public void deleteByIds(Map map);
+
+
+    /**
+     * 检索
+     *
+     * @param map
+     * @return
+     */
+    public List<QuestionInfo> index(Map map);
+
 }

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QuestionUsual;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 常用标签表 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+public interface QuestionUsualService extends IService<QuestionUsual> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.RetrievalMapping;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 同义词检索映射表 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+public interface RetrievalMappingService extends IService<RetrievalMapping> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.Retrieval;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 同义词检索表 服务类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+public interface RetrievalService extends IService<Retrieval> {
+
+}

+ 6 - 0
icssman-service/src/main/java/com/diagbot/service/impl/QuestionInfoServiceImpl.java

@@ -6,6 +6,7 @@ import com.diagbot.service.QuestionInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -23,4 +24,9 @@ public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, Que
     public void deleteByIds(Map map) {
         baseMapper.deleteByIds(map);
     }
+
+    @Override
+    public List<QuestionInfo> index(Map map) {
+        return baseMapper.index(map);
+    }
 }

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QuestionUsual;
+import com.diagbot.mapper.QuestionUsualMapper;
+import com.diagbot.service.QuestionUsualService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 常用标签表 服务实现类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+@Service
+public class QuestionUsualServiceImpl extends ServiceImpl<QuestionUsualMapper, QuestionUsual> implements QuestionUsualService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.RetrievalMapping;
+import com.diagbot.mapper.RetrievalMappingMapper;
+import com.diagbot.service.RetrievalMappingService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 同义词检索映射表 服务实现类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+@Service
+public class RetrievalMappingServiceImpl extends ServiceImpl<RetrievalMappingMapper, RetrievalMapping> implements RetrievalMappingService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.Retrieval;
+import com.diagbot.mapper.RetrievalMapper;
+import com.diagbot.service.RetrievalService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 同义词检索表 服务实现类
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+@Service
+public class RetrievalServiceImpl extends ServiceImpl<RetrievalMapper, Retrieval> implements RetrievalService {
+
+}

+ 8 - 3
icssman-service/src/main/java/com/diagbot/web/QuestionInfoController.java

@@ -2,16 +2,21 @@ package com.diagbot.web;
 
 
 import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.QuestionIndexDTO;
 import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.QuestionInfo;
 import com.diagbot.facade.QuestionInfoFacade;
 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 java.util.List;
+
 /**
  * <p>
  * 标签基础表 前端控制器
@@ -43,9 +48,9 @@ public class QuestionInfoController {
             notes = "")
     @PostMapping("/index")
     @SysLogger("index")
-    public RespDTO<Boolean> index() {
-
-        return RespDTO.onSuc(true);
+    public RespDTO<List<QuestionInfo>> index(@RequestBody QuestionIndexDTO questionIndexDTO) {
+        List<QuestionInfo> data = questionInfoFacade.indexFac(questionIndexDTO);
+        return RespDTO.onSuc(data);
     }
 
 

+ 21 - 0
icssman-service/src/main/java/com/diagbot/web/QuestionUsualController.java

@@ -0,0 +1,21 @@
+package com.diagbot.web;
+
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 常用标签表 前端控制器
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018-12-03
+ */
+@RestController
+@RequestMapping("/questionUsual")
+@Api(value = "常用标签维护相关API", tags = { "常用标签维护相关API" })
+public class QuestionUsualController {
+
+}

+ 21 - 0
icssman-service/src/main/java/com/diagbot/web/RetrievalController.java

@@ -0,0 +1,21 @@
+package com.diagbot.web;
+
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 同义词检索表 前端控制器
+ * </p>
+ *
+ * @author wangyu
+ * @since 2018--03
+ */
+@RestController
+@RequestMapping("/retrieval")
+@Api(value = "同义词维护相关API", tags = { "同义词维护相关API" })
+public class RetrievalController {
+
+}

+ 38 - 0
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -41,4 +41,42 @@
             #{id}
         </foreach>
     </delete>
+
+    <select id="index" parameterType="java.util.Map" resultType="com.diagbot.entity.QuestionInfo">
+        select * from `icss_question_info`
+        where is_deleted = 'N'
+        <if test="tagName != null and tagName != ''">
+            and tag_name = #{tagName}
+        </if>
+        <if test="sexType != null and sexType != ''">
+            and sex_type in (3, #{sexType})
+        </if>
+        <if test="age != null and age != ''">
+            <![CDATA[ and age_begin <= #{age} ]]>
+            <![CDATA[ and age_end >= #{age} ]]>
+        </if>
+        <if test="type != null and type != ''">
+            and type = #{type}
+        </if>
+
+        union
+
+        select * from `icss_question_info`
+        where is_deleted = 'N'
+        <if test="tagName != null and tagName != ''">
+            and tag_name like concat("%", #{tagName}, "%")
+        </if>
+        <if test="sexType != null and sexType != ''">
+            and sex_type in (3, #{sexType})
+        </if>
+        <if test="age != null and age != ''">
+            <![CDATA[ and age_begin <= #{age} ]]>
+            <![CDATA[ and age_end >= #{age} ]]>
+        </if>
+        <if test="type != null and type != ''">
+            and type = #{type}
+        </if>
+
+
+    </select>
 </mapper>

+ 21 - 0
icssman-service/src/main/resources/mapper/QuestionUsualMapper.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.QuestionUsualMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QuestionUsual">
+        <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="question_id" property="questionId" />
+        <result column="dept_id" property="deptId" />
+        <result column="usual" property="usual" />
+        <result column="type" property="type" />
+        <result column="order_no" property="orderNo" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 18 - 0
icssman-service/src/main/resources/mapper/RetrievalMapper.xml

@@ -0,0 +1,18 @@
+<?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.RetrievalMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.Retrieval">
+        <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="name" property="name" />
+        <result column="spell" property="spell" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 19 - 0
icssman-service/src/main/resources/mapper/RetrievalMappingMapper.xml

@@ -0,0 +1,19 @@
+<?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.RetrievalMappingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.RetrievalMapping">
+        <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="retrieval_id" property="retrievalId" />
+        <result column="question_id" property="questionId" />
+        <result column="show_type" property="showType" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>