| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652 |
- <?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.BisInspVlgdrinkProjManageDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage" id="bisInspVlgdrinkProjManageResultMap">
- <result property="splPlbm" column="SPL_PLBM"/>
- <result property="equPlbm" column="EQU_PLBM"/>
- <result property="rptPlbm" column="RPT_PLBM"/>
- <result property="labPlbm" column="LAB_PLBM"/>
- <result property="insPlbm" column="INS_PLBM"/>
- <result property="sanPlbm" column="SAN_PLBM"/>
- <result property="sysPlbm" column="SYS_PLBM"/>
- <result property="vdoPlbm" column="VDO_PLBM"/>
- <result property="feePlbm" column="FEE_PLBM"/>
- <result property="pjnm" column="PJNM"/>
- <result property="runId" column="RUN_ID"/>
- <result property="engId" column="ENG_ID"/>
- <result property="cwsCode" column="CWS_CODE"/>
- <result property="villageNm" column="VILLAGE_NM"/>
- <result property="buildYear" column="BUILD_YEAR"/>
- <result property="planSupplyScale" column="PLAN_SUPPLY_SCALE"/>
- <result property="supplyScale" column="SUPPLY_SCALE"/>
- <result property="personNum" column="PERSON_NUM"/>
- <result property="pipeDamagePer" column="PIPE_DAMAGE_PER"/>
- <result property="projectType" column="PROJECT_TYPE"/>
- <result property="is24hSupply" column="IS_24H_SUPPLY"/>
- <result property="isHavecleanEqui" column="IS_HAVECLEAN_EQUI"/>
- <result property="isCleanequiG" column="IS_CLEANEQUI_G"/>
- <result property="isHavedisinfect" column="IS_HAVEDISINFECT"/>
- <result property="disinfectType" column="DISINFECT_TYPE"/>
- <result property="isDisinfectGood" column="IS_DISINFECT_GOOD"/>
- <result property="isHavereport" column="IS_HAVEREPORT"/>
- <result property="isQuailtyGood" column="IS_QUAILTY_GOOD"/>
- <result property="isHaveLab" column="IS_HAVE_LAB"/>
- <result property="isDailyCheck" column="IS_DAILY_CHECK"/>
- <result property="isDailycheckGood" column="IS_DAILYCHECK_GOOD"/>
- <result property="isInsLicence" column="IS_INS_LICENCE"/>
- <result property="isSanLicence" column="IS_SAN_LICENCE"/>
- <result property="isAutosystem" column="IS_AUTOSYSTEM"/>
- <result property="isAutosysGood" column="IS_AUTOSYS_GOOD"/>
- <result property="isVideoSystem" column="IS_VIDEO_SYSTEM"/>
- <result property="isVideosysGood" column="IS_VIDEOSYS_GOOD"/>
- <result property="waterFee" column="WATER_FEE"/>
- <result property="waterCost" column="WATER_COST"/>
- <result property="operCost" column="OPER_COST"/>
- <result property="feeRecyclePer" column="FEE_RECYCLE_PER"/>
- <result property="manager" column="MANAGER"/>
- <result property="isHaveHotline" column="IS_HAVE_HOTLINE"/>
- <result property="visitDate" column="VISIT_DATE"/>
- <result property="recPersId" column="REC_PERS_ID"/>
- <result property="recPers2" column="REC_PERS2"/>
- <result property="recPersTel" column="REC_PERS_TEL"/>
- <result property="createTime" column="CREATE_TIME"/>
- <result property="updateTime" column="UPDATE_TIME"/>
- <result property="status" column="STATUS"/>
- <result property="isHrSupply" column="IS_HR_SUPPLY"/>
- <result property="hrNote" column="HR_NOTE"/>
- <result property="disinfectNote" column="DISINFECT_NOTE"/>
- <result property="qualityNote" column="QUALITY_NOTE"/>
- </resultMap>
- <sql id="table_columns">
- SPL_PLBM ,
- EQU_PLBM ,
- RPT_PLBM ,
- LAB_PLBM ,
- INS_PLBM ,
- SAN_PLBM ,
- SYS_PLBM ,
- VDO_PLBM ,
- FEE_PLBM ,
- PJNM ,
- RUN_ID ,
- ENG_ID ,
- CWS_CODE ,
- VILLAGE_NM ,
- BUILD_YEAR ,
- PLAN_SUPPLY_SCALE ,
- SUPPLY_SCALE ,
- PERSON_NUM ,
- PIPE_DAMAGE_PER ,
- PROJECT_TYPE ,
- IS_24H_SUPPLY ,
- IS_HAVECLEAN_EQUI ,
- IS_CLEANEQUI_G ,
- IS_HAVEDISINFECT ,
- DISINFECT_TYPE ,
- IS_DISINFECT_GOOD ,
- IS_HAVEREPORT ,
- IS_QUAILTY_GOOD ,
- IS_HAVE_LAB ,
- IS_DAILY_CHECK ,
- IS_DAILYCHECK_GOOD ,
- IS_INS_LICENCE ,
- IS_SAN_LICENCE ,
- IS_AUTOSYSTEM ,
- IS_AUTOSYS_GOOD ,
- IS_VIDEO_SYSTEM ,
- IS_VIDEOSYS_GOOD ,
- WATER_FEE ,
- WATER_COST ,
- OPER_COST ,
- FEE_RECYCLE_PER ,
- MANAGER ,
- IS_HAVE_HOTLINE ,
- TO_CHAR(VISIT_DATE,'YYYY-MM-DD') VISIT_DATE,
- REC_PERS_ID ,
- REC_PERS2 ,
- REC_PERS_TEL ,
- TO_CHAR(CREATE_TIME,'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
- TO_CHAR(UPDATE_TIME,'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
- STATUS,
- IS_HR_SUPPLY,
- HR_NOTE,
- DISINFECT_NOTE,
- QUALITY_NOTE
- </sql>
- <sql id="table_columns2">
- SPL_PLBM ,
- EQU_PLBM ,
- RPT_PLBM ,
- LAB_PLBM ,
- INS_PLBM ,
- SAN_PLBM ,
- SYS_PLBM ,
- VDO_PLBM ,
- FEE_PLBM ,
- PJNM ,
- RUN_ID ,
- ENG_ID ,
- CWS_CODE ,
- VILLAGE_NM ,
- BUILD_YEAR ,
- PLAN_SUPPLY_SCALE ,
- SUPPLY_SCALE ,
- PERSON_NUM ,
- PIPE_DAMAGE_PER ,
- PROJECT_TYPE ,
- IS_24H_SUPPLY ,
- IS_HAVECLEAN_EQUI ,
- IS_CLEANEQUI_G ,
- IS_HAVEDISINFECT ,
- DISINFECT_TYPE ,
- IS_DISINFECT_GOOD ,
- IS_HAVEREPORT ,
- IS_QUAILTY_GOOD ,
- IS_HAVE_LAB ,
- IS_DAILY_CHECK ,
- IS_DAILYCHECK_GOOD ,
- IS_INS_LICENCE ,
- IS_SAN_LICENCE ,
- IS_AUTOSYSTEM ,
- IS_AUTOSYS_GOOD ,
- IS_VIDEO_SYSTEM ,
- IS_VIDEOSYS_GOOD ,
- WATER_FEE ,
- WATER_COST ,
- OPER_COST ,
- FEE_RECYCLE_PER ,
- MANAGER ,
- IS_HAVE_HOTLINE ,
- VISIT_DATE ,
- REC_PERS_ID ,
- REC_PERS2 ,
- REC_PERS_TEL ,
- CREATE_TIME ,
- UPDATE_TIME ,
- STATUS,
- IS_HR_SUPPLY,
- HR_NOTE,
- DISINFECT_NOTE,
- QUALITY_NOTE
- </sql>
- <sql id="entity_properties">
- #{splPlbm},
- #{equPlbm},
- #{rptPlbm},
- #{labPlbm},
- #{insPlbm},
- #{sanPlbm},
- #{sysPlbm},
- #{vdoPlbm},
- #{feePlbm},
- #{pjnm},
- #{runId},
- #{engId},
- #{cwsCode},
- #{villageNm},
- #{buildYear},
- #{planSupplyScale},
- #{supplyScale},
- #{personNum},
- #{pipeDamagePer},
- #{projectType},
- #{is24hSupply},
- #{isHavecleanEqui},
- #{isCleanequiG},
- #{isHavedisinfect},
- #{disinfectType},
- #{isDisinfectGood},
- #{isHavereport},
- #{isQuailtyGood},
- #{isHaveLab},
- #{isDailyCheck},
- #{isDailycheckGood},
- #{isInsLicence},
- #{isSanLicence},
- #{isAutosystem},
- #{isAutosysGood},
- #{isVideoSystem},
- #{isVideosysGood},
- #{waterFee},
- #{waterCost},
- #{operCost},
- #{feeRecyclePer},
- #{manager},
- #{isHaveHotline},
- TO_DATE(#{visitDate},'YYYY-MM-DD'),
- #{recPersId},
- #{recPers2},
- #{recPersTel},
- TO_DATE(#{createTime},'YYYY-MM-DD HH24:MI:SS') ,
- TO_DATE(#{updateTime},'YYYY-MM-DD HH24:MI:SS') ,
- #{status},
- #{isHrSupply},
- #{hrNote},
- #{disinfectNote},
- #{qualityNote}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="splPlbm != null and splPlbm != ''">and SPL_PLBM = #{splPlbm}</if>
- <if test="equPlbm != null and equPlbm != ''">and EQU_PLBM = #{equPlbm}</if>
- <if test="rptPlbm != null and rptPlbm != ''">and RPT_PLBM = #{rptPlbm}</if>
- <if test="labPlbm != null and labPlbm != ''">and LAB_PLBM = #{labPlbm}</if>
- <if test="insPlbm != null and insPlbm != ''">and INS_PLBM = #{insPlbm}</if>
- <if test="sanPlbm != null and sanPlbm != ''">and SAN_PLBM = #{sanPlbm}</if>
- <if test="sysPlbm != null and sysPlbm != ''">and SYS_PLBM = #{sysPlbm}</if>
- <if test="vdoPlbm != null and vdoPlbm != ''">and VDO_PLBM = #{vdoPlbm}</if>
- <if test="feePlbm != null and feePlbm != ''">and FEE_PLBM = #{feePlbm}</if>
- <if test="pjnm != null and pjnm != ''">and PJNM LIKE '%'||#{pjnm}||'%'</if>
- <if test="runId != null and runId != ''">and RUN_ID = #{runId}</if>
- <if test="engId != null and engId != ''">and ENG_ID = #{engId}</if>
- <if test="cwsCode != null and cwsCode != ''">and CWS_CODE = #{cwsCode}</if>
- <if test="villageNm != null and villageNm != ''">and VILLAGE_NM = #{villageNm}</if>
- <if test="buildYear != null and buildYear != ''">and BUILD_YEAR = #{buildYear}</if>
- <if test="planSupplyScale != null and planSupplyScale != ''">and PLAN_SUPPLY_SCALE = #{planSupplyScale}</if>
- <if test="supplyScale != null and supplyScale != ''">and SUPPLY_SCALE = #{supplyScale}</if>
- <if test="personNum != null and personNum != ''">and PERSON_NUM = #{personNum}</if>
- <if test="pipeDamagePer != null and pipeDamagePer != ''">and PIPE_DAMAGE_PER = #{pipeDamagePer}</if>
- <if test="projectType != null and projectType != ''">and PROJECT_TYPE = #{projectType}</if>
- <if test="is24hSupply != null and is24hSupply != ''">and IS_24H_SUPPLY = #{is24hSupply}</if>
- <if test="isHavecleanEqui != null and isHavecleanEqui != ''">and IS_HAVECLEAN_EQUI = #{isHavecleanEqui}</if>
- <if test="isCleanequiG != null and isCleanequiG != ''">and IS_CLEANEQUI_G = #{isCleanequiG}</if>
- <if test="isHavedisinfect != null and isHavedisinfect != ''">and IS_HAVEDISINFECT = #{isHavedisinfect}</if>
- <if test="disinfectType != null and disinfectType != ''">and DISINFECT_TYPE = #{disinfectType}</if>
- <if test="isDisinfectGood != null and isDisinfectGood != ''">and IS_DISINFECT_GOOD = #{isDisinfectGood}</if>
- <if test="isHavereport != null and isHavereport != ''">and IS_HAVEREPORT = #{isHavereport}</if>
- <if test="isQuailtyGood != null and isQuailtyGood != ''">and IS_QUAILTY_GOOD = #{isQuailtyGood}</if>
- <if test="isHaveLab != null and isHaveLab != ''">and IS_HAVE_LAB = #{isHaveLab}</if>
- <if test="isDailyCheck != null and isDailyCheck != ''">and IS_DAILY_CHECK = #{isDailyCheck}</if>
- <if test="isDailycheckGood != null and isDailycheckGood != ''">and IS_DAILYCHECK_GOOD =
- #{isDailycheckGood}
- </if>
- <if test="isInsLicence != null and isInsLicence != ''">and IS_INS_LICENCE = #{isInsLicence}</if>
- <if test="isSanLicence != null and isSanLicence != ''">and IS_SAN_LICENCE = #{isSanLicence}</if>
- <if test="isAutosystem != null and isAutosystem != ''">and IS_AUTOSYSTEM = #{isAutosystem}</if>
- <if test="isAutosysGood != null and isAutosysGood != ''">and IS_AUTOSYS_GOOD = #{isAutosysGood}</if>
- <if test="isVideoSystem != null and isVideoSystem != ''">and IS_VIDEO_SYSTEM = #{isVideoSystem}</if>
- <if test="isVideosysGood != null and isVideosysGood != ''">and IS_VIDEOSYS_GOOD = #{isVideosysGood}</if>
- <if test="waterFee != null and waterFee != ''">and WATER_FEE = #{waterFee}</if>
- <if test="waterCost != null and waterCost != ''">and WATER_COST = #{waterCost}</if>
- <if test="operCost != null and operCost != ''">and OPER_COST = #{operCost}</if>
- <if test="feeRecyclePer != null">and FEE_RECYCLE_PER = #{feeRecyclePer}</if>
- <if test="manager != null and manager != ''">and MANAGER = #{manager}</if>
- <if test="isHaveHotline != null and isHaveHotline != ''">and IS_HAVE_HOTLINE = #{isHaveHotline}</if>
- <if test="visitDate != null and visitDate != ''">and VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD')</if>
- <if test="recPersId != null and recPersId != ''">and REC_PERS_ID = #{recPersId}</if>
- <if test="recPers2 != null and recPers2 != ''">and REC_PERS2 = #{recPers2}</if>
- <if test="recPersTel != null and recPersTel != ''">and REC_PERS_TEL = #{recPersTel}</if>
- <if test="createTime != null and createTime != ''">and CREATE_TIME = TO_DATE(#{createTime},'YYYY-MM-DD
- HH24:MI:SS')
- </if>
- <if test="updateTime != null and updateTime != ''">and UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
- HH24:MI:SS')
- </if>
- <if test="status != null and status != ''">and STATUS = #{status}</if>
- <if test="isHrSupply != null and isHrSupply != ''">and IS_HR_SUPPLY = #{isHrSupply}</if>
- <if test="hrNote != null and hrNote != ''">and HR_NOTE = #{hrNote}</if>
- <if test="disinfectNote != null and disinfectNote != ''">and DISINFECT_NOTE = #{disinfectNote}</if>
- <if test="qualityNote != null and qualityNote != ''">and QUALITY_NOTE = #{qualityNote}</if>
- </trim>
- </sql>
- <select id="get" resultMap="bisInspVlgdrinkProjManageResultMap" parameterType="String">
- select
- <include refid="table_columns"/>
- from BIS_INSP_VLGDRINK_PROJ_MANAGE where RUN_ID = #{id}
- </select>
- <select id="getBy" resultMap="bisInspVlgdrinkProjManageResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_VLGDRINK_PROJ_MANAGE
- <include refid="page_where"/>
- </select>
- <select id="findAll" resultMap="bisInspVlgdrinkProjManageResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_VLGDRINK_PROJ_MANAGE
- </select>
- <select id="findList" resultMap="bisInspVlgdrinkProjManageResultMap">
- select
- <include refid="table_columns"/>
- from BIS_INSP_VLGDRINK_PROJ_MANAGE
- <include refid="page_where"/>
- ORDER BY UPDATE_TIME DESC
- </select>
- <select id="selectCount" resultType="int">
- select count(RUN_ID) from BIS_INSP_VLGDRINK_PROJ_MANAGE
- <include refid="page_where"/>
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
- insert into BIS_INSP_VLGDRINK_PROJ_MANAGE(
- <include refid="table_columns2"/>
- )
- values (
- <include refid="entity_properties"/>
- )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from BIS_INSP_VLGDRINK_PROJ_MANAGE where RUN_ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
- delete from BIS_INSP_VLGDRINK_PROJ_MANAGE
- <include refid="page_where"/>
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update BIS_INSP_VLGDRINK_PROJ_MANAGE set flag_valid = 0 where RUN_ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
- update BIS_INSP_VLGDRINK_PROJ_MANAGE
- <trim prefix="set" suffixOverrides=",">
- <if test="splPlbm != null and splPlbm != ''">SPL_PLBM = #{splPlbm},</if>
- <if test="equPlbm != null and equPlbm != ''">EQU_PLBM = #{equPlbm},</if>
- <if test="rptPlbm != null and rptPlbm != ''">RPT_PLBM = #{rptPlbm},</if>
- <if test="labPlbm != null and labPlbm != ''">LAB_PLBM = #{labPlbm},</if>
- <if test="insPlbm != null and insPlbm != ''">INS_PLBM = #{insPlbm},</if>
- <if test="sanPlbm != null and sanPlbm != ''">SAN_PLBM = #{sanPlbm},</if>
- <if test="sysPlbm != null and sysPlbm != ''">SYS_PLBM = #{sysPlbm},</if>
- <if test="vdoPlbm != null and vdoPlbm != ''">VDO_PLBM = #{vdoPlbm},</if>
- <if test="feePlbm != null and feePlbm != ''">FEE_PLBM = #{feePlbm},</if>
- <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
- <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
- <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
- <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
- <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
- <if test="personNum != null and personNum != ''">PERSON_NUM = #{personNum},</if>
- <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
- <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
- <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
- <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
- <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
- <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
- <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
- <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
- <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
- <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
- <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
- <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
- <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
- </if>
- <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
- <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
- <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
- <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
- <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
- <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
- <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
- <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
- <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
- <if test="feeRecyclePer != null">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
- <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
- <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
- <if test="visitDate != null and visitDate != ''">VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD'),</if>
- <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
- <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
- <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
- <if test="createTime != null and createTime != ''">CREATE_TIME = TO_DATE(#{createTime},'YYYY-MM-DD
- HH24:MI:SS'),
- </if>
- <if test="updateTime != null and updateTime != ''">UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
- HH24:MI:SS'),
- </if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="isHrSupply != null and isHrSupply != ''">IS_HR_SUPPLY = #{isHrSupply},</if>
- <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
- <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
- <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
- </trim>
- <where>RUN_ID = #{runId}</where>
- </update>
- <update id="updateByCwsCode" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
- update BIS_INSP_VLGDRINK_PROJ_MANAGE
- <trim prefix="set" suffixOverrides=",">
- <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
- <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
- <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
- <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
- <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
- <if test="personNum != null">PERSON_NUM = #{personNum},</if>
- <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
- <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
- <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
- <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
- <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
- <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
- <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
- <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
- <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
- <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
- <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
- <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
- <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
- </if>
- <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
- <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
- <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
- <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
- <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
- <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
- <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
- <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
- <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
- <if test="feeRecyclePer != null and feeRecyclePer != ''">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
- <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
- <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
- <if test="visitDate != null and visitDate != ''">VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD'),</if>
- <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
- <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
- <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
- <if test="updateTime != null and updateTime != ''">UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
- HH24:MI:SS'),
- </if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
- <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
- <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
- </trim>
- <where>CWS_CODE = #{cwsCode}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
- update BIS_INSP_VLGDRINK_PROJ_MANAGE
- <trim prefix="set" suffixOverrides=",">
- <if test="splPlbm != null and splPlbm != ''">SPL_PLBM = #{splPlbm},</if>
- <if test="equPlbm != null and equPlbm != ''">EQU_PLBM = #{equPlbm},</if>
- <if test="rptPlbm != null and rptPlbm != ''">RPT_PLBM = #{rptPlbm},</if>
- <if test="labPlbm != null and labPlbm != ''">LAB_PLBM = #{labPlbm},</if>
- <if test="insPlbm != null and insPlbm != ''">INS_PLBM = #{insPlbm},</if>
- <if test="sanPlbm != null and sanPlbm != ''">SAN_PLBM = #{sanPlbm},</if>
- <if test="sysPlbm != null and sysPlbm != ''">SYS_PLBM = #{sysPlbm},</if>
- <if test="vdoPlbm != null and vdoPlbm != ''">VDO_PLBM = #{vdoPlbm},</if>
- <if test="feePlbm != null and feePlbm != ''">FEE_PLBM = #{feePlbm},</if>
- <if test="pjnm != null and pjnm != ''">PJNM = #{pjnm},</if>
- <if test="engId != null and engId != ''">ENG_ID = #{engId},</if>
- <if test="cwsCode != null and cwsCode != ''">CWS_CODE = #{cwsCode},</if>
- <if test="villageNm != null and villageNm != ''">VILLAGE_NM = #{villageNm},</if>
- <if test="buildYear != null and buildYear != ''">BUILD_YEAR = #{buildYear},</if>
- <if test="planSupplyScale != null and planSupplyScale != ''">PLAN_SUPPLY_SCALE = #{planSupplyScale},</if>
- <if test="supplyScale != null and supplyScale != ''">SUPPLY_SCALE = #{supplyScale},</if>
- <if test="personNum != null and personNum != ''">PERSON_NUM = #{personNum},</if>
- <if test="pipeDamagePer != null and pipeDamagePer != ''">PIPE_DAMAGE_PER = #{pipeDamagePer},</if>
- <if test="projectType != null and projectType != ''">PROJECT_TYPE = #{projectType},</if>
- <if test="is24hSupply != null and is24hSupply != ''">IS_24H_SUPPLY = #{is24hSupply},</if>
- <if test="isHavecleanEqui != null and isHavecleanEqui != ''">IS_HAVECLEAN_EQUI = #{isHavecleanEqui},</if>
- <if test="isCleanequiG != null and isCleanequiG != ''">IS_CLEANEQUI_G = #{isCleanequiG},</if>
- <if test="isHavedisinfect != null and isHavedisinfect != ''">IS_HAVEDISINFECT = #{isHavedisinfect},</if>
- <if test="disinfectType != null and disinfectType != ''">DISINFECT_TYPE = #{disinfectType},</if>
- <if test="isDisinfectGood != null and isDisinfectGood != ''">IS_DISINFECT_GOOD = #{isDisinfectGood},</if>
- <if test="isHavereport != null and isHavereport != ''">IS_HAVEREPORT = #{isHavereport},</if>
- <if test="isQuailtyGood != null and isQuailtyGood != ''">IS_QUAILTY_GOOD = #{isQuailtyGood},</if>
- <if test="isHaveLab != null and isHaveLab != ''">IS_HAVE_LAB = #{isHaveLab},</if>
- <if test="isDailyCheck != null and isDailyCheck != ''">IS_DAILY_CHECK = #{isDailyCheck},</if>
- <if test="isDailycheckGood != null and isDailycheckGood != ''">IS_DAILYCHECK_GOOD = #{isDailycheckGood},
- </if>
- <if test="isInsLicence != null and isInsLicence != ''">IS_INS_LICENCE = #{isInsLicence},</if>
- <if test="isSanLicence != null and isSanLicence != ''">IS_SAN_LICENCE = #{isSanLicence},</if>
- <if test="isAutosystem != null and isAutosystem != ''">IS_AUTOSYSTEM = #{isAutosystem},</if>
- <if test="isAutosysGood != null and isAutosysGood != ''">IS_AUTOSYS_GOOD = #{isAutosysGood},</if>
- <if test="isVideoSystem != null and isVideoSystem != ''">IS_VIDEO_SYSTEM = #{isVideoSystem},</if>
- <if test="isVideosysGood != null and isVideosysGood != ''">IS_VIDEOSYS_GOOD = #{isVideosysGood},</if>
- <if test="waterFee != null and waterFee != ''">WATER_FEE = #{waterFee},</if>
- <if test="waterCost != null and waterCost != ''">WATER_COST = #{waterCost},</if>
- <if test="operCost != null and operCost != ''">OPER_COST = #{operCost},</if>
- <if test="feeRecyclePer != null and feeRecyclePer != ''">FEE_RECYCLE_PER = #{feeRecyclePer},</if>
- <if test="manager != null and manager != ''">MANAGER = #{manager},</if>
- <if test="isHaveHotline != null and isHaveHotline != ''">IS_HAVE_HOTLINE = #{isHaveHotline},</if>
- <if test="visitDate != null and visitDate != ''">VISIT_DATE = TO_DATE(#{visitDate},'YYYY-MM-DD'),</if>
- <if test="recPersId != null and recPersId != ''">REC_PERS_ID = #{recPersId},</if>
- <if test="recPers2 != null and recPers2 != ''">REC_PERS2 = #{recPers2},</if>
- <if test="recPersTel != null and recPersTel != ''">REC_PERS_TEL = #{recPersTel},</if>
- <if test="createTime != null and createTime != ''">CREATE_TIME = TO_DATE(#{createTime},'YYYY-MM-DD
- HH24:MI:SS'),
- </if>
- <if test="updateTime != null and updateTime != ''">UPDATE_TIME = TO_DATE(#{updateTime},'YYYY-MM-DD
- HH24:MI:SS'),
- </if>
- <if test="status != null and status != ''">STATUS = #{status},</if>
- <if test="hrNote != null and hrNote != ''">HR_NOTE = #{hrNote},</if>
- <if test="disinfectNote != null and disinfectNote != ''">DISINFECT_NOTE = #{disinfectNote},</if>
- <if test="qualityNote != null and qualityNote != ''">QUALITY_NOTE = #{qualityNote},</if>
- </trim>
- <include refid="page_where"/>
- </update>
- <!-- 其他自定义SQL -->
- <select id="queryListByObjId" resultMap="bisInspVlgdrinkProjManageResultMap" parameterType="string">
- SELECT
- B.PJNM,
- B.RUN_ID,
- A.ENG_ID FROM
- BIS_INSP_VILL_RGSTR A
- RIGHT JOIN BIS_INSP_VLGDRINK_PROJ_MANAGE B ON A.ENG_ID=B.ENG_ID
- WHERE A.OBJ_ID=#{objId}
- <if test="name != null and name != ''">AND B.PJNM LIKE '%'||#{name}||'%'</if>
- </select>
- <select id="getListByCodeAndPerId" parameterType="cn.com.goldenwater.dcproj.dto.VillRgstrDto"
- resultType="cn.com.goldenwater.dcproj.model.BisInspVlgdrinkProjManage">
- SELECT * FROM BIS_INSP_VLGDRINK_PROJ_MANAGE A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID = B.ENG_ID
- LEFT JOIN BIS_INSP_ALL_OBJ C ON B.OBJ_ID = C.OBJ_ID
- WHERE
- <!--
- REGEXP_LIKE(
- C.Id,(SELECT LISTAGG(id, '|') WITHIN GROUP(ORDER BY PERSID) as id FROM BIS_INSP_ALL_RLATION WHERE PERSID = #{persId})
- )
- -->
- REGEXP_LIKE(
- C.Id,'^('||
- ( case when(SELECT count(id) from BIS_INSP_ALL_RLATION WHERE PERSID =#{persId})>0 then
- (SELECT LISTAGG(id, '|') WITHIN GROUP(ORDER BY PERSID) as
- id FROM BIS_INSP_ALL_RLATION WHERE PERSID =#{persId})
- else (select 'non' from dual) end)
- ||')')
- AND C.CODE LIKE '${adCode}%' AND C.PTYPE = '2'
- <if test="adNm != null and adNm != ''">and A.PJNM LIKE '%${adNm}%'</if>
- </select>
- <select id="getPageByNodeId" parameterType="cn.com.goldenwater.dcproj.param.GetVillPageByNodeIdParam"
- resultType="cn.com.goldenwater.dcproj.dto.BisInspVlgdrinkProjManageDcdxDto">
- select A.SPL_PLBM ,
- A.EQU_PLBM ,
- A.RPT_PLBM ,
- A.LAB_PLBM ,
- A.INS_PLBM ,
- A.SAN_PLBM ,
- A.SYS_PLBM ,
- A.VDO_PLBM ,
- A.FEE_PLBM ,
- A.PJNM ,
- A.RUN_ID ,
- A.ENG_ID ,
- A.CWS_CODE ,
- A.VILLAGE_NM ,
- A.BUILD_YEAR ,
- A.PLAN_SUPPLY_SCALE ,
- A.SUPPLY_SCALE ,
- A.PERSON_NUM ,
- A.PIPE_DAMAGE_PER ,
- A.PROJECT_TYPE ,
- A.IS_24H_SUPPLY ,
- A.IS_HAVECLEAN_EQUI ,
- A.IS_CLEANEQUI_G ,
- A.IS_HAVEDISINFECT ,
- A.DISINFECT_TYPE ,
- A.IS_DISINFECT_GOOD ,
- A.IS_HAVEREPORT ,
- A.IS_QUAILTY_GOOD ,
- A.IS_HAVE_LAB ,
- A.IS_DAILY_CHECK ,
- A.IS_DAILYCHECK_GOOD ,
- A.IS_INS_LICENCE ,
- A.IS_SAN_LICENCE ,
- A.IS_AUTOSYSTEM ,
- A.IS_AUTOSYS_GOOD ,
- A.IS_VIDEO_SYSTEM ,
- A.IS_VIDEOSYS_GOOD ,
- A.WATER_FEE ,
- A.WATER_COST ,
- A.OPER_COST ,
- A.FEE_RECYCLE_PER ,
- A.MANAGER ,
- A.IS_HAVE_HOTLINE ,
- TO_CHAR(A.VISIT_DATE,'YYYY-MM-DD') VISIT_DATE,
- A.REC_PERS_ID ,
- A.REC_PERS2 ,
- A.REC_PERS_TEL ,
- TO_CHAR(A.CREATE_TIME,'YYYY-MM-DD HH24:MI:SS') CREATE_TIME,
- TO_CHAR(A.UPDATE_TIME,'YYYY-MM-DD HH24:MI:SS') UPDATE_TIME,
- A.STATUS,
- A.IS_HR_SUPPLY,
- A.HR_NOTE,
- A.DISINFECT_NOTE,
- A.QUALITY_NOTE,D.PNM GROUP_NM,F.PNM CHKCOM,H.AD_NAME COUNTY,I.AD_NAME CITY,J.AD_NAME PROVINCE from
- BIS_INSP_VLGDRINK_PROJ_MANAGE A LEFT JOIN BIS_INSP_VILL_RGSTR B ON A.ENG_ID=B.ENG_ID LEFT JOIN bis_insp_all_obj
- C ON B.OBJ_ID=C.OBJ_ID
- LEFT JOIN BIS_INSP_ALL D ON C.ID=D.ID LEFT JOIN BIS_INSP_ALL E ON D.PID=E.ID LEFT JOIN BIS_INSP_ALL F ON
- E.PID=F.ID
- LEFT JOIN ATT_CWS_BASE ATT ON A.CWS_CODE=ATT.CWS_CODE
- LEFT JOIN ATT_AD_X_BASE H ON ATT.ADDVCD=H.AD_CODE
- LEFT JOIN ATT_AD_X_BASE I ON H.AD_FCODE=I.AD_CODE LEFT JOIN ATT_AD_X_BASE J ON I.AD_FCODE=J.AD_CODE WHERE 1=1
- <if test="nodeId != null and nodeId != ''">
- and C.ID like #{nodeId}||'%'
- </if>
- <if test="startDate != null and startDate != ''">
- AND A.VISIT_DATE >=TO_DATE(#{startDate},'YYYY-MM-DD')
- </if>
- <if test="endDate != null and endDate != ''">
- AND A.VISIT_DATE <TO_DATE(#{endDate},'YYYY-MM-DD')+1
- </if>
- <if test="chkComId != null and chkComId != ''">
- AND F.ID =#{chkComId}
- </if>
- <if test="groupId != null and groupId != ''">
- AND D.ID =#{groupId}
- </if>
- <if test="adNm != null and adNm != ''">
- AND( A.VILLAGE_NM LIKE '%'||#{adNm}||'%' OR H.AD_NAME LIKE '%'||#{adNm}||'%' OR I.AD_NAME LIKE
- '%'||#{adNm}||'%' OR J.AD_NAME LIKE '%'||#{adNm}||'%' )
- </if>
- ORDER BY A.UPDATE_TIME DESC,A.VISIT_DATE DESC
- </select>
- </mapper>
|