| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- <?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.BisInspPblmRepeatDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspPblm" id="bisInspPblmRepeatResultMap">
- <result property="inspPblmCate" column="INSP_PBLM_CATE"/>
- <result property="pblmStat" column="PBLM_STAT"/>
- <result property="reviOpin" column="REVI_OPIN"/>
- <result property="reviConc" column="REVI_CONC"/>
- <result property="reviOrgGuid" column="REVI_ORG_GUID"/>
- <result property="dataStat" column="DATA_STAT"/>
- <result property="collTime" column="COLL_TIME"/>
- <result property="recPers" column="REC_PERS"/>
- <result property="note" column="NOTE"/>
- <result property="regid" column="REGID"/>
- <result property="commonFileIds" column="COMMON_FILE_IDS"/>
- <result property="fileNo" column="FILE_NO"/>
- <result property="fileNoNumber" column="FILE_NO_NUMBER"/>
- <result property="pblmsId" column="PBLMS_ID"/>
- <result property="pblmsTypeId" column="PBLMS_TYPE_ID"/>
- <result property="villType" column="VILL_TYPE"/>
- <result property="cwsCode" column="CWS_CODE"/>
- <result property="villageCode" column="VILLAGE_CODE"/>
- <result property="hasVedio" column="HAS_VEDIO"/>
- <result property="problemType" column="PROBLEM_TYPE"/>
- <result property="qualityTypeId" column="QUALITY_TYPE_ID"/>
- <result property="defectTypeId" column="DEFECT_TYPE_ID"/>
- <result property="fdbkId" column="FDBK_ID"/>
- <result property="itemId" column="ITEM_ID"/>
- <result property="waterUserId" column="WATER_USER_ID"/>
- <result property="quote" column="QUOTE"/>
- <result property="pblmId" column="PBLM_ID"/>
- <result property="objId" column="OBJ_ID"/>
- <result property="objType" column="OBJ_TYPE"/>
- <result property="inspGroupId" column="INSP_GROUP_ID"/>
- <result property="pguid" column="PGUID"/>
- <result property="inspPblmType" column="INSP_PBLM_TYPE"/>
- <result property="inspPblmCode" column="INSP_PBLM_CODE"/>
- <result property="inspPblmName" column="INSP_PBLM_NAME"/>
- <result property="inspPblmDesc" column="INSP_PBLM_DESC"/>
- <result property="inspAddDesc" column="INSP_ADD_DESC"/>
- <result property="pblmLong" column="PBLM_LONG"/>
- <result property="pblmLat" column="PBLM_LAT"/>
- <result property="ifCasePblm" column="IF_CASE_PBLM"/>
- <result property="inspPblmOrgName" column="INSP_PBLM_ORG_NAME"/>
- <result property="pblmPersName" column="PBLM_PERS_NAME"/>
- </resultMap>
-
- <sql id="table_columns">
- INSP_PBLM_CATE,
- PBLM_STAT,
- REVI_OPIN,
- REVI_CONC,
- REVI_ORG_GUID,
- DATA_STAT,
- COLL_TIME,
- REC_PERS,
- NOTE,
- REGID,
- COMMON_FILE_IDS,
- FILE_NO,
- FILE_NO_NUMBER,
- PBLMS_ID,
- PBLMS_TYPE_ID,
- VILL_TYPE,
- CWS_CODE,
- VILLAGE_CODE,
- HAS_VEDIO,
- PROBLEM_TYPE,
- QUALITY_TYPE_ID,
- DEFECT_TYPE_ID,
- FDBK_ID,
- ITEM_ID,
- WATER_USER_ID,
- QUOTE,
- PBLM_ID,
- OBJ_ID,
- OBJ_TYPE,
- INSP_GROUP_ID,
- PGUID,
- INSP_PBLM_TYPE,
- INSP_PBLM_CODE,
- INSP_PBLM_NAME,
- INSP_PBLM_DESC,
- INSP_ADD_DESC,
- PBLM_LONG,
- PBLM_LAT,
- IF_CASE_PBLM,
- INSP_PBLM_ORG_NAME,
- PBLM_PERS_NAME
- </sql>
- <sql id="entity_properties">
- #{inspPblmCate},
- #{pblmStat},
- #{reviOpin},
- #{reviConc},
- #{reviOrgGuid},
- #{dataStat},
- #{collTime},
- #{recPers},
- #{note},
- #{regid},
- #{commonFileIds},
- #{fileNo},
- #{fileNoNumber},
- #{pblmsId},
- #{pblmsTypeId},
- #{villType},
- #{cwsCode},
- #{villageCode},
- #{hasVedio},
- #{problemType},
- #{qualityTypeId},
- #{defectTypeId},
- #{fdbkId},
- #{itemId},
- #{waterUserId},
- #{quote},
- #{pblmId},
- #{objId},
- #{objType},
- #{inspGroupId},
- #{pguid},
- #{inspPblmType},
- #{inspPblmCode},
- #{inspPblmName},
- #{inspPblmDesc},
- #{inspAddDesc},
- #{pblmLong},
- #{pblmLat},
- #{ifCasePblm},
- #{inspPblmOrgName},
- #{pblmPersName}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="pblmStat != null and pblmStat != ''">and PBLM_STAT = #{pblmStat}</if>
- <if test="reviOpin != null and reviOpin != ''">and REVI_OPIN = #{reviOpin}</if>
- <if test="reviConc != null and reviConc != ''">and REVI_CONC = #{reviConc}</if>
- <if test="reviOrgGuid != null and reviOrgGuid != ''">and REVI_ORG_GUID = #{reviOrgGuid}</if>
- <if test="dataStat != null and dataStat != ''">and DATA_STAT = #{dataStat}</if>
- <if test="collTime != null">and COLL_TIME = #{collTime}</if>
- <if test="recPers != null and recPers != ''">and REC_PERS = #{recPers}</if>
- <if test="note != null and note != ''">and NOTE = #{note}</if>
- <if test="regid != null and regid != ''">and REGID = #{regid}</if>
- <if test="commonFileIds != null and commonFileIds != ''">and COMMON_FILE_IDS = #{commonFileIds}</if>
- <if test="fileNo != null and fileNo != ''">and FILE_NO = #{fileNo}</if>
- <if test="fileNoNumber != null and fileNoNumber != ''">and FILE_NO_NUMBER = #{fileNoNumber}</if>
- <if test="pblmsId != null and pblmsId != ''">and PBLMS_ID = #{pblmsId}</if>
- <if test="pblmsTypeId != null and pblmsTypeId != ''">and PBLMS_TYPE_ID = #{pblmsTypeId}</if>
- <if test="villType != null and villType != ''">and VILL_TYPE = #{villType}</if>
- <if test="cwsCode != null and cwsCode != ''">and CWS_CODE = #{cwsCode}</if>
- <if test="villageCode != null and villageCode != ''">and VILLAGE_CODE = #{villageCode}</if>
- <if test="hasVedio != null and hasVedio != ''">and HAS_VEDIO = #{hasVedio}</if>
- <if test="problemType != null and problemType != ''">and PROBLEM_TYPE = #{problemType}</if>
- <if test="qualityTypeId != null and qualityTypeId != ''">and QUALITY_TYPE_ID = #{qualityTypeId}</if>
- <if test="defectTypeId != null and defectTypeId != ''">and DEFECT_TYPE_ID = #{defectTypeId}</if>
- <if test="fdbkId != null and fdbkId != ''">and FDBK_ID = #{fdbkId}</if>
- <if test="itemId != null and itemId != ''">and ITEM_ID = #{itemId}</if>
- <if test="waterUserId != null and waterUserId != ''">and WATER_USER_ID = #{waterUserId}</if>
- <if test="quote != null and quote != ''">and QUOTE = #{quote}</if>
- <if test="pblmId != null and pblmId != ''">and PBLM_ID = #{pblmId}</if>
- <if test="objId != null and objId != ''">and OBJ_ID = #{objId}</if>
- <if test="objType != null and objType != ''">and OBJ_TYPE = #{objType}</if>
- <if test="inspGroupId != null and inspGroupId != ''">and INSP_GROUP_ID = #{inspGroupId}</if>
- <if test="pguid != null and pguid != ''">and PGUID = #{pguid}</if>
- <if test="inspPblmType != null and inspPblmType != ''">and INSP_PBLM_TYPE = #{inspPblmType}</if>
- <if test="inspPblmCode != null and inspPblmCode != ''">and INSP_PBLM_CODE = #{inspPblmCode}</if>
- <if test="inspPblmName != null and inspPblmName != ''">and INSP_PBLM_NAME = #{inspPblmName}</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">and INSP_PBLM_DESC = #{inspPblmDesc}</if>
- <if test="inspAddDesc != null and inspAddDesc != ''">and INSP_ADD_DESC = #{inspAddDesc}</if>
- <if test="pblmLong != null and pblmLong != ''">and PBLM_LONG = #{pblmLong}</if>
- <if test="pblmLat != null and pblmLat != ''">and PBLM_LAT = #{pblmLat}</if>
- <if test="ifCasePblm != null and ifCasePblm != ''">and IF_CASE_PBLM = #{ifCasePblm}</if>
- <if test="inspPblmOrgName != null and inspPblmOrgName != ''">and INSP_PBLM_ORG_NAME = #{inspPblmOrgName}</if>
- <if test="pblmPersName != null and pblmPersName != ''">and PBLM_PERS_NAME = #{pblmPersName}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspPblmRepeatResultMap" parameterType="String" >
- select b.PERS_NAME,s.*,p.insp_pblms_name,p.org_Id,p.check_point,p.pblm_desc,j.nm,CASE WHEN r.STATE IS NULL THEN '0' ELSE r.STATE END as state from BIS_INSP_PBLM_REPEAT s
- left join bis_insp_all_obj j on s.obj_id=j.obj_id
- left join bis_insp_rsvr_rgstr_repeat r on r.obj_id=j.obj_id
- join BIS_INSP_ALL_RLATION_PERS b on s.REC_PERS=b.GUID
- left join obj_insp_pblms p on p.guid=s.pblms_type_id
- where s.PBLM_ID=#{id}
- </select>
- <select id="getBy" resultMap="bisInspPblmRepeatResultMap">
- select <include refid="table_columns" /> from BIS_INSP_PBLM_REPEAT <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="bisInspPblmRepeatResultMap">
- select <include refid="table_columns" /> from BIS_INSP_PBLM_REPEAT
- </select>
- <select id="findList" resultMap="bisInspPblmRepeatResultMap">
- select <include refid="table_columns" /> from BIS_INSP_PBLM_REPEAT <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from BIS_INSP_PBLM_REPEAT <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
- insert into BIS_INSP_PBLM_REPEAT( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_PBLM_REPEAT where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
- delete from BIS_INSP_PBLM_REPEAT <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_PBLM_REPEAT set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
- update BIS_INSP_PBLM_REPEAT
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmStat != null and pblmStat != ''">PBLM_STAT = #{pblmStat},</if>
- <if test="reviOpin != null and reviOpin != ''">REVI_OPIN = #{reviOpin},</if>
- <if test="reviConc != null and reviConc != ''">REVI_CONC = #{reviConc},</if>
- <if test="reviOrgGuid != null and reviOrgGuid != ''">REVI_ORG_GUID = #{reviOrgGuid},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="regid != null and regid != ''">REGID = #{regid},</if>
- <if test="commonFileIds != null and commonFileIds != ''">COMMON_FILE_IDS = #{commonFileIds},</if>
- <if test="fileNo != null and fileNo != ''">FILE_NO = #{fileNo},</if>
- <if test="fileNoNumber != null and fileNoNumber != ''">FILE_NO_NUMBER = #{fileNoNumber},</if>
- <if test="pblmsId != null and pblmsId != ''">PBLMS_ID = #{pblmsId},</if>
- <if test="pblmsTypeId != null and pblmsTypeId != ''">PBLMS_TYPE_ID = #{pblmsTypeId},</if>
- <if test="villType != null and villType != ''">VILL_TYPE = #{villType},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="villageCode != null and villageCode != ''">VILLAGE_CODE = #{villageCode},</if>
- <if test="hasVedio != null and hasVedio != ''">HAS_VEDIO = #{hasVedio},</if>
- <if test="problemType != null and problemType != ''">PROBLEM_TYPE = #{problemType},</if>
- <if test="qualityTypeId != null and qualityTypeId != ''">QUALITY_TYPE_ID = #{qualityTypeId},</if>
- <if test="defectTypeId != null and defectTypeId != ''">DEFECT_TYPE_ID = #{defectTypeId},</if>
- <if test="fdbkId != null and fdbkId != ''">FDBK_ID = #{fdbkId},</if>
- <if test="itemId != null and itemId != ''">ITEM_ID = #{itemId},</if>
- <if test="waterUserId != null and waterUserId != ''">WATER_USER_ID = #{waterUserId},</if>
- <if test="quote != null and quote != ''">QUOTE = #{quote},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
- <if test="inspGroupId != null and inspGroupId != ''">INSP_GROUP_ID = #{inspGroupId},</if>
- <if test="pguid != null and pguid != ''">PGUID = #{pguid},</if>
- <if test="inspPblmType != null and inspPblmType != ''">INSP_PBLM_TYPE = #{inspPblmType},</if>
- <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
- <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
- <if test="inspAddDesc != null and inspAddDesc != ''">INSP_ADD_DESC = #{inspAddDesc},</if>
- <if test="pblmLong != null and pblmLong != ''">PBLM_LONG = #{pblmLong},</if>
- <if test="pblmLat != null and pblmLat != ''">PBLM_LAT = #{pblmLat},</if>
- <if test="ifCasePblm != null and ifCasePblm != ''">IF_CASE_PBLM = #{ifCasePblm},</if>
- <if test="inspPblmOrgName != null and inspPblmOrgName != ''">INSP_PBLM_ORG_NAME = #{inspPblmOrgName},</if>
- <if test="pblmPersName != null and pblmPersName != ''">PBLM_PERS_NAME = #{pblmPersName},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspPblm">
- update BIS_INSP_PBLM_REPEAT
- <trim prefix="set" suffixOverrides=",">
- <if test="pblmStat != null and pblmStat != ''">PBLM_STAT = #{pblmStat},</if>
- <if test="reviOpin != null and reviOpin != ''">REVI_OPIN = #{reviOpin},</if>
- <if test="reviConc != null and reviConc != ''">REVI_CONC = #{reviConc},</if>
- <if test="reviOrgGuid != null and reviOrgGuid != ''">REVI_ORG_GUID = #{reviOrgGuid},</if>
- <if test="dataStat != null and dataStat != ''">DATA_STAT = #{dataStat},</if>
- <if test="collTime != null">COLL_TIME = #{collTime},</if>
- <if test="recPers != null and recPers != ''">REC_PERS = #{recPers},</if>
- <if test="note != null and note != ''">NOTE = #{note},</if>
- <if test="regid != null and regid != ''">REGID = #{regid},</if>
- <if test="commonFileIds != null and commonFileIds != ''">COMMON_FILE_IDS = #{commonFileIds},</if>
- <if test="fileNo != null and fileNo != ''">FILE_NO = #{fileNo},</if>
- <if test="fileNoNumber != null and fileNoNumber != ''">FILE_NO_NUMBER = #{fileNoNumber},</if>
- <if test="pblmsId != null and pblmsId != ''">PBLMS_ID = #{pblmsId},</if>
- <if test="pblmsTypeId != null and pblmsTypeId != ''">PBLMS_TYPE_ID = #{pblmsTypeId},</if>
- <if test="villType != null and villType != ''">VILL_TYPE = #{villType},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="villageCode != null and villageCode != ''">VILLAGE_CODE = #{villageCode},</if>
- <if test="hasVedio != null and hasVedio != ''">HAS_VEDIO = #{hasVedio},</if>
- <if test="problemType != null and problemType != ''">PROBLEM_TYPE = #{problemType},</if>
- <if test="qualityTypeId != null and qualityTypeId != ''">QUALITY_TYPE_ID = #{qualityTypeId},</if>
- <if test="defectTypeId != null and defectTypeId != ''">DEFECT_TYPE_ID = #{defectTypeId},</if>
- <if test="fdbkId != null and fdbkId != ''">FDBK_ID = #{fdbkId},</if>
- <if test="itemId != null and itemId != ''">ITEM_ID = #{itemId},</if>
- <if test="waterUserId != null and waterUserId != ''">WATER_USER_ID = #{waterUserId},</if>
- <if test="quote != null and quote != ''">QUOTE = #{quote},</if>
- <if test="pblmId != null and pblmId != ''">PBLM_ID = #{pblmId},</if>
- <if test="objId != null and objId != ''">OBJ_ID = #{objId},</if>
- <if test="objType != null and objType != ''">OBJ_TYPE = #{objType},</if>
- <if test="inspGroupId != null and inspGroupId != ''">INSP_GROUP_ID = #{inspGroupId},</if>
- <if test="pguid != null and pguid != ''">PGUID = #{pguid},</if>
- <if test="inspPblmType != null and inspPblmType != ''">INSP_PBLM_TYPE = #{inspPblmType},</if>
- <if test="inspPblmCode != null and inspPblmCode != ''">INSP_PBLM_CODE = #{inspPblmCode},</if>
- <if test="inspPblmName != null and inspPblmName != ''">INSP_PBLM_NAME = #{inspPblmName},</if>
- <if test="inspPblmDesc != null and inspPblmDesc != ''">INSP_PBLM_DESC = #{inspPblmDesc},</if>
- <if test="inspAddDesc != null and inspAddDesc != ''">INSP_ADD_DESC = #{inspAddDesc},</if>
- <if test="pblmLong != null and pblmLong != ''">PBLM_LONG = #{pblmLong},</if>
- <if test="pblmLat != null and pblmLat != ''">PBLM_LAT = #{pblmLat},</if>
- <if test="ifCasePblm != null and ifCasePblm != ''">IF_CASE_PBLM = #{ifCasePblm},</if>
- <if test="inspPblmOrgName != null and inspPblmOrgName != ''">INSP_PBLM_ORG_NAME = #{inspPblmOrgName},</if>
- <if test="pblmPersName != null and pblmPersName != ''">PBLM_PERS_NAME = #{pblmPersName},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|