Prechádzať zdrojové kódy

慢病指标维护接口

wangfeng 6 rokov pred
rodič
commit
559d15531a

+ 64 - 0
icssman-service/src/main/java/com/diagbot/dto/IndexConfigAllDTO.java

@@ -0,0 +1,64 @@
+package com.diagbot.dto;
+
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年3月26日 上午11:16:17
+ */
+@Setter
+@Getter
+public class IndexConfigAllDTO {
+	@TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 指标公表名
+     */
+    private String indexUnique;
+
+    /**
+     * 疾病id
+     */
+    private Long diseaseId;
+
+    /**
+     * 指标描述
+     */
+    private Integer indexDesc;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+}

+ 47 - 0
icssman-service/src/main/java/com/diagbot/dto/IndexConfigDTO.java

@@ -0,0 +1,47 @@
+package com.diagbot.dto;
+
+import java.util.Date;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年3月26日 上午10:00:35
+ */
+@Setter
+@Getter
+public class IndexConfigDTO {
+	private Long id;
+	 /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+	 * 疾病id
+	 */
+	private Long diseaseId;
+
+	/**
+	 * 疾病id
+	 */
+	private String diseaseName;
+}

+ 171 - 0
icssman-service/src/main/java/com/diagbot/entity/IndexConfig.java

@@ -0,0 +1,171 @@
+package com.diagbot.entity;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+/**
+ * <p>
+ * 指标配置
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-03-25
+ */
+@TableName("icss_index_config")
+public class IndexConfig 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;
+
+    /**
+     * 指标公表名
+     */
+    private String indexUnique;
+
+    /**
+     * 疾病id
+     */
+    private Long diseaseId;
+
+    /**
+     * 指标描述
+     */
+    private Integer indexDesc;
+
+    /**
+     * 显示顺序
+     */
+    private Integer 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 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 String getIndexUnique() {
+        return indexUnique;
+    }
+
+    public void setIndexUnique(String indexUnique) {
+        this.indexUnique = indexUnique;
+    }
+    public Long getDiseaseId() {
+        return diseaseId;
+    }
+
+    public void setDiseaseId(Long diseaseId) {
+        this.diseaseId = diseaseId;
+    }
+    public Integer getIndexDesc() {
+        return indexDesc;
+    }
+
+    public void setIndexDesc(Integer indexDesc) {
+        this.indexDesc = indexDesc;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "IndexConfig{" +
+        "id=" + id +
+        ", isDeleted=" + isDeleted +
+        ", gmtCreate=" + gmtCreate +
+        ", gmtModified=" + gmtModified +
+        ", creator=" + creator +
+        ", modifier=" + modifier +
+        ", indexUnique=" + indexUnique +
+        ", diseaseId=" + diseaseId +
+        ", indexDesc=" + indexDesc +
+        ", orderNo=" + orderNo +
+        ", remark=" + remark +
+        "}";
+    }
+}

+ 177 - 0
icssman-service/src/main/java/com/diagbot/facade/IndexConfigFacade.java

