Commit a2f600cc by Suvalue

疾病实体添加

parent 2de213e9
...@@ -20,14 +20,21 @@ public class SerDiseaseController { ...@@ -20,14 +20,21 @@ public class SerDiseaseController {
@GetMapping("disease/level") @GetMapping("disease/level")
@Token @Token
@ApiOperation("根据等级查询疾病信息") @ApiOperation("根据等级查询疾病信息")
public Object getDiseaseByLevel(@RequestBody Disease disease) throws InterruptedException { public Object getDiseaseByLevel(@RequestBody Disease.DiseaseByLevel disease) throws InterruptedException {
return null; return null;
} }
@GetMapping("disease/level") @GetMapping("disease/name")
@Token @Token
@ApiOperation("根据疾病名称查询疾病信息") @ApiOperation("根据疾病名称查询疾病信息")
public Object getDiseaseByName(@RequestBody Disease disease) throws InterruptedException { public Object getDiseaseByMdcName(@RequestBody Disease.DiseaseByName disease) throws InterruptedException {
return null;
}
@GetMapping("disease/level/info")
@Token
@ApiOperation("查询特定等级下所有数据以及子数据")
public Object getDiseaseByLevelSon(@RequestBody Disease.DiseaseByLevelSon disease) throws InterruptedException {
return null; return null;
} }
......
...@@ -6,6 +6,10 @@ import java.math.BigDecimal; ...@@ -6,6 +6,10 @@ import java.math.BigDecimal;
public class Disease { public class Disease {
/**
* 等级查询疾病实体
*/
public class DiseaseByLevel{ public class DiseaseByLevel{
@ApiModelProperty(value = "等级",required = true) @ApiModelProperty(value = "等级",required = true)
private BigDecimal level; private BigDecimal level;
...@@ -38,6 +42,61 @@ public class Disease { ...@@ -38,6 +42,61 @@ public class Disease {
this.mdcCode = mdcCode; this.mdcCode = mdcCode;
} }
} }
/**
* 名称查询疾病实体
*/
public class DiseaseByName{
@ApiModelProperty(value = "时间",required = true)
private BigDecimal date;
@ApiModelProperty("疾病名称")
private String mdcName;
public BigDecimal getDate() {
return date;
}
public void setDate(BigDecimal date) {
this.date = date;
}
public String getMdcName() {
return mdcName;
}
public void setMdcName(String mdcName) {
this.mdcName = mdcName;
}
}
/**
* 特定等级下所有数据以及子数据实体
*/
public class DiseaseByLevelSon{
@ApiModelProperty(value = "等级",required = true)
private BigDecimal level;
@ApiModelProperty(value = "时间",required = true)
private BigDecimal date;
public BigDecimal getDate() {
return date;
}
public void setDate(BigDecimal date) {
this.date = date;
}
public BigDecimal getLevel() {
return level;
}
public void setLevel(BigDecimal level) {
this.level = level;
}
}
} }
<?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.bsoft.api.mapper.SerDiseaseDocRsMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDiseaseDocRs">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="ORG_ID" jdbcType="DECIMAL" property="orgId" />
<result column="DOC_CODE" jdbcType="VARCHAR" property="docCode" />
<result column="DOC_NAME" jdbcType="VARCHAR" property="docName" />
<result column="MDC_CODE" jdbcType="VARCHAR" property="mdcCode" />
<result column="DATE" jdbcType="DECIMAL" property="date" />
<result column="DEPT_CODE" jdbcType="VARCHAR" property="deptCode" />
<result column="DEPT_NAME" jdbcType="VARCHAR" property="deptName" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from LL.SER_DISEASE_DOC_RS
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDiseaseDocRs">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DISEASE_DOC_RS_ID.nextval from dual
</selectKey>
insert into LL.SER_DISEASE_DOC_RS (ORG_ID, DOC_CODE, DOC_NAME,
MDC_CODE, DATE, DEPT_CODE,
DEPT_NAME)
values (#{orgId,jdbcType=DECIMAL}, #{docCode,jdbcType=VARCHAR}, #{docName,jdbcType=VARCHAR},
#{mdcCode,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL}, #{deptCode,jdbcType=VARCHAR},
#{deptName,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDiseaseDocRs">
update LL.SER_DISEASE_DOC_RS
set ORG_ID = #{orgId,jdbcType=DECIMAL},
DOC_CODE = #{docCode,jdbcType=VARCHAR},
DOC_NAME = #{docName,jdbcType=VARCHAR},
MDC_CODE = #{mdcCode,jdbcType=VARCHAR},
DATE = #{date,jdbcType=DECIMAL},
DEPT_CODE = #{deptCode,jdbcType=VARCHAR},
DEPT_NAME = #{deptName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, DATE, DEPT_CODE, DEPT_NAME
from LL.SER_DISEASE_DOC_RS
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, ORG_ID, DOC_CODE, DOC_NAME, MDC_CODE, DATE, DEPT_CODE, DEPT_NAME
from LL.SER_DISEASE_DOC_RS
</select>
</mapper>
\ No newline at end of file
<?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.bsoft.api.mapper.SerDiseaseMapper">
<resultMap id="BaseResultMap" type="com.bsoft.api.model.SerDisease">
<id column="ID" jdbcType="DECIMAL" property="id" />
<result column="CREATE_DATE" jdbcType="TIMESTAMP" property="createDate" />
<result column="CREATE_USERID" jdbcType="DECIMAL" property="createUserid" />
<result column="STATE" jdbcType="DECIMAL" property="state" />
<result column="MDC_CODE" jdbcType="VARCHAR" property="mdcCode" />
<result column="MDC_NAME" jdbcType="VARCHAR" property="mdcName" />
<result column="DATE" jdbcType="DECIMAL" property="date" />
<result column="MDC_NUM" jdbcType="DECIMAL" property="mdcNum" />
<result column="PARENT_ID" jdbcType="DECIMAL" property="parentId" />
<result column="LEVEL" jdbcType="DECIMAL" property="level" />
<result column="ORG_ID" jdbcType="DECIMAL" property="orgId" />
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName" />
</resultMap>
<delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
delete from LL.SER_DISEASE
where ID = #{id,jdbcType=DECIMAL}
</delete>
<insert id="insert" parameterType="com.bsoft.api.model.SerDisease">
<selectKey keyProperty="id" order="AFTER" resultType="java.math.BigDecimal">
select SEQ_SER_DISEASE_ID.nextval from dual
</selectKey>
insert into LL.SER_DISEASE (CREATE_DATE, CREATE_USERID, STATE,
MDC_CODE, MDC_NAME, DATE,
MDC_NUM, PARENT_ID, LEVEL,
ORG_ID, ORG_NAME)
values (#{createDate,jdbcType=TIMESTAMP}, #{createUserid,jdbcType=DECIMAL}, #{state,jdbcType=DECIMAL},
#{mdcCode,jdbcType=VARCHAR}, #{mdcName,jdbcType=VARCHAR}, #{date,jdbcType=DECIMAL},
#{mdcNum,jdbcType=DECIMAL}, #{parentId,jdbcType=DECIMAL}, #{level,jdbcType=DECIMAL},
#{orgId,jdbcType=DECIMAL}, #{orgName,jdbcType=VARCHAR})
</insert>
<update id="updateByPrimaryKey" parameterType="com.bsoft.api.model.SerDisease">
update LL.SER_DISEASE
set CREATE_DATE = #{createDate,jdbcType=TIMESTAMP},
CREATE_USERID = #{createUserid,jdbcType=DECIMAL},
STATE = #{state,jdbcType=DECIMAL},
MDC_CODE = #{mdcCode,jdbcType=VARCHAR},
MDC_NAME = #{mdcName,jdbcType=VARCHAR},
DATE = #{date,jdbcType=DECIMAL},
MDC_NUM = #{mdcNum,jdbcType=DECIMAL},
PARENT_ID = #{parentId,jdbcType=DECIMAL},
LEVEL = #{level,jdbcType=DECIMAL},
ORG_ID = #{orgId,jdbcType=DECIMAL},
ORG_NAME = #{orgName,jdbcType=VARCHAR}
where ID = #{id,jdbcType=DECIMAL}
</update>
<select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, MDC_CODE, MDC_NAME, DATE, MDC_NUM,
PARENT_ID, LEVEL, ORG_ID, ORG_NAME
from LL.SER_DISEASE
where ID = #{id,jdbcType=DECIMAL}
</select>
<select id="selectAll" resultMap="BaseResultMap">
select ID, CREATE_DATE, CREATE_USERID, STATE, MDC_CODE, MDC_NAME, DATE, MDC_NUM,
PARENT_ID, LEVEL, ORG_ID, ORG_NAME
from LL.SER_DISEASE
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment