guoshilong
2024-01-03 7a097bbdf5e87d1068a3b4831ccf0c23ea46cc5e
skjcmanager/skjcmanager-service/skjcmanager-sm/src/main/java/cn/gistack/sm/resDataCheck/mapper/QualityManageMapper.xml
@@ -5,6 +5,7 @@
    <select id="selectCustomizePage" resultType="cn.gistack.sm.resDataCheck.vo.QualityManageVO">
        SELECT
               arb."guid" AS resGuid,
               arb."name" AS resName,
               arb."res_loc" AS resLoc,
                CASE aab."ad_name"
@@ -42,15 +43,15 @@
            AND rule.name LIKE CONCAT('%',#{vo.ruleName},'%')
        </if>
        <if test="vo.startTime !=null and vo.startTime !=''">
            AND DATE_FORMAT(qm.create_time,'%Y-%m-%d') &gt;= #{vo.startTime}
            AND qm.create_time &gt;= #{vo.startTime}
        </if>
        <if test="vo.endTime !=null and vo.endTime !=''">
            AND DATE_FORMAT(qm.create_time,'%Y-%m-%d') &lt;= #{vo.endTime}
            AND qm.create_time &lt;= #{vo.endTime}
        </if>
        <if test="vo.adCode != null and vo.adCode != '' ">
            and (aab."ad_code" = #{vo.adCode} or aa."ad_code" = #{vo.adCode} or ab."ad_code" = #{vo.adCode} or ac."ad_code" = #{vo.adCode})
        </if>
        order by qm.create_time desc
    </select>
    <select id="getDetail" resultType="cn.gistack.sm.resDataCheck.vo.QualityManageVO">
        SELECT
@@ -70,8 +71,8 @@
    </select>
    <insert id="addQualityManage">
        insert into SM_RES_DATA_QUALITY_MANAGE (res_id,rule_id,create_time,update_time)
        select a."guid" as res_id,${ruleId} AS rule_id,NOW() AS create_time,NOW() AS update_time
        insert into SM_RES_DATA_QUALITY_MANAGE (res_id,rule_id,create_time,update_time,val)
        select a."guid" as res_id,${ruleId} AS rule_id,NOW() AS create_time,NOW() AS update_time, ${varStr}
        from SJZT_MD."att_res_base" a
                 left join SJZT_MD."att_res_danger_manage_special" b on (a."guid" = b."res_guid")
                 left join SJZT_MD."att_res_stag_char" c on (a."guid" = c."res_guid")