@@ -0,0 +1,177 @@
+package com.diagbot.facade;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.client.UserServiceClient;
+import com.diagbot.dto.IndexConfigAllDTO;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.IndexConfigService;
+import com.diagbot.service.impl.IndexConfigServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.IndexConfigDiseaseIdVO;
+import com.diagbot.vo.IndexConfigDiseaseNameVO;
+import com.diagbot.vo.IndexConfigListVO;
+import com.diagbot.vo.IndexConfigVO;
+
+/**
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年3月25日 下午4:20:09
+ */
+@Component
+public class IndexConfigFacade extends IndexConfigServiceImpl {
+
+	@Autowired
+	IndexConfigService indexConfigService;
+	@Autowired
+	UserServiceClient userServiceClient;
+	/**
+	 * 
+	 * @param page
+	 * @param indexConfigDiseaseNameVO
+	 * @return
+	 */
+	public IPage<IndexConfigDTO> queryIndexConfigPage(IndexConfigDiseaseNameVO indexConfigDiseaseNameVO) {
+		IPage<IndexConfigDTO> datas = indexConfigService.queryIndexConfigPageAlls(indexConfigDiseaseNameVO);
+		List<IndexConfigDTO> data = datas.getRecords();
+		List<String> modifierid = new ArrayList<>();
+		modifierid = data.stream().map(ac -> ac.getModifier()).collect(Collectors.toList());
+		Map<String, String> userNames = new HashMap<>();
+		if (modifierid.size() > 0) {
+			RespDTO<Map<String, String>> userNamesDTO = userServiceClient.getUserInfoByIds(modifierid);
+			if (userNamesDTO == null || !CommonErrorCode.OK.getCode().equals(userNamesDTO.code)) {
+				throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "获取所有用户信息失败");
+			}
+			userNames = userNamesDTO.data;
+		}
+		List<IndexConfigDTO> indexConfigLists = new ArrayList<IndexConfigDTO>();
+		for (IndexConfigDTO evalua : data) {
+			IndexConfigDTO dateNew = new IndexConfigDTO();
+			dateNew.setId(evalua.getId());
+			dateNew.setCreator(evalua.getCreator());
+			dateNew.setGmtModified(evalua.getGmtModified());
+			dateNew.setDiseaseId(evalua.getDiseaseId());
+			dateNew.setGmtCreate(evalua.getGmtCreate());
+			dateNew.setModifier(userNames.get(evalua.getModifier()));
+			dateNew.setDiseaseName(evalua.getDiseaseName());
+			indexConfigLists.add(dateNew);
+		}
+
+		return datas.setRecords(indexConfigLists);
+	}
+	/**
+	 * 
+	 * @param indexConfigDiseaseIdVO
+	 * @return
+	 */
+	public List<IndexConfigAllDTO> getIndexConfigLists(IndexConfigDiseaseIdVO indexConfigDiseaseIdVO) {
+		QueryWrapper<IndexConfig> IndexConfigQuery = new QueryWrapper<IndexConfig>();
+		IndexConfigQuery.eq("disease_id",indexConfigDiseaseIdVO.getDiseaseId()).eq("is_deleted", IsDeleteEnum.N.getKey());
+		List<IndexConfig> datas = list(IndexConfigQuery);
+        //过滤
+        List<IndexConfigAllDTO> data = BeanUtil.listCopyTo(datas, IndexConfigAllDTO.class);
+		return data;
+	}
+	/**
+	 * 
+	 * @param indexConfigListVO
+	 * @return
+	 */
+	public boolean updateIndexConfigList(IndexConfigListVO indexConfigListVO) {
+		
+		/*UpdateWrapper<IndexConfig> IndexConfigNew =new UpdateWrapper<>();
+		IndexConfigNew.eq("disease_id",indexConfigListVO.getDiseaseId()).eq("is_deleted", IsDeleteEnum.N.getKey())
+		.set("is_deleted", IsDeleteEnum.Y.getKey()).set("modifier", UserUtils.getCurrentPrincipleID())
+        .set("gmt_modified", DateUtil.now());
+		boolean res = update(new IndexConfig(), IndexConfigNew);*/
+		IndexConfigDiseaseIdVO indexConfigDiseaseIdVO =new IndexConfigDiseaseIdVO();
+		indexConfigDiseaseIdVO.setDiseaseId(indexConfigListVO.getDiseaseId());
+		boolean res =  cancelIndexConfigAlls(indexConfigDiseaseIdVO);
+		List<IndexConfig> IndexConfigLsit= new ArrayList<IndexConfig>();
+		List<IndexConfigVO> data = indexConfigListVO.getIndexConfigData();
+		for(IndexConfigVO dataNew : data){
+			IndexConfig IndexConfig= new IndexConfig();
+			IndexConfig.setDiseaseId(dataNew.getDiseaseId());
+			IndexConfig.setCreator(UserUtils.getCurrentPrincipleID());
+			IndexConfig.setGmtCreate(DateUtil.now());
+			IndexConfig.setGmtModified(DateUtil.now());
+			IndexConfig.setIndexDesc(dataNew.getIndexDesc());
+			IndexConfig.setIndexUnique(dataNew.getIndexUnique());
+			IndexConfig.setModifier(UserUtils.getCurrentPrincipleID());
+			IndexConfig.setOrderNo(dataNew.getOrderNo());
+			IndexConfig.setRemark(dataNew.getRemark());
+			IndexConfigLsit.add(IndexConfig);
+		}
+		
+		res = indexConfigService.saveBatch(IndexConfigLsit);
+		
+		return res;
+	}
+	
+	public boolean saveIndexConfigList(IndexConfigListVO indexConfigListVO) {
+		List<IndexConfigVO> indexConfigData = indexConfigListVO.getIndexConfigData();
+		List<String> indexUnique = new ArrayList<>();
+		for(IndexConfigVO e: indexConfigData){
+			indexUnique.add(e.getIndexUnique());
+		}
+		
+        QueryWrapper<IndexConfig> IndexConfigQuery = new QueryWrapper<>();
+
+        IndexConfigQuery.in("index_unique", indexUnique);
+        List<IndexConfig> dataUnique = list(IndexConfigQuery);
+        if(dataUnique != null && dataUnique.size()>0){
+        	 throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "该'"+dataUnique.get(0).getIndexUnique()+"'已存在");	       	
+        }
+        
+        List<IndexConfig> IndexConfigLsit= new ArrayList<IndexConfig>();
+		List<IndexConfigVO> data = indexConfigListVO.getIndexConfigData();
+		for(IndexConfigVO dataNew : data){
+			IndexConfig IndexConfig= new IndexConfig();
+			IndexConfig.setDiseaseId(dataNew.getDiseaseId());
+			IndexConfig.setCreator(UserUtils.getCurrentPrincipleID());
+			IndexConfig.setGmtCreate(DateUtil.now());
+			IndexConfig.setGmtModified(DateUtil.now());
+			IndexConfig.setIndexDesc(dataNew.getIndexDesc());
+			IndexConfig.setIndexUnique(dataNew.getIndexUnique());
+			IndexConfig.setModifier(UserUtils.getCurrentPrincipleID());
+			IndexConfig.setOrderNo(dataNew.getOrderNo());
+			IndexConfig.setRemark(dataNew.getRemark());
+			IndexConfigLsit.add(IndexConfig);
+		}
+		
+		return indexConfigService.saveBatch(IndexConfigLsit);
+	}
+	
+	
+	/**
+	 * 
+	 * @param indexConfigDiseaseIdVO
+	 * @return
+	 */
+	public boolean cancelIndexConfigAlls(IndexConfigDiseaseIdVO indexConfigDiseaseIdVO) {
+		
+		UpdateWrapper<IndexConfig> IndexConfigNew =new UpdateWrapper<>();
+		IndexConfigNew.eq("disease_id",indexConfigDiseaseIdVO.getDiseaseId()).eq("is_deleted", IsDeleteEnum.N.getKey())
+		.set("is_deleted", IsDeleteEnum.Y.getKey()).set("modifier", UserUtils.getCurrentPrincipleID())
+	    .set("gmt_modified", DateUtil.now());
+		return update(new IndexConfig(), IndexConfigNew);
+	}
+}

+ 24 - 0
icssman-service/src/main/java/com/diagbot/mapper/IndexConfigMapper.java

@@ -0,0 +1,24 @@
+package com.diagbot.mapper;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.vo.IndexConfigDiseaseNameVO;
+
+/**
+ * <p>
+ * 指标配置 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-03-25
+ */
+public interface IndexConfigMapper extends BaseMapper<IndexConfig> {
+
+	IPage<IndexConfigDTO> queryIndexConfigPageAlls(@Param("indexConfigVO")IndexConfigDiseaseNameVO indexConfigVO);
+
+}

+ 22 - 0
icssman-service/src/main/java/com/diagbot/service/IndexConfigService.java

@@ -0,0 +1,22 @@
+package com.diagbot.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.vo.IndexConfigDiseaseNameVO;
+
+/**
+ * <p>
+ * 指标配置 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-03-25
+ */
+public interface IndexConfigService extends IService<IndexConfig> {
+
+	public IPage<IndexConfigDTO> queryIndexConfigPageAlls(IndexConfigDiseaseNameVO indexConfigDiseaseNameVO);
+
+}

+ 29 - 0
icssman-service/src/main/java/com/diagbot/service/impl/IndexConfigServiceImpl.java

@@ -0,0 +1,29 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.entity.IndexConfig;
+import com.diagbot.mapper.IndexConfigMapper;
+import com.diagbot.service.IndexConfigService;
+import com.diagbot.vo.IndexConfigDiseaseNameVO;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 指标配置 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2019-03-25
+ */
+@Service
+public class IndexConfigServiceImpl extends ServiceImpl<IndexConfigMapper, IndexConfig> implements IndexConfigService {
+
+	@Override
+	public IPage<IndexConfigDTO> queryIndexConfigPageAlls(IndexConfigDiseaseNameVO indexConfigDiseaseNameVO) {
+		return baseMapper.queryIndexConfigPageAlls(indexConfigDiseaseNameVO);
+	}
+
+}

+ 19 - 0
icssman-service/src/main/java/com/diagbot/vo/IndexConfigDiseaseIdVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年3月11日 下午6:47:34
+ */
+@Setter
+@Getter
+public class IndexConfigDiseaseIdVO {
+	/**
+	 * 疾病ID
+	 */
+	private Long diseaseId; 
+}

+ 19 - 0
icssman-service/src/main/java/com/diagbot/vo/IndexConfigDiseaseNameVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年3月26日 上午10:09:20
+ */
+@Setter
+@Getter
+public class IndexConfigDiseaseNameVO extends Page{
+	private static final long serialVersionUID = 1L;
+	private String  diseaseName;
+}

+ 21 - 0
icssman-service/src/main/java/com/diagbot/vo/IndexConfigListVO.java

@@ -0,0 +1,21 @@
+package com.diagbot.vo;
+
+import java.util.List;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年3月26日 下午1:20:18
+ */
+@Setter
+@Getter
+public class IndexConfigListVO {
+
+	private Long diseaseId;
+	
+	private List<IndexConfigVO> indexConfigData;
+}

+ 39 - 0
icssman-service/src/main/java/com/diagbot/vo/IndexConfigVO.java

@@ -0,0 +1,39 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 
+ * @author wangfeng
+ * @Description: TODO
+ * @date 2019年3月26日 下午1:21:08
+ */
+@Setter
+@Getter
+public class IndexConfigVO {
+	/**
+     * 指标公表名
+     */
+    private String indexUnique;
+
+    /**
+     * 疾病id
+     */
+    private Long diseaseId;
+
+    /**
+     * 指标描述
+     */
+    private Integer indexDesc;
+
+    /**
+     * 显示顺序
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+}

+ 95 - 0
icssman-service/src/main/java/com/diagbot/web/IndexConfigController.java

@@ -0,0 +1,95 @@
+package com.diagbot.web;
+
+
+import java.util.List;
+
+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.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.IndexConfigAllDTO;
+import com.diagbot.dto.IndexConfigDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.IndexConfigFacade;
+import com.diagbot.vo.IndexConfigDiseaseIdVO;
+import com.diagbot.vo.IndexConfigDiseaseNameVO;
+import com.diagbot.vo.IndexConfigListVO;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+
+/**
+ * <p>
+ * 指标配置 前端控制器
+ *
+ * @author wangfeng
+ * @since 2019-03-25
+ */
+@RestController
+@RequestMapping("/indexConfig")
+@Api(value = "慢病指标值关联维护API[by:wangfeng]", tags = { "WF-2期-慢病指标值关联维护API" })
+@SuppressWarnings("unchecked") 
+public class IndexConfigController {
+	
+	@Autowired
+	IndexConfigFacade indexConfigFacade;
+	
+	@ApiOperation(value = "分页模糊查询慢病指标值关联维护[by:wangfeng]", notes = "")
+    @PostMapping("/queryIndexConfigPages")
+    @SysLogger("queryIndexConfigPages")
+    @Transactional
+    public RespDTO<IPage<IndexConfigDTO>> queryIndexConfigPages(@RequestBody IndexConfigDiseaseNameVO indexConfigDiseaseNameVO) {
+
+    	IPage<IndexConfigDTO> data = indexConfigFacade.queryIndexConfigPage(indexConfigDiseaseNameVO);
+
+        return RespDTO.onSuc(data);
+    }
+
+	@ApiOperation(value = "获取慢病指标值关联维护[by:wangfeng]", notes = "")
+    @PostMapping("/getIndexConfigLists")
+    @SysLogger("getIndexConfigLists")
+    @Transactional
+    public RespDTO<List<IndexConfigAllDTO>> getIndexConfigLists(@RequestBody IndexConfigDiseaseIdVO indexConfigDiseaseIdVO) {
+
+		List<IndexConfigAllDTO> data = indexConfigFacade.getIndexConfigLists(indexConfigDiseaseIdVO);
+
+        return RespDTO.onSuc(data);
+    }
+	
+	@ApiOperation(value = "慢病指标值关联维护——修改关联[by:wangfeng]", notes = "")
+    @PostMapping("/updateIndexConfigList")
+    @SysLogger("updateIndexConfigList")
+    @Transactional
+    public RespDTO<Boolean> updateIndexConfigList(@RequestBody IndexConfigListVO indexConfigListVO) {
+
+		boolean res = indexConfigFacade.updateIndexConfigList(indexConfigListVO);
+
+        return RespDTO.onSuc(res);
+    }
+	@ApiOperation(value = "慢病指标值关联维护——添加关联[by:wangfeng]", notes = "")
+    @PostMapping("/saveIndexConfigLists")
+    @SysLogger("saveIndexConfigLists")
+    @Transactional
+    public RespDTO<Boolean> saveIndexConfigLists(@RequestBody IndexConfigListVO indexConfigListVO) {
+
+		boolean res = indexConfigFacade.saveIndexConfigList(indexConfigListVO);
+
+        return RespDTO.onSuc(res);
+    }
+	
+	@ApiOperation(value = "删除慢病指标值关联维护[by:wangfeng]", notes = "")
+    @PostMapping("/cancelIndexConfigAlls")
+    @SysLogger("cancelIndexConfigAlls")
+    @Transactional
+    public RespDTO<Boolean> cancelIndexConfigAlls(@RequestBody IndexConfigDiseaseIdVO indexConfigDiseaseIdVO) {
+
+		boolean res = indexConfigFacade.cancelIndexConfigAlls(indexConfigDiseaseIdVO);
+
+        return RespDTO.onSuc(res);
+    }
+}

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

@@ -0,0 +1,38 @@
+<?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.IndexConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.IndexConfig">
+        <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="index_unique" property="indexUnique" />
+        <result column="disease_id" property="diseaseId" />
+        <result column="index_desc" property="indexDesc" />
+        <result column="order_no" property="orderNo" />
+        <result column="remark" property="remark" />
+    </resultMap>
+<select id="queryIndexConfigPageAlls" resultType="com.diagbot.dto.IndexConfigDTO">
+	SELECT
+	a.id as id,
+	a.gmt_create as gmtCreate,
+	a.gmt_modified as gmtModified,
+	a.creator as creator,
+	a.modifier as modifier,
+	a.disease_id as diseaseId ,
+	b.tag_name as diseaseName
+	FROM
+	icss_index_config a
+	JOIN icss_question_info b
+	WHERE a.disease_id = b.id
+	<if test="indexConfigVO.diseaseName != null">
+	AND b.tag_name LIKE CONCAT('%', #{indexConfigVO.diseaseName}, '%')
+	</if>
+	GROUP BY a.disease_id
+	ORDER BY a.gmt_create DESC
+</select>
+</mapper>