|
|
@@ -81,7 +81,6 @@
|
|
|
</select>
|
|
|
|
|
|
<select id="summaryPage" resultType="org.sky.scientific.pojo.vo.XmSummary">
|
|
|
-
|
|
|
SELECT
|
|
|
xm.id, xm.xmbh,xm.xmkssj,
|
|
|
COALESCE(get_xm_info(xm.id, 'XMMC', #{ew.yearAndMonth}), xm.XMMC) AS xmmc,
|
|
|
@@ -111,9 +110,38 @@
|
|
|
<if test="ew.xmfzrxm!=null and ew.xmfzrxm!=''">and tech.name like concat('%', #{ew.xmfzrxm},'%')</if>
|
|
|
<if test="ew.xmsqdw!=null and ew.xmsqdw!=''">and CONCAT_WS('/',(SELECT name FROM kd_department d2 WHERE d2.id = d.parent_id), d.`name`) like concat('%',#{ew.xmsqdw},'%')</if>
|
|
|
<if test="ew.status!=null">and COALESCE(get_xm_info(xm.id, 'STATUS', #{ew.yearAndMonth}), xm.STATUS) = #{ew.status}</if>
|
|
|
-
|
|
|
</select>
|
|
|
|
|
|
+<!-- <select id="summaryPage" resultType="org.sky.scientific.pojo.vo.XmSummary">-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- xm.id, xm.xmbh,xm.xmkssj,-->
|
|
|
+<!-- COALESCE(get_xm_info(xm.id, 'XMMC', #{ew.yearAndMonth}), xm.XMMC) AS xmmc,-->
|
|
|
+<!-- COALESCE(get_xm_info(xm.id, 'XMFZR', #{ew.yearAndMonth}), xm.XMFZR) AS xmfzr,-->
|
|
|
+<!-- tech.name as xmfzrxm,-->
|
|
|
+<!-- COALESCE(get_xm_info(xm.id, 'XMSQDWID', #{ew.yearAndMonth}), xm.XMSQDWID) AS xmsqdwid,-->
|
|
|
+<!-- COALESCE(get_xm_info(xm.id, 'XMJSSJ', #{ew.yearAndMonth}), xm.XMJSSJ) AS xmjssj,-->
|
|
|
+<!-- COALESCE(get_xm_info(xm.id, 'XMYSZEMX', #{ew.yearAndMonth}), xm.XMYSZEMX) AS xmyszemx,-->
|
|
|
+<!-- COALESCE(get_xm_info(xm.id, 'STATUS', #{ew.yearAndMonth}), xm.STATUS) AS status,-->
|
|
|
+<!-- LXBG as lxbg,-->
|
|
|
+<!-- (select count(*) from kd_xm_jdxbg jdxbg where jdxbg.xm_id = xm.id and date_format(jdxbg.fill_date,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as jdxbgCount,-->
|
|
|
+<!-- (select count(*) from kd_xm_jtb jtb where jtb.xm_id = xm.id and date_format(jtb.tbsj,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as ysbgCount,-->
|
|
|
+<!-- (select count(*) from kd_cg_zl zl where zl.xm_id = xm.id and zl.ZLLX = '发明专利' and date_format(zl.SHOUQUAN_RQ,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as fmzlCount,-->
|
|
|
+<!-- (select count(*) from kd_cg_zl zl where zl.xm_id = xm.id and zl.ZLLX = '实用新型专利' and date_format(zl.SHOUQUAN_RQ,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as syxxzlCount,-->
|
|
|
+<!-- (select count(*) from kd_cg_rjzzq rjzzq where rjzzq.xm_id = xm.id and date_format(rjzzq.DJPZRQ,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as rzCount,-->
|
|
|
+<!-- (select count(*) from kd_cg_jsbz jsbz where jsbz.xm_id = xm.id and date_format(jsbz.SSRQ,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as bzCount,-->
|
|
|
+<!-- (select count(*) from kd_cg_kylw kylw where kylw.xm_id = xm.id and date_format(kylw.FBRQ,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as lwCount,-->
|
|
|
+<!-- (select count(*) from kd_cg_qt qt where qt.xm_id = xm.id and date_format(qt.SHOUQUAN_RQ,'%Y%m') between concat(left(#{ew.yearAndMonth},4),'01') and #{ew.yearAndMonth}) as qtCount,-->
|
|
|
+<!-- (select ifnull(sum(WWFYJE), 0) from kd_xm_wwxm ww where ww.XM_ID = xm.id and ww.year_and_month = left(#{ew.yearAndMonth}, 4)) as wwAmount-->
|
|
|
+<!-- FROM kd_xm xm-->
|
|
|
+<!-- LEFT JOIN kd_technician tech ON tech.id = COALESCE(get_xm_info(xm.id, 'XMFZR', #{ew.yearAndMonth}), xm.XMFZR)-->
|
|
|
+<!-- WHERE xm.tenant_id = #{ew.tenantId} and DATE_FORMAT(xm.XMKSSJ, '%Y%m') <![CDATA[<=]]> #{ew.yearAndMonth}-->
|
|
|
+<!-- <if test="ew.xmbh!=null and ew.xmbh!=''">and xm.XMBH like concat('%',#{ew.xmbh},'%')</if>-->
|
|
|
+<!-- <if test="ew.xmmc!=null and ew.xmmc!=''">and COALESCE(get_xm_info(xm.id, 'XMMC', #{ew.yearAndMonth}), xm.XMMC) like concat('%',#{ew.xmmc},'%')</if>-->
|
|
|
+<!-- <if test="ew.xmfzrxm!=null and ew.xmfzrxm!=''">and tech.name like concat('%', #{ew.xmfzrxm},'%')</if>-->
|
|
|
+<!-- <if test="ew.xmsqdw!=null and ew.xmsqdw!=''">and CONCAT_WS('/',(SELECT name FROM kd_department d2 WHERE d2.id = d.parent_id), d.`name`) like concat('%',#{ew.xmsqdw},'%')</if>-->
|
|
|
+<!-- <if test="ew.status!=null">and COALESCE(get_xm_info(xm.id, 'STATUS', #{ew.yearAndMonth}), xm.STATUS) = #{ew.status}</if>-->
|
|
|
+<!-- </select>-->
|
|
|
+
|
|
|
<select id="selectYszb" resultType="org.sky.scientific.pojo.vo.XmYszbVO">
|
|
|
SELECT xm.id as xmId,xm.XMKSSJ,
|
|
|
COALESCE(get_xm_info(xm.id, 'XMMC', null), xm.XMMC) AS xmmc,
|