提交 a7ed3cff authored 作者: zhu's avatar zhu

1.develop

2.fix bug
上级 0da44840
...@@ -48,6 +48,12 @@ public class DiseaseConfig extends BaseDomain { ...@@ -48,6 +48,12 @@ public class DiseaseConfig extends BaseDomain {
@TableField(value = "disease_desc", select = false) @TableField(value = "disease_desc", select = false)
@Schema(description = "疾病描述", nullable = false) @Schema(description = "疾病描述", nullable = false)
private String diseaseDesc; private String diseaseDesc;
/**
* 常见症状
*/
@TableField(value = "common_symptoms")
@Schema(description = "常见症状", nullable = false)
private String commonSymptoms;
/** /**
* 操作人Id * 操作人Id
*/ */
...@@ -112,6 +118,12 @@ public class DiseaseConfig extends BaseDomain { ...@@ -112,6 +118,12 @@ public class DiseaseConfig extends BaseDomain {
} }
return false; return false;
} }
if (this.getCommonSymptoms() == null) {
if (throwException) {
throw new ApiCode.ApiException(-1, "常见症状不能为空!");
}
return false;
}
if (this.getEditorId() == null) { if (this.getEditorId() == null) {
if (throwException) { if (throwException) {
throw new ApiCode.ApiException(-1, "操作人Id不能为空!"); throw new ApiCode.ApiException(-1, "操作人Id不能为空!");
......
...@@ -45,6 +45,11 @@ public class DiseaseConfigParam extends BaseParam<DiseaseConfig> { ...@@ -45,6 +45,11 @@ public class DiseaseConfigParam extends BaseParam<DiseaseConfig> {
*/ */
@Parameter(description = "疾病描述") @Parameter(description = "疾病描述")
private String diseaseDesc; private String diseaseDesc;
/**
* 常见症状
*/
@Parameter(description = "常见症状")
private String commonSymptoms;
/** /**
* 操作人Id * 操作人Id
*/ */
...@@ -131,6 +136,17 @@ public class DiseaseConfigParam extends BaseParam<DiseaseConfig> { ...@@ -131,6 +136,17 @@ public class DiseaseConfigParam extends BaseParam<DiseaseConfig> {
wrapper.eq(columnPrefix + "disease_desc", this.getDiseaseDesc()); wrapper.eq(columnPrefix + "disease_desc", this.getDiseaseDesc());
} }
} }
if (this.getCommonSymptoms() != null) {
if (this.getCommonSymptoms().startsWith("%") && this.getCommonSymptoms().endsWith("%")) {
wrapper.like(columnPrefix + "common_symptoms", this.getCommonSymptoms().substring(1, this.getCommonSymptoms().length() - 1));
} else if (this.getCommonSymptoms().startsWith("%") && !this.getCommonSymptoms().endsWith("%")) {
wrapper.likeLeft(columnPrefix + "common_symptoms", this.getCommonSymptoms().substring(1));
} else if (this.getCommonSymptoms().endsWith("%")) {
wrapper.likeRight(columnPrefix + "common_symptoms", this.getCommonSymptoms().substring(0, this.getCommonSymptoms().length() - 1));
} else {
wrapper.eq(columnPrefix + "common_symptoms", this.getCommonSymptoms());
}
}
wrapper.eq(this.getEditorId() != null, columnPrefix + "editor_id", this.getEditorId()); wrapper.eq(this.getEditorId() != null, columnPrefix + "editor_id", this.getEditorId());
if (this.getEditorName() != null) { if (this.getEditorName() != null) {
if (this.getEditorName().startsWith("%") && this.getEditorName().endsWith("%")) { if (this.getEditorName().startsWith("%") && this.getEditorName().endsWith("%")) {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.xwd.hospital.server.domain.DiseaseConfig"> <resultMap id="BaseResultMap" type="com.xwd.hospital.server.domain.DiseaseConfig">
<id column="id" jdbcType="BIGINT" property="id" /> <id column="id" jdbcType="BIGINT" property="id" />
<result column="disease_name" jdbcType="VARCHAR" property="diseaseName" /> <result column="disease_name" jdbcType="VARCHAR" property="diseaseName" />
<result column="common_symptoms" jdbcType="VARCHAR" property="commonSymptoms" />
<result column="editor_id" jdbcType="BIGINT" property="editorId" /> <result column="editor_id" jdbcType="BIGINT" property="editorId" />
<result column="editor_name" jdbcType="VARCHAR" property="editorName" /> <result column="editor_name" jdbcType="VARCHAR" property="editorName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
...@@ -13,25 +14,25 @@ ...@@ -13,25 +14,25 @@
<result column="disease_desc" jdbcType="VARCHAR" property="diseaseDesc" /> <result column="disease_desc" jdbcType="VARCHAR" property="diseaseDesc" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
`id`, `disease_name`, `editor_id`, `editor_name`, `create_time`, `update_time` `id`, `disease_name`, `common_symptoms`, `editor_id`, `editor_name`, `create_time`, `update_time`
</sql> </sql>
<sql id="Base_Column_List_With_Prefix"> <sql id="Base_Column_List_With_Prefix">
t.`id`, t.`disease_name`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time` t.`id`, t.`disease_name`, t.`common_symptoms`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql> </sql>
<sql id="Base_Column_List_Full"> <sql id="Base_Column_List_Full">
`id`, `disease_name`, `disease_desc`, `editor_id`, `editor_name`, `create_time`, `update_time` `id`, `disease_name`, `disease_desc`, `common_symptoms`, `editor_id`, `editor_name`, `create_time`, `update_time`
</sql> </sql>
<sql id="Base_Column_List_Full_With_Prefix"> <sql id="Base_Column_List_Full_With_Prefix">
t.`id`, t.`disease_name`, t.`disease_desc`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time` t.`id`, t.`disease_name`, t.`disease_desc`, t.`common_symptoms`, t.`editor_id`, t.`editor_name`, t.`create_time`, t.`update_time`
</sql> </sql>
<insert id="batchInsert"> <insert id="batchInsert">
insert into pms_disease_config ( insert into pms_disease_config (
`disease_name`, `disease_desc`, `editor_id`, `editor_name` `disease_name`, `disease_desc`, `common_symptoms`, `editor_id`, `editor_name`
) )
values values
<foreach collection="records" item="record" separator=","> <foreach collection="records" item="record" separator=",">
( (
#{record.diseaseName, jdbcType=VARCHAR}, #{record.diseaseDesc, jdbcType=VARCHAR}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR} #{record.diseaseName, jdbcType=VARCHAR}, #{record.diseaseDesc, jdbcType=VARCHAR}, #{record.commonSymptoms, jdbcType=VARCHAR}, #{record.editorId, jdbcType=BIGINT}, #{record.editorName, jdbcType=VARCHAR}
) )
</foreach> </foreach>
</insert> </insert>
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
<trim suffixOverrides=","> <trim suffixOverrides=",">
disease_name = #{et.diseaseName, jdbcType=VARCHAR}, disease_name = #{et.diseaseName, jdbcType=VARCHAR},
disease_desc = #{et.diseaseDesc, jdbcType=VARCHAR}, disease_desc = #{et.diseaseDesc, jdbcType=VARCHAR},
common_symptoms = #{et.commonSymptoms, jdbcType=VARCHAR},
editor_id = #{et.editorId, jdbcType=BIGINT}, editor_id = #{et.editorId, jdbcType=BIGINT},
editor_name = #{et.editorName, jdbcType=VARCHAR}, editor_name = #{et.editorName, jdbcType=VARCHAR},
</trim> </trim>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论