123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590 |
- <?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="com.ruoyi.project.process.mapper.TMocMapper">
- <resultMap type="TMoc" id="TMocResult">
- <result property="id" column="id" />
- <result property="plantCode" column="plant_code" />
- <result property="mocNo" column="moc_no" />
- <result property="plantNumber" column="plant_number" />
- <result property="noticeLetter" column="notice_letter" />
- <result property="workLetter" column="work_letter" />
- <result property="cteNo" column="cte_no" />
- <result property="investCost" column="invest_cost" />
- <result property="category" column="category" />
- <result property="significance" column="significance" />
- <result property="classification" column="classification" />
- <result property="area" column="area" />
- <result property="dashControl" column="dash_control" />
- <result property="title" column="title" />
- <result property="owner" column="owner" />
- <result property="approveTime" column="approve_time" />
- <result property="estimateEndtime" column="estimate_endtime" />
- <result property="endtime" column="endtime" />
- <result property="trueState" column="true_state" />
- <result property="changeNature" column="change_nature" />
- <result property="overTime" column="over_time" />
- <result property="riskLevel" column="risk_level" />
- <result property="training" column="training" />
- <result property="pssr" column="pssr" />
- <result property="ehsCheck" column="ehs_check" />
- <result property="ehsDb" column="ehs_db" />
- <result property="pidMaster" column="pid_master" />
- <result property="pssrDb" column="pssr_db" />
- <result property="capex" column="capex" />
- <result property="delFlag" column="del_flag" />
- <result property="createrCode" column="creater_code" />
- <result property="createdate" column="createdate" />
- <result property="updaterCode" column="updater_code" />
- <result property="updatedate" column="updatedate" />
- <result property="deptId" column="dept_id" />
- <result property="remarks" column="remarks" />
- <result property="temporaryState" column="temporary_state" />
- <result property="sopUpdate" column="sop_update" />
- <result property="companyMocNo" column="company_moc_no" />
- <result property="projectNo" column="project_no" />
- <result property="mocType" column="moc_type" />
- <result property="mcTime" column="mc_time" />
- <result property="mcDetail" column="mc_detail" />
- <result property="docUpdate" column="doc_update" />
- <result property="pssrNo" column="pssr_no" />
- <result property="deptName" column="dept_name" />
- <result property="timeliness" column="timeliness" />
- <result property="tempCategory" column="temp_category" />
- <result property="expTime" column="exp_time" />
- <result property="tempState" column="temp_state" />
- <result property="location" column="location" />
- <result property="finishDate" column="finish_date" />
- <result property="processUnit" column="process_unit" />
- <result property="department" column="department" />
- <result property="leakLocation" column="leak_location" />
- <result property="pressure" column="pressure" />
- <result property="temperature" column="temperature" />
- <result property="leakFluid" column="leak_fluid" />
- <result property="materialType" column="material_type" />
- <result property="planDate" column="plan_date" />
- <result property="sealDate" column="seal_date" />
- <result property="extention1" column="extention1" />
- <result property="extention2" column="extention2" />
- <result property="extention3" column="extention3" />
- <result property="extention4" column="extention4" />
- <result property="extention5" column="extention5" />
- <result property="extention6" column="extention6" />
- <result property="extention7" column="extention7" />
- <result property="extention8" column="extention8" />
- <result property="extention9" column="extention9" />
- <result property="status" column="status" />
- <result property="removeTime" column="remove_time" />
- </resultMap>
- <sql id="selectTMocVo">
- select d.id, d.plant_code, d.moc_no, d.plant_number, d.notice_letter, d.work_letter, d.cte_no, d.invest_cost, d.category, d.significance, d.classification, d.area, d.dash_control, d.title, d.owner, d.approve_time, d.estimate_endtime, d.endtime, d.true_state, d.change_nature, d.over_time, d.risk_level, d.training, d.pssr, d.ehs_check, d.ehs_db, d.pid_master, d.pssr_db, d.capex, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.temporary_state, d.sop_update, d.company_moc_no, d.project_no, d.moc_type, d.mc_time, d.mc_detail, d.doc_update, d.pssr_no, d.timeliness, d.temp_category, d.exp_time, d.temp_state, d.location, d.finish_date, d.process_unit, d.department, d.leak_location, d.pressure, d.temperature, d.leak_fluid, d.material_type, d.plan_date, d.seal_date, d.extention1, d.extention2, d.extention3, d.extention4, d.extention5, d.extention6, d.extention7, d.extention8, d.extention9, d.status, d.remove_time ,s.dept_name from t_moc d
- left join sys_dept s on s.dept_id = d.dept_id
- </sql>
- <select id="selectTMocList" parameterType="TMoc" resultMap="TMocResult">
- <include refid="selectTMocVo"/>
- <where>
- <if test="mocNo != null and mocNo != ''"> and moc_no like concat(concat('%', #{mocNo}), '%')</if>
- <if test="plantNumber != null and plantNumber != ''"> and plant_number like concat(concat('%', #{plantNumber}), '%')</if>
- <if test="noticeLetter != null and noticeLetter != ''"> and notice_letter like concat(concat('%', #{noticeLetter}), '%')</if>
- <if test="workLetter != null and workLetter != ''"> and work_letter like concat(concat('%', #{workLetter}), '%')</if>
- <if test="cteNo != null and cteNo != ''"> and cte_no like concat(concat('%', #{cteNo}), '%')</if>
- <if test="investCost != null and investCost != ''"> and invest_cost like concat(concat('%', #{investCost}), '%')</if>
- <if test="category != null and category != ''"> and category like concat(concat('%', #{category}), '%')</if>
- <if test="significance != null and significance != ''"> and significance like concat(concat('%', #{significance}), '%')</if>
- <if test="classification != null and classification != ''"> and classification like concat(concat('%', #{classification}), '%')</if>
- <if test="area != null and area != ''"> and area like concat(concat('%', #{area}), '%')</if>
- <if test="dashControl != null and dashControl != ''"> and dash_control like concat(concat('%', #{dashControl}), '%')</if>
- <if test="title != null and title != ''"> and title like concat(concat('%', #{title}), '%')</if>
- <if test="owner != null and owner != ''"> and owner like concat(concat('%', #{owner}), '%')</if>
- <if test="approveTime != null "> and approve_time = #{approveTime}</if>
- <if test="estimateEndtime != null "> and estimate_endtime = #{estimateEndtime}</if>
- <if test="endtime != null "> and endtime = #{endtime}</if>
- <if test="trueState != null and trueState != ''"> and true_state like concat(concat('%', #{trueState}), '%')</if>
- <if test="changeNature != null and changeNature != ''"> and change_nature like concat(concat('%', #{changeNature}), '%')</if>
- <if test="overTime != null "> and over_time = #{overTime}</if>
- <if test="riskLevel != null and riskLevel != ''"> and risk_level like concat(concat('%', #{riskLevel}), '%')</if>
- <if test="training != null and training != ''"> and training like concat(concat('%', #{training}), '%')</if>
- <if test="pssr != null and pssr != ''"> and pssr like concat(concat('%', #{pssr}), '%')</if>
- <if test="ehsCheck != null and ehsCheck != ''"> and ehs_check like concat(concat('%', #{ehsCheck}), '%')</if>
- <if test="ehsDb != null and ehsDb != ''"> and ehs_db like concat(concat('%', #{ehsDb}), '%')</if>
- <if test="pidMaster != null and pidMaster != ''"> and pid_master like concat(concat('%', #{pidMaster}), '%')</if>
- <if test="pssrDb != null and pssrDb != ''"> and pssr_db like concat(concat('%', #{pssrDb}), '%')</if>
- <if test="capex != null and capex != ''"> and capex like concat(concat('%', #{capex}), '%')</if>
- <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
- <if test="companyMocNo != null and companyMocNo != ''"> and company_moc_no like concat(concat('%', #{companyMocNo}), '%') </if>
- <if test="projectNo != null and projectNo != ''"> and project_no like concat(concat('%', #{projectNo}), '%') </if>
- <if test="mocType != null and mocType != ''"> and moc_type = #{mocType}</if>
- <if test="mcTime != null "> and mc_time = #{mcTime}</if>
- <if test="mcDetail != null and mcDetail != ''"> and mc_detail like concat(concat('%', #{mcDetail}), '%') </if>
- <if test="docUpdate != null and docUpdate != ''"> and doc_update = #{docUpdate}</if>
- <if test="pssrNo != null and pssrNo != ''"> and pssr_no like concat(concat('%', #{pssrNo}), '%') </if>
- <if test="timeliness != null "> and timeliness = #{timeliness}</if>
- <if test="tempCategory != null "> and temp_category = #{tempCategory}</if>
- <if test="expTime != null "> and exp_time = #{expTime}</if>
- <if test="tempState != null "> and temp_state = #{tempState}</if>
- <if test="location != null and location != ''"> and location like concat(concat('%', #{location}), '%') </if>
- <if test="finishDate != null "> and finish_date = #{finishDate}</if>
- <if test="processUnit != null and processUnit != ''"> and process_unit = #{processUnit}</if>
- <if test="department != null "> and department = #{department}</if>
- <if test="leakLocation != null and leakLocation != ''"> and leak_location like concat(concat('%', #{leakLocation}), '%') </if>
- <if test="pressure != null and pressure != ''"> and pressure = #{pressure}</if>
- <if test="temperature != null and temperature != ''"> and temperature = #{temperature}</if>
- <if test="leakFluid != null and leakFluid != ''"> and leak_fluid like concat(concat('%', #{leakFluid}), '%') </if>
- <if test="materialType != null and materialType != ''"> and material_type = #{materialType}</if>
- <if test="planDate != null "> and plan_date = #{planDate}</if>
- <if test="sealDate != null "> and seal_date = #{sealDate}</if>
- <if test="extention1 != null "> and extention1 = #{extention1}</if>
- <if test="extention2 != null "> and extention2 = #{extention2}</if>
- <if test="extention3 != null "> and extention3 = #{extention3}</if>
- <if test="extention4 != null "> and extention4 = #{extention4}</if>
- <if test="extention5 != null "> and extention5 = #{extention5}</if>
- <if test="extention6 != null "> and extention6 = #{extention6}</if>
- <if test="extention7 != null "> and extention7 = #{extention7}</if>
- <if test="extention8 != null "> and extention8 = #{extention8}</if>
- <if test="extention9 != null "> and extention9 = #{extention9}</if>
- <if test="status != null and status != ''"> and status = #{status}</if>
- <if test="removeTime != null "> and remove_time = #{removeTime}</if>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- order by d.id desc
- </select>
- <select id="selectTMocById" parameterType="Long" resultMap="TMocResult">
- <include refid="selectTMocVo"/>
- where id = #{id}
- </select>
- <insert id="insertTMoc" parameterType="TMoc">
- <selectKey keyProperty="id" resultType="long" order="BEFORE">
- SELECT seq_t_moc.NEXTVAL as id FROM DUAL
- </selectKey>
- insert into t_moc
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="id != null">id,</if>
- <if test="plantCode != null and plantCode != ''">plant_code,</if>
- <if test="mocNo != null">moc_no,</if>
- <if test="plantNumber != null">plant_number,</if>
- <if test="noticeLetter != null">notice_letter,</if>
- <if test="workLetter != null">work_letter,</if>
- <if test="cteNo != null">cte_no,</if>
- <if test="investCost != null">invest_cost,</if>
- <if test="category != null">category,</if>
- <if test="significance != null">significance,</if>
- <if test="classification != null">classification,</if>
- <if test="area != null">area,</if>
- <if test="dashControl != null">dash_control,</if>
- <if test="title != null">title,</if>
- <if test="owner != null">owner,</if>
- <if test="approveTime != null">approve_time,</if>
- <if test="estimateEndtime != null">estimate_endtime,</if>
- <if test="endtime != null">endtime,</if>
- <if test="trueState != null">true_state,</if>
- <if test="changeNature != null">change_nature,</if>
- <if test="overTime != null">over_time,</if>
- <if test="riskLevel != null">risk_level,</if>
- <if test="training != null">training,</if>
- <if test="pssr != null">pssr,</if>
- <if test="ehsCheck != null">ehs_check,</if>
- <if test="ehsDb != null">ehs_db,</if>
- <if test="pidMaster != null">pid_master,</if>
- <if test="pssrDb != null">pssr_db,</if>
- <if test="capex != null">capex,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createrCode != null">creater_code,</if>
- <if test="createdate != null">createdate,</if>
- <if test="updaterCode != null">updater_code,</if>
- <if test="updatedate != null">updatedate,</if>
- <if test="deptId != null">dept_id,</if>
- <if test="remarks != null">remarks,</if>
- <if test="temporaryState != null">temporary_state,</if>
- <if test="sopUpdate != null">sop_update,</if>
- <if test="companyMocNo != null">company_moc_no,</if>
- <if test="projectNo != null">project_no,</if>
- <if test="mocType != null">moc_type,</if>
- <if test="mcTime != null">mc_time,</if>
- <if test="mcDetail != null">mc_detail,</if>
- <if test="docUpdate != null">doc_update,</if>
- <if test="pssrNo != null">pssr_no,</if>
- <if test="timeliness != null">timeliness,</if>
- <if test="tempCategory != null">temp_category,</if>
- <if test="expTime != null">exp_time,</if>
- <if test="tempState != null">temp_state,</if>
- <if test="location != null">location,</if>
- <if test="finishDate != null">finish_date,</if>
- <if test="processUnit != null">process_unit,</if>
- <if test="department != null">department,</if>
- <if test="leakLocation != null">leak_location,</if>
- <if test="pressure != null">pressure,</if>
- <if test="temperature != null">temperature,</if>
- <if test="leakFluid != null">leak_fluid,</if>
- <if test="materialType != null">material_type,</if>
- <if test="planDate != null">plan_date,</if>
- <if test="sealDate != null">seal_date,</if>
- <if test="extention1 != null">extention1,</if>
- <if test="extention2 != null">extention2,</if>
- <if test="extention3 != null">extention3,</if>
- <if test="extention4 != null">extention4,</if>
- <if test="extention5 != null">extention5,</if>
- <if test="extention6 != null">extention6,</if>
- <if test="extention7 != null">extention7,</if>
- <if test="extention8 != null">extention8,</if>
- <if test="extention9 != null">extention9,</if>
- <if test="status != null">status,</if>
- <if test="removeTime != null">remove_time,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="id != null">#{id},</if>
- <if test="plantCode != null and plantCode != ''">#{plantCode},</if>
- <if test="mocNo != null">#{mocNo},</if>
- <if test="plantNumber != null">#{plantNumber},</if>
- <if test="noticeLetter != null">#{noticeLetter},</if>
- <if test="workLetter != null">#{workLetter},</if>
- <if test="cteNo != null">#{cteNo},</if>
- <if test="investCost != null">#{investCost},</if>
- <if test="category != null">#{category},</if>
- <if test="significance != null">#{significance},</if>
- <if test="classification != null">#{classification},</if>
- <if test="area != null">#{area},</if>
- <if test="dashControl != null">#{dashControl},</if>
- <if test="title != null">#{title},</if>
- <if test="owner != null">#{owner},</if>
- <if test="approveTime != null">#{approveTime},</if>
- <if test="estimateEndtime != null">#{estimateEndtime},</if>
- <if test="endtime != null">#{endtime},</if>
- <if test="trueState != null">#{trueState},</if>
- <if test="changeNature != null">#{changeNature},</if>
- <if test="overTime != null">#{overTime},</if>
- <if test="riskLevel != null">#{riskLevel},</if>
- <if test="training != null">#{training},</if>
- <if test="pssr != null">#{pssr},</if>
- <if test="ehsCheck != null">#{ehsCheck},</if>
- <if test="ehsDb != null">#{ehsDb},</if>
- <if test="pidMaster != null">#{pidMaster},</if>
- <if test="pssrDb != null">#{pssrDb},</if>
- <if test="capex != null">#{capex},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createrCode != null">#{createrCode},</if>
- <if test="createdate != null">#{createdate},</if>
- <if test="updaterCode != null">#{updaterCode},</if>
- <if test="updatedate != null">#{updatedate},</if>
- <if test="deptId != null">#{deptId},</if>
- <if test="remarks != null">#{remarks},</if>
- <if test="temporaryState != null">#{temporaryState},</if>
- <if test="sopUpdate != null">#{sopUpdate},</if>
- <if test="companyMocNo != null">#{companyMocNo},</if>
- <if test="projectNo != null">#{projectNo},</if>
- <if test="mocType != null">#{mocType},</if>
- <if test="mcTime != null">#{mcTime},</if>
- <if test="mcDetail != null">#{mcDetail},</if>
- <if test="docUpdate != null">#{docUpdate},</if>
- <if test="pssrNo != null">#{pssrNo},</if>
- <if test="timeliness != null">#{timeliness},</if>
- <if test="tempCategory != null">#{tempCategory},</if>
- <if test="expTime != null">#{expTime},</if>
- <if test="tempState != null">#{tempState},</if>
- <if test="location != null">#{location},</if>
- <if test="finishDate != null">#{finishDate},</if>
- <if test="processUnit != null">#{processUnit},</if>
- <if test="department != null">#{department},</if>
- <if test="leakLocation != null">#{leakLocation},</if>
- <if test="pressure != null">#{pressure},</if>
- <if test="temperature != null">#{temperature},</if>
- <if test="leakFluid != null">#{leakFluid},</if>
- <if test="materialType != null">#{materialType},</if>
- <if test="planDate != null">#{planDate},</if>
- <if test="sealDate != null">#{sealDate},</if>
- <if test="extention1 != null">#{extention1},</if>
- <if test="extention2 != null">#{extention2},</if>
- <if test="extention3 != null">#{extention3},</if>
- <if test="extention4 != null">#{extention4},</if>
- <if test="extention5 != null">#{extention5},</if>
- <if test="extention6 != null">#{extention6},</if>
- <if test="extention7 != null">#{extention7},</if>
- <if test="extention8 != null">#{extention8},</if>
- <if test="extention9 != null">#{extention9},</if>
- <if test="status != null">#{status},</if>
- <if test="removeTime != null">#{removeTime},</if>
- </trim>
- </insert>
- <update id="updateTMoc" parameterType="TMoc">
- update t_moc
- <trim prefix="SET" suffixOverrides=",">
- <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
- <if test="mocNo != null">moc_no = #{mocNo},</if>
- <if test="plantNumber != null">plant_number = #{plantNumber},</if>
- <if test="noticeLetter != null">notice_letter = #{noticeLetter},</if>
- <if test="workLetter != null">work_letter = #{workLetter},</if>
- <if test="cteNo != null">cte_no = #{cteNo},</if>
- <if test="investCost != null">invest_cost = #{investCost},</if>
- <if test="category != null">category = #{category},</if>
- <if test="significance != null">significance = #{significance},</if>
- <if test="classification != null">classification = #{classification},</if>
- <if test="area != null">area = #{area},</if>
- <if test="dashControl != null">dash_control = #{dashControl},</if>
- <if test="title != null">title = #{title},</if>
- <if test="owner != null">owner = #{owner},</if>
- <if test="approveTime != null">approve_time = #{approveTime},</if>
- <if test="estimateEndtime != null">estimate_endtime = #{estimateEndtime},</if>
- <if test="endtime != null">endtime = #{endtime},</if>
- <if test="approveTime == null">approve_time = NULL,</if>
- <if test="estimateEndtime == null">estimate_endtime = NULL,</if>
- <if test="endtime == null">endtime = NULL,</if>
- <if test="trueState != null">true_state = #{trueState},</if>
- <if test="changeNature != null">change_nature = #{changeNature},</if>
- <if test="overTime != null">over_time = #{overTime},</if>
- <if test="overTime == null">over_time = NULL,</if>
- <if test="riskLevel != null">risk_level = #{riskLevel},</if>
- <if test="training != null">training = #{training},</if>
- <if test="pssr != null">pssr = #{pssr},</if>
- <if test="ehsCheck != null">ehs_check = #{ehsCheck},</if>
- <if test="ehsDb != null">ehs_db = #{ehsDb},</if>
- <if test="pidMaster != null">pid_master = #{pidMaster},</if>
- <if test="pssrDb != null">pssr_db = #{pssrDb},</if>
- <if test="capex != null">capex = #{capex},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createrCode != null">creater_code = #{createrCode},</if>
- <if test="createdate != null">createdate = #{createdate},</if>
- <if test="updaterCode != null">updater_code = #{updaterCode},</if>
- <if test="updatedate != null">updatedate = #{updatedate},</if>
- <if test="deptId != null">dept_id = #{deptId},</if>
- <if test="remarks != null">remarks = #{remarks},</if>
- <if test="temporaryState != null">temporary_state = #{temporaryState},</if>
- <if test="sopUpdate != null">sop_update = #{sopUpdate},</if>
- <if test="companyMocNo != null">company_moc_no = #{companyMocNo},</if>
- <if test="projectNo != null">project_no = #{projectNo},</if>
- <if test="mocType != null">moc_type = #{mocType},</if>
- <if test="mcTime != null">mc_time = #{mcTime},</if>
- <if test="mcDetail != null">mc_detail = #{mcDetail},</if>
- <if test="docUpdate != null">doc_update = #{docUpdate},</if>
- <if test="pssrNo != null">pssr_no = #{pssrNo},</if>
- <if test="timeliness != null">timeliness = #{timeliness},</if>
- <if test="tempCategory != null">temp_category = #{tempCategory},</if>
- <if test="expTime != null">exp_time = #{expTime},</if>
- <if test="tempState != null">temp_state = #{tempState},</if>
- <if test="location != null">location = #{location},</if>
- <if test="finishDate != null">finish_date = #{finishDate},</if>
- <if test="processUnit != null">process_unit = #{processUnit},</if>
- <if test="department != null">department = #{department},</if>
- <if test="leakLocation != null">leak_location = #{leakLocation},</if>
- <if test="pressure != null">pressure = #{pressure},</if>
- <if test="temperature != null">temperature = #{temperature},</if>
- <if test="leakFluid != null">leak_fluid = #{leakFluid},</if>
- <if test="materialType != null">material_type = #{materialType},</if>
- <if test="planDate != null">plan_date = #{planDate},</if>
- <if test="sealDate != null">seal_date = #{sealDate},</if>
- <if test="extention1 != null">extention1 = #{extention1},</if>
- <if test="extention2 != null">extention2 = #{extention2},</if>
- <if test="extention3 != null">extention3 = #{extention3},</if>
- <if test="extention4 != null">extention4 = #{extention4},</if>
- <if test="extention5 != null">extention5 = #{extention5},</if>
- <if test="extention6 != null">extention6 = #{extention6},</if>
- <if test="extention7 != null">extention7 = #{extention7},</if>
- <if test="extention8 != null">extention8 = #{extention8},</if>
- <if test="extention9 != null">extention9 = #{extention9},</if>
- <if test="status != null">status = #{status},</if>
- <if test="removeTime != null">remove_time = #{removeTime},</if>
- <if test="removeTime == null">remove_time = null,</if>
- </trim>
- where id = #{id}
- </update>
- <update id="deleteTMocById" parameterType="Long">
- update t_moc set del_flag = 2 where id = #{id}
- </update>
- <update id="deleteTMocByIds" parameterType="String">
- update t_moc set del_flag = 2 where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </update>
- <select id="selectYearData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,TO_CHAR(d.APPROVE_TIME,'YYYY') as dataName FROM t_moc d
- <where>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY TO_CHAR(d.APPROVE_TIME,'YYYY')
- order by dataName
- </select>
- <select id="selectTrueStateData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,d.true_state as dataName FROM t_moc d
- <where>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY true_state
- order by dataName
- </select>
- <select id="selectChangeData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,d.CHANGE_NATURE as dataName FROM t_moc d
- <where>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY CHANGE_NATURE
- order by dataName
- </select>
- <select id="selectCategoryData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,d.CATEGORY as dataName FROM t_moc d
- <where>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY CATEGORY
- order by dataName
- </select>
- <select id="selectRiskData" resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum,d.RISK_LEVEL as dataName FROM t_moc d
- <where>
- and d.del_flag = 0
- </where>
- <!-- 数据范围过滤 -->
- ${params.dataScope}
- GROUP BY RISK_LEVEL
- order by dataName
- </select>
- <select id="selectMocData"
- parameterType="com.ruoyi.project.process.controller.vo.MocNoVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, substr(d.MOC_NO, 7, 4) as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.del_flag = 0
- </where>
- GROUP BY substr(d.MOC_NO, 7, 4)
- order by dataName
- </select>
- <select id="selectAreaData"
- parameterType="com.ruoyi.project.process.controller.vo.AreaVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, area as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.del_flag = 0
- </where>
- GROUP BY area
- order by dataName
- </select>
- <select id="selectMcDetailData"
- parameterType="com.ruoyi.project.process.controller.vo.McDetailVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, MC_DETAIL as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.del_flag = 0
- </where>
- GROUP BY MC_DETAIL
- order by dataName
- </select>
- <select id="selectRiskLevelData"
- parameterType="com.ruoyi.project.process.controller.vo.RiskLevelVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, RISK_LEVEL as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.del_flag = 0
- </where>
- GROUP BY RISK_LEVEL
- order by dataName
- </select>
- <select id="selectTempStateData"
- parameterType="com.ruoyi.project.process.controller.vo.TempStateVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, TEMP_STATE as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- <if test="tempCategory != null and tempCategory != ''"> and d.temp_category = #{tempCategory} </if>
- and d.del_flag = 0
- </where>
- GROUP BY TEMP_STATE
- order by dataName
- </select>
- <select id="selectStatusData"
- parameterType="com.ruoyi.project.process.controller.vo.StatusVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, status as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.temp_category = #{tempCategory}
- and d.del_flag = 0
- </where>
- GROUP BY status
- order by dataName
- </select>
- <select id="selectDepartmentData"
- parameterType="com.ruoyi.project.process.controller.vo.DepartmentVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, DEPARTMENT as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.temp_category = #{tempCategory}
- and d.del_flag = 0
- </where>
- GROUP BY DEPARTMENT
- order by dataName
- </select>
- <select id="selectLeakLocationData"
- parameterType="com.ruoyi.project.process.controller.vo.LeakLocationVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, LEAK_LOCATION as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.temp_category = #{tempCategory}
- and d.del_flag = 0
- </where>
- GROUP BY LEAK_LOCATION
- order by dataName
- </select>
- <select id="selectMaterialTypeData"
- parameterType="com.ruoyi.project.process.controller.vo.MaterialTypeVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, MATERIAL_TYPE as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.temp_category = #{tempCategory}
- and d.del_flag = 0
- </where>
- GROUP BY MATERIAL_TYPE
- order by dataName
- </select>
- <select id="selectSealDateData"
- parameterType="com.ruoyi.project.process.controller.vo.SealDateVO"
- resultType="com.ruoyi.project.common.domain.DataEntity">
- SELECT count(1) as dataNum, extract(year from SEAL_DATE) as dataName FROM t_moc d
- <where>
- and d.timeliness = #{timeliness}
- and d.temp_category = #{tempCategory}
- and d.del_flag = 0
- </where>
- GROUP BY extract(year from SEAL_DATE)
- order by dataName
- </select>
- </mapper>
|