|
@@ -0,0 +1,246 @@
|
|
|
+<?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.jiayue.ipfcst.d5000web.mapper.CollectedDailyPowerMapper">
|
|
|
+
|
|
|
+ <resultMap type="com.jiayue.ipfcst.d5000web.bean.DailyPower" id="dailyPower">
|
|
|
+ <result property="p1" column="P1"/>
|
|
|
+ <result property="p2" column="P2"/>
|
|
|
+ <result property="p3" column="P3"/>
|
|
|
+ <result property="p4" column="P4"/>
|
|
|
+ <result property="p5" column="P5"/>
|
|
|
+ <result property="p6" column="P6"/>
|
|
|
+ <result property="p7" column="P7"/>
|
|
|
+ <result property="p8" column="P8"/>
|
|
|
+ <result property="p9" column="P9"/>
|
|
|
+ <result property="p10" column="P10"/>
|
|
|
+ <result property="p11" column="P11"/>
|
|
|
+ <result property="p12" column="P12"/>
|
|
|
+ <result property="p13" column="P13"/>
|
|
|
+ <result property="p14" column="P14"/>
|
|
|
+ <result property="p15" column="P15"/>
|
|
|
+ <result property="p16" column="P16"/>
|
|
|
+ <result property="p17" column="P17"/>
|
|
|
+ <result property="p18" column="P18"/>
|
|
|
+ <result property="p19" column="P19"/>
|
|
|
+ <result property="p20" column="P20"/>
|
|
|
+ <result property="p21" column="P21"/>
|
|
|
+ <result property="p22" column="P22"/>
|
|
|
+ <result property="p23" column="P23"/>
|
|
|
+ <result property="p24" column="P24"/>
|
|
|
+ <result property="p25" column="P25"/>
|
|
|
+ <result property="p26" column="P26"/>
|
|
|
+ <result property="p27" column="P27"/>
|
|
|
+ <result property="p28" column="P28"/>
|
|
|
+ <result property="p29" column="P29"/>
|
|
|
+ <result property="p30" column="P30"/>
|
|
|
+ <result property="p31" column="P31"/>
|
|
|
+ <result property="p32" column="P32"/>
|
|
|
+ <result property="p33" column="P33"/>
|
|
|
+ <result property="p34" column="P34"/>
|
|
|
+ <result property="p35" column="P35"/>
|
|
|
+ <result property="p36" column="P36"/>
|
|
|
+ <result property="p37" column="P37"/>
|
|
|
+ <result property="p38" column="P38"/>
|
|
|
+ <result property="p39" column="P39"/>
|
|
|
+ <result property="p40" column="P40"/>
|
|
|
+ <result property="p41" column="P41"/>
|
|
|
+ <result property="p42" column="P42"/>
|
|
|
+ <result property="p43" column="P43"/>
|
|
|
+ <result property="p44" column="P44"/>
|
|
|
+ <result property="p45" column="P45"/>
|
|
|
+ <result property="p46" column="P46"/>
|
|
|
+ <result property="p47" column="P47"/>
|
|
|
+ <result property="p48" column="P48"/>
|
|
|
+ <result property="p49" column="P49"/>
|
|
|
+ <result property="p50" column="P50"/>
|
|
|
+ <result property="p51" column="P51"/>
|
|
|
+ <result property="p52" column="P52"/>
|
|
|
+ <result property="p53" column="P53"/>
|
|
|
+ <result property="p54" column="P54"/>
|
|
|
+ <result property="p55" column="P55"/>
|
|
|
+ <result property="p56" column="P56"/>
|
|
|
+ <result property="p57" column="P57"/>
|
|
|
+ <result property="p58" column="P58"/>
|
|
|
+ <result property="p59" column="P59"/>
|
|
|
+ <result property="p60" column="P60"/>
|
|
|
+ <result property="p61" column="P61"/>
|
|
|
+ <result property="p62" column="P62"/>
|
|
|
+ <result property="p63" column="P63"/>
|
|
|
+ <result property="p64" column="P64"/>
|
|
|
+ <result property="p65" column="P65"/>
|
|
|
+ <result property="p66" column="P66"/>
|
|
|
+ <result property="p67" column="P67"/>
|
|
|
+ <result property="p68" column="P68"/>
|
|
|
+ <result property="p69" column="P69"/>
|
|
|
+ <result property="p70" column="P70"/>
|
|
|
+ <result property="p71" column="P71"/>
|
|
|
+ <result property="p72" column="P72"/>
|
|
|
+ <result property="p73" column="P73"/>
|
|
|
+ <result property="p74" column="P74"/>
|
|
|
+ <result property="p75" column="P75"/>
|
|
|
+ <result property="p76" column="P76"/>
|
|
|
+ <result property="p77" column="P77"/>
|
|
|
+ <result property="p78" column="P78"/>
|
|
|
+ <result property="p79" column="P79"/>
|
|
|
+ <result property="p80" column="P80"/>
|
|
|
+ <result property="p81" column="P81"/>
|
|
|
+ <result property="p82" column="P82"/>
|
|
|
+ <result property="p83" column="P83"/>
|
|
|
+ <result property="p84" column="P84"/>
|
|
|
+ <result property="p85" column="P85"/>
|
|
|
+ <result property="p86" column="P86"/>
|
|
|
+ <result property="p87" column="P87"/>
|
|
|
+ <result property="p88" column="P88"/>
|
|
|
+ <result property="p89" column="P89"/>
|
|
|
+ <result property="p90" column="P90"/>
|
|
|
+ <result property="p91" column="P91"/>
|
|
|
+ <result property="p92" column="P92"/>
|
|
|
+ <result property="p93" column="P93"/>
|
|
|
+ <result property="p94" column="P94"/>
|
|
|
+ <result property="p95" column="P95"/>
|
|
|
+ <result property="p96" column="P96"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <resultMap type="com.jiayue.ipfcst.d5000web.bean.CollectedDailyPower" extends="dailyPower" id="collectedDailyPower">
|
|
|
+ <result property="id" column="ID"/>
|
|
|
+ <result property="date" column="DATE"/>
|
|
|
+ <result property="updateDate" column="UPDATEDATE"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <insert id="add">
|
|
|
+ insert into D5000.COLLECTEDDAILYPOWER
|
|
|
+ (`date`,updatedate,`IS_MANUAL`,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90,p91,p92,p93,p94,p95,p96)
|
|
|
+ values
|
|
|
+ (
|
|
|
+ #{date},#{updateDate},#{isManual},#{p1},#{p2},#{p3},#{p4},#{p5},#{p6},#{p7},#{p8},#{p9},#{p10},#{p11},#{p12},#{p13},#{p14},#{p15},#{p16},#{p17},#{p18},#{p19},#{p20},#{p21},#{p22},#{p23},#{p24},#{p25},#{p26},#{p27},#{p28},#{p29},#{p30},#{p31},#{p32},#{p33},#{p34},#{p35},#{p36},#{p37},#{p38},#{p39},#{p40},#{p41},#{p42},#{p43},#{p44},#{p45},#{p46},#{p47},#{p48},#{p49},#{p50},#{p51},#{p52},#{p53},#{p54},#{p55},#{p56},#{p57},#{p58},#{p59},#{p60},#{p61},#{p62},#{p63},#{p64},#{p65},#{p66},#{p67},#{p68},#{p69},#{p70},#{p71},#{p72},#{p73},#{p74},#{p75},#{p76},#{p77},#{p78},#{p79},#{p80},#{p81},#{p82},#{p83},#{p84},#{p85},#{p86},#{p87},#{p88},#{p89},#{p90},#{p91},#{p92},#{p93},#{p94},#{p95},#{p96})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="update">
|
|
|
+ update D5000.COLLECTEDDAILYPOWER
|
|
|
+ <trim prefix="set" suffixOverrides=",">
|
|
|
+ <if test="updateDate!= null">updateDate = #{updateDate},</if>
|
|
|
+ <if test="isManual!= null">`IS_MANUAL` = #{isManual},</if>
|
|
|
+ <if test="p1!= null">p1 = #{p1},</if>
|
|
|
+ <if test="p2!= null">p2 = #{p2},</if>
|
|
|
+ <if test="p3!= null">p3 = #{p3},</if>
|
|
|
+ <if test="p4!= null">p4 = #{p4},</if>
|
|
|
+ <if test="p5!= null">p5 = #{p5},</if>
|
|
|
+ <if test="p6!= null">p6 = #{p6},</if>
|
|
|
+ <if test="p7!= null">p7 = #{p7},</if>
|
|
|
+ <if test="p8!= null">p8 = #{p8},</if>
|
|
|
+ <if test="p9!= null">p9 = #{p9},</if>
|
|
|
+ <if test="p10!= null">p10 = #{p10},</if>
|
|
|
+ <if test="p11!= null">p11 = #{p11},</if>
|
|
|
+ <if test="p12!= null">p12 = #{p12},</if>
|
|
|
+ <if test="p13!= null">p13 = #{p13},</if>
|
|
|
+ <if test="p14!= null">p14 = #{p14},</if>
|
|
|
+ <if test="p15!= null">p15 = #{p15},</if>
|
|
|
+ <if test="p16!= null">p16 = #{p16},</if>
|
|
|
+ <if test="p17!= null">p17 = #{p17},</if>
|
|
|
+ <if test="p18!= null">p18 = #{p18},</if>
|
|
|
+ <if test="p19!= null">p19 = #{p19},</if>
|
|
|
+ <if test="p20!= null">p20 = #{p20},</if>
|
|
|
+ <if test="p21!= null">p21 = #{p21},</if>
|
|
|
+ <if test="p22!= null">p22 = #{p22},</if>
|
|
|
+ <if test="p23!= null">p23 = #{p23},</if>
|
|
|
+ <if test="p24!= null">p24 = #{p24},</if>
|
|
|
+ <if test="p25!= null">p25 = #{p25},</if>
|
|
|
+ <if test="p26!= null">p26 = #{p26},</if>
|
|
|
+ <if test="p27!= null">p27 = #{p27},</if>
|
|
|
+ <if test="p28!= null">p28 = #{p28},</if>
|
|
|
+ <if test="p29!= null">p29 = #{p29},</if>
|
|
|
+ <if test="p30!= null">p30 = #{p30},</if>
|
|
|
+ <if test="p31!= null">p31 = #{p31},</if>
|
|
|
+ <if test="p32!= null">p32 = #{p32},</if>
|
|
|
+ <if test="p33!= null">p33 = #{p33},</if>
|
|
|
+ <if test="p34!= null">p34 = #{p34},</if>
|
|
|
+ <if test="p35!= null">p35 = #{p35},</if>
|
|
|
+ <if test="p36!= null">p36 = #{p36},</if>
|
|
|
+ <if test="p37!= null">p37 = #{p37},</if>
|
|
|
+ <if test="p38!= null">p38 = #{p38},</if>
|
|
|
+ <if test="p39!= null">p39 = #{p39},</if>
|
|
|
+ <if test="p40!= null">p40 = #{p40},</if>
|
|
|
+ <if test="p41!= null">p41 = #{p41},</if>
|
|
|
+ <if test="p42!= null">p42 = #{p42},</if>
|
|
|
+ <if test="p43!= null">p43 = #{p43},</if>
|
|
|
+ <if test="p44!= null">p44 = #{p44},</if>
|
|
|
+ <if test="p45!= null">p45 = #{p45},</if>
|
|
|
+ <if test="p46!= null">p46 = #{p46},</if>
|
|
|
+ <if test="p47!= null">p47 = #{p47},</if>
|
|
|
+ <if test="p48!= null">p48 = #{p48},</if>
|
|
|
+ <if test="p49!= null">p49 = #{p49},</if>
|
|
|
+ <if test="p50!= null">p50 = #{p50},</if>
|
|
|
+ <if test="p51!= null">p51 = #{p51},</if>
|
|
|
+ <if test="p52!= null">p52 = #{p52},</if>
|
|
|
+ <if test="p53!= null">p53 = #{p53},</if>
|
|
|
+ <if test="p54!= null">p54 = #{p54},</if>
|
|
|
+ <if test="p55!= null">p55 = #{p55},</if>
|
|
|
+ <if test="p56!= null">p56 = #{p56},</if>
|
|
|
+ <if test="p57!= null">p57 = #{p57},</if>
|
|
|
+ <if test="p58!= null">p58 = #{p58},</if>
|
|
|
+ <if test="p59!= null">p59 = #{p59},</if>
|
|
|
+ <if test="p60!= null">p60 = #{p60},</if>
|
|
|
+ <if test="p61!= null">p61 = #{p61},</if>
|
|
|
+ <if test="p62!= null">p62 = #{p62},</if>
|
|
|
+ <if test="p63!= null">p63 = #{p63},</if>
|
|
|
+ <if test="p64!= null">p64 = #{p64},</if>
|
|
|
+ <if test="p65!= null">p65 = #{p65},</if>
|
|
|
+ <if test="p66!= null">p66 = #{p66},</if>
|
|
|
+ <if test="p67!= null">p67 = #{p67},</if>
|
|
|
+ <if test="p68!= null">p68 = #{p68},</if>
|
|
|
+ <if test="p69!= null">p69 = #{p69},</if>
|
|
|
+ <if test="p70!= null">p70 = #{p70},</if>
|
|
|
+ <if test="p71!= null">p71 = #{p71},</if>
|
|
|
+ <if test="p72!= null">p72 = #{p72},</if>
|
|
|
+ <if test="p73!= null">p73 = #{p73},</if>
|
|
|
+ <if test="p74!= null">p74 = #{p74},</if>
|
|
|
+ <if test="p75!= null">p75 = #{p75},</if>
|
|
|
+ <if test="p76!= null">p76 = #{p76},</if>
|
|
|
+ <if test="p77!= null">p77 = #{p77},</if>
|
|
|
+ <if test="p78!= null">p78 = #{p78},</if>
|
|
|
+ <if test="p79!= null">p79 = #{p79},</if>
|
|
|
+ <if test="p80!= null">p80 = #{p80},</if>
|
|
|
+ <if test="p81!= null">p81 = #{p81},</if>
|
|
|
+ <if test="p82!= null">p82 = #{p82},</if>
|
|
|
+ <if test="p83!= null">p83 = #{p83},</if>
|
|
|
+ <if test="p84!= null">p84 = #{p84},</if>
|
|
|
+ <if test="p85!= null">p85 = #{p85},</if>
|
|
|
+ <if test="p86!= null">p86 = #{p86},</if>
|
|
|
+ <if test="p87!= null">p87 = #{p87},</if>
|
|
|
+ <if test="p88!= null">p88 = #{p88},</if>
|
|
|
+ <if test="p89!= null">p89 = #{p89},</if>
|
|
|
+ <if test="p90!= null">p90 = #{p90},</if>
|
|
|
+ <if test="p91!= null">p91 = #{p91},</if>
|
|
|
+ <if test="p92!= null">p92 = #{p92},</if>
|
|
|
+ <if test="p93!= null">p93 = #{p93},</if>
|
|
|
+ <if test="p94!= null">p94 = #{p94},</if>
|
|
|
+ <if test="p95!= null">p95 = #{p95},</if>
|
|
|
+ <if test="p96!= null">p96 = #{p96}</if>
|
|
|
+ </trim>
|
|
|
+ where `date`=#{date}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="get" resultMap="collectedDailyPower">
|
|
|
+ SELECT
|
|
|
+ *
|
|
|
+ FROM
|
|
|
+ D5000.COLLECTEDDAILYPOWER
|
|
|
+ WHERE
|
|
|
+ 1=1
|
|
|
+ <if test="updateDate!= null">and updateDate = #{updateDate}</if>
|
|
|
+ <if test="date!= null">and `date` = #{date}</if>
|
|
|
+ <if test="isManual!= null">and `IS_MANUAL` = #{isManual}</if>
|
|
|
+ </select>
|
|
|
+ <select id="containThisDate" resultType="java.lang.Integer">
|
|
|
+ select COUNT(id) from D5000.COLLECTEDDAILYPOWER where `date`=#{date};
|
|
|
+ </select>
|
|
|
+ <select id="isManual" resultType="java.lang.Boolean">
|
|
|
+ select IS_MANUAL from D5000.COLLECTEDDAILYPOWER where `date`=#{date};
|
|
|
+ </select>
|
|
|
+ <select id="getLastRecord" resultType="com.jiayue.ipfcst.d5000web.bean.CollectedDailyPower">
|
|
|
+ SELECT * FROM D5000.COLLECTEDDAILYPOWER where id=select max(id) from D5000.COLLECTEDDAILYPOWER
|
|
|
+ </select>
|
|
|
+ <select id="getFutureRecord" resultType="com.jiayue.ipfcst.d5000web.bean.CollectedDailyPower">
|
|
|
+ SELECT * FROM D5000.COLLECTEDDAILYPOWER where `date` > #{date}
|
|
|
+ </select>
|
|
|
+</mapper>
|