| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462 |
- <?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="cn.com.goldenwater.dcproj.dao.BisInspGrwDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspGrw" id="bisInspGrwResultMap">
- <result property="id" column="ID"/>
- <result property="repeatability" column="REPEATABILITY"/>
- <result property="upTm" column="UPTM"/>
- <result property="toolProfScore" column="TOOL_PROF_SCORE"/>
- <result property="flagTool" column="FLAG_TOOL"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="monitorRate" column="MONITOR_RATE"/>
- <result property="toolTsoScore" column="TOOL_TSO_SCORE"/>
- <result property="checkComment" column="CHECK_COMMENT"/>
- <result property="flagSafeguard" column="FLAG_SAFEGUARD"/>
- <result property="signScore" column="SIGN_SCORE"/>
- <result property="trainScore" column="TRAIN_SCORE"/>
- <result property="intm" column="INTM"/>
- <result property="markScore" column="MARK_SCORE"/>
- <result property="repeatabilityScore" column="REPEATABILITY_SCORE"/>
- <result property="allScore" column="ALL_SCORE"/>
- <result property="safeguardScore" column="SAFEGUARD_SCORE"/>
- <result property="flagExact" column="FLAG_EXACT"/>
- <result property="toolScore" column="TOOL_SCORE"/>
- <result property="exactScore" column="EXACT_SCORE"/>
- <result property="inspState" column="INSP_STATE"/>
- <result property="handScore" column="HAND_SCORE"/>
- <result property="stnm" column="STNM"/>
- <result property="flagValid" column="FLAG_VALID"/>
- <result property="percentage" column="PERCENTAGE"/>
- <result property="sttp" column="STTP"/>
- <result property="stcd" column="STCD"/>
- <result property="percentageStatus" column="PERCENTAGE_STATUS"/>
- <result property="checkPid" column="CHECK_PID"/>
- <result property="percentageScore" column="PERCENTAGE_SCORE"/>
- <result property="wellProtScore" column="WELL_PROT_SCORE"/>
- <result property="flagMark" column="FLAG_MARK"/>
- <result property="flagSign" column="FLAG_SIGN"/>
- <result property="maintainStatus" column="MAINTAIN_STATUS"/>
- <result property="checkPname" column="CHECK_PNAME"/>
- <result property="flagTrain" column="FLAG_TRAIN"/>
- <result property="stlc" column="STLC"/>
- <result property="orgId" column="ORG_ID"/>
- </resultMap>
- <sql id="table_columns">
- ID ,
- REPEATABILITY ,
- DATE_FORMAT(UPTM,'%Y-%m-%d %T') UPTM,
- TOOL_PROF_SCORE ,
- FLAG_TOOL ,
- OBJ_ID ,
- MONITOR_RATE ,
- TOOL_TSO_SCORE ,
- CHECK_COMMENT ,
- FLAG_SAFEGUARD ,
- SIGN_SCORE ,
- TRAIN_SCORE ,
- DATE_FORMAT(INTM,'%Y-%m-%d %T') INTM,
- MARK_SCORE ,
- REPEATABILITY_SCORE ,
- ALL_SCORE ,
- SAFEGUARD_SCORE ,
- FLAG_EXACT ,
- TOOL_SCORE ,
- EXACT_SCORE ,
- INSP_STATE ,
- HAND_SCORE ,
- STNM ,
- FLAG_VALID ,
- PERCENTAGE ,
- STTP ,
- STCD ,
- PERCENTAGE_STATUS ,
- CHECK_PID ,
- PERCENTAGE_SCORE ,
- WELL_PROT_SCORE ,
- FLAG_MARK ,
- FLAG_SIGN ,
- MAINTAIN_STATUS ,
- CHECK_PNAME ,
- FLAG_TRAIN ,
- STLC ,ORG_ID
- </sql>
- <sql id="table_columns2">
- ID ,
- REPEATABILITY ,
- UPTM ,
- TOOL_PROF_SCORE ,
- FLAG_TOOL ,
- OBJ_ID ,
- MONITOR_RATE ,
- TOOL_TSO_SCORE ,
- CHECK_COMMENT ,
- FLAG_SAFEGUARD ,
- SIGN_SCORE ,
- TRAIN_SCORE ,
- INTM ,
- MARK_SCORE ,
- REPEATABILITY_SCORE ,
- ALL_SCORE ,
- SAFEGUARD_SCORE ,
- FLAG_EXACT ,
- TOOL_SCORE ,
- EXACT_SCORE ,
- INSP_STATE ,
- HAND_SCORE ,
- STNM ,
- FLAG_VALID ,
- PERCENTAGE ,
- STTP ,
- STCD ,
- PERCENTAGE_STATUS ,
- CHECK_PID ,
- PERCENTAGE_SCORE ,
- WELL_PROT_SCORE ,
- FLAG_MARK ,
- FLAG_SIGN ,
- MAINTAIN_STATUS ,
- CHECK_PNAME ,
- FLAG_TRAIN ,
- STLC ,ORG_ID
- </sql>
- <sql id="entity_properties">
- #{id},
- #{repeatability},
- DATE_FORMAT(#{upTm},'%Y-%m-%d %T') ,
- #{toolProfScore},
- #{flagTool},
- #{objId},
- #{monitorRate},
- #{toolTsoScore},
- #{checkComment},
- #{flagSafeguard},
- #{signScore},
- #{trainScore},
- DATE_FORMAT(#{intm},'%Y-%m-%d %T') ,
- #{markScore},
- #{repeatabilityScore},
- #{allScore},
- #{safeguardScore},
- #{flagExact},
- #{toolScore},
- #{exactScore},
- #{inspState},
- #{handScore},
- #{stnm},
- #{flagValid},
- #{percentage},
- #{sttp},
- #{stcd},
- #{percentageStatus},
- #{checkPid},
- #{percentageScore},
- #{wellProtScore},
- #{flagMark},
- #{flagSign},
- #{maintainStatus},
- #{checkPname},
- #{flagTrain},
- #{stlc},#{orgId}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="id != null and id != ''">and ID = #{id}</if>
- <if test="orgId != null and orgId != ''">and ORG_ID = #{orgId}</if>
- <if test="repeatability != null">and REPEATABILITY = #{repeatability}</if>
- <if test="uptm != null and uptm != ''">and UPTM = STR_TO_DATE(#{uptm},'%Y-%m-%d %T')</if>
- <if test="toolProfScore != null">and TOOL_PROF_SCORE = #{toolProfScore}</if>
- <if test="flagTool != null and flagTool != ''">and FLAG_TOOL = #{flagTool}</if>
- <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
- <if test="monitorRate != null and monitorRate != ''">and MONITOR_RATE = #{monitorRate}</if>
- <if test="toolTsoScore != null">and TOOL_TSO_SCORE = #{toolTsoScore}</if>
- <if test="checkComment != null and checkComment != ''">and CHECK_COMMENT = #{checkComment}</if>
- <if test="flagSafeguard != null and flagSafeguard != ''">and FLAG_SAFEGUARD = #{flagSafeguard}</if>
- <if test="signScore != null">and SIGN_SCORE = #{signScore}</if>
- <if test="trainScore != null">and TRAIN_SCORE = #{trainScore}</if>
- <if test="intm != null and intm != ''">and INTM = STR_TO_DATE(#{intm},'%Y-%m-%d %T')</if>
- <if test="markScore != null">and MARK_SCORE = #{markScore}</if>
- <if test="repeatabilityScore != null">and REPEATABILITY_SCORE = #{repeatabilityScore}</if>
- <if test="allScore != null">and ALL_SCORE = #{allScore}</if>
- <if test="safeguardScore != null">and SAFEGUARD_SCORE = #{safeguardScore}</if>
- <if test="flagExact != null and flagExact != ''">and FLAG_EXACT = #{flagExact}</if>
- <if test="toolScore != null">and TOOL_SCORE = #{toolScore}</if>
- <if test="exactScore != null">and EXACT_SCORE = #{exactScore}</if>
- <if test="inspState != null and inspState != ''">and INSP_STATE = #{inspState}</if>
- <if test="handScore != null">and HAND_SCORE = #{handScore}</if>
- <if test="stnm != null and stnm != ''">and STNM = #{stnm}</if>
- <if test="flagValid != null and flagValid != ''">and FLAG_VALID = #{flagValid}</if>
- <if test="percentage != null">and PERCENTAGE = #{percentage}</if>
- <if test="sttp != null and sttp != ''">and STTP = #{sttp}</if>
- <if test="stcd != null and stcd != ''">and STCD = #{stcd}</if>
- <if test="percentageStatus != null and percentageStatus != ''">and PERCENTAGE_STATUS = #{percentageStatus}</if>
- <if test="checkPid != null and checkPid != ''">and CHECK_PID = #{checkPid}</if>
- <if test="percentageScore != null">and PERCENTAGE_SCORE = #{percentageScore}</if>
- <if test="wellProtScore != null">and WELL_PROT_SCORE = #{wellProtScore}</if>
- <if test="flagMark != null and flagMark != ''">and FLAG_MARK = #{flagMark}</if>
- <if test="flagSign != null and flagSign != ''">and FLAG_SIGN = #{flagSign}</if>
- <if test="maintainStatus != null and maintainStatus != ''">and MAINTAIN_STATUS = #{maintainStatus}</if>
- <if test="checkPname != null and checkPname != ''">and CHECK_PNAME LIKE CONCAT('%', #{checkPname}, '%')</if>
- <if test="flagTrain != null and flagTrain != ''">and FLAG_TRAIN = #{flagTrain}</if>
- <if test="stlc != null and stlc != ''">and STLC = #{stlc}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspGrwResultMap" parameterType="String" >
- select <include refid="table_columns" /> from BIS_INSP_GRW where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspGrwResultMap">
- select <include refid="table_columns" /> from BIS_INSP_GRW <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspGrwResultMap">
- select <include refid="table_columns" /> from BIS_INSP_GRW
- </select>
- <select id="findList" resultMap="bisInspGrwResultMap">
- select <include refid="table_columns" /> from BIS_INSP_GRW <include refid="page_where" /> ORDER BY ID
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_GRW <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrw">
- insert into BIS_INSP_GRW( <include refid="table_columns2" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_GRW where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrw">
- delete from BIS_INSP_GRW <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_GRW set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrw">
- update BIS_INSP_GRW
- <trim prefix="set" suffixOverrides=",">
- <if test="id != null and id != ''"> ID = #{id},</if>
- <if test="repeatability != null"> REPEATABILITY = #{repeatability},</if>
- <if test="uptm != null and uptm != ''"> UPTM = STR_TO_DATE(#{uptm},'%Y-%m-%d %T'),</if>
- <if test="toolProfScore != null"> TOOL_PROF_SCORE = #{toolProfScore},</if>
- <if test="flagTool != null and flagTool != ''"> FLAG_TOOL = #{flagTool},</if>
- <if test="objId != null and objId != ''"> OBJ_ID = #{objId},</if>
- <if test="monitorRate != null and monitorRate != ''"> MONITOR_RATE = #{monitorRate},</if>
- <if test="toolTsoScore != null"> TOOL_TSO_SCORE = #{toolTsoScore},</if>
- <if test="checkComment != null and checkComment != ''"> CHECK_COMMENT = #{checkComment},</if>
- <if test="flagSafeguard != null and flagSafeguard != ''"> FLAG_SAFEGUARD = #{flagSafeguard},</if>
- <if test="signScore != null"> SIGN_SCORE = #{signScore},</if>
- <if test="trainScore != null"> TRAIN_SCORE = #{trainScore},</if>
- <if test="intm != null and intm != ''"> INTM = STR_TO_DATE(#{intm},'%Y-%m-%d %T'),</if>
- <if test="markScore != null"> MARK_SCORE = #{markScore},</if>
- <if test="repeatabilityScore != null"> REPEATABILITY_SCORE = #{repeatabilityScore},</if>
- <if test="allScore != null"> ALL_SCORE = #{allScore},</if>
- <if test="safeguardScore != null"> SAFEGUARD_SCORE = #{safeguardScore},</if>
- <if test="flagExact != null and flagExact != ''"> FLAG_EXACT = #{flagExact},</if>
- <if test="toolScore != null"> TOOL_SCORE = #{toolScore},</if>
- <if test="exactScore != null"> EXACT_SCORE = #{exactScore},</if>
- <if test="inspState != null and inspState != ''"> INSP_STATE = #{inspState},</if>
- <if test="handScore != null"> HAND_SCORE = #{handScore},</if>
- <if test="stnm != null and stnm != ''"> STNM = #{stnm},</if>
- <if test="flagValid != null and flagValid != ''"> FLAG_VALID = #{flagValid},</if>
- <if test="percentage != null"> PERCENTAGE = #{percentage},</if>
- <if test="sttp != null and sttp != ''"> STTP = #{sttp},</if>
- <if test="stcd != null and stcd != ''"> STCD = #{stcd},</if>
- <if test="percentageStatus != null and percentageStatus != ''"> PERCENTAGE_STATUS = #{percentageStatus},</if>
- <if test="checkPid != null and checkPid != ''"> CHECK_PID = #{checkPid},</if>
- <if test="percentageScore != null"> PERCENTAGE_SCORE = #{percentageScore},</if>
- <if test="wellProtScore != null"> WELL_PROT_SCORE = #{wellProtScore},</if>
- <if test="flagMark != null and flagMark != ''"> FLAG_MARK = #{flagMark},</if>
- <if test="flagSign != null and flagSign != ''"> FLAG_SIGN = #{flagSign},</if>
- <if test="maintainStatus != null and maintainStatus != ''"> MAINTAIN_STATUS = #{maintainStatus},</if>
- <if test="checkPname != null and checkPname != ''"> CHECK_PNAME = #{checkPname},</if>
- <if test="flagTrain != null and flagTrain != ''"> FLAG_TRAIN = #{flagTrain},</if>
- <if test="stlc != null and stlc != ''"> STLC = #{stlc},</if>
- <if test="orgId != null and orgId != ''">ORG_ID = #{orgId},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateByStcd" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrw">
- update BIS_INSP_GRW
- <trim prefix="set" suffixOverrides=",">
- <if test="id != null and id != ''"> ID = #{id},</if>
- <if test="repeatability != null"> REPEATABILITY = #{repeatability},</if>
- <if test="uptm != null and uptm != ''"> UPTM = STR_TO_DATE(#{uptm},'%Y-%m-%d %T'),</if>
- <if test="toolProfScore != null"> TOOL_PROF_SCORE = #{toolProfScore},</if>
- <if test="flagTool != null and flagTool != ''"> FLAG_TOOL = #{flagTool},</if>
- <if test="objId != null and objId != ''"> OBJ_ID = #{objId},</if>
- <if test="monitorRate != null and monitorRate != ''"> MONITOR_RATE = #{monitorRate},</if>
- <if test="toolTsoScore != null"> TOOL_TSO_SCORE = #{toolTsoScore},</if>
- <if test="checkComment != null and checkComment != ''"> CHECK_COMMENT = #{checkComment},</if>
- <if test="flagSafeguard != null and flagSafeguard != ''"> FLAG_SAFEGUARD = #{flagSafeguard},</if>
- <if test="signScore != null"> SIGN_SCORE = #{signScore},</if>
- <if test="trainScore != null"> TRAIN_SCORE = #{trainScore},</if>
- <if test="intm != null and intm != ''"> INTM = STR_TO_DATE(#{intm},'%Y-%m-%d %T'),</if>
- <if test="markScore != null"> MARK_SCORE = #{markScore},</if>
- <if test="repeatabilityScore != null"> REPEATABILITY_SCORE = #{repeatabilityScore},</if>
- <if test="allScore != null"> ALL_SCORE = #{allScore},</if>
- <if test="safeguardScore != null"> SAFEGUARD_SCORE = #{safeguardScore},</if>
- <if test="flagExact != null and flagExact != ''"> FLAG_EXACT = #{flagExact},</if>
- <if test="toolScore != null"> TOOL_SCORE = #{toolScore},</if>
- <if test="exactScore != null"> EXACT_SCORE = #{exactScore},</if>
- <if test="inspState != null and inspState != ''"> INSP_STATE = #{inspState},</if>
- <if test="handScore != null"> HAND_SCORE = #{handScore},</if>
- <if test="stnm != null and stnm != ''"> STNM = #{stnm},</if>
- <if test="flagValid != null and flagValid != ''"> FLAG_VALID = #{flagValid},</if>
- <if test="percentage != null"> PERCENTAGE = #{percentage},</if>
- <if test="sttp != null and sttp != ''"> STTP = #{sttp},</if>
- <if test="percentageStatus != null and percentageStatus != ''"> PERCENTAGE_STATUS = #{percentageStatus},</if>
- <if test="checkPid != null and checkPid != ''"> CHECK_PID = #{checkPid},</if>
- <if test="percentageScore != null"> PERCENTAGE_SCORE = #{percentageScore},</if>
- <if test="wellProtScore != null"> WELL_PROT_SCORE = #{wellProtScore},</if>
- <if test="flagMark != null and flagMark != ''"> FLAG_MARK = #{flagMark},</if>
- <if test="flagSign != null and flagSign != ''"> FLAG_SIGN = #{flagSign},</if>
- <if test="maintainStatus != null and maintainStatus != ''"> MAINTAIN_STATUS = #{maintainStatus},</if>
- <if test="checkPname != null and checkPname != ''"> CHECK_PNAME = #{checkPname},</if>
- <if test="flagTrain != null and flagTrain != ''"> FLAG_TRAIN = #{flagTrain},</if>
- <if test="stlc != null and stlc != ''"> STLC = #{stlc},</if>
- <if test="orgId != null and orgId != ''"> ORG_ID = #{orgId},</if>
- </trim>
- <where>stcd = #{stcd}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspGrw">
- update BIS_INSP_GRW
- <trim prefix="set" suffixOverrides=",">
- <if test="id != null and id != ''"> ID = #{id},</if>
- <if test="repeatability != null and repeatability != ''"> REPEATABILITY = #{repeatability},</if>
- <if test="uptm != null and uptm != ''"> UPTM = STR_TO_DATE(#{uptm},'%Y-%m-%d %T'),</if>
- <if test="toolProfScore != null and toolProfScore != ''"> TOOL_PROF_SCORE = #{toolProfScore},</if>
- <if test="flagTool != null and flagTool != ''"> FLAG_TOOL = #{flagTool},</if>
- <if test="objId != null and objId != ''"> OBJ_ID = #{objId},</if>
- <if test="monitorRate != null and monitorRate != ''"> MONITOR_RATE = #{monitorRate},</if>
- <if test="toolTsoScore != null and toolTsoScore != ''"> TOOL_TSO_SCORE = #{toolTsoScore},</if>
- <if test="checkComment != null and checkComment != ''"> CHECK_COMMENT = #{checkComment},</if>
- <if test="flagSafeguard != null and flagSafeguard != ''"> FLAG_SAFEGUARD = #{flagSafeguard},</if>
- <if test="signScore != null and signScore != ''"> SIGN_SCORE = #{signScore},</if>
- <if test="trainScore != null and trainScore != ''"> TRAIN_SCORE = #{trainScore},</if>
- <if test="markScore != null and markScore != ''"> MARK_SCORE = #{markScore},</if>
- <if test="repeatabilityScore != null and repeatabilityScore != ''"> REPEATABILITY_SCORE = #{repeatabilityScore},</if>
- <if test="allScore != null and allScore != ''"> ALL_SCORE = #{allScore},</if>
- <if test="safeguardScore != null and safeguardScore != ''"> SAFEGUARD_SCORE = #{safeguardScore},</if>
- <if test="flagExact != null and flagExact != ''"> FLAG_EXACT = #{flagExact},</if>
- <if test="toolScore != null and toolScore != ''"> TOOL_SCORE = #{toolScore},</if>
- <if test="exactScore != null and exactScore != ''"> EXACT_SCORE = #{exactScore},</if>
- <if test="inspState != null and inspState != ''"> INSP_STATE = #{inspState},</if>
- <if test="handScore != null and handScore != ''"> HAND_SCORE = #{handScore},</if>
- <if test="stnm != null and stnm != ''"> STNM = #{stnm},</if>
- <if test="flagValid != null and flagValid != ''"> FLAG_VALID = #{flagValid},</if>
- <if test="percentage != null and percentage != ''"> PERCENTAGE = #{percentage},</if>
- <if test="sttp != null and sttp != ''"> STTP = #{sttp},</if>
- <if test="stcd != null and stcd != ''"> STCD = #{stcd},</if>
- <if test="percentageStatus != null and percentageStatus != ''"> PERCENTAGE_STATUS = #{percentageStatus},</if>
- <if test="checkPid != null and checkPid != ''"> CHECK_PID = #{checkPid},</if>
- <if test="percentageScore != null and percentageScore != ''"> PERCENTAGE_SCORE = #{percentageScore},</if>
- <if test="wellProtScore != null and wellProtScore != ''"> WELL_PROT_SCORE = #{wellProtScore},</if>
- <if test="flagMark != null and flagMark != ''"> FLAG_MARK = #{flagMark},</if>
- <if test="flagSign != null and flagSign != ''"> FLAG_SIGN = #{flagSign},</if>
- <if test="maintainStatus != null and maintainStatus != ''"> MAINTAIN_STATUS = #{maintainStatus},</if>
- <if test="checkPname != null and checkPname != ''"> CHECK_PNAME = #{checkPname},</if>
- <if test="flagTrain != null and flagTrain != ''"> FLAG_TRAIN = #{flagTrain},</if>
- <if test="stlc != null and stlc != ''"> STLC = #{stlc},</if>
- <if test="orgId != null and orgId != ''"> ORG_ID = #{orgId},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <sql id="choseSql">
- <choose>
- <when test="province !=null and province !=''">
- and A.ad_code=#{province}
- </when>
- <otherwise>
- and A.ad_code is null
- </otherwise>
- </choose>
- </sql>
- <sql id="orgIdSql">
- <choose>
- <when test="orgId !=null and orgId !=''">
- and ORG_ID=#{orgId}
- </when>
- <otherwise>
- and ORG_ID is null
- </otherwise>
- </choose>
- </sql>
- <!-- 其他自定义SQL -->
- <select id="findPageByType" parameterType="cn.com.goldenwater.dcproj.param.TypeParam" resultType="cn.com.goldenwater.dcproj.dto.BisInspGrwListDto">
- select * from (select A.ID NODEID,A.CODE,A.Nm,A.PTYPE,A.OBJ_ID,A.IS_SET_OBJ,
- CASE WHEN b.INSP_STATE IS NULL THEN '0' ELSE b.INSP_STATE END AS INSP_STATE,
- CASE WHEN b.INSP_STATE IS NULL THEN '0' ELSE b.INSP_STATE END AS WTDST_STATE,
- B.ID,B.STTP,C.LTTD,C.LGTD,C.LGTD_PC,C.LTTD_PC,B.STCD,
- B.STNM,B.STLC,B.INTM
- FROM BIS_INSP_ALL_OBJ A
- LEFT JOIN BIS_INSP_GRW B
- ON A.OBJ_ID = B.OBJ_ID
- LEFT JOIN ATT_GRW_BASE C ON B.STCD=C.STCD
- where 1=1
- <include refid="choseSql"/>
- and
- A.id in (${inIdsSql})
- ) a
- where ptype=#{pType}
- <if test="plnaId !=null and plnaId !=''">
- and a.NODEID like '${plnaId}%'
- </if>
- <if test="state !=null and state !=''">
- and INSP_STATE =#{state}
- </if>
- <if test="rsName !=null and rsName !=''">
- and a.nm like '%${rsName}%'
- </if>
- order by WTDST_STATE asc
- <if test="orderBy != null and orderBy != ''">
- ,CONVERT( nm USING gbk ) COLLATE gbk_chinese_ci ASC
- </if>
- </select>
- <select id="queryDetailListWithPblm" parameterType="cn.com.goldenwater.dcproj.param.GetPageByNodeIdParam" resultType="cn.com.goldenwater.dcproj.dto.BisInspGrwDetailDto">
- SELECT E.*,B.LTTD,B.LGTD,B.LGTD_PC,B.LTTD_PC,B.ADCD,B.ADNM,B.GOGUNT,B.RVNM, DATE_FORMAT(B.ESSTYM,'%Y-%m-%d') ESSTYM,
- B.ONUN,B.MNUN
- FROM BIS_INSP_GRW E LEFT JOIN ATT_GRW_BASE B ON E.STCD=B.STCD
- LEFT JOIN bis_insp_all_obj A ON E.OBJ_ID=A.OBJ_ID left join bis_insp_all rt on A.id=rt.id where 1=1
- <if test="nodeId !=null and nodeId !=''">
- and A.id like CONCAT(#{nodeId}, '%')
- </if>
- <if test="tabType =='2'.toString()">
- and rt.entm <STR_TO_DATE(#{nowTime},'%Y-%m-%d')
- </if>
- <if test="tabType =='1'.toString()">
- and rt.entm >=STR_TO_DATE(#{nowTime},'%Y-%m-%d')
- </if>
- <include refid="choseSql"/>
- <if test="stnm != null and stnm != ''">and E.STNM like CONCAT(#{stnm}, '%')</if>
- <if test="inspState != null and inspState != ''">and E.INSP_STATE = #{inspState}</if>
- ORDER BY E.INSP_STATE ASC
- </select>
- <select id="getGrwByIdNm" resultType="cn.com.goldenwater.dcproj.model.BisInspBase">
- select b.id RGSTR_ID, b.obj_id obj_id,b.stnm nm from bis_insp_all_obj a join BIS_INSP_GRW b on a.obj_id=b.obj_id where id=#{groupId} and a.nm like '%${nm}%'
- </select>
- </mapper>
|