Commit 66b8b4f3 by Suvalue

病组接口速度优化

parent 75400fdb
#### \u6D4B\u8BD5\u73AF\u5883 ###################################################
spring.datasource.url=jdbc:mysql://192.168.18.176:3306/scml_zp_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_sy_ys?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
......
......@@ -176,11 +176,8 @@
<select id="selectParentByIdNoZbz" resultMap="DiseaseLevel">
select d.*,val.ZLS
from SER_DISEASE d
join (select ZBZBM,SUM(ZLS) as ZLS
from val_block_values_1_3_2
where `TIME`=#{date}
group by ZBZBM) val on val.ZBZBM = d.MDC_CODE
where 1 = 1 and d.STATE=1
join val_block_values_1_3_1 val on val.ZBZBM = d.MDC_CODE
where 1 = 1 and d.STATE=1 and val.`TIME`=#{date}
<if test="diseaseId!=null">
and d.id=(select PARENT_ID from SER_DISEASE where id = #{diseaseId,jdbcType=DECIMAL} )
</if>
......@@ -189,11 +186,9 @@
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,d.GROUP_TYPE,val.ZLS
from SER_DISEASE d
left join (select ZBZBM,SUM(ZLS) as ZLS
from val_block_values_1_3_2
where `TIME`=#{date}
group by ZBZBM) val on val.ZBZBM = d.MDC_CODE
where 1 = 1 and STATE=1 and STATE=1
left join val_block_values_1_3_1 val on val.ZBZBM = d.MDC_CODE
where 1 = 1 and d.STATE=1
and val.time=#{date}
<if test="diseaseId!=null">
and d.PARENT_ID=#{diseaseId,jdbcType=DECIMAL}
</if>
......
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