123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595 |
- <?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.slibra.business.mapper.TXinyiIndustryMapper">
- <resultMap type="TXinyiIndustry" id="TXinyiIndustryResult">
- <result property="ID" column="ID" />
- <result property="testDate" column="TEST_DATE" />
- <result property="testHour" column="TEST_HOUR" />
- <result property="testTime" column="TEST_TIME" />
- <result property="jsCod" column="JS_COD" />
- <result property="jsPh" column="JS_PH" />
- <result property="jsSs" column="JS_SS" />
- <result property="jsTp" column="JS_TP" />
- <result property="jsTn" column="JS_TN" />
- <result property="jsNh3" column="JS_NH3" />
- <result property="jsSwPh" column="JS_SW_PH" />
- <result property="jsBfyw" column="JS_BFYW" />
- <result property="csSlqc" column="CS_SLQC" />
- <result property="csCod" column="CS_COD" />
- <result property="csPh" column="CS_PH" />
- <result property="csSs" column="CS_SS" />
- <result property="csTn" column="CS_TN" />
- <result property="csTp" column="CS_TP" />
- <result property="csNh3" column="CS_NH3" />
- <result property="oneHyzdDo" column="ONE_HYZD_DO" />
- <result property="oneHymdDo" column="ONE_HYMD_DO" />
- <result property="twoHyzdDo" column="TWO_HYZD_DO" />
- <result property="twoHymdDo" column="TWO_HYMD_DO" />
- <result property="oneMlss" column="ONE_MLSS" />
- <result property="twoMlss" column="TWO_MLSS" />
- <result property="jsTds" column="JS_TDS" />
- <result property="jsSlq" column="JS_SLQ" />
- <result property="nHlbOneGp" column="N_HLB_ONE_GP" />
- <result property="nHlbTwoGp" column="N_HLB_TWO_GP" />
- <result property="nHlbThreeGp" column="N_HLB_THREE_GP" />
- <result property="nHlbFourGp" column="N_HLB_FOUR_GP" />
- <result property="nhlBFiveGp" column="NHL_B_FIVE_GP" />
- <result property="nHlbSixGp" column="N_HLB_SIX_GP" />
- <result property="wHlbOneGp" column="W_HLB_ONE_GP" />
- <result property="wHlbTwoGp" column="W_HLB_TWO_GP" />
- <result property="wHlbThreeGp" column="W_HLB_THREE_GP" />
- <result property="wHlbFourGp" column="W_HLB_FOUR_GP" />
- <result property="wHlbFiveGp" column="W_HLB_FIVE_GP" />
- <result property="fjOne" column="FJ_ONE" />
- <result property="fjTwo" column="FJ_TWO" />
- <result property="fjThree" column="FJ_THREE" />
- <result property="fjFour" column="FJ_FOUR" />
- <result property="fjFive" column="FJ_FIVE" />
- <result property="fjSix" column="FJ_SIX" />
- <result property="kqllOne" column="KQLL_ONE" />
- <result property="kqllTwo" column="KQLL_TWO" />
- <result property="kqllThree" column="KQLL_THREE" />
- <result property="kqllFour" column="KQLL_FOUR" />
- <result property="kqllFive" column="KQLL_FIVE" />
- <result property="kqllSix" column="KQLL_SIX" />
- <result property="SJTYJLY" column="SJTYJLY" />
- <result property="CLJYSSLL" column="CLJYSSLL" />
- <result property="hycRjyAll" column="HYC_RJY_ALL" />
- <result property="hycRjyZdAll" column="HYC_RJY_ZD_ALL" />
- <result property="hycWnndAll" column="HYC_WNND_ALL" />
- <result property="CLP04YCZ" column="CL_P04_YCZ" />
- <result property="createdTime" column="CREATED_TIME" />
- </resultMap>
- <sql id="selectTXinyiIndustryVo">
- select ID, TEST_DATE, TEST_HOUR, TEST_TIME, JS_COD, JS_PH, JS_SS, JS_TP, JS_TN, JS_NH3, JS_SW_PH, JS_BFYW, CS_SLQC, CS_COD, CS_PH, CS_SS, CS_TN, CS_TP, CS_NH3, ONE_HYZD_DO, ONE_HYMD_DO, TWO_HYZD_DO, TWO_HYMD_DO, ONE_MLSS, TWO_MLSS, JS_TDS, JS_SLQ, N_HLB_ONE_GP, N_HLB_TWO_GP, N_HLB_THREE_GP, N_HLB_FOUR_GP, NHL_B_FIVE_GP, N_HLB_SIX_GP, W_HLB_ONE_GP, W_HLB_TWO_GP, W_HLB_THREE_GP, W_HLB_FOUR_GP, W_HLB_FIVE_GP, FJ_ONE, FJ_TWO, FJ_THREE, FJ_FOUR, FJ_FIVE, FJ_SIX, KQLL_ONE, KQLL_TWO, KQLL_THREE, KQLL_FOUR, KQLL_FIVE, KQLL_SIX, SJTYJLY, CLJYSSLL, HYC_RJY_ALL, HYC_RJY_ZD_ALL, HYC_WNND_ALL, CL_P04_YCZ, CREATED_TIME from t_xinyi_industry
- </sql>
- <select id="selectTXinyiIndustryByID" parameterType="Long" resultMap="TXinyiIndustryResult">
- <include refid="selectTXinyiIndustryVo"/>
- where ID = #{ID}
- </select>
- <insert id="insertTXinyiIndustry" parameterType="TXinyiIndustry" useGeneratedKeys="true" keyProperty="ID">
- insert into t_xinyi_industry
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="testDate != null">TEST_DATE,</if>
- <if test="testHour != null">TEST_HOUR,</if>
- <if test="testTime != null">TEST_TIME,</if>
- <if test="jsCod != null">JS_COD,</if>
- <if test="jsPh != null">JS_PH,</if>
- <if test="jsSs != null">JS_SS,</if>
- <if test="jsTp != null">JS_TP,</if>
- <if test="jsTn != null">JS_TN,</if>
- <if test="jsNh3 != null">JS_NH3,</if>
- <if test="jsSwPh != null">JS_SW_PH,</if>
- <if test="jsBfyw != null">JS_BFYW,</if>
- <if test="csSlqc != null">CS_SLQC,</if>
- <if test="csCod != null">CS_COD,</if>
- <if test="csPh != null">CS_PH,</if>
- <if test="csSs != null">CS_SS,</if>
- <if test="csTn != null">CS_TN,</if>
- <if test="csTp != null">CS_TP,</if>
- <if test="csNh3 != null">CS_NH3,</if>
- <if test="oneHyzdDo != null">ONE_HYZD_DO,</if>
- <if test="oneHymdDo != null">ONE_HYMD_DO,</if>
- <if test="twoHyzdDo != null">TWO_HYZD_DO,</if>
- <if test="twoHymdDo != null">TWO_HYMD_DO,</if>
- <if test="oneMlss != null">ONE_MLSS,</if>
- <if test="twoMlss != null">TWO_MLSS,</if>
- <if test="jsTds != null">JS_TDS,</if>
- <if test="jsSlq != null">JS_SLQ,</if>
- <if test="nHlbOneGp != null">N_HLB_ONE_GP,</if>
- <if test="nHlbTwoGp != null">N_HLB_TWO_GP,</if>
- <if test="nHlbThreeGp != null">N_HLB_THREE_GP,</if>
- <if test="nHlbFourGp != null">N_HLB_FOUR_GP,</if>
- <if test="nhlBFiveGp != null">NHL_B_FIVE_GP,</if>
- <if test="nHlbSixGp != null">N_HLB_SIX_GP,</if>
- <if test="wHlbOneGp != null">W_HLB_ONE_GP,</if>
- <if test="wHlbTwoGp != null">W_HLB_TWO_GP,</if>
- <if test="wHlbThreeGp != null">W_HLB_THREE_GP,</if>
- <if test="wHlbFourGp != null">W_HLB_FOUR_GP,</if>
- <if test="wHlbFiveGp != null">W_HLB_FIVE_GP,</if>
- <if test="fjOne != null">FJ_ONE,</if>
- <if test="fjTwo != null">FJ_TWO,</if>
- <if test="fjThree != null">FJ_THREE,</if>
- <if test="fjFour != null">FJ_FOUR,</if>
- <if test="fjFive != null">FJ_FIVE,</if>
- <if test="fjSix != null">FJ_SIX,</if>
- <if test="kqllOne != null">KQLL_ONE,</if>
- <if test="kqllTwo != null">KQLL_TWO,</if>
- <if test="kqllThree != null">KQLL_THREE,</if>
- <if test="kqllFour != null">KQLL_FOUR,</if>
- <if test="kqllFive != null">KQLL_FIVE,</if>
- <if test="kqllSix != null">KQLL_SIX,</if>
- <if test="SJTYJLY != null">SJTYJLY,</if>
- <if test="CLJYSSLL != null">CLJYSSLL,</if>
- <if test="hycRjyAll != null">HYC_RJY_ALL,</if>
- <if test="hycRjyZdAll != null">HYC_RJY_ZD_ALL,</if>
- <if test="hycWnndAll != null">HYC_WNND_ALL,</if>
- <if test="CLP04YCZ != null">CL_P04_YCZ,</if>
- <if test="createdTime != null">CREATED_TIME,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="testDate != null">#{testDate},</if>
- <if test="testHour != null">#{testHour},</if>
- <if test="testTime != null">#{testTime},</if>
- <if test="jsCod != null">#{jsCod},</if>
- <if test="jsPh != null">#{jsPh},</if>
- <if test="jsSs != null">#{jsSs},</if>
- <if test="jsTp != null">#{jsTp},</if>
- <if test="jsTn != null">#{jsTn},</if>
- <if test="jsNh3 != null">#{jsNh3},</if>
- <if test="jsSwPh != null">#{jsSwPh},</if>
- <if test="jsBfyw != null">#{jsBfyw},</if>
- <if test="csSlqc != null">#{csSlqc},</if>
- <if test="csCod != null">#{csCod},</if>
- <if test="csPh != null">#{csPh},</if>
- <if test="csSs != null">#{csSs},</if>
- <if test="csTn != null">#{csTn},</if>
- <if test="csTp != null">#{csTp},</if>
- <if test="csNh3 != null">#{csNh3},</if>
- <if test="oneHyzdDo != null">#{oneHyzdDo},</if>
- <if test="oneHymdDo != null">#{oneHymdDo},</if>
- <if test="twoHyzdDo != null">#{twoHyzdDo},</if>
- <if test="twoHymdDo != null">#{twoHymdDo},</if>
- <if test="oneMlss != null">#{oneMlss},</if>
- <if test="twoMlss != null">#{twoMlss},</if>
- <if test="jsTds != null">#{jsTds},</if>
- <if test="jsSlq != null">#{jsSlq},</if>
- <if test="nHlbOneGp != null">#{nHlbOneGp},</if>
- <if test="nHlbTwoGp != null">#{nHlbTwoGp},</if>
- <if test="nHlbThreeGp != null">#{nHlbThreeGp},</if>
- <if test="nHlbFourGp != null">#{nHlbFourGp},</if>
- <if test="nhlBFiveGp != null">#{nhlBFiveGp},</if>
- <if test="nHlbSixGp != null">#{nHlbSixGp},</if>
- <if test="wHlbOneGp != null">#{wHlbOneGp},</if>
- <if test="wHlbTwoGp != null">#{wHlbTwoGp},</if>
- <if test="wHlbThreeGp != null">#{wHlbThreeGp},</if>
- <if test="wHlbFourGp != null">#{wHlbFourGp},</if>
- <if test="wHlbFiveGp != null">#{wHlbFiveGp},</if>
- <if test="fjOne != null">#{fjOne},</if>
- <if test="fjTwo != null">#{fjTwo},</if>
- <if test="fjThree != null">#{fjThree},</if>
- <if test="fjFour != null">#{fjFour},</if>
- <if test="fjFive != null">#{fjFive},</if>
- <if test="fjSix != null">#{fjSix},</if>
- <if test="kqllOne != null">#{kqllOne},</if>
- <if test="kqllTwo != null">#{kqllTwo},</if>
- <if test="kqllThree != null">#{kqllThree},</if>
- <if test="kqllFour != null">#{kqllFour},</if>
- <if test="kqllFive != null">#{kqllFive},</if>
- <if test="kqllSix != null">#{kqllSix},</if>
- <if test="SJTYJLY != null">#{SJTYJLY},</if>
- <if test="CLJYSSLL != null">#{CLJYSSLL},</if>
- <if test="hycRjyAll != null">#{hycRjyAll},</if>
- <if test="hycRjyZdAll != null">#{hycRjyZdAll},</if>
- <if test="hycWnndAll != null">#{hycWnndAll},</if>
- <if test="CLP04YCZ != null">#{CLP04YCZ},</if>
- <if test="createdTime != null">#{createdTime},</if>
- </trim>
- </insert>
- <update id="updateTXinyiIndustry" parameterType="TXinyiIndustry">
- update t_xinyi_industry
- <trim prefix="SET" suffixOverrides=",">
- <if test="testDate != null">TEST_DATE = #{testDate},</if>
- <if test="testHour != null">TEST_HOUR = #{testHour},</if>
- <if test="testTime != null">TEST_TIME = #{testTime},</if>
- <if test="jsCod != null">JS_COD = #{jsCod},</if>
- <if test="jsPh != null">JS_PH = #{jsPh},</if>
- <if test="jsSs != null">JS_SS = #{jsSs},</if>
- <if test="jsTp != null">JS_TP = #{jsTp},</if>
- <if test="jsTn != null">JS_TN = #{jsTn},</if>
- <if test="jsNh3 != null">JS_NH3 = #{jsNh3},</if>
- <if test="jsSwPh != null">JS_SW_PH = #{jsSwPh},</if>
- <if test="jsBfyw != null">JS_BFYW = #{jsBfyw},</if>
- <if test="csSlqc != null">CS_SLQC = #{csSlqc},</if>
- <if test="csCod != null">CS_COD = #{csCod},</if>
- <if test="csPh != null">CS_PH = #{csPh},</if>
- <if test="csSs != null">CS_SS = #{csSs},</if>
- <if test="csTn != null">CS_TN = #{csTn},</if>
- <if test="csTp != null">CS_TP = #{csTp},</if>
- <if test="csNh3 != null">CS_NH3 = #{csNh3},</if>
- <if test="oneHyzdDo != null">ONE_HYZD_DO = #{oneHyzdDo},</if>
- <if test="oneHymdDo != null">ONE_HYMD_DO = #{oneHymdDo},</if>
- <if test="twoHyzdDo != null">TWO_HYZD_DO = #{twoHyzdDo},</if>
- <if test="twoHymdDo != null">TWO_HYMD_DO = #{twoHymdDo},</if>
- <if test="oneMlss != null">ONE_MLSS = #{oneMlss},</if>
- <if test="twoMlss != null">TWO_MLSS = #{twoMlss},</if>
- <if test="jsTds != null">JS_TDS = #{jsTds},</if>
- <if test="jsSlq != null">JS_SLQ = #{jsSlq},</if>
- <if test="nHlbOneGp != null">N_HLB_ONE_GP = #{nHlbOneGp},</if>
- <if test="nHlbTwoGp != null">N_HLB_TWO_GP = #{nHlbTwoGp},</if>
- <if test="nHlbThreeGp != null">N_HLB_THREE_GP = #{nHlbThreeGp},</if>
- <if test="nHlbFourGp != null">N_HLB_FOUR_GP = #{nHlbFourGp},</if>
- <if test="nhlBFiveGp != null">NHL_B_FIVE_GP = #{nhlBFiveGp},</if>
- <if test="nHlbSixGp != null">N_HLB_SIX_GP = #{nHlbSixGp},</if>
- <if test="wHlbOneGp != null">W_HLB_ONE_GP = #{wHlbOneGp},</if>
- <if test="wHlbTwoGp != null">W_HLB_TWO_GP = #{wHlbTwoGp},</if>
- <if test="wHlbThreeGp != null">W_HLB_THREE_GP = #{wHlbThreeGp},</if>
- <if test="wHlbFourGp != null">W_HLB_FOUR_GP = #{wHlbFourGp},</if>
- <if test="wHlbFiveGp != null">W_HLB_FIVE_GP = #{wHlbFiveGp},</if>
- <if test="fjOne != null">FJ_ONE = #{fjOne},</if>
- <if test="fjTwo != null">FJ_TWO = #{fjTwo},</if>
- <if test="fjThree != null">FJ_THREE = #{fjThree},</if>
- <if test="fjFour != null">FJ_FOUR = #{fjFour},</if>
- <if test="fjFive != null">FJ_FIVE = #{fjFive},</if>
- <if test="fjSix != null">FJ_SIX = #{fjSix},</if>
- <if test="kqllOne != null">KQLL_ONE = #{kqllOne},</if>
- <if test="kqllTwo != null">KQLL_TWO = #{kqllTwo},</if>
- <if test="kqllThree != null">KQLL_THREE = #{kqllThree},</if>
- <if test="kqllFour != null">KQLL_FOUR = #{kqllFour},</if>
- <if test="kqllFive != null">KQLL_FIVE = #{kqllFive},</if>
- <if test="kqllSix != null">KQLL_SIX = #{kqllSix},</if>
- <if test="SJTYJLY != null">SJTYJLY = #{SJTYJLY},</if>
- <if test="CLJYSSLL != null">CLJYSSLL = #{CLJYSSLL},</if>
- <if test="hycRjyAll != null">HYC_RJY_ALL = #{hycRjyAll},</if>
- <if test="hycRjyZdAll != null">HYC_RJY_ZD_ALL = #{hycRjyZdAll},</if>
- <if test="hycWnndAll != null">HYC_WNND_ALL = #{hycWnndAll},</if>
- <if test="CLP04YCZ != null">CL_P04_YCZ = #{CLP04YCZ},</if>
- <if test="createdTime != null">CREATED_TIME = #{createdTime},</if>
- </trim>
- where ID = #{ID}
- </update>
- <delete id="deleteTXinyiIndustryByID" parameterType="Long">
- delete from t_xinyi_industry where ID = #{ID}
- </delete>
- <delete id="deleteTXinyiIndustryByIDs" parameterType="String">
- delete from t_xinyi_industry where ID in
- <foreach item="ID" collection="array" open="(" separator="," close=")">
- #{ID}
- </foreach>
- </delete>
- <!-- 下面是新增的 -->
- <select id="getUniqueTXinyiIndustry" resultMap="TXinyiIndustryResult">
- <include refid="selectTXinyiIndustryVo"/>
- where TEST_TIME = #{testTime}
- </select>
- <update id="updateTXinyiIndustryCLByBetweenTime" >
- update t_xinyi_industry set CLJYSSLL = #{cljyssll}
- where TEST_TIME between #{beginTime} and #{endTime}
- </update>
- <update id="updateTXinyiIndustrySJByBetweenTime" >
- update t_xinyi_industry set SJTYJLY = #{sjtyjly}
- where TEST_TIME between #{beginTime} and #{endTime}
- </update>
- <select id="getLastHour" resultType="string">
- SELECT TEST_HOUR FROM t_xinyi_industry ORDER BY id DESC LIMIT 1
- </select>
- <select id="getLastMinute" resultType="string">
- SELECT TEST_TIME FROM t_xinyi_industry ORDER BY id DESC LIMIT 1
- </select>
- <select id="selectLast10RecordsForDecision" resultType="hashmap">
- SELECT
- a.ID ID,
- a.TEST_DATE TEST_DATE,
- a.TEST_HOUR TEST_HOUR,
- a.JS_COD COD_in,
- b.JSCOD_SJZ COD_in_name,
- a.CS_COD COD_off,
- b.CSCOD_BZZ COD_off_name,
- b.CSCOD_GKZ COD_off_con,
- a.JS_TP TP_in,
- b.JSZL_SJZ TP_in_name,
- a.CS_TP TP_off,
- b.CSZL_BZZ TP_off_name,
- b.CSZL_GKZ TP_off_con,
- a.JS_TN TN_in,
- b.JSZD_SJZ TN_in_name,
- a.CS_TN TN_off,
- b.CSZZ_BZZ TN_off_name,
- b.CSZZ_GKZ TN_off_con,
- a.JS_NH3 andan_in,
- b.JSAD_SJZ andan_in_name,
- a.CS_NH3 andan_off,
- b.CSAD_BZZ andan_off_name,
- b.CSAD_GKZ andan_off_con,
- a.JS_SS SS_in,
- b.JSSS_SJZ SS_in_name,
- a.CS_SS SS_off,
- b.CSSS_BZZ SS_off_name,
- b.CSSS_GKZ SS_off_con,
- a.JS_TDS TDS_in,
- b.JDTDS_GKZ TDS_in_name,
- c.JS_SW T,
- a.JS_PH pH,
- a.JS_SLQ Q_in,
- b.JSSL_SJZ Q_in_name,
- '' continuity,
- '' check_rise,
- '' time_tips,
- '' cs_continuity,
- c.WNTJZS_ALL SVI,
- b.WNTJZS_GKZ SVI_con,
- c.WNCJB_ALL SV,
- b.WNCJB_GKZ SV_con,
- c.HFXWNND_ALL MLVSS,
- a.HYC_WNND_ALL MLSS,
- '' MLVSS_wentai,
- '' MLSS_wentai,
- c.YYC_RJY_ALL DO_ana,
- a.HYC_RJY_ALL DO_O,
- c.QYC_RJY_ALL DO_que,
- '' DO_que_wentai,
- '' DO_ana_wentai,
- '' DO_O_wentai,
- c.JS_BOD5 BOD_in,
- c.JS_BOD5/a.JS_TP c,
- c.JS_BOD5/a.JS_TN b,
- '' BTP_wending,
- '' JS_TN_wentai,
- a.CL_P04_YCZ CL_P04_YCZ,
- (a.JS_TP - a.CL_P04_YCZ)/a.JS_TP TP_LV,
- '' TP_LV_continuity
- FROM
- t_xinyi_industry a
- LEFT JOIN t_xinyi_norm_config b on 1 = 1
- LEFT JOIN t_xinyi_daily c on a.TEST_DATE = c.TEST_DATE
- WHERE 1 = 1
- ORDER BY a.ID DESC
- LIMIT 10
- </select>
- <!-- todo 以后不用sql拼接实验室数据 处理历史数据并新增字段,直接获取 另外把关联查询改成在java代码中处理
- 不用再拼接了 SqlServer同步过来的机器人实验室数据已经有了新的字段
- -->
- <select id="selectLast10RecordsForDecisionOnlyIndustry" resultType="com.slibra.common.core.domain.DecisionReq">
- SELECT
- a.ID ID,
- a.TEST_DATE testDate,
- a.TEST_HOUR testHour,
- a.JS_COD codIn,
- b.JSCOD_SJZ codInName,
- a.CS_COD codOff,
- b.CSCOD_BZZ codOffName,
- b.CSCOD_GKZ codOffCon,
- a.JS_TP tpIn,
- b.JSZL_SJZ tpInName,
- a.CS_TP tpOff,
- b.CSZL_BZZ tpOffName,
- b.CSZL_GKZ tpOffCon,
- a.JS_TN tnIn,
- b.JSZD_SJZ tnInName,
- a.CS_TN tnOff,
- b.CSZZ_BZZ tnOffName,
- b.CSZZ_GKZ tnOffCon,
- a.JS_NH3 addanIn,
- b.JSAD_SJZ addanInName,
- a.CS_NH3 andanOff,
- b.CSAD_BZZ andanOffName,
- b.CSAD_GKZ andanOffCon,
- a.JS_SS ssIn,
- b.JSSS_SJZ ssInName,
- a.CS_SS ssOff,
- b.CSSS_BZZ ssOffName,
- b.CSSS_GKZ ssOffCon,
- a.JS_TDS tdsIn,
- b.JDTDS_GKZ tdsInName,
- a.JS_PH pH,
- a.JS_SLQ qIn,
- b.JSSL_SJZ qInName,
- b.WNTJZS_GKZ sviCon,
- b.WNCJB_GKZ svCon,
- a.CL_P04_YCZ clP04YCZ,
- ( a.JS_TP - a.CL_P04_YCZ )/ a.JS_TP tpLv,
- a.SJTYJLY tyjyl,
- a.CLJYSSLL cltjl,
- c.HYCXSY_ALL hycxsyAll,
- c.QYAN_ALL qyanAll,
- c.QYCKXSY_ALL qyckxsyAll,
- c.TP_RCC_JQR eccZl,
- c.HYZLSY_ALL hyzlsyAll
- FROM
- t_xinyi_industry a
- LEFT JOIN t_xinyi_norm_config b ON 1 = 1
- LEFT JOIN (
- SELECT
- TEST_HOUR,
- any_value ( HYCXSY_ALL ) HYCXSY_ALL,
- any_value ( QYAN_ALL ) QYAN_ALL,
- any_value ( QYCKXSY_ALL ) QYCKXSY_ALL,
- any_value ( TP_RCC_JQR ) TP_RCC_JQR,
- any_value ( HYZLSY_ALL ) HYZLSY_ALL
- FROM
- t_xinyi_robot
- GROUP BY
- TEST_HOUR
- ) c ON a.TEST_HOUR = c.TEST_HOUR
- WHERE
- 1 = 1
- ORDER BY
- a.ID DESC
- LIMIT 0,10
- </select>
- <select id="selectTXinyiIndustryNewest" resultMap="TXinyiIndustryResult">
- <include refid="selectTXinyiIndustryVo"/>
- order by id desc limit 1
- </select>
- <select id="selectNIndustry" resultMap="TXinyiIndustryResult">
- <include refid="selectTXinyiIndustryVo"/>
- order by id desc limit #{size}
- </select>
- <select id="selectIndustryAvgByDate" resultMap="TXinyiIndustryResult">
- SELECT
- AVG(JS_SLQ) JS_SLQ,
- AVG(JS_COD) JS_COD,
- AVG(JS_TN) JS_TN,
- AVG(JS_TP) JS_TP,
- AVG(JS_NH3) JS_NH3,
- AVG(JS_SS) JS_SS,
- AVG(CS_SLQC) CS_SLQC,
- AVG(CS_COD) CS_COD,
- AVG(CS_TN) CS_TN,
- AVG(CS_TP) CS_TP,
- AVG(CS_NH3) CS_NH3,
- AVG(CS_SS) CS_SS
- FROM
- t_xinyi_industry
- WHERE
- TEST_DATE = #{date}
- </select>
- <select id="getCount" resultType="java.lang.Integer">
- SELECT COUNT(*) FROM t_xinyi_industry
- </select>
- <select id="selectTXinyiIndustryListByPage" resultMap="TXinyiIndustryResult">
- <include refid="selectTXinyiIndustryVo"/>
- ORDER BY id LIMIT #{start}, #{end}
- </select>
- <select id="selectJSLByDate" resultType="com.slibra.business.res.ChartBasic">
- SELECT
- TEST_HOUR time,
- JS_SLQ val
- FROM
- t_xinyi_industry
- WHERE
- TEST_DATE BETWEEN #{start} AND #{end}
- ORDER BY
- ID ASC
- </select>
- <select id="selectJsCodByDate" resultType="com.slibra.business.res.ChartBasic">
- SELECT
- TEST_HOUR time,
- JS_COD val
- FROM
- t_xinyi_industry
- WHERE
- TEST_DATE BETWEEN #{start} AND #{end}
- ORDER BY
- ID ASC
- </select>
- <select id="selectJsTnByDate" resultType="com.slibra.business.res.ChartBasic">
- SELECT
- TEST_HOUR time,
- JS_TN val
- FROM
- t_xinyi_industry
- WHERE
- TEST_DATE BETWEEN #{start} AND #{end}
- ORDER BY
- ID ASC
- </select>
- <select id="selectTytzjlByDate" resultType="com.slibra.business.res.ChartBasic">
- SELECT
- TEST_HOUR time,
- SJTYJLY val
- FROM
- t_xinyi_industry
- WHERE
- TEST_DATE BETWEEN #{start} AND #{end}
- ORDER BY
- ID ASC
- </select>
- <select id="selectTXinyiIndustryList" parameterType="TXinyiIndustry" resultMap="TXinyiIndustryResult">
- <include refid="selectTXinyiIndustryVo"/>
- <where>
- <if test="testDate != null and testDate != ''"> and TEST_DATE = #{testDate}</if>
- <if test="testHour != null and testHour != ''"> and TEST_HOUR = #{testHour}</if>
- <if test="testTime != null and testTime != ''"> and TEST_TIME = #{testTime}</if>
- <if test="jsCod != null "> and JS_COD = #{jsCod}</if>
- <if test="jsPh != null "> and JS_PH = #{jsPh}</if>
- <if test="jsSs != null "> and JS_SS = #{jsSs}</if>
- <if test="jsTp != null "> and JS_TP = #{jsTp}</if>
- <if test="jsTn != null "> and JS_TN = #{jsTn}</if>
- <if test="jsNh3 != null "> and JS_NH3 = #{jsNh3}</if>
- <if test="jsSwPh != null "> and JS_SW_PH = #{jsSwPh}</if>
- <if test="jsBfyw != null "> and JS_BFYW = #{jsBfyw}</if>
- <if test="csSlqc != null "> and CS_SLQC = #{csSlqc}</if>
- <if test="csCod != null "> and CS_COD = #{csCod}</if>
- <if test="csPh != null "> and CS_PH = #{csPh}</if>
- <if test="csSs != null "> and CS_SS = #{csSs}</if>
- <if test="csTn != null "> and CS_TN = #{csTn}</if>
- <if test="csTp != null "> and CS_TP = #{csTp}</if>
- <if test="csNh3 != null "> and CS_NH3 = #{csNh3}</if>
- <if test="oneHyzdDo != null "> and ONE_HYZD_DO = #{oneHyzdDo}</if>
- <if test="oneHymdDo != null "> and ONE_HYMD_DO = #{oneHymdDo}</if>
- <if test="twoHyzdDo != null "> and TWO_HYZD_DO = #{twoHyzdDo}</if>
- <if test="twoHymdDo != null "> and TWO_HYMD_DO = #{twoHymdDo}</if>
- <if test="oneMlss != null "> and ONE_MLSS = #{oneMlss}</if>
- <if test="twoMlss != null "> and TWO_MLSS = #{twoMlss}</if>
- <if test="jsTds != null "> and JS_TDS = #{jsTds}</if>
- <if test="jsSlq != null "> and JS_SLQ = #{jsSlq}</if>
- <if test="nHlbOneGp != null "> and N_HLB_ONE_GP = #{nHlbOneGp}</if>
- <if test="nHlbTwoGp != null "> and N_HLB_TWO_GP = #{nHlbTwoGp}</if>
- <if test="nHlbThreeGp != null "> and N_HLB_THREE_GP = #{nHlbThreeGp}</if>
- <if test="nHlbFourGp != null "> and N_HLB_FOUR_GP = #{nHlbFourGp}</if>
- <if test="nhlBFiveGp != null "> and NHL_B_FIVE_GP = #{nhlBFiveGp}</if>
- <if test="nHlbSixGp != null "> and N_HLB_SIX_GP = #{nHlbSixGp}</if>
- <if test="wHlbOneGp != null "> and W_HLB_ONE_GP = #{wHlbOneGp}</if>
- <if test="wHlbTwoGp != null "> and W_HLB_TWO_GP = #{wHlbTwoGp}</if>
- <if test="wHlbThreeGp != null "> and W_HLB_THREE_GP = #{wHlbThreeGp}</if>
- <if test="wHlbFourGp != null "> and W_HLB_FOUR_GP = #{wHlbFourGp}</if>
- <if test="wHlbFiveGp != null "> and W_HLB_FIVE_GP = #{wHlbFiveGp}</if>
- <if test="fjOne != null "> and FJ_ONE = #{fjOne}</if>
- <if test="fjTwo != null "> and FJ_TWO = #{fjTwo}</if>
- <if test="fjThree != null "> and FJ_THREE = #{fjThree}</if>
- <if test="fjFour != null "> and FJ_FOUR = #{fjFour}</if>
- <if test="fjFive != null "> and FJ_FIVE = #{fjFive}</if>
- <if test="fjSix != null "> and FJ_SIX = #{fjSix}</if>
- <if test="kqllOne != null "> and KQLL_ONE = #{kqllOne}</if>
- <if test="kqllTwo != null "> and KQLL_TWO = #{kqllTwo}</if>
- <if test="kqllThree != null "> and KQLL_THREE = #{kqllThree}</if>
- <if test="kqllFour != null "> and KQLL_FOUR = #{kqllFour}</if>
- <if test="kqllFive != null "> and KQLL_FIVE = #{kqllFive}</if>
- <if test="kqllSix != null "> and KQLL_SIX = #{kqllSix}</if>
- <if test="SJTYJLY != null "> and SJTYJLY = #{SJTYJLY}</if>
- <if test="CLJYSSLL != null "> and CLJYSSLL = #{CLJYSSLL}</if>
- <if test="hycRjyAll != null and hycRjyAll != ''"> and HYC_RJY_ALL = #{hycRjyAll}</if>
- <if test="hycRjyZdAll != null and hycRjyZdAll != ''"> and HYC_RJY_ZD_ALL = #{hycRjyZdAll}</if>
- <if test="hycWnndAll != null and hycWnndAll != ''"> and HYC_WNND_ALL = #{hycWnndAll}</if>
- <if test="CLP04YCZ != null "> and CL_P04_YCZ = #{CLP04YCZ}</if>
- <if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
- <!-- 下面是新增的SQL检索条件 -->
- <if test="timeBegin != null and timeBegin != ''"> and TEST_DATE >= #{timeBegin}</if>
- <if test="timeEnd != null and timeEnd != ''"> and TEST_DATE <= #{timeEnd}</if>
- </where>
- order by id desc
- </select>
- </mapper>
|