Commit 365e48b05cf97e3a16eca64ac8dd1f1f5091b100
Exists in
master
Merge branch 'master' of https://git.healthbaby.com.cn/jiangjiazhi/center
Showing 34 changed files
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/DiagnoseConfMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/DiagnoseConfMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskConfMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskConfMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskSourceMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskSourceMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskVersionMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskVersionMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/package-info.java
- parent/base.common/src/main/java/com/lyms/base/common/entity/conf/DiagnoseConf.java
- parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskConf.java
- parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskSource.java
- parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskVersion.java
- parent/base.common/src/main/java/com/lyms/base/common/entity/conf/package-info.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/DiagnoseConfService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/HighriskConfService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/HighriskSourceService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/HighriskVersionService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/DiagnoseConfServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/HighriskConfServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/HighriskSourceServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/HighriskVersionServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/package-info.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/package-info.java
- parent/base.common/src/main/java/com/lyms/base/common/utils/ConverUtils.java
- parent/base.common/src/main/java/com/lyms/base/common/utils/package-info.java
- parent/base.common/src/test/java/base/common/test/Test.java
- parent/base.common/src/test/java/base/common/test/package-info.java
- parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/DiagnoseConfController.java
- parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/HighriskConfController.java
- parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/HighriskSourceController.java
- parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/HighriskVersionController.java
- parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/package-info.java
- parent/hospital.web/src/test/java/test/hospital/Test.java
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/DiagnoseConfMapper.java
View file @
365e48b
| 1 | +package com.lyms.base.common.dao.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 8 | +import com.lyms.base.common.entity.conf.DiagnoseConf; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * Mapper接口 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +@Repository | |
| 19 | +public interface DiagnoseConfMapper extends BaseMapper<DiagnoseConf> { | |
| 20 | + | |
| 21 | + public Integer deleteLogicById(Serializable id); | |
| 22 | + | |
| 23 | +} |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/DiagnoseConfMapper.xml
View file @
365e48b
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.base.common.dao.conf.DiagnoseConfMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.conf.DiagnoseConf"> | |
| 7 | + <result column="ID" property="id" /> | |
| 8 | + <result column="SOURCE_ID" property="sourceId" /> | |
| 9 | + <result column="VERSION_ID" property="versionId" /> | |
| 10 | + <result column="NAME" property="name" /> | |
| 11 | + <result column="COLORCODE" property="colorcode" /> | |
| 12 | + <result column="COLORTEXT" property="colortext" /> | |
| 13 | + <result column="GROUPORDER" property="grouporder" /> | |
| 14 | + <result column="ITEMORDER" property="itemorder" /> | |
| 15 | + <result column="GRADE" property="grade" /> | |
| 16 | + <result column="ENABLE" property="enable" /> | |
| 17 | + </resultMap> | |
| 18 | + | |
| 19 | + <!-- 通用查询结果列 --> | |
| 20 | + <sql id="Base_Column_List"> | |
| 21 | + ID AS id, SOURCE_ID AS sourceId, VERSION_ID AS versionId, NAME AS name, COLORCODE AS colorcode, COLORTEXT AS colortext, GROUPORDER AS grouporder, ITEMORDER AS itemorder, GRADE AS grade, ENABLE AS enable | |
| 22 | + </sql> | |
| 23 | +</mapper> |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskConfMapper.java
View file @
365e48b
| 1 | +package com.lyms.base.common.dao.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import org.springframework.stereotype.Repository; | |
| 7 | + | |
| 8 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 9 | +import com.lyms.base.common.entity.conf.HighriskConf; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * <p> | |
| 13 | + * Mapper接口 | |
| 14 | + * </p> | |
| 15 | + * | |
| 16 | + * @author maliang | |
| 17 | + * @since 2017-03-28 | |
| 18 | + */ | |
| 19 | +@Repository | |
| 20 | +public interface HighriskConfMapper extends BaseMapper<HighriskConf> { | |
| 21 | + | |
| 22 | + public Integer deleteLogicById(Serializable id); | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * <li>@Description:根据版本号获取对应的信息 | |
| 26 | + * <li>@param versionId | |
| 27 | + * <li>@return | |
| 28 | + * <li>创建人:maliang | |
| 29 | + * <li>创建时间:2017年3月28日 | |
| 30 | + * <li>修改人: | |
| 31 | + * <li>修改时间: | |
| 32 | + */ | |
| 33 | + public List<HighriskConf> selectByVersion(String versionId); | |
| 34 | + | |
| 35 | +} |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskConfMapper.xml
View file @
365e48b
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.base.common.dao.conf.HighriskConfMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.conf.HighriskConf"> | |
| 7 | + <result column="ID" property="id" /> | |
| 8 | + <result column="SOURCE_ID" property="sourceId" /> | |
| 9 | + <result column="VERSION_ID" property="versionId" /> | |
| 10 | + <result column="NAME" property="name" /> | |
| 11 | + <result column="COLORCODE" property="colorcode" /> | |
| 12 | + <result column="COLORTEXT" property="colortext" /> | |
| 13 | + <result column="GROUPORDER" property="grouporder" /> | |
| 14 | + <result column="ITEMORDER" property="itemorder" /> | |
| 15 | + <result column="GRADE" property="grade" /> | |
| 16 | + <result column="ENABLE" property="enable" /> | |
| 17 | + </resultMap> | |
| 18 | + | |
| 19 | + <!-- 通用查询结果列 --> | |
| 20 | + <sql id="Base_Column_List"> | |
| 21 | + ID AS id, SOURCE_ID AS sourceId, VERSION_ID AS versionId, NAME AS name, COLORCODE AS colorcode, COLORTEXT AS colortext, GROUPORDER AS grouporder, ITEMORDER AS itemorder, GRADE AS grade, ENABLE AS enable | |
| 22 | + </sql> | |
| 23 | + | |
| 24 | + <select id="selectByVersion" resultMap="BaseResultMap"> | |
| 25 | + select <include refid="Base_Column_List" /> from HIGHRISK_CONF where versionId=#{versionId} | |
| 26 | + </select> | |
| 27 | + | |
| 28 | +</mapper> |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskSourceMapper.java
View file @
365e48b
| 1 | +package com.lyms.base.common.dao.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 8 | +import com.lyms.base.common.entity.conf.HighriskSource; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * Mapper接口 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +@Repository | |
| 19 | +public interface HighriskSourceMapper extends BaseMapper<HighriskSource> { | |
| 20 | + | |
| 21 | + public Integer deleteLogicById(Serializable id); | |
| 22 | + | |
| 23 | +} |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskSourceMapper.xml
View file @
365e48b
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.base.common.dao.conf.HighriskSourceMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.conf.HighriskSource"> | |
| 7 | + <result column="ID" property="id" /> | |
| 8 | + <result column="NAME" property="name" /> | |
| 9 | + <result column="TYPE" property="type" /> | |
| 10 | + <result column="ENABLE" property="enable" /> | |
| 11 | + </resultMap> | |
| 12 | + | |
| 13 | + <!-- 通用查询结果列 --> | |
| 14 | + <sql id="Base_Column_List"> | |
| 15 | + ID AS id, NAME AS name, TYPE AS type, ENABLE AS enable | |
| 16 | + </sql> | |
| 17 | +</mapper> |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskVersionMapper.java
View file @
365e48b
| 1 | +package com.lyms.base.common.dao.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 8 | +import com.lyms.base.common.entity.conf.HighriskVersion; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * Mapper接口 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +@Repository | |
| 19 | +public interface HighriskVersionMapper extends BaseMapper<HighriskVersion> { | |
| 20 | + | |
| 21 | + public Integer deleteLogicById(Serializable id); | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * <li>@Description:根据ID 禁用状态获取数据信息 | |
| 25 | + * <li>@param id | |
| 26 | + * <li>@param status | |
| 27 | + * <li>@return | |
| 28 | + * <li>创建人:maliang | |
| 29 | + * <li>创建时间:2017年3月28日 | |
| 30 | + * <li>修改人: | |
| 31 | + * <li>修改时间: | |
| 32 | + */ | |
| 33 | + public HighriskVersion selectBy(Serializable id, Integer status); | |
| 34 | + | |
| 35 | +} |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/HighriskVersionMapper.xml
View file @
365e48b
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.base.common.dao.conf.HighriskVersionMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.conf.HighriskVersion"> | |
| 7 | + <result column="ID" property="id" /> | |
| 8 | + <result column="NAME" property="name" /> | |
| 9 | + <result column="ENABLE" property="enable" /> | |
| 10 | + </resultMap> | |
| 11 | + | |
| 12 | + <!-- 通用查询结果列 --> | |
| 13 | + <sql id="Base_Column_List"> | |
| 14 | + ID AS id, NAME AS name, ENABLE AS enable | |
| 15 | + </sql> | |
| 16 | + | |
| 17 | + | |
| 18 | + <sql id="Base_Table"> | |
| 19 | + HIGHRISK_VERSION | |
| 20 | + </sql> | |
| 21 | + | |
| 22 | + <!-- id & enable --> | |
| 23 | + <select id="selectBy" resultType="HighriskVersion" > | |
| 24 | + select <include refid="Base_Column_List" /> from <include refid="Base_Table" /> | |
| 25 | + <where> | |
| 26 | + id=#{id} and enable=#{status} | |
| 27 | + </where> | |
| 28 | + </select> | |
| 29 | + | |
| 30 | +</mapper> |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/package-info.java
View file @
365e48b
| 1 | +/** | |
| 2 | + * <li>@Title: package-info.java | |
| 3 | + * <li>@Package com.lyms.base.common.dao.conf | |
| 4 | + * <li>@Description: TODO(文件描述) | |
| 5 | + * <li>@author maliang | |
| 6 | + * <li>@date 2017年3月28日 | |
| 7 | + */ | |
| 8 | +/** | |
| 9 | + * <li>@ClassName: package-info | |
| 10 | + * <li>@Description: TODO(类描述) | |
| 11 | + * <li>@author maliang | |
| 12 | + * <li>@date 2017年3月28日 | |
| 13 | + * <li> | |
| 14 | + */ | |
| 15 | +package com.lyms.base.common.dao.conf; |
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/DiagnoseConf.java
View file @
365e48b
| 1 | +package com.lyms.base.common.entity.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 6 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * <p> | |
| 10 | + * 区域组诊断版本项配置表 | |
| 11 | + * </p> | |
| 12 | + * | |
| 13 | + * @author maliang | |
| 14 | + * @since 2017-03-28 | |
| 15 | + */ | |
| 16 | +@TableName("DIAGNOSE_CONF") | |
| 17 | +public class DiagnoseConf implements Serializable { | |
| 18 | + | |
| 19 | + private static final long serialVersionUID = 1L; | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * | |
| 23 | + */ | |
| 24 | + @TableField(value = "ID") | |
| 25 | + private String id; | |
| 26 | + /** | |
| 27 | + * 高危项定义资源表ID | |
| 28 | + */ | |
| 29 | + @TableField(value = "SOURCE_ID") | |
| 30 | + private String sourceId; | |
| 31 | + /** | |
| 32 | + * 版本ID | |
| 33 | + */ | |
| 34 | + @TableField(value = "VERSION_ID") | |
| 35 | + private String versionId; | |
| 36 | + /** | |
| 37 | + * 自定义高危显示名 | |
| 38 | + */ | |
| 39 | + @TableField(value = "NAME") | |
| 40 | + private String name; | |
| 41 | + /** | |
| 42 | + * 自定义高危颜色编码 | |
| 43 | + */ | |
| 44 | + @TableField(value = "COLORCODE") | |
| 45 | + private String colorcode; | |
| 46 | + /** | |
| 47 | + * 自定义高危颜色描述 | |
| 48 | + */ | |
| 49 | + @TableField(value = "COLORTEXT") | |
| 50 | + private String colortext; | |
| 51 | + /** | |
| 52 | + * 高危组排序 | |
| 53 | + */ | |
| 54 | + @TableField(value = "GROUPORDER") | |
| 55 | + private String grouporder; | |
| 56 | + /** | |
| 57 | + * 高危项排序 | |
| 58 | + */ | |
| 59 | + @TableField(value = "ITEMORDER") | |
| 60 | + private String itemorder; | |
| 61 | + /** | |
| 62 | + * 自定义评分 | |
| 63 | + */ | |
| 64 | + @TableField(value = "GRADE") | |
| 65 | + private String grade; | |
| 66 | + /** | |
| 67 | + * 是否启用,默认1启用 | |
| 68 | + */ | |
| 69 | + @TableField(value = "ENABLE") | |
| 70 | + private String enable; | |
| 71 | + | |
| 72 | + public String getId() { | |
| 73 | + return id; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setId(String id) { | |
| 77 | + this.id = id; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public String getSourceId() { | |
| 81 | + return sourceId; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setSourceId(String sourceId) { | |
| 85 | + this.sourceId = sourceId; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public String getVersionId() { | |
| 89 | + return versionId; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setVersionId(String versionId) { | |
| 93 | + this.versionId = versionId; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public String getName() { | |
| 97 | + return name; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setName(String name) { | |
| 101 | + this.name = name; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public String getColorcode() { | |
| 105 | + return colorcode; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setColorcode(String colorcode) { | |
| 109 | + this.colorcode = colorcode; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public String getColortext() { | |
| 113 | + return colortext; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setColortext(String colortext) { | |
| 117 | + this.colortext = colortext; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public String getGrouporder() { | |
| 121 | + return grouporder; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setGrouporder(String grouporder) { | |
| 125 | + this.grouporder = grouporder; | |
| 126 | + } | |
| 127 | + | |
| 128 | + public String getItemorder() { | |
| 129 | + return itemorder; | |
| 130 | + } | |
| 131 | + | |
| 132 | + public void setItemorder(String itemorder) { | |
| 133 | + this.itemorder = itemorder; | |
| 134 | + } | |
| 135 | + | |
| 136 | + public String getGrade() { | |
| 137 | + return grade; | |
| 138 | + } | |
| 139 | + | |
| 140 | + public void setGrade(String grade) { | |
| 141 | + this.grade = grade; | |
| 142 | + } | |
| 143 | + | |
| 144 | + public String getEnable() { | |
| 145 | + return enable; | |
| 146 | + } | |
| 147 | + | |
| 148 | + public void setEnable(String enable) { | |
| 149 | + this.enable = enable; | |
| 150 | + } | |
| 151 | + | |
| 152 | +} |
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskConf.java
View file @
365e48b
| 1 | +package com.lyms.base.common.entity.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.apache.ibatis.type.Alias; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 8 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 区域组高危版本项配置表 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +@Alias(value = "highriskConf") | |
| 19 | +@TableName("HIGHRISK_CONF") | |
| 20 | +public class HighriskConf implements Serializable { | |
| 21 | + | |
| 22 | + private static final long serialVersionUID = 1L; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * | |
| 26 | + */ | |
| 27 | + @TableField(value = "ID") | |
| 28 | + private String id; | |
| 29 | + /** | |
| 30 | + * 高危项定义资源表ID | |
| 31 | + */ | |
| 32 | + @TableField(value = "SOURCE_ID") | |
| 33 | + private String sourceId; | |
| 34 | + /** | |
| 35 | + * 版本ID | |
| 36 | + */ | |
| 37 | + @TableField(value = "VERSION_ID") | |
| 38 | + private String versionId; | |
| 39 | + /** | |
| 40 | + * 自定义高危显示名 | |
| 41 | + */ | |
| 42 | + @TableField(value = "NAME") | |
| 43 | + private String name; | |
| 44 | + /** | |
| 45 | + * 自定义高危颜色编码 | |
| 46 | + */ | |
| 47 | + @TableField(value = "COLORCODE") | |
| 48 | + private String colorcode; | |
| 49 | + /** | |
| 50 | + * 自定义高危颜色描述 | |
| 51 | + */ | |
| 52 | + @TableField(value = "COLORTEXT") | |
| 53 | + private String colortext; | |
| 54 | + /** | |
| 55 | + * 高危组排序 | |
| 56 | + */ | |
| 57 | + @TableField(value = "GROUPORDER") | |
| 58 | + private String grouporder; | |
| 59 | + /** | |
| 60 | + * 高危项排序 | |
| 61 | + */ | |
| 62 | + @TableField(value = "ITEMORDER") | |
| 63 | + private String itemorder; | |
| 64 | + /** | |
| 65 | + * 自定义评分 | |
| 66 | + */ | |
| 67 | + @TableField(value = "GRADE") | |
| 68 | + private String grade; | |
| 69 | + /** | |
| 70 | + * 是否启用,默认1启用 | |
| 71 | + */ | |
| 72 | + @TableField(value = "ENABLE") | |
| 73 | + private Integer enable; | |
| 74 | + | |
| 75 | + public String getId() { | |
| 76 | + return id; | |
| 77 | + } | |
| 78 | + | |
| 79 | + public void setId(String id) { | |
| 80 | + this.id = id; | |
| 81 | + } | |
| 82 | + | |
| 83 | + public String getSourceId() { | |
| 84 | + return sourceId; | |
| 85 | + } | |
| 86 | + | |
| 87 | + public void setSourceId(String sourceId) { | |
| 88 | + this.sourceId = sourceId; | |
| 89 | + } | |
| 90 | + | |
| 91 | + public String getVersionId() { | |
| 92 | + return versionId; | |
| 93 | + } | |
| 94 | + | |
| 95 | + public void setVersionId(String versionId) { | |
| 96 | + this.versionId = versionId; | |
| 97 | + } | |
| 98 | + | |
| 99 | + public String getName() { | |
| 100 | + return name; | |
| 101 | + } | |
| 102 | + | |
| 103 | + public void setName(String name) { | |
| 104 | + this.name = name; | |
| 105 | + } | |
| 106 | + | |
| 107 | + public String getColorcode() { | |
| 108 | + return colorcode; | |
| 109 | + } | |
| 110 | + | |
| 111 | + public void setColorcode(String colorcode) { | |
| 112 | + this.colorcode = colorcode; | |
| 113 | + } | |
| 114 | + | |
| 115 | + public String getColortext() { | |
| 116 | + return colortext; | |
| 117 | + } | |
| 118 | + | |
| 119 | + public void setColortext(String colortext) { | |
| 120 | + this.colortext = colortext; | |
| 121 | + } | |
| 122 | + | |
| 123 | + public String getGrouporder() { | |
| 124 | + return grouporder; | |
| 125 | + } | |
| 126 | + | |
| 127 | + public void setGrouporder(String grouporder) { | |
| 128 | + this.grouporder = grouporder; | |
| 129 | + } | |
| 130 | + | |
| 131 | + public String getItemorder() { | |
| 132 | + return itemorder; | |
| 133 | + } | |
| 134 | + | |
| 135 | + public void setItemorder(String itemorder) { | |
| 136 | + this.itemorder = itemorder; | |
| 137 | + } | |
| 138 | + | |
| 139 | + public String getGrade() { | |
| 140 | + return grade; | |
| 141 | + } | |
| 142 | + | |
| 143 | + public void setGrade(String grade) { | |
| 144 | + this.grade = grade; | |
| 145 | + } | |
| 146 | + | |
| 147 | + public Integer getEnable() { | |
| 148 | + return enable; | |
| 149 | + } | |
| 150 | + | |
| 151 | + public void setEnable(Integer enable) { | |
| 152 | + this.enable = enable; | |
| 153 | + } | |
| 154 | + | |
| 155 | +} |
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskSource.java
View file @
365e48b
| 1 | +package com.lyms.base.common.entity.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 6 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * <p> | |
| 10 | + * 高危项定义资源表 | |
| 11 | + * </p> | |
| 12 | + * | |
| 13 | + * @author maliang | |
| 14 | + * @since 2017-03-28 | |
| 15 | + */ | |
| 16 | +@TableName("HIGHRISK_SOURCE") | |
| 17 | +public class HighriskSource implements Serializable { | |
| 18 | + | |
| 19 | + private static final long serialVersionUID = 1L; | |
| 20 | + | |
| 21 | + /** | |
| 22 | + * | |
| 23 | + */ | |
| 24 | + @TableField(value = "ID") | |
| 25 | + private String id; | |
| 26 | + /** | |
| 27 | + * 高危项名称 | |
| 28 | + */ | |
| 29 | + @TableField(value = "NAME") | |
| 30 | + private String name; | |
| 31 | + /** | |
| 32 | + * 高危所属划分:0所有,1妇女,2男性,3儿童 | |
| 33 | + */ | |
| 34 | + @TableField(value = "TYPE") | |
| 35 | + private String type; | |
| 36 | + /** | |
| 37 | + * 是否启用,默认1启用 | |
| 38 | + */ | |
| 39 | + @TableField(value = "ENABLE") | |
| 40 | + private Integer enable; | |
| 41 | + | |
| 42 | + public String getId() { | |
| 43 | + return id; | |
| 44 | + } | |
| 45 | + | |
| 46 | + public void setId(String id) { | |
| 47 | + this.id = id; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public String getName() { | |
| 51 | + return name; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public void setName(String name) { | |
| 55 | + this.name = name; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public String getType() { | |
| 59 | + return type; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public void setType(String type) { | |
| 63 | + this.type = type; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public Integer getEnable() { | |
| 67 | + return enable; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public void setEnable(Integer enable) { | |
| 71 | + this.enable = enable; | |
| 72 | + } | |
| 73 | + | |
| 74 | +} |
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/HighriskVersion.java
View file @
365e48b
| 1 | +package com.lyms.base.common.entity.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.apache.ibatis.type.Alias; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 8 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 高危版本表 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +@Alias(value = "HighriskVersion") | |
| 19 | +@TableName("HIGHRISK_VERSION") | |
| 20 | +public class HighriskVersion implements Serializable { | |
| 21 | + | |
| 22 | + private static final long serialVersionUID = 1L; | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * | |
| 26 | + */ | |
| 27 | + @TableField(value = "ID") | |
| 28 | + private String id; | |
| 29 | + /** | |
| 30 | + * 高危版本名称 | |
| 31 | + */ | |
| 32 | + @TableField(value = "NAME") | |
| 33 | + private String name; | |
| 34 | + /** | |
| 35 | + * 是否启用 | |
| 36 | + */ | |
| 37 | + @TableField(value = "ENABLE") | |
| 38 | + private Integer enable; | |
| 39 | + | |
| 40 | + public String getId() { | |
| 41 | + return id; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public void setId(String id) { | |
| 45 | + this.id = id; | |
| 46 | + } | |
| 47 | + | |
| 48 | + public String getName() { | |
| 49 | + return name; | |
| 50 | + } | |
| 51 | + | |
| 52 | + public void setName(String name) { | |
| 53 | + this.name = name; | |
| 54 | + } | |
| 55 | + | |
| 56 | + public Integer getEnable() { | |
| 57 | + return enable; | |
| 58 | + } | |
| 59 | + | |
| 60 | + public void setEnable(Integer enable) { | |
| 61 | + this.enable = enable; | |
| 62 | + } | |
| 63 | + | |
| 64 | +} |
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/package-info.java
View file @
365e48b
parent/base.common/src/main/java/com/lyms/base/common/service/conf/DiagnoseConfService.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.lyms.base.common.entity.conf.DiagnoseConf; | |
| 6 | +import com.lyms.web.service.BaseService; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * <p> | |
| 10 | + * 服务类 | |
| 11 | + * </p> | |
| 12 | + * | |
| 13 | + * @author maliang | |
| 14 | + * @since 2017-03-28 | |
| 15 | + */ | |
| 16 | +public interface DiagnoseConfService extends BaseService<DiagnoseConf> { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 20 | + * <li>@param id 删除主键id | |
| 21 | + * <li>@return 大于0修改成功,否则为失败 | |
| 22 | + */ | |
| 23 | + public Integer deleteLogicById(Serializable id); | |
| 24 | + | |
| 25 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/HighriskConfService.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import com.lyms.base.common.entity.conf.HighriskConf; | |
| 7 | +import com.lyms.exception.SystemException; | |
| 8 | +import com.lyms.web.service.BaseService; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 区域组高危版本项配置 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +public interface HighriskConfService extends BaseService<HighriskConf> { | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 22 | + * <li>@param id 删除主键id | |
| 23 | + * <li>@return 大于0修改成功,否则为失败 | |
| 24 | + */ | |
| 25 | + public Integer deleteLogicById(Serializable id); | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * <li>@Description:添加高危版本配置项 | |
| 29 | + * <li>@param highriskConf | |
| 30 | + * <li>@return String 添加成功返回ID | |
| 31 | + * <li>创建人:maliang | |
| 32 | + * <li>创建时间:2017年3月28日 | |
| 33 | + * <li>修改人: | |
| 34 | + * <li>修改时间: | |
| 35 | + */ | |
| 36 | + public String createHighriskConf(HighriskConf highriskConf) throws SystemException; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * <li>@Description: 修改高危版本配置项 | |
| 40 | + * <li>@param highriskConf | |
| 41 | + * <li>@return | |
| 42 | + * <li>@throws SystemException | |
| 43 | + * <li>创建人:maliang | |
| 44 | + * <li>创建时间:2017年3月28日 | |
| 45 | + * <li>修改人: | |
| 46 | + * <li>修改时间: | |
| 47 | + */ | |
| 48 | + public boolean updateHighriskConf(HighriskConf highriskConf) throws SystemException; | |
| 49 | + | |
| 50 | + /** | |
| 51 | + * <li>@Description:根据版本号获取高危配置信息 | |
| 52 | + * <li>@return | |
| 53 | + * <li>创建人:maliang | |
| 54 | + * <li>创建时间:2017年3月28日 | |
| 55 | + * <li>修改人: | |
| 56 | + * <li>修改时间: | |
| 57 | + */ | |
| 58 | + public List<HighriskConf> getHighriskConf(String versionId); | |
| 59 | + | |
| 60 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/HighriskSourceService.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.lyms.base.common.entity.conf.HighriskSource; | |
| 6 | +import com.lyms.web.service.BaseService; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * <p> | |
| 10 | + * 服务类 | |
| 11 | + * </p> | |
| 12 | + * | |
| 13 | + * @author maliang | |
| 14 | + * @since 2017-03-28 | |
| 15 | + */ | |
| 16 | +public interface HighriskSourceService extends BaseService<HighriskSource> { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 20 | + * <li>@param id 删除主键id | |
| 21 | + * <li>@return 大于0修改成功,否则为失败 | |
| 22 | + */ | |
| 23 | + public Integer deleteLogicById(Serializable id); | |
| 24 | + | |
| 25 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/HighriskVersionService.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.lyms.base.common.entity.conf.HighriskVersion; | |
| 6 | +import com.lyms.exception.SystemException; | |
| 7 | +import com.lyms.web.service.BaseService; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * <p> | |
| 11 | + * 高危版本服务类 | |
| 12 | + * </p> | |
| 13 | + * | |
| 14 | + * @author maliang | |
| 15 | + * @since 2017-03-28 | |
| 16 | + */ | |
| 17 | +public interface HighriskVersionService extends BaseService<HighriskVersion> { | |
| 18 | + | |
| 19 | + /** | |
| 20 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 21 | + * <li>@param id 删除主键id | |
| 22 | + * <li>@return 大于0修改成功,否则为失败 | |
| 23 | + */ | |
| 24 | + public Integer deleteLogicById(Serializable id); | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * <li>@Description:启用/禁用 | |
| 28 | + * <li>@param id | |
| 29 | + * <li>@return | |
| 30 | + * <li>创建人:maliang | |
| 31 | + * <li>创建时间:2017年3月28日 | |
| 32 | + * <li>修改人: | |
| 33 | + * <li>修改时间: | |
| 34 | + */ | |
| 35 | + public boolean enable(Serializable id) throws SystemException; | |
| 36 | + | |
| 37 | + /** | |
| 38 | + * <li>@Description:根据ID获取版本信息 | |
| 39 | + * <li>@param id | |
| 40 | + * <li>@return | |
| 41 | + * <li>@throws SystemException | |
| 42 | + * <li>创建人:maliang | |
| 43 | + * <li>创建时间:2017年3月28日 | |
| 44 | + * <li>修改人: | |
| 45 | + * <li>修改时间: | |
| 46 | + */ | |
| 47 | + public HighriskVersion getEnableHighriskVersionBy(Serializable id) throws SystemException; | |
| 48 | + | |
| 49 | + /** | |
| 50 | + * <li>@Description:添加版本号 | |
| 51 | + * <li>@param version | |
| 52 | + * <li>@return | |
| 53 | + * <li>@throws SystemException | |
| 54 | + * <li>创建人:maliang | |
| 55 | + * <li>创建时间:2017年3月28日 | |
| 56 | + * <li>修改人: | |
| 57 | + * <li>修改时间: | |
| 58 | + */ | |
| 59 | + public String createVersion(HighriskVersion version) throws SystemException; | |
| 60 | + | |
| 61 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/DiagnoseConfServiceImpl.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 6 | +import com.lyms.base.common.dao.conf.DiagnoseConfMapper; | |
| 7 | +import com.lyms.base.common.entity.conf.DiagnoseConf; | |
| 8 | +import com.lyms.base.common.service.conf.DiagnoseConfService; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 服务类 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +public class DiagnoseConfServiceImpl extends ServiceImpl<DiagnoseConfMapper, DiagnoseConf> | |
| 19 | + implements DiagnoseConfService { | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public Integer deleteLogicById(Serializable id) { | |
| 23 | + return null; | |
| 24 | + } | |
| 25 | + | |
| 26 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/HighriskConfServiceImpl.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import org.apache.commons.lang3.StringUtils; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.transaction.annotation.Transactional; | |
| 9 | + | |
| 10 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 11 | +import com.lyms.base.common.dao.conf.HighriskConfMapper; | |
| 12 | +import com.lyms.base.common.entity.conf.HighriskConf; | |
| 13 | +import com.lyms.base.common.enums.StatusEnum; | |
| 14 | +import com.lyms.base.common.service.conf.HighriskConfService; | |
| 15 | +import com.lyms.exception.SystemException; | |
| 16 | +import com.lyms.util.StrUtils; | |
| 17 | + | |
| 18 | +/** | |
| 19 | + * <p> | |
| 20 | + * 区域组高危版本项配置 | |
| 21 | + * </p> | |
| 22 | + * | |
| 23 | + * @author maliang | |
| 24 | + * @since 2017-03-28 | |
| 25 | + */ | |
| 26 | +public class HighriskConfServiceImpl extends ServiceImpl<HighriskConfMapper, HighriskConf> | |
| 27 | + implements HighriskConfService { | |
| 28 | + | |
| 29 | + @Autowired | |
| 30 | + private HighriskConfMapper confMapper; | |
| 31 | + | |
| 32 | + @Override | |
| 33 | + @Transactional | |
| 34 | + public Integer deleteLogicById(Serializable id) { | |
| 35 | + return null; | |
| 36 | + } | |
| 37 | + | |
| 38 | + private void throwCheckException(HighriskConf highriskConf) throws SystemException { | |
| 39 | + if (highriskConf == null) { | |
| 40 | + throw new SystemException("版本配置项目信息为空"); | |
| 41 | + } | |
| 42 | + } | |
| 43 | + | |
| 44 | + @Override | |
| 45 | + @Transactional | |
| 46 | + public String createHighriskConf(HighriskConf highriskConf) throws SystemException { | |
| 47 | + | |
| 48 | + throwCheckException(highriskConf); | |
| 49 | + | |
| 50 | + String id = StrUtils.uuid(); | |
| 51 | + highriskConf.setId(id); | |
| 52 | + | |
| 53 | + Integer enable = highriskConf.getEnable(); | |
| 54 | + if (enable == null) { | |
| 55 | + highriskConf.setEnable(StatusEnum.ENABLED.getStatus()); | |
| 56 | + } | |
| 57 | + return id; | |
| 58 | + } | |
| 59 | + | |
| 60 | + @Override | |
| 61 | + @Transactional | |
| 62 | + public boolean updateHighriskConf(HighriskConf highriskConf) throws SystemException { | |
| 63 | + | |
| 64 | + throwCheckException(highriskConf); | |
| 65 | + | |
| 66 | + String id = highriskConf.getId(); | |
| 67 | + | |
| 68 | + if (StringUtils.isBlank(id)) | |
| 69 | + return false; | |
| 70 | + Integer tag = confMapper.updateById(highriskConf); | |
| 71 | + | |
| 72 | + return tag != null && tag >= 1; | |
| 73 | + } | |
| 74 | + | |
| 75 | + @Override | |
| 76 | + public List<HighriskConf> getHighriskConf(String versionId) { | |
| 77 | + if (StringUtils.isBlank(versionId)) | |
| 78 | + return null; | |
| 79 | + return confMapper.selectByVersion(versionId); | |
| 80 | + } | |
| 81 | + | |
| 82 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/HighriskSourceServiceImpl.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 6 | +import com.lyms.base.common.dao.conf.HighriskSourceMapper; | |
| 7 | +import com.lyms.base.common.entity.conf.HighriskSource; | |
| 8 | +import com.lyms.base.common.service.conf.HighriskSourceService; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 服务类 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author maliang | |
| 16 | + * @since 2017-03-28 | |
| 17 | + */ | |
| 18 | +public class HighriskSourceServiceImpl extends ServiceImpl<HighriskSourceMapper, HighriskSource> | |
| 19 | + implements HighriskSourceService { | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public Integer deleteLogicById(Serializable id) { | |
| 23 | + return null; | |
| 24 | + } | |
| 25 | + | |
| 26 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/HighriskVersionServiceImpl.java
View file @
365e48b
| 1 | +package com.lyms.base.common.service.conf.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | +import org.springframework.transaction.annotation.Transactional; | |
| 7 | + | |
| 8 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 9 | +import com.lyms.base.common.dao.conf.HighriskVersionMapper; | |
| 10 | +import com.lyms.base.common.entity.conf.HighriskVersion; | |
| 11 | +import com.lyms.base.common.enums.StatusEnum; | |
| 12 | +import com.lyms.base.common.service.conf.HighriskVersionService; | |
| 13 | +import com.lyms.exception.SystemException; | |
| 14 | +import com.lyms.util.StrUtils; | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * <p> | |
| 18 | + * 高危版本服务类 | |
| 19 | + * </p> | |
| 20 | + * | |
| 21 | + * @author maliang | |
| 22 | + * @since 2017-03-28 | |
| 23 | + */ | |
| 24 | +public class HighriskVersionServiceImpl extends ServiceImpl<HighriskVersionMapper, HighriskVersion> | |
| 25 | + implements HighriskVersionService { | |
| 26 | + | |
| 27 | + @Autowired | |
| 28 | + private HighriskVersionMapper versionMapper; | |
| 29 | + | |
| 30 | + @Override | |
| 31 | + public Integer deleteLogicById(Serializable id) { | |
| 32 | + return null; | |
| 33 | + } | |
| 34 | + | |
| 35 | + @Override | |
| 36 | + @Transactional | |
| 37 | + public boolean enable(Serializable id) { | |
| 38 | + | |
| 39 | + if (id == null) | |
| 40 | + return false; | |
| 41 | + | |
| 42 | + HighriskVersion version = versionMapper.selectById(id); | |
| 43 | + if (version == null) | |
| 44 | + return false; | |
| 45 | + Integer enable = version.getEnable(); | |
| 46 | + | |
| 47 | + int status = enable == null || StatusEnum.isDisEnabled(Integer.valueOf(enable)) ? StatusEnum.ENABLED.getStatus() | |
| 48 | + : StatusEnum.DISENABLED.getStatus(); | |
| 49 | + version.setEnable(status); | |
| 50 | + | |
| 51 | + Integer tag = versionMapper.updateById(version); | |
| 52 | + return tag != null && tag >= 1; | |
| 53 | + } | |
| 54 | + | |
| 55 | + @Override | |
| 56 | + public HighriskVersion getEnableHighriskVersionBy(Serializable id) throws SystemException { | |
| 57 | + | |
| 58 | + boolean tag = false; | |
| 59 | + HighriskVersion version = null; | |
| 60 | + if (id == null) { | |
| 61 | + tag = true; | |
| 62 | + } else { | |
| 63 | + version = versionMapper.selectBy(id, StatusEnum.ENABLED.getStatus()); | |
| 64 | + if (version == null) { | |
| 65 | + tag = true; | |
| 66 | + } | |
| 67 | + } | |
| 68 | + // 获取默认版本信息 | |
| 69 | + if (tag) { | |
| 70 | + // version = versionMapper.selectById(id); | |
| 71 | + // TODO 获取默认版本 | |
| 72 | + } | |
| 73 | + return version; | |
| 74 | + } | |
| 75 | + | |
| 76 | + @Override | |
| 77 | + public String createVersion(HighriskVersion version) throws SystemException { | |
| 78 | + | |
| 79 | + if (version == null) { | |
| 80 | + throw new SystemException("版本信息为空"); | |
| 81 | + } | |
| 82 | + String id = StrUtils.uuid(); | |
| 83 | + version.setId(id); | |
| 84 | + Integer enable = version.getEnable(); | |
| 85 | + // 默认开启版本 | |
| 86 | + if (enable == null) { | |
| 87 | + version.setEnable(StatusEnum.ENABLED.getStatus()); | |
| 88 | + } | |
| 89 | + Integer tag = versionMapper.insert(version); | |
| 90 | + return tag != null && tag >= 1 ? id : null; | |
| 91 | + } | |
| 92 | + | |
| 93 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/package-info.java
View file @
365e48b
parent/base.common/src/main/java/com/lyms/base/common/service/conf/package-info.java
View file @
365e48b
parent/base.common/src/main/java/com/lyms/base/common/utils/ConverUtils.java
View file @
365e48b
| 1 | +package com.lyms.base.common.utils; | |
| 2 | + | |
| 3 | +import org.apache.commons.codec.binary.Base64; | |
| 4 | +import org.apache.commons.lang3.StringUtils; | |
| 5 | + | |
| 6 | +/** | |
| 7 | + * <li>@ClassName: BitSetUtils | |
| 8 | + * <li>@Description: | |
| 9 | + * <li>@author maliang | |
| 10 | + * <li>@date 2017年3月27日 | |
| 11 | + * <li> | |
| 12 | + */ | |
| 13 | +public class ConverUtils { | |
| 14 | + // 创建动态长度 | |
| 15 | + private String[] convers = null; | |
| 16 | + | |
| 17 | + private static final String SPLIT = ","; | |
| 18 | + /** | |
| 19 | + * 默认扩展20的长度 | |
| 20 | + */ | |
| 21 | + private static final int default_size = 20; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * 默认初始10个长度 创建一个新的实例 BitArray. | |
| 25 | + * | |
| 26 | + */ | |
| 27 | + public ConverUtils() { | |
| 28 | + convers = new String[10]; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public ConverUtils(int size) { | |
| 32 | + convers = new String[size]; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public static ConverUtils build() { | |
| 36 | + return new ConverUtils(); | |
| 37 | + } | |
| 38 | + | |
| 39 | + public ConverUtils set(int index, String value) { | |
| 40 | + this.push(index, value); | |
| 41 | + return this; | |
| 42 | + } | |
| 43 | + | |
| 44 | + public ConverUtils conver(String base64Str) { | |
| 45 | + if (StringUtils.isNotBlank(base64Str)) { | |
| 46 | + byte[] bytes = Base64.decodeBase64(base64Str); | |
| 47 | + String str = new String(bytes); | |
| 48 | + convers = StringUtils.splitPreserveAllTokens(str, SPLIT); | |
| 49 | + } | |
| 50 | + return this; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public String get(int index) { | |
| 54 | + if (convers == null) { | |
| 55 | + return ""; | |
| 56 | + } | |
| 57 | + return pull(index); | |
| 58 | + } | |
| 59 | + | |
| 60 | + private boolean extend(Integer size) { | |
| 61 | + | |
| 62 | + if (size == null || size <= 0) { | |
| 63 | + size = default_size; | |
| 64 | + } | |
| 65 | + | |
| 66 | + if (convers == null) { | |
| 67 | + convers = new String[size]; | |
| 68 | + } else { | |
| 69 | + // 长度扩展 | |
| 70 | + int len = convers.length + size; | |
| 71 | + String[] tmp = new String[len]; | |
| 72 | + System.arraycopy(convers, 0, tmp, 0, convers.length); | |
| 73 | + convers = tmp; | |
| 74 | + } | |
| 75 | + return true; | |
| 76 | + } | |
| 77 | + | |
| 78 | + private boolean mustExtend(int index) { | |
| 79 | + return convers.length <= index; | |
| 80 | + } | |
| 81 | + | |
| 82 | + private boolean push(int index, String value) { | |
| 83 | + if (mustExtend(index)) { | |
| 84 | + extend(index); | |
| 85 | + } | |
| 86 | + convers[index] = value; | |
| 87 | + return true; | |
| 88 | + } | |
| 89 | + | |
| 90 | + private String pull(int index) { | |
| 91 | + return convers[index]; | |
| 92 | + } | |
| 93 | + | |
| 94 | + @Override | |
| 95 | + public String toString() { | |
| 96 | + return StringUtils.join(convers, SPLIT); | |
| 97 | + } | |
| 98 | + | |
| 99 | + public byte[] conver() { | |
| 100 | + return this.toString().getBytes(); | |
| 101 | + } | |
| 102 | + | |
| 103 | + public String converBase64Str() { | |
| 104 | + return Base64.encodeBase64String(this.conver()); | |
| 105 | + } | |
| 106 | + | |
| 107 | +} |
parent/base.common/src/main/java/com/lyms/base/common/utils/package-info.java
View file @
365e48b
parent/base.common/src/test/java/base/common/test/Test.java
View file @
365e48b
| 1 | +package base.common.test; | |
| 2 | + | |
| 3 | +public class Test { | |
| 4 | + | |
| 5 | + public static void main(String[] args) { | |
| 6 | + System.out.println(-200 >> 3); | |
| 7 | + System.out.println(4 << 3); | |
| 8 | + System.out.println(4 | 3); | |
| 9 | + System.out.println(4 ^ 3); | |
| 10 | + System.out.println(4 & 3); | |
| 11 | + System.out.println(-200 >>> 3); | |
| 12 | + | |
| 13 | + System.out.println(Math.sin(1)); | |
| 14 | + System.out.println(-200 / (int) Math.pow(2, 3.0)); | |
| 15 | + System.out.println(Math.pow(9, 1.0 / 3)); | |
| 16 | + } | |
| 17 | +} |
parent/base.common/src/test/java/base/common/test/package-info.java
View file @
365e48b
| 1 | +/** | |
| 2 | + * <li>@Title: package-info.java | |
| 3 | + * <li>@Package base.common.test | |
| 4 | + * <li>@Description: TODO(文件描述) | |
| 5 | + * <li>@author maliang | |
| 6 | + * <li>@date 2017年3月28日 | |
| 7 | + */ | |
| 8 | +/** | |
| 9 | + * <li>@ClassName: package-info | |
| 10 | + * <li>@Description: TODO(类描述) | |
| 11 | + * <li>@author maliang | |
| 12 | + * <li>@date 2017年3月28日 | |
| 13 | + * <li> | |
| 14 | + */ | |
| 15 | +package base.common.test; |
parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/DiagnoseConfController.java
View file @
365e48b
parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/HighriskConfController.java
View file @
365e48b
parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/HighriskSourceController.java
View file @
365e48b
parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/HighriskVersionController.java
View file @
365e48b
| 1 | +package com.lyms.hospital.controller.conf; | |
| 2 | + | |
| 3 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 4 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 5 | +import org.springframework.web.bind.annotation.RestController; | |
| 6 | + | |
| 7 | +import com.lyms.base.common.service.conf.HighriskVersionService; | |
| 8 | +import com.lyms.web.controller.BaseController; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 高危版本 | |
| 12 | + * | |
| 13 | + * @author maliang | |
| 14 | + * @since 2017-03-28 | |
| 15 | + */ | |
| 16 | +@RestController | |
| 17 | +@RequestMapping(value = "/highrisk/version") | |
| 18 | +public class HighriskVersionController extends BaseController { | |
| 19 | + | |
| 20 | + @Autowired | |
| 21 | + private HighriskVersionService highriskVersionService; | |
| 22 | + | |
| 23 | +} |
parent/hospital.web/src/main/java/com/lyms/hospital/controller/conf/package-info.java
View file @
365e48b
parent/hospital.web/src/test/java/test/hospital/Test.java
View file @
365e48b
| 1 | 1 | package test.hospital; |
| 2 | 2 | |
| 3 | +import com.lyms.base.common.utils.ConverUtils; | |
| 4 | + | |
| 3 | 5 | public class Test { |
| 4 | - | |
| 6 | + | |
| 5 | 7 | public static void main(String[] args) { |
| 6 | 8 | System.out.println(123123123); |
| 9 | + ConverUtils conver = ConverUtils.build(); | |
| 10 | + String str = conver.set(0, "你好").converBase64Str(); | |
| 11 | + System.out.println(str); | |
| 12 | + conver.conver(str); | |
| 13 | + System.out.println(conver.get(0)); | |
| 14 | + } | |
| 15 | + | |
| 16 | + // 创建 | |
| 17 | + static class BitArray { | |
| 18 | + | |
| 7 | 19 | } |
| 8 | 20 | |
| 9 | 21 | } |