| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650 |
- <?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.BisInspPblmPlistDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspPblmPlist" id="bisInspPblmPlistResultMap">
- <result property="id" column="ID"/>
- <result property="dutyName" column="DUTY_NAME"/>
- <result property="pblmClassify" column="PBLM_CLASSIFY"/>
- <result property="pblmNub" column="PBLM_NUB"/>
- <result property="pblmNubName" column="PBLM_NUB_NAME"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="pblmNo" column="PBLM_NO"/>
- <result property="objType" column="OBJ_TYPE"/>
- <result property="pblmNameBz" column="PBLM_NAME_BZ"/>
- <result property="checkPointBz" column="CHECK_POINT_BZ"/>
- <result property="pblmDescBz" column="PBLM_DESC_BZ"/>
- <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
- <result property="inspPblmDesc" column="INSP_PBLM_DESC"/>
- <result property="objName" column="OBJ_NAME"/>
- <result property="objCode" column="OBJ_CODE"/>
- <result property="objAdCode" column="OBJ_AD_CODE"/>
- <result property="pblmAdName" column="PBLM_AD_NAME"/>
- <result property="pblmTm" column="PBLM_TM"/>
- <result property="pblmReason" column="PBLM_REASON"/>
- <result property="pblmCrtm" column="PBLM_CRTM"/>
- <result property="isRect" column="IS_RECT"/>
- <result property="pblmPltm" column="PBLM_PLTM"/>
- <result property="pblmActm" column="PBLM_ACTM"/>
- <result property="crtState" column="CRT_STATE"/>
- <result property="crtInfo" column="CRT_INFO"/>
- <result property="crtNote" column="CRT_NOTE"/>
- <result property="pblmState" column="PBLM_STATE"/>
- <result property="pblmOut" column="PBLM_OUT"/>
- <result property="sendOrgId" column="SEND_ORG_ID"/>
- <result property="sendOrgName" column="SEND_ORG_NAME"/>
- <result property="recvOrgId" column="RECV_ORG_ID"/>
- <result property="recvOrgName" column="RECV_ORG_NAME"/>
- <result property="tranOrgId" column="TRAN_ORG_ID"/>
- <result property="tranOrgName" column="TRAN_ORG_NAME"/>
- <result property="persId" column="PERS_ID"/>
- <result property="persName" column="PERS_NAME"/>
- <result property="intm" column="INTM"/>
- <result property="uptm" column="UPTM"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="isStart" column="IS_START"/>
- <result property="impSource" column="IMP_SOURCE"/>
- <result property="isSite" column="IS_SITE"/>
- <result property="chkDept" column="CHK_DEPT"/>
- <result property="dcBatch" column="DC_BATCH"/>
- <result property="provincial" column="PROVINCIAL"/>
- <result property="belongOrgId" column="BELONG_ORG_ID"/>
- <result property="belongAdCode" column="BELONG_AD_CODE"/>
- <result property="selfInspProcessState" column="SELF_INSP_PROCESS_STATE"/>
- <result property="damRegCode" column="DAM_REG_CODE"/>
- <result property="reviewStat" column="REVIEW_STAT"/>
- <result property="reviewResult" column="REVIEW_RESULT"/>
- <result property="reviewNote" column="REVIEW_NOTE"/>
- <result property="reviewTm" column="REVIEW_TM"/>
- </resultMap>
- <sql id="table_columns">
- ID,
- DUTY_NAME,
- PBLM_CLASSIFY,
- PBLM_NUB,
- PBLM_NUB_NAME,
- PBLM_ID,
- PBLM_NO,
- OBJ_TYPE,
- PBLM_NAME_BZ,
- CHECK_POINT_BZ,
- PBLM_DESC_BZ,
- INSP_PBLM_CATE,
- INSP_PBLM_DESC,
- OBJ_NAME,
- OBJ_CODE,
- OBJ_AD_CODE,
- PBLM_AD_NAME,
- PBLM_TM,
- PBLM_REASON,
- PBLM_CRTM,
- IS_RECT,
- PBLM_PLTM,
- PBLM_ACTM,
- CRT_STATE,
- CRT_INFO,
- CRT_NOTE,
- PBLM_STATE,
- PBLM_OUT,
- SEND_ORG_ID,
- SEND_ORG_NAME,
- RECV_ORG_ID,
- RECV_ORG_NAME,
- TRAN_ORG_ID,
- TRAN_ORG_NAME,
- PERS_ID,
- PERS_NAME,
- INTM,
- UPTM,
- DATA_STAT,
- IS_START,
- IMP_SOURCE,
- IS_SITE,
- CHK_DEPT,
- DC_BATCH,
- PROVINCIAL,
- BELONG_ORG_ID,
- BELONG_AD_CODE,
- SELF_INSP_PROCESS_STATE,
- DAM_REG_CODE,
- REVIEW_STAT,
- REVIEW_RESULT,
- REVIEW_NOTE,
- REVIEW_TM
- </sql>
- <sql id="entity_properties">
- #{id},
- #{dutyName},
- #{pblmClassify},
- #{pblmNub},
- #{pblmNubName},
- #{pblmId},
- #{pblmNo},
- #{objType},
- #{pblmNameBz},
- #{checkPointBz},
- #{pblmDescBz},
- #{inspPblmCate},
- #{inspPblmDesc},
- #{objName},
- #{objCode},
- #{objAdCode},
- #{pblmAdName},
- #{pblmTm},
- #{pblmReason},
- #{pblmCrtm},
- #{isRect},
- #{pblmPltm},
- #{pblmActm},
- #{crtState},
- #{crtInfo},
- #{crtNote},
- #{pblmState},
- #{pblmOut},
- #{sendOrgId},
- #{sendOrgName},
- #{recvOrgId},
- #{recvOrgName},
- #{tranOrgId},
- #{tranOrgName},
- #{persId},
- #{persName},
- #{intm},
- #{uptm},
- #{dataStat},
- #{isStart},
- #{impSource},
- #{isSite},
- #{chkDept},
- #{dcBatch},
- #{provincial},
- #{belongOrgId},
- #{belongAdCode},
- #{selfInspProcessState},
- #{damRegCode},
- #{reviewStat},
- #{reviewResult},
- #{reviewNote},
- #{reviewTm}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="chkDept != null and chkDept != ''">and CHK_DEPT LIKE CONCAT('%',CONCAT(#{chkDept},'%'))</if>
- <if test="dcBatch != null and dcBatch != ''">and DC_BATCH LIKE CONCAT('%',CONCAT(#{dcBatch},'%'))</if>
- <if test="dutyName != null and dutyName != ''">and DUTY_NAME = #{dutyName}</if>
- <if test="impSource != null and impSource != ''">and IMP_SOURCE = #{impSource}</if>
- <if test="pblmClassify != null and pblmClassify != ''">and PBLM_CLASSIFY = #{pblmClassify}</if>
- <if test="pblmNub != null and pblmNub != ''">and PBLM_NUB = #{pblmNub}</if>
- <if test="pblmNubName != null and pblmNubName != ''">and PBLM_NUB_NAME = #{pblmNubName}</if>
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="pblmNo != null and pblmNo != ''">and PBLM_NO = #{pblmNo}</if>
- <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
- <if test="pblmNameBz != null and pblmNameBz != ''">and PBLM_NAME_BZ = #{pblmNameBz}</if>
- <if test="checkPointBz != null and checkPointBz != ''">and CHECK_POINT_BZ = #{checkPointBz}</if>
- <if test="pblmDescBz != null and pblmDescBz != ''">and PBLM_DESC_BZ = #{pblmDescBz}</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">and INSP_PBLM_CATE = #{inspPblmCate}</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">and INSP_PBLM_DESC = #{inspPblmDesc}</if>
- <if test="objName != null and objName != ''">and OBJ_NAME = #{objName}</if>
- <if test="objCode != null and objCode != ''">and OBJ_CODE = #{objCode}</if>
- <if test="objAdCode != null and objAdCode != ''">and OBJ_AD_CODE like concat(#{objAdCode},'%')</if>
- <if test="pblmAdName != null and pblmAdName != ''">and PBLM_AD_NAME = #{pblmAdName}</if>
- <if test="pblmTm != null">and PBLM_TM = #{pblmTm}</if>
- <if test="pblmReason != null">and PBLM_REASON= #{pblmReason}</if>
- <if test="pblmCrtm != null">and PBLM_CRTM = #{pblmCrtm}</if>
- <if test="isRect != null and isRect != ''">and IS_RECT = #{isRect}</if>
- <if test="pblmPltm != null">and PBLM_PLTM = #{pblmPltm}</if>
- <if test="pblmActm != null">and PBLM_ACTM = #{pblmActm}</if>
- <if test="crtState != null and crtState != ''">and CRT_STATE = #{crtState}</if>
- <if test="crtInfo != null and crtInfo != ''">and CRT_INFO = #{crtInfo}</if>
- <if test="crtNote != null and crtNote != ''">and CRT_NOTE = #{crtNote}</if>
- <if test="pblmState != null and pblmState != ''">and PBLM_STATE = #{pblmState}</if>
- <if test="pblmOut != null and pblmOut != ''">and PBLM_OUT = #{pblmOut}</if>
- <if test="sendOrgId != null and sendOrgId != ''">and SEND_ORG_ID = #{sendOrgId}</if>
- <if test="sendOrgName != null and sendOrgName != ''">and SEND_ORG_NAME = #{sendOrgName}</if>
- <if test="recvOrgId != null and recvOrgId != ''">and RECV_ORG_ID = #{recvOrgId}</if>
- <if test="recvOrgName != null and recvOrgName != ''">and RECV_ORG_NAME = #{recvOrgName}</if>
- <if test="tranOrgId != null and tranOrgId != ''">and TRAN_ORG_ID = #{tranOrgId}</if>
- <if test="tranOrgName != null and tranOrgName != ''">and TRAN_ORG_NAME = #{tranOrgName}</if>
- <if test="persId != null and persId != ''">and PERS_ID = #{persId}</if>
- <if test="persName != null and persName != ''">and PERS_NAME = #{persName}</if>
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="uptm != null">and UPTM = #{uptm}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="isStart != null and isStart != ''">and IS_START = #{isStart}</if>
- <if test="isSite != null and isSite != ''">and IS_SITE = #{isSite}</if>
- <if test="provincial != null and provincial != ''">and PROVINCIAL = #{provincial}</if>
- <if test="belongOrgId != null and belongOrgId != ''">and BELONG_ORG_ID = #{belongOrgId}</if>
- <if test="belongAdCode != null and belongAdCode != ''">and BELONG_AD_CODE LIKE CONCAT(#{belongAdCode},'%') </if>
- <if test="selfInspProcessState != null and selfInspProcessState != ''">and SELF_INSP_PROCESS_STATE = #{selfInspProcessState}</if>
- <if test='damRegCode != null and damRegCode != ""'>and DAM_REG_CODE LIKE CONCAT('%',CONCAT(#{damRegCode},'%')) </if>
- <if test='reviewStat != null and reviewStat != ""'>and REVIEW_STAT = #{reviewStat}</if>
- <if test='reviewResult != null and reviewResult != ""'>and REVIEW_RESULT = #{reviewResult}</if>
- <if test="reviewTm != null">and TO_CHAR(REVIEW_TM,'yyyy-MM-dd') = TO_CHAR(#{reviewTm},'yyyy-MM-dd')</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspPblmPlistResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PBLM_PLIST where ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspPblmPlistResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PBLM_PLIST
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspPblmPlistResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PBLM_PLIST
- </select>
- <select id="findList" resultMap="bisInspPblmPlistResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_PBLM_PLIST
- <include refid="page_where"/>
- </select>
- <!-- 四川省 水库大坝 根据注册登记号 查询整改台账-->
- <select id="findListByDamRegCode" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- select * from BIS_INSP_PBLM_PLIST
- where DAM_REG_CODE = #{damRegCode} and DATA_STAT='0'
- </select>
- <select id="selectCount" resultType="int">
- select count(ID) from BIS_INSP_PBLM_PLIST
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- insert into BIS_INSP_PBLM_PLIST(
- <include refid="table_columns"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- update BIS_INSP_PBLM_PLIST set DATA_STAT='9' where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- delete from BIS_INSP_PBLM_PLIST
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_PBLM_PLIST set DATA_STAT = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- update BIS_INSP_PBLM_PLIST
- <trim prefix="set" suffixOverrides=",">
- <if test="chkDept != null and chkDept != ''">CHK_DEPT = #{chkDept},</if>
- <if test="dcBatch != null and dcBatch != ''">DC_BATCH = #{dcBatch},</if>
- <if test="impSource != null and impSource != ''">IMP_SOURCE = #{impSource},</if>
- <if test="dutyName != null and dutyName != ''">DUTY_NAME = #{dutyName},</if>
- <if test="pblmClassify != null and pblmClassify != ''">PBLM_CLASSIFY = #{pblmClassify},</if>
- <if test="pblmNub != null and pblmNub != ''">PBLM_NUB = #{pblmNub},</if>
- <if test="pblmNubName != null and pblmNubName != ''">PBLM_NUB_NAME = #{pblmNubName},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="pblmNo != null and pblmNo != ''">PBLM_NO = #{pblmNo},</if>
- <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
- <if test="pblmNameBz != null and pblmNameBz != ''">PBLM_NAME_BZ = #{pblmNameBz},</if>
- <if test="checkPointBz != null and checkPointBz != ''">CHECK_POINT_BZ = #{checkPointBz},</if>
- <if test="pblmDescBz != null and pblmDescBz != ''">PBLM_DESC_BZ = #{pblmDescBz},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
- <if test="objName != null and objName != ''">OBJ_NAME = #{objName},</if>
- <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
- <if test="objAdCode != null and objAdCode != ''">OBJ_AD_CODE = #{objAdCode},</if>
- <if test="pblmAdName != null and pblmAdName != ''">PBLM_AD_NAME = #{pblmAdName},</if>
- <if test="pblmTm != null">PBLM_TM = #{pblmTm},</if>
- <if test="pblmReason != null">PBLM_REASON = #{pblmReason},</if>
- <if test="pblmCrtm != null">PBLM_CRTM = #{pblmCrtm},</if>
- <if test="isRect != null and isRect != ''">IS_RECT = #{isRect},</if>
- <if test="pblmPltm != null">PBLM_PLTM = #{pblmPltm},</if>
- <if test="pblmActm != null">PBLM_ACTM = #{pblmActm},</if>
- <if test="crtState != null and crtState != ''">CRT_STATE = #{crtState},</if>
- <if test="crtInfo != null and crtInfo != ''">CRT_INFO = #{crtInfo},</if>
- <if test="crtNote != null and crtNote != ''">CRT_NOTE = #{crtNote},</if>
- <if test="pblmState != null and pblmState != ''">PBLM_STATE = #{pblmState},</if>
- <if test="pblmOut != null and pblmOut != ''">PBLM_OUT = #{pblmOut},</if>
- <if test="sendOrgId != null and sendOrgId != ''">SEND_ORG_ID = #{sendOrgId},</if>
- <if test="sendOrgName != null and sendOrgName != ''">SEND_ORG_NAME = #{sendOrgName},</if>
- <if test="recvOrgId != null and recvOrgId != ''">RECV_ORG_ID = #{recvOrgId},</if>
- <if test="recvOrgName != null and recvOrgName != ''">RECV_ORG_NAME = #{recvOrgName},</if>
- <if test="tranOrgId != null and tranOrgId != ''">TRAN_ORG_ID = #{tranOrgId},</if>
- <if test="tranOrgName != null and tranOrgName != ''">TRAN_ORG_NAME = #{tranOrgName},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="isStart != null and isStart != ''">IS_START = #{isStart},</if>
- <if test="isSite != null and isSite != ''">IS_SITE = #{isSite},</if>
- <if test='damRegCode != null and damRegCode != ""'>DAM_REG_CODE = #{damRegCode},</if>
- <if test='reviewStat != null and reviewStat != ""'>REVIEW_STAT = #{reviewStat},</if>
- <if test='reviewResult != null and reviewResult != ""'>REVIEW_RESULT = #{reviewResult},</if>
- <if test='reviewNote != null and reviewNote != ""'>REVIEW_NOTE = #{reviewNote},</if>
- <if test='reviewTm != null '>REVIEW_TM = #{reviewTm},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- update BIS_INSP_PBLM_PLIST
- <trim prefix="set" suffixOverrides=",">
- <if test="chkDept != null and chkDept != ''">CHK_DEPT = #{chkDept},</if>
- <if test="dcBatch != null and dcBatch != ''">DC_BATCH = #{dcBatch},</if>
- <if test="impSource != null and impSource != ''">IMP_SOURCE = #{impSource},</if>
- <if test="dutyName != null and dutyName != ''">DUTY_NAME = #{dutyName},</if>
- <if test="pblmClassify != null and pblmClassify != ''">PBLM_CLASSIFY = #{pblmClassify},</if>
- <if test="pblmNub != null and pblmNub != ''">PBLM_NUB = #{pblmNub},</if>
- <if test="pblmNubName != null and pblmNubName != ''">PBLM_NUB_NAME = #{pblmNubName},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="pblmNo != null and pblmNo != ''">PBLM_NO = #{pblmNo},</if>
- <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
- <if test="pblmNameBz != null and pblmNameBz != ''">PBLM_NAME_BZ = #{pblmNameBz},</if>
- <if test="checkPointBz != null and checkPointBz != ''">CHECK_POINT_BZ = #{checkPointBz},</if>
- <if test="pblmDescBz != null and pblmDescBz != ''">PBLM_DESC_BZ = #{pblmDescBz},</if>
- <if test="inspPblmCate != null and inspPblmCate != ''">INSP_PBLM_CATE = #{inspPblmCate},</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
- <if test="objName != null and objName != ''">OBJ_NAME = #{objName},</if>
- <if test="objCode != null and objCode != ''">OBJ_CODE = #{objCode},</if>
- <if test="objAdCode != null and objAdCode != ''">OBJ_AD_CODE = #{objAdCode},</if>
- <if test="pblmAdName != null and pblmAdName != ''">PBLM_AD_NAME = #{pblmAdName},</if>
- <if test="pblmTm != null">PBLM_TM = #{pblmTm},</if>
- <if test="pblmReason != null">PBLM_REASON = #{pblmReason},</if>
- <if test="pblmCrtm != null">PBLM_CRTM = #{pblmCrtm},</if>
- <if test="isRect != null and isRect != ''">IS_RECT = #{isRect},</if>
- <if test="pblmPltm != null">PBLM_PLTM = #{pblmPltm},</if>
- <if test="pblmActm != null">PBLM_ACTM = #{pblmActm},</if>
- <if test="crtState != null and crtState != ''">CRT_STATE = #{crtState},</if>
- <if test="crtInfo != null and crtInfo != ''">CRT_INFO = #{crtInfo},</if>
- <if test="crtNote != null and crtNote != ''">CRT_NOTE = #{crtNote},</if>
- <if test="pblmState != null and pblmState != ''">PBLM_STATE = #{pblmState},</if>
- <if test="pblmOut != null and pblmOut != ''">PBLM_OUT = #{pblmOut},</if>
- <if test="sendOrgId != null and sendOrgId != ''">SEND_ORG_ID = #{sendOrgId},</if>
- <if test="sendOrgName != null and sendOrgName != ''">SEND_ORG_NAME = #{sendOrgName},</if>
- <if test="recvOrgId != null and recvOrgId != ''">RECV_ORG_ID = #{recvOrgId},</if>
- <if test="recvOrgName != null and recvOrgName != ''">RECV_ORG_NAME = #{recvOrgName},</if>
- <if test="tranOrgId != null and tranOrgId != ''">TRAN_ORG_ID = #{tranOrgId},</if>
- <if test="tranOrgName != null and tranOrgName != ''">TRAN_ORG_NAME = #{tranOrgName},</if>
- <if test="persId != null and persId != ''">PERS_ID = #{persId},</if>
- <if test="persName != null and persName != ''">PERS_NAME = #{persName},</if>
- <if test="intm != null">INTM = #{intm},</if>
- <if test="uptm != null">UPTM = #{uptm},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="isStart != null and isStart != ''">IS_START = #{isStart},</if>
- <if test="isSite != null and isSite != ''">IS_SITE = #{isSite},</if>
- <if test='damRegCode != null and damRegCode != ""'>DAM_REG_CODE = #{damRegCode},</if>
- <if test='reviewStat != null and reviewStat != ""'>REVIEW_STAT = #{reviewStat},</if>
- <if test='reviewResult != null and reviewResult != ""'>REVIEW_RESULT = #{reviewResult},</if>
- <if test='reviewNote != null and reviewNote != ""'>REVIEW_NOTE = #{reviewNote},</if>
- <if test='reviewTm != null '>REVIEW_TM = #{reviewTm},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 市、县自查 更新 整改问题 的 问题状态 -->
- <update id="updateSelfInspStateById" parameterType="cn.com.goldenwater.dcproj.param.BisInspPblmPlistParam">
- update BIS_INSP_PBLM_PLIST
- set SELF_INSP_PROCESS_STATE = #{selfInspProcessState}
- <!-- 是否启动 下发是更新状态为 1-->
- <if test='isStart != null and "" != isStart '>,IS_START = #{isStart}</if>
- <!-- 是否反馈 -->
- <if test='isRect != null and "" != isRect '>,IS_RECT = #{isRect}</if>
- <if test="pblmPltm != null">,PBLM_PLTM = #{pblmPltm}</if>
- <if test="pblmActm != null">,PBLM_ACTM = #{pblmActm}</if>
- <if test="pblmTm != null">,PBLM_TM = #{pblmTm}</if>
- <if test="pblmReason != null">,PBLM_REASON = #{pblmReason}</if>
- <if test="pblmCrtm != null">,PBLM_CRTM = #{pblmCrtm}</if>
- <!-- 问题整改状态 -->
- <if test='crtState != null and "" != crtState '>,CRT_STATE = #{crtState}</if>
- <if test='crtInfo != null and "" != crtInfo '>,CRT_INFO = #{crtInfo}</if>
- <if test='crtNote != null and "" != crtNote ' >, CRT_NOTE = #{crtNote}</if>
- <!-- 是否销号 -->
- <if test=' null != pblmOut and "" != pblmOut '>,PBLM_OUT = #{pblmOut}</if>
- <!-- 是否到现场复核 -->
- <if test='isSite != null and "" != isSite '>,IS_SITE = #{isSite}</if>
- <if test='chkDept != null and "" != chkDept '>,CHK_DEPT = #{chkDept}</if>
- <if test='dcBatch != null and "" != dcBatch '>,DC_BATCH = #{dcBatch}</if>
- <if test="uptm != null">,UPTM = #{uptm}</if>
- where ID = #{id}
- </update>
- <!-- 其他自定义SQL -->
- <select id="getList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- select * from BIS_INSP_PBLM_PLIST A
- where PBLM_STATE IN ('1','2','3','4','5','6','7','8','9','10','11')
- and DATA_STAT='0'
- <if test="year != null and year != ''">
- and to_char(PBLM_TM,'yyyy') =#{year}
- </if>
- <if test="objAdCode != null and objAdCode != ''">
- and obj_Ad_Code like concat(#{objAdCode},'%')
- </if>
- <if test="objType != null and objType != ''">
- and obj_type =#{objType}
- </if>
- <if test="crtState != null and crtState != ''">
- and CRT_STATE =#{crtState}
- </if>
- <if test="objName != null and objName != ''">
- and OBJ_NAME like concat(#{objName},'%')
- </if>
- <if test="pblmState != null and pblmState != ''">
- and PBLM_STATE =#{pblmState}
- </if>
- <if test="pblmNameBz != null and pblmNameBz != ''">
- and PBLM_NAME_BZ like concat(#{pblmNameBz},'%')
- </if>
- order by intm desc
- </select>
- <select id="sendOrgGetList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- select * from (select * from BIS_INSP_PBLM_PLIST
- where DATA_STAT='0'
- <if test="province !=null and province.length() ==2">
- and pblm_classify in (
- select pblm_classify from bis_insp_pblm_mend_pri where MAND_PERS_ID =#{persId} and DATA_STAT='0'
- )
- union
- (
- select * from BIS_INSP_PBLM_PLIST
- where DATA_STAT = '0' and pers_id =#{persId}
- )
- </if>
- ) pl
- left join BIS_INSP_PBLM p ON pl.PBLM_ID = p.PBLM_ID
- left join BIS_INSP_ALL_OBJ J ON P.OBJ_ID = J.OBJ_ID
- left join BIS_INSP_ALL L ON L.ID = J.ID
- where 1=1
- <if test=' null != isSys and "" != isSys and "1" == isSys.toString() '>AND pl.PBLM_ID is not null</if>
- <if test=' null != isSys and "" != isSys and "1" != isSys.toString() '>AND pl.PBLM_ID is null</if>
- <if test="depm != null and depm.length > 0 ">
- AND pl.obj_type IN (SELECT TO_NUMBER(PTYPE) FROM ATT_INSP_TYPE_DUTY where DUTY_DEP IN
- <foreach item="item" index="index" collection="depm" open="(" separator="," close=")">
- '${item}'
- </foreach>
- )
- </if>
- <if test="sttm != null">AND pl.PBLM_TM >= #{sttm}</if>
- <if test="entm != null">AND pl.PBLM_TM < #{entm} + 1</if>
- <if test="chkDept != null and chkDept != ''">and pl.CHK_DEPT LIKE CONCAT('%',CONCAT(#{chkDept},'%'))</if>
- <if test="dcBatch != null and dcBatch != ''">and pl.DC_BATCH LIKE CONCAT('%',CONCAT(#{dcBatch},'%'))</if>
- <if test="year != null and year != ''">and to_char(pl.PBLM_TM,'yyyy') =#{year}</if>
- <if test="objAdCode != null and objAdCode != ''">and pl.obj_Ad_Code like concat(#{objAdCode},'%')</if>
- <if test="pblmAdName != null and pblmAdName != ''">and pl.PBLM_AD_NAME like '%${pblmAdName}%'</if>
- <if test="province != null and province != ''">AND pl.OBJ_AD_CODE LIKE CONCAT(#{province},'%')</if>
- <if test="objType != null and objType != ''">and pl.obj_type = TO_NUMBER(#{objType})</if>
- <if test="crtState != null and crtState != ''">and pl.CRT_STATE =#{crtState}</if>
- <if test="objName != null and objName != ''">and pl.OBJ_NAME like concat(#{objName},'%')</if>
- <if test="pblmState != null and pblmState != ''">and pl.PBLM_STATE =#{pblmState}</if>
- <if test="pblmNameBz != null and pblmNameBz != ''">and pl.PBLM_NAME_BZ like concat(#{pblmNameBz},'%')</if>
- <if test="pblmClassify != null and pblmClassify != ''">and pl.PBLM_CLASSIFY like '%${pblmClassify}%'</if>
- <if test="persName != null and persName != ''">and pl.PERS_NAME like '%${persName}%'</if>
- <if test="isStart != null and isStart != ''">and pl.IS_START =#{isStart}</if>
- <if test="pblmOut != null and pblmOut != ''">
- <if test="pblmOut =='1'.toString()">
- and pl.PBLM_OUT =#{pblmOut}
- </if>
- <if test="pblmOut =='0'.toString()">
- and (pl.PBLM_OUT =#{pblmOut} or PBLM_OUT is null)
- </if>
- </if>
- <if test="impSource != null and impSource != ''">AND pl.IMP_SOURCE IN (${impSource})</if>
- <if test="isSite != null and isSite != ''">AND pl.IS_SITE =#{isSite}</if>
- <if test="pblmNub != null and pblmNub != ''">and pl.PBLM_NUB = #{pblmNub}</if>
- <if test="provincialLevel == 2">AND pl.is_start = '1'</if>
- <!-- 整改问题 归属 各级查看 本级 -->
- <if test='belongOrgId != null and belongOrgId != "" and null == adGrad and null == orgType '>and pl.BELONG_ORG_ID = #{belongOrgId} </if>
- <!-- 省 查看 市/县 -->
- <if test='belongOrgId != null and belongOrgId != "" and "2" == adGrad and null != orgType'>and pl.BELONG_ORG_ID in (${belongOrgId}) </if>
- <!-- 市 查看 县 -->
- <if test='belongOrgId != null and belongOrgId != "" and "3" == adGrad and "county" == orgType'>and pl.BELONG_ORG_ID in (${belongOrgId}) </if>
- <!-- 市 查看 省级下发 -->
- <if test='belongOrgId != null and belongOrgId != "" and "3" == adGrad and "province" == orgType'>and pl.BELONG_ORG_ID = #{belongOrgId} </if>
- <!-- 县 查看 市级下发 -->
- <if test='belongOrgId != null and belongOrgId != "" and "4" == adGrad and "city" == orgType'>and pl.BELONG_ORG_ID = #{belongOrgId} and nvl(SELF_INSP_PROCESS_STATE,'1') <> '1' </if>
- <!-- 县 查看 省级下发给市、市下发给县的 -->
- <if test='belongOrgId != null and belongOrgId != "" and "4" == adGrad and "province" == orgType'>and pl.BELONG_ORG_ID = #{belongOrgId} </if>
- <!-- 市、县自查 流程状态 -->
- <if test='selfInspProcessState != null and selfInspProcessState != "" '>and pl.SELF_INSP_PROCESS_STATE = #{selfInspProcessState} </if>
- <!-- 严重程度 lxf 2022/11/21 -->
- <if test='inspPblmCate != null and inspPblmCate != "" '>AND pl.INSP_PBLM_CATE =#{inspPblmCate}</if>
- <!-- 四川省 注册登记号 复核状态 复核结果 lxf 2023/05/09 -->
- <if test='damRegCode != null and damRegCode != ""'>and pl.DAM_REG_CODE LIKE CONCAT('%',CONCAT(#{damRegCode},'%')) </if>
- <if test='reviewStat != null and reviewStat != ""'>and pl.REVIEW_STAT = #{reviewStat}</if>
- <if test='reviewResult != null and reviewResult != ""'>and pl.REVIEW_RESULT = #{reviewResult}</if>
- <!-- 福建省 督查整改台账增加查询条件 -->
- <if test="ifCasePblm != null and ifCasePblm != ''">and p.IF_CASE_PBLM = #{ifCasePblm}</if>
- <if test="hasVedio != null and hasVedio != ''">and p.HAS_VEDIO = #{hasVedio}</if>
- <if test="startTime != null and startTime != ''">and p.COLL_TIME >= TO_DATE(#{startTime},'YYYY-MM-DD')</if>
- <if test="endTime != null and endTime != ''">and p.COLL_TIME < TO_DATE(#{endTime},'YYYY-MM-DD')+1</if>
- <if test="orgNm != null and orgNm != ''">and L.PNM like '%${orgNm}%'</if>
- <if test="leadDep !=null and leadDep != ''">and L.lead_dep LIKE CONCAT('%', CONCAT(#{leadDep}, '%') ) </if>
- ORDER BY pl.OBJ_AD_CODE, pl.OBJ_TYPE, pl.OBJ_NAME
- </select>
- <select id="recvGetList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- select * from BIS_INSP_PBLM_PLIST
- where DATA_STAT='0'
- <if test="year != null and year != ''">
- and to_char(PBLM_TM,'yyyy') =#{year}
- </if>
- <if test="objAdCode != null and objAdCode != ''">
- and obj_Ad_Code like concat(#{objAdCode},'%')
- </if>
- <if test="objType != null and objType != ''">
- and obj_type =#{objType}
- </if>
- <if test="crtState != null and crtState != ''">
- and CRT_STATE =#{crtState}
- </if>
- <if test="objName != null and objName != ''">
- and OBJ_NAME like concat(#{objName},'%')
- </if>
- <if test="pblmState != null and pblmState != ''">
- and PBLM_STATE =#{pblmState}
- </if>
- <if test="pblmNameBz != null and pblmNameBz != ''">
- and PBLM_NAME_BZ like concat(#{pblmNameBz},'%')
- </if>
- order by intm desc
- </select>
- <select id="recvCountyGetList" resultType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- select * from BIS_INSP_PBLM_PLIST
- where
- DATA_STAT='0'
- <if test="year != null and year != ''">
- and to_char(PBLM_TM,'yyyy') =#{year}
- </if>
- <if test="objAdCode != null and objAdCode != ''">
- and obj_Ad_Code like concat(#{objAdCode},'%')
- </if>
- <if test="objType != null and objType != ''">
- and obj_type =#{objType}
- </if>
- <if test="crtState != null and crtState != ''">
- and CRT_STATE =#{crtState}
- </if>
- <if test="objName != null and objName != ''">
- and OBJ_NAME like concat(#{objName},'%')
- </if>
- <if test="pblmState != null and pblmState != ''">
- and PBLM_STATE =#{pblmState}
- </if>
- <if test="pblmNameBz != null and pblmNameBz != ''">
- and PBLM_NAME_BZ like concat(#{pblmNameBz},'%')
- </if>
- order by intm desc
- </select>
- <select id="getBpmDataId" resultType="java.util.Map">
- SELECT
- a.TASK_INST_ID AS "taskInstId",
- a.PROC_INST_ID AS "procInstId",
- b.BPM_PROC_TYPE_NM AS "procTypeName"
- FROM
- <choose>
- <when test="province.substring(0,2)=='35'">T_BPM_TASK_INS</when>
- <when test='orgId == "053"'>T_BPM_TASK_INS</when>
- <when test='orgId == "034"'>T_BPM_TASK_INS</when>
- <otherwise>BPM.T_BPM_TASK_INS</otherwise>
- </choose>
- a
- JOIN
- <choose>
- <when test="province.substring(0,2)=='35'">T_BPM_PROC_INS</when>
- <when test='orgId == "053"'>T_BPM_PROC_INS</when>
- <when test='orgId == "034"'>T_BPM_PROC_INS</when>
- <otherwise>BPM.T_BPM_PROC_INS</otherwise>
- </choose>
- b ON b.PROC_INST_ID = a.PROC_INST_ID
- where BIZ_KEY = #{id}
- order by a.CRD_TIME DESC
- </select>
- <select id="getAllClassType" resultType="java.lang.String">
- select distinct pblm_classify from BIS_INSP_PBLM_PLIST t where pblm_classify is not null and length(pblm_classify)>1
- <if test="adCode != null and adCode != ''">
- and OBJ_AD_CODE like concat(#{adCode},'%')
- </if>
- order by pblm_classify
- </select>
- <!-- 查询PblmClassify -->
- <select id="getPblmClassifyMap" parameterType="java.util.List" resultMap="bisInspPblmClassifyResultMap">
- select id as businessKey,PBLM_CLASSIFY from BIS_INSP_PBLM_PLIST where ID in (
- <foreach collection="list" separator="," item="item">
- #{item}
- </foreach>
- )
- UNION ALL
- SELECT ID AS businessKey,'稽察整改' PBLM_CLASSIFY FROM TAC_PROVINCE_PBLM_MEND_INFO WHERE ID IN (
- <foreach collection="list" separator="," item="item">
- #{item}
- </foreach>
- )
- </select>
- <resultMap id="bisInspPblmClassifyResultMap" type="cn.com.goldenwater.dcproj.model.BisInspPblmClassify">
- <result property="businessKey" column="businessKey"/>
- <result property="PBLM_CLASSIFY" column="pblmClassify"/>
- </resultMap>
- <update id="updateDamRegCodeByRsCode" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblmPlist">
- update BIS_INSP_PBLM_PLIST set DAM_REG_CODE = #{damRegCode},UPTM = #{uptm}
- where OBJ_CODE = #{objCode}
- </update>
- </mapper>
|