Commit 82360aa8 by Suvalue

疾病信息修改

parent 445c569b
......@@ -12,7 +12,7 @@ public class DiseaseLevel {
private String mdcNum;
private BigDecimal parentId;
private BigDecimal level;
private BigDecimal orgId;
private String orgId;
private String orgName;
private List<DiseaseLevel> diseaseLevelList;
......@@ -72,11 +72,11 @@ public class DiseaseLevel {
this.level = level;
}
public BigDecimal getOrgId() {
public String getOrgId() {
return orgId;
}
public void setOrgId(BigDecimal orgId) {
public void setOrgId(String orgId) {
this.orgId = orgId;
}
......
#### \u6D4B\u8BD5\u73AF\u5883 ###################################################
spring.datasource.url=jdbc:mysql://192.168.18.176:3306/scml_sy_test1.0?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE&serverTimezone=UTC
spring.datasource.url=jdbc:mysql://192.168.18.176:3306/scml_mzx?useUnicode=true&characterEncoding=utf8&useSSL=false&autoReconnect=true&rewriteBatchedStatements=TRUE&serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=Suvalue2016
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
......
......@@ -24,7 +24,7 @@
<result column="MDC_NUM" jdbcType="VARCHAR" 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_ID" jdbcType="VARCHAR" property="orgId"/>
<result column="ORG_NAME" jdbcType="VARCHAR" property="orgName"/>
</resultMap>
<insert id="insert" parameterType="com.bsoft.api.model.SerDisease">
......@@ -85,13 +85,12 @@
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE
<if test="deptCode!=null">
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2
where TIME=#{date} and ZLS>0
and KSBM=#{deptCode,jdbcType=VARCHAR}
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE
</if>
<if test="deptCode==null">
join (select ZBZBM,SUM(ZLS) as ZLS
......@@ -103,44 +102,28 @@
<if test="level!=null">
and d.`LEVEL` = #{level,jdbcType=DECIMAL}
</if>
<if test="deptCode!=null">
and rs.DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
order by val.ZLS desc
</select>
<select id="selectByLevelNoZBZ" resultMap="DiseaseLevel">
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d,SER_DISEASE_DOC_RS rs
from SER_DISEASE d
where 1 = 1 and STATE=1 and rs.MDC_CODE=d.MDC_CODE
<if test="level!=null">
and d.`LEVEL` = #{level,jdbcType=DECIMAL}
</if>
<if test="deptCode!=null">
and rs.DEPT_CODE = #{deptCode,jdbcType=VARCHAR}
</if>
<if test="deptCode==null">
and EXISTS(select o2.ORG_CODE as DEPT_CODE
from SYS_USER_ORG_RS rs2
join DIC_ORG o2 on o2.id = rs2.ORG_ID and rs2.STATE = 1
where o2.STATE = 1
and rs2.USER_ID = #{userId,jdbcType=DECIMAL}
and o2.ORG_CODE = rs.DEPT_CODE
)
</if>
order by d.MDC_NUM
</select>
<select id="selectByParentId" resultMap="DiseaseLevel">
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE
<if test="deptCode!=null">
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_2_2
where TIME=#{date} and ZLS>0
and KSBM=#{deptCode,jdbcType=VARCHAR}
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE
</if>
<if test="deptCode==null">
join (select ZBZBM,SUM(ZLS) as ZLS
......@@ -152,22 +135,18 @@
<if test="parentId!=null">
and d.PARENT_ID = #{parentId,jdbcType=DECIMAL}
</if>
<if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
order by val.ZLS desc
</select>
<select id="selectByParentIdNoZbz" resultMap="DiseaseLevel">
select DISTINCT d.ID, d.CREATE_DATE, d.CREATE_USERID, d.`STATE`, d.MDC_CODE, d.MDC_NAME, d.`DATE`,d.MDC_NUM,
d.PARENT_ID, d.`LEVEL`, d.ORG_ID, d.ORG_NAME
from SER_DISEASE d
join SER_DISEASE_DOC_RS rs on rs.MDC_CODE=d.MDC_CODE
<if test="deptCode!=null">
join (select ZBZBM,KSBM,SUM(ZLS) as ZLS
from val_block_values_1_5_2
where TIME=#{date}
and KSBM=#{deptCode,jdbcType=VARCHAR}
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE and val.KSBM=rs.DEPT_CODE
group by ZBZBM,KSBM) val on val.ZBZBM = d.MDC_CODE
</if>
<if test="deptCode==null">
join (select ZBZBM,SUM(ZLS) as ZLS
......@@ -179,9 +158,6 @@
<if test="parentId!=null">
and d.PARENT_ID = #{parentId,jdbcType=DECIMAL}
</if>
<if test="deptCode!=null">
and rs.DEPT_CODE=#{deptCode,jdbcType=VARCHAR}
</if>
order by val.ZLS desc
</select>
<select id="selectParentById" resultMap="DiseaseLevel">
......
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