代码调整
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
package com.njcn.harmonic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.po.RMpPollutionDPO;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/4 15:29【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RMpPollutionDPOMapper extends BaseMapper<RMpPollutionDPO> {
|
||||
int updateBatch(List<RMpPollutionDPO> list);
|
||||
|
||||
int batchInsert(@Param("list") List<RMpPollutionDPO> list);
|
||||
|
||||
int insertOrUpdate(RMpPollutionDPO record);
|
||||
|
||||
int insertOrUpdateSelective(RMpPollutionDPO record);
|
||||
|
||||
@Select({"<script>",
|
||||
"SELECT\n",
|
||||
" l.line_id,\n",
|
||||
" max(l.value) as value\n",
|
||||
"FROM\n" +
|
||||
" r_mp_pollution_d l\n",
|
||||
"where line_id in\n",
|
||||
"<foreach item='item' index='index' collection='items' open='(' separator=',' close=')'>",
|
||||
"#{item}",
|
||||
"</foreach>",
|
||||
"\tand DATE_FORMAT( data_date ,'%Y-%m') =#{searchBeginTime}\n",
|
||||
"and pollution_type =#{pollutionType}",
|
||||
"GROUP BY\n",
|
||||
" l.line_id",
|
||||
"</script>"
|
||||
|
||||
})
|
||||
List<RMpPollutionDPO> selectMaxList(@Param("items") List<String> line, @Param("pollutionType") String pollutionType, @Param("searchBeginTime") String searchBeginTime);
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.njcn.harmonic.mapper;
|
||||
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgBusbarVoltageM;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgBusbarVoltageVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +18,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageMMapper extends BaseMapper<RStatOrgBusbarVoltageM> {
|
||||
|
||||
/**
|
||||
* 获取月区域电站母线电压类指标超标计
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RStatOrgBusbarVoltageVO> getMstatOrgBusbarVoltageVO(@Param("param") StatSubstationBizBaseParam param);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.njcn.harmonic.mapper;
|
||||
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgBusbarVoltageQ;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgBusbarVoltageVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +18,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageQMapper extends BaseMapper<RStatOrgBusbarVoltageQ> {
|
||||
|
||||
/**
|
||||
* 获取季区域电站母线电压类指标超标计
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RStatOrgBusbarVoltageVO> getQstatOrgBusbarVoltageVO(@Param("param") StatSubstationBizBaseParam param);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,13 @@
|
||||
package com.njcn.harmonic.mapper;
|
||||
|
||||
import com.njcn.harmonic.pojo.param.StatSubstationBizBaseParam;
|
||||
import com.njcn.harmonic.pojo.po.RStatOrgBusbarVoltageY;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgBusbarVoltageVO;
|
||||
import com.njcn.harmonic.pojo.vo.RStatOrgIndexVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -13,4 +19,10 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
*/
|
||||
public interface RStatOrgBusbarVoltageYMapper extends BaseMapper<RStatOrgBusbarVoltageY> {
|
||||
|
||||
/**
|
||||
* 获取年区域电站母线电压类指标超标计
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
List<RStatOrgBusbarVoltageVO> getYstatOrgBusbarVoltageVO(@Param("param") StatSubstationBizBaseParam param);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.njcn.harmonic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
*
|
||||
* Description:
|
||||
* 接口文档访问地址:http://serverIP:port/swagger-ui.html
|
||||
* Date: 2022/11/3 10:18【需求编号】
|
||||
*
|
||||
* @author clam
|
||||
* @version V1.0.0
|
||||
*/
|
||||
public interface RStatPollutionOrgMPOMapper extends BaseMapper<RStatPollutionOrgMPO> {
|
||||
int updateBatch(List<RStatPollutionOrgMPO> list);
|
||||
|
||||
int batchInsert(@Param("list") List<RStatPollutionOrgMPO> list);
|
||||
|
||||
int insertOrUpdate(RStatPollutionOrgMPO record);
|
||||
|
||||
int insertOrUpdateSelective(RStatPollutionOrgMPO record);
|
||||
}
|
||||
@@ -38,6 +38,7 @@
|
||||
|
||||
<select id="getReportTemplateByDept" resultType="ReportTemplateVO">
|
||||
SELECT
|
||||
DISTINCT
|
||||
a.id,
|
||||
a.NAME,
|
||||
b.activation
|
||||
@@ -45,7 +46,7 @@
|
||||
sys_excel_rpt_temp a
|
||||
LEFT JOIN sys_dept_temp b ON a.Id = b.temp_id
|
||||
WHERE
|
||||
a.state = 1
|
||||
b.activation = 1
|
||||
and b.dept_id in
|
||||
<foreach collection="list" index="index" item="item" separator="," open="(" close=")">
|
||||
#{item.id}
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
rmshd.inuharm_times
|
||||
FROM
|
||||
r_mp_part_harmonic_detail_d rmphd
|
||||
LEFT JOIN r_mp_surplus_harmonic_detail_d rmshd ON rmshd.measurement_point_id = rmphd.measurement_point_id
|
||||
LEFT JOIN r_mp_surplus_harmonic_detail_d rmshd ON rmshd.measurement_point_id = rmphd.measurement_point_id
|
||||
AND rmshd.data_date = rmphd.data_date
|
||||
<where>
|
||||
<if test="param != null and param.id">
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
<?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.njcn.harmonic.mapper.RMpPollutionDPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RMpPollutionDPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_mp_pollution_d-->
|
||||
<id column="line_id" jdbcType="VARCHAR" property="lineId" />
|
||||
<id column="data_date" jdbcType="TIMESTAMP" property="dataDate" />
|
||||
<id column="pollution_type" jdbcType="VARCHAR" property="pollutionType" />
|
||||
<result column="value" jdbcType="FLOAT" property="value" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
line_id, data_date, pollution_type, `value`
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_mp_pollution_d
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when line_id = #{item.lineId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where line_id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.lineId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_mp_pollution_d
|
||||
(line_id, data_date, pollution_type, `value`)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.lineId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
#{item.value,jdbcType=FLOAT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RMpPollutionDPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_mp_pollution_d
|
||||
(line_id, data_date, pollution_type, `value`)
|
||||
values
|
||||
(#{lineId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
on duplicate key update
|
||||
line_id = #{lineId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RMpPollutionDPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_mp_pollution_d
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lineId != null">
|
||||
line_id,
|
||||
</if>
|
||||
<if test="dataDate != null">
|
||||
data_date,
|
||||
</if>
|
||||
<if test="pollutionType != null">
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lineId != null">
|
||||
#{lineId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataDate != null">
|
||||
#{dataDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pollutionType != null">
|
||||
#{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
#{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="lineId != null">
|
||||
line_id = #{lineId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataDate != null">
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pollutionType != null">
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
@@ -15,5 +15,49 @@
|
||||
<result column="flicker_average" property="flickerAverage" />
|
||||
<result column="flicker_accrued" property="flickerAccrued" />
|
||||
</resultMap>
|
||||
<select id="getMstatOrgBusbarVoltageVO" resultType="com.njcn.harmonic.pojo.vo.RStatOrgBusbarVoltageVO">
|
||||
SELECT
|
||||
thisOrg.org_no,
|
||||
thisOrg.data_date,
|
||||
thisOrg.busbar_id,
|
||||
thisOrg.measurement_count,
|
||||
thisOrg.v_average as average,
|
||||
thisOrg.v_accrued as accrued,
|
||||
thisOrg.unbalance_average,
|
||||
thisOrg.unbalance_accrued,
|
||||
thisOrg.flicker_average,
|
||||
thisOrg.flicker_accrued,
|
||||
lastOrg.v_average as averageSame,
|
||||
lastOrg.v_accrued as accruedSame,
|
||||
lastOrg.unbalance_average as unbalanceAverageSame,
|
||||
lastOrg.unbalance_accrued as unbalanceAccruedSame,
|
||||
lastOrg.flicker_average as flickerAverageSame,
|
||||
lastOrg.flicker_accrued as flickerAccruedSame
|
||||
FROM
|
||||
r_stat_org_busbar_voltage_m thisOrg
|
||||
LEFt JOIN r_stat_org_busbar_voltage_m lastOrg on thisOrg.org_no=lastOrg.org_no and thisOrg.busbar_id=lastOrg.busbar_id
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (lastOrg.data_date >= date(
|
||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
||||
AND (lastOrg.data_date <= date(
|
||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
||||
</if>
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND thisOrg.org_no IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND thisOrg.data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND thisOrg.data_date <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -15,5 +15,50 @@
|
||||
<result column="flicker_average" property="flickerAverage" />
|
||||
<result column="flicker_accrued" property="flickerAccrued" />
|
||||
</resultMap>
|
||||
<select id="getQstatOrgBusbarVoltageVO" resultType="com.njcn.harmonic.pojo.vo.RStatOrgBusbarVoltageVO">
|
||||
SELECT
|
||||
thisOrg.org_no,
|
||||
thisOrg.data_date,
|
||||
thisOrg.busbar_id,
|
||||
thisOrg.measurement_count,
|
||||
thisOrg.v_average as average,
|
||||
thisOrg.v_accrued as accrued,
|
||||
thisOrg.unbalance_average,
|
||||
thisOrg.unbalance_accrued,
|
||||
thisOrg.flicker_average,
|
||||
thisOrg.flicker_accrued,
|
||||
lastOrg.v_average as averageSame,
|
||||
lastOrg.v_accrued as accruedSame,
|
||||
lastOrg.unbalance_average as unbalanceAverageSame,
|
||||
lastOrg.unbalance_accrued as unbalanceAccruedSame,
|
||||
lastOrg.flicker_average as flickerAverageSame,
|
||||
lastOrg.flicker_accrued as flickerAccruedSame
|
||||
FROM
|
||||
r_stat_org_busbar_voltage_q thisOrg
|
||||
LEFt JOIN r_stat_org_busbar_voltage_q lastOrg on thisOrg.org_no=lastOrg.org_no and thisOrg.busbar_id=lastOrg.busbar_id
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (lastOrg.data_date >= date(
|
||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
||||
AND (lastOrg.data_date <= date(
|
||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
||||
</if>
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND thisOrg.org_no IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND thisOrg.data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND thisOrg.data_date <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -15,5 +15,50 @@
|
||||
<result column="flicker_average" property="flickerAverage" />
|
||||
<result column="flicker_accrued" property="flickerAccrued" />
|
||||
</resultMap>
|
||||
<select id="getYstatOrgBusbarVoltageVO" resultType="com.njcn.harmonic.pojo.vo.RStatOrgBusbarVoltageVO">
|
||||
SELECT
|
||||
thisOrg.org_no,
|
||||
thisOrg.data_date,
|
||||
thisOrg.busbar_id,
|
||||
thisOrg.measurement_count,
|
||||
thisOrg.v_average as average,
|
||||
thisOrg.v_accrued as accrued,
|
||||
thisOrg.unbalance_average,
|
||||
thisOrg.unbalance_accrued,
|
||||
thisOrg.flicker_average,
|
||||
thisOrg.flicker_accrued,
|
||||
lastOrg.v_average as averageSame,
|
||||
lastOrg.v_accrued as accruedSame,
|
||||
lastOrg.unbalance_average as unbalanceAverageSame,
|
||||
lastOrg.unbalance_accrued as unbalanceAccruedSame,
|
||||
lastOrg.flicker_average as flickerAverageSame,
|
||||
lastOrg.flicker_accrued as flickerAccruedSame
|
||||
FROM
|
||||
r_stat_org_busbar_voltage_y thisOrg
|
||||
LEFt JOIN r_stat_org_busbar_voltage_y lastOrg on thisOrg.org_no=lastOrg.org_no and thisOrg.busbar_id=lastOrg.busbar_id
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND (lastOrg.data_date >= date(
|
||||
DATE_ADD( #{param.startTime}, INTERVAL - 1 YEAR )))
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime !=''">
|
||||
AND (lastOrg.data_date <= date(
|
||||
DATE_ADD( #{param.endTime}, INTERVAL - 1 YEAR )))
|
||||
</if>
|
||||
<where>
|
||||
<if test="param != null and param.ids != null and param.ids.size > 0">
|
||||
AND thisOrg.org_no IN
|
||||
<foreach collection='param.ids' item='item' index="index" open='(' separator=',' close=')'>
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="param!=null and param.startTime != null and param.startTime !=''">
|
||||
AND thisOrg.data_date >= #{param.startTime}
|
||||
</if>
|
||||
<if test="param!=null and param.endTime != null and param.endTime != ''">
|
||||
AND thisOrg.data_date <= #{param.endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
<?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.njcn.harmonic.mapper.RStatPollutionOrgMPOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table r_stat_pollution_org_m-->
|
||||
<id column="org_id" jdbcType="VARCHAR" property="orgId" />
|
||||
<id column="data_date" jdbcType="TIMESTAMP" property="dataDate" />
|
||||
<result column="pollution_type" jdbcType="VARCHAR" property="pollutionType" />
|
||||
<result column="value" jdbcType="FLOAT" property="value" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
org_id, data_date, pollution_type, `value`
|
||||
</sql>
|
||||
<update id="updateBatch" parameterType="java.util.List">
|
||||
<!--@mbg.generated-->
|
||||
update r_stat_pollution_org_m
|
||||
<trim prefix="set" suffixOverrides=",">
|
||||
<trim prefix="pollution_type = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.pollutionType,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</trim>
|
||||
<trim prefix="`value` = case" suffix="end,">
|
||||
<foreach collection="list" index="index" item="item">
|
||||
when org_id = #{item.orgId,jdbcType=VARCHAR} then #{item.value,jdbcType=FLOAT}
|
||||
</foreach>
|
||||
</trim>
|
||||
</trim>
|
||||
where org_id in
|
||||
<foreach close=")" collection="list" item="item" open="(" separator=", ">
|
||||
#{item.orgId,jdbcType=VARCHAR}
|
||||
</foreach>
|
||||
</update>
|
||||
<insert id="batchInsert" parameterType="map">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_m
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
values
|
||||
<foreach collection="list" item="item" separator=",">
|
||||
(#{item.orgId,jdbcType=VARCHAR}, #{item.dataDate,jdbcType=TIMESTAMP}, #{item.pollutionType,jdbcType=VARCHAR},
|
||||
#{item.value,jdbcType=FLOAT})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="insertOrUpdate" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_m
|
||||
(org_id, data_date, pollution_type, `value`)
|
||||
values
|
||||
(#{orgId,jdbcType=VARCHAR}, #{dataDate,jdbcType=TIMESTAMP}, #{pollutionType,jdbcType=VARCHAR},
|
||||
#{value,jdbcType=FLOAT})
|
||||
on duplicate key update
|
||||
org_id = #{orgId,jdbcType=VARCHAR},
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
`value` = #{value,jdbcType=FLOAT}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.njcn.harmonic.pojo.po.RStatPollutionOrgMPO">
|
||||
<!--@mbg.generated-->
|
||||
insert into r_stat_pollution_org_m
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orgId != null">
|
||||
org_id,
|
||||
</if>
|
||||
<if test="dataDate != null">
|
||||
data_date,
|
||||
</if>
|
||||
<if test="pollutionType != null">
|
||||
pollution_type,
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value`,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orgId != null">
|
||||
#{orgId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataDate != null">
|
||||
#{dataDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pollutionType != null">
|
||||
#{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
#{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="orgId != null">
|
||||
org_id = #{orgId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="dataDate != null">
|
||||
data_date = #{dataDate,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="pollutionType != null">
|
||||
pollution_type = #{pollutionType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="value != null">
|
||||
`value` = #{value,jdbcType=FLOAT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user