forked from floraachy/xiuos_IoT
add qjdq data websocket
This commit is contained in:
parent
3a4b6eace9
commit
e4d0c4cb33
|
@ -0,0 +1,25 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<code_scheme name="Project" version="173">
|
||||
<JetCodeStyleSettings>
|
||||
<option name="PACKAGES_TO_USE_STAR_IMPORTS">
|
||||
<value>
|
||||
<package name="java.util" alias="false" withSubpackages="false" />
|
||||
<package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
|
||||
<package name="io.ktor" alias="false" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="PACKAGES_IMPORT_LAYOUT">
|
||||
<value>
|
||||
<package name="" alias="false" withSubpackages="true" />
|
||||
<package name="java" alias="false" withSubpackages="true" />
|
||||
<package name="javax" alias="false" withSubpackages="true" />
|
||||
<package name="kotlin" alias="false" withSubpackages="true" />
|
||||
<package name="" alias="true" withSubpackages="true" />
|
||||
</value>
|
||||
</option>
|
||||
</JetCodeStyleSettings>
|
||||
<ScalaCodeStyleSettings>
|
||||
<option name="MULTILINE_STRING_CLOSING_QUOTES_ON_NEW_LINE" value="true" />
|
||||
</ScalaCodeStyleSettings>
|
||||
</code_scheme>
|
||||
</component>
|
|
@ -0,0 +1,5 @@
|
|||
<component name="ProjectCodeStyleConfiguration">
|
||||
<state>
|
||||
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||
</state>
|
||||
</component>
|
|
@ -113,6 +113,12 @@
|
|||
<artifactId>spring-boot-starter-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.spark</groupId>
|
||||
<artifactId>spark-core_2.12</artifactId>
|
||||
<version>3.3.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
package com.aiit.xiuos.Utils;
|
||||
|
||||
public class BeanUtil {
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.aiit.xiuos.Utils;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import java.io.*;
|
||||
@Slf4j
|
||||
public class CsvUtils {
|
||||
public static StringBuffer FinsJson2CSV(JSONArray jsonArray) {
|
||||
StringBuffer stringBuffer=new StringBuffer();
|
||||
// "value_name": "启动",
|
||||
// "value_type": 1,
|
||||
// "area_char": "W",
|
||||
// "data_type": 0,
|
||||
// "start_address": 0,
|
||||
// "bit_address": 0,
|
||||
// "data_length": 1
|
||||
for(int i=0;i<jsonArray.size();i++){
|
||||
JSONObject items =jsonArray.getJSONObject(i);
|
||||
stringBuffer.append(items.getString("value_name")).append(",")
|
||||
.append(items.getString("area_char")).append(",")
|
||||
.append(items.getInteger("data_type")).append(",")
|
||||
.append(items.getInteger("start_address")).append(",")
|
||||
.append(items.getInteger("bit_address")).append(",")
|
||||
.append(items.getInteger("data_length")).append("\n");
|
||||
}
|
||||
return stringBuffer;
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package com.aiit.xiuos.Utils;
|
||||
|
||||
public class DINGUtils {
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.aiit.xiuos.dao.mappers;
|
||||
|
||||
import com.aiit.xiuos.model.QjdqElectric;
|
||||
|
||||
public interface QjdqElectricMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(QjdqElectric record);
|
||||
|
||||
int insertSelective(QjdqElectric record);
|
||||
|
||||
QjdqElectric selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(QjdqElectric record);
|
||||
|
||||
int updateByPrimaryKey(QjdqElectric record);
|
||||
}
|
|
@ -0,0 +1,136 @@
|
|||
package com.aiit.xiuos.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
public class QjdqElectric {
|
||||
private Integer id;
|
||||
|
||||
private BigDecimal electric2;
|
||||
|
||||
private BigDecimal electric3;
|
||||
|
||||
private BigDecimal electric4;
|
||||
|
||||
private BigDecimal electric5;
|
||||
|
||||
private BigDecimal electric6;
|
||||
|
||||
private BigDecimal electric7;
|
||||
|
||||
private BigDecimal electric8;
|
||||
|
||||
private BigDecimal electric9;
|
||||
|
||||
private BigDecimal electric10;
|
||||
|
||||
private BigDecimal electric11;
|
||||
|
||||
private BigDecimal electric12;
|
||||
|
||||
private BigDecimal electric13;
|
||||
|
||||
private BigDecimal electric14;
|
||||
|
||||
private BigDecimal electric15;
|
||||
|
||||
private BigDecimal electric16;
|
||||
|
||||
private BigDecimal electric17;
|
||||
|
||||
private BigDecimal electric18;
|
||||
|
||||
private BigDecimal electric19;
|
||||
|
||||
private BigDecimal electric20;
|
||||
|
||||
private BigDecimal electric21;
|
||||
|
||||
private BigDecimal electric22;
|
||||
|
||||
private BigDecimal electric23;
|
||||
|
||||
private BigDecimal electric24;
|
||||
|
||||
private BigDecimal electric25;
|
||||
|
||||
private BigDecimal electric26;
|
||||
|
||||
private BigDecimal electric27;
|
||||
|
||||
private BigDecimal electric28;
|
||||
|
||||
private BigDecimal electric29;
|
||||
|
||||
private BigDecimal electric30;
|
||||
|
||||
private BigDecimal electric31;
|
||||
|
||||
private BigDecimal electric32;
|
||||
|
||||
private BigDecimal electric33;
|
||||
|
||||
private BigDecimal electric34;
|
||||
|
||||
private BigDecimal electric35;
|
||||
|
||||
private BigDecimal electric36;
|
||||
|
||||
private BigDecimal electric37;
|
||||
|
||||
private BigDecimal electric38;
|
||||
|
||||
private BigDecimal electric39;
|
||||
|
||||
private BigDecimal electric40;
|
||||
|
||||
public QjdqElectric(Integer id, BigDecimal electric2, BigDecimal electric3, BigDecimal electric4, BigDecimal electric5, BigDecimal electric6, BigDecimal electric7, BigDecimal electric8, BigDecimal electric9, BigDecimal electric10, BigDecimal electric11, BigDecimal electric12, BigDecimal electric13, BigDecimal electric14, BigDecimal electric15, BigDecimal electric16, BigDecimal electric17, BigDecimal electric18, BigDecimal electric19, BigDecimal electric20, BigDecimal electric21, BigDecimal electric22, BigDecimal electric23, BigDecimal electric24, BigDecimal electric25, BigDecimal electric26, BigDecimal electric27, BigDecimal electric28, BigDecimal electric29, BigDecimal electric30, BigDecimal electric31, BigDecimal electric32, BigDecimal electric33, BigDecimal electric34, BigDecimal electric35, BigDecimal electric36, BigDecimal electric37, BigDecimal electric38, BigDecimal electric39, BigDecimal electric40) {
|
||||
this.id = id;
|
||||
this.electric2 = electric2;
|
||||
this.electric3 = electric3;
|
||||
this.electric4 = electric4;
|
||||
this.electric5 = electric5;
|
||||
this.electric6 = electric6;
|
||||
this.electric7 = electric7;
|
||||
this.electric8 = electric8;
|
||||
this.electric9 = electric9;
|
||||
this.electric10 = electric10;
|
||||
this.electric11 = electric11;
|
||||
this.electric12 = electric12;
|
||||
this.electric13 = electric13;
|
||||
this.electric14 = electric14;
|
||||
this.electric15 = electric15;
|
||||
this.electric16 = electric16;
|
||||
this.electric17 = electric17;
|
||||
this.electric18 = electric18;
|
||||
this.electric19 = electric19;
|
||||
this.electric20 = electric20;
|
||||
this.electric21 = electric21;
|
||||
this.electric22 = electric22;
|
||||
this.electric23 = electric23;
|
||||
this.electric24 = electric24;
|
||||
this.electric25 = electric25;
|
||||
this.electric26 = electric26;
|
||||
this.electric27 = electric27;
|
||||
this.electric28 = electric28;
|
||||
this.electric29 = electric29;
|
||||
this.electric30 = electric30;
|
||||
this.electric31 = electric31;
|
||||
this.electric32 = electric32;
|
||||
this.electric33 = electric33;
|
||||
this.electric34 = electric34;
|
||||
this.electric35 = electric35;
|
||||
this.electric36 = electric36;
|
||||
this.electric37 = electric37;
|
||||
this.electric38 = electric38;
|
||||
this.electric39 = electric39;
|
||||
this.electric40 = electric40;
|
||||
}
|
||||
|
||||
public QjdqElectric() {
|
||||
super();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package com.aiit.xiuos.redis;
|
||||
|
||||
public class RedisConfig {
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package com.aiit.xiuos.redis;
|
||||
|
||||
public class RedisUtil {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.aiit.xiuos.service;
|
||||
|
||||
import com.aiit.xiuos.model.QjdqElectric;
|
||||
|
||||
public interface QjdqElectricService {
|
||||
int updateElectric(QjdqElectric qjdqElectric);
|
||||
QjdqElectric selectElectric(int id);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
package com.aiit.xiuos.service.impl;
|
||||
|
||||
import com.aiit.xiuos.dao.mappers.QjdqElectricMapper;
|
||||
import com.aiit.xiuos.model.QjdqElectric;
|
||||
import com.aiit.xiuos.service.QjdqElectricService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class QjdqElectricServiceImpl implements QjdqElectricService {
|
||||
@Autowired
|
||||
QjdqElectricMapper qjdqElectricMapper;
|
||||
@Override
|
||||
public int updateElectric(QjdqElectric qjdqElectric) {
|
||||
return qjdqElectricMapper.updateByPrimaryKeySelective(qjdqElectric);
|
||||
}
|
||||
|
||||
@Override
|
||||
public QjdqElectric selectElectric(int id) {
|
||||
return qjdqElectricMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,153 @@
|
|||
package com.aiit.xiuos.socket;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.websocket.*;
|
||||
import javax.websocket.server.PathParam;
|
||||
import javax.websocket.server.ServerEndpoint;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
@ServerEndpoint(value = "/websocket/qjdq/{clientId}")
|
||||
@Component
|
||||
@Slf4j
|
||||
public class QJDQWebSocketServer {
|
||||
/**
|
||||
* 静态变量,用来记录当前在线连接数。应该把它设计成线程安全的。
|
||||
*/
|
||||
private static int onlineCount = 0;
|
||||
|
||||
/**
|
||||
* concurrent包的线程安全Set,用来存放每个客户端对应的MyWebSocket对象。
|
||||
*/
|
||||
public static ConcurrentHashMap<String, QJDQWebSocketServer> webSocketSet = new ConcurrentHashMap<String, QJDQWebSocketServer>();
|
||||
|
||||
public HashMap<String,Integer> cntofParam=new HashMap<String,Integer>();
|
||||
|
||||
public HashMap<String,Integer> numofAccount=new HashMap<String,Integer>();
|
||||
|
||||
/**
|
||||
* 与某个客户端的连接会话,需要通过它来给客户端发送数据
|
||||
*/
|
||||
private Session session;
|
||||
|
||||
/**
|
||||
* 传过来的id
|
||||
*/
|
||||
private String name = "";
|
||||
|
||||
/**
|
||||
* 连接建立成功调用的方法*/
|
||||
@OnOpen
|
||||
public void onOpen(@PathParam(value = "clientId") String clientId, Session session) {
|
||||
//接收到发送消息的人员编号
|
||||
name = clientId;
|
||||
this.session = session;
|
||||
/**加入set中*/
|
||||
webSocketSet.put(clientId,this);
|
||||
/**在线数加1*/
|
||||
addOnlineCount();
|
||||
log.info("有新连接"+clientId+"加入!当前在线人数为" + getOnlineCount());
|
||||
try {
|
||||
sendMessage(clientId+"-连接已建立-");
|
||||
} catch (IOException e) {
|
||||
log.error("IO异常");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 连接关闭调用的方法
|
||||
*/
|
||||
@OnClose
|
||||
public void onClose() {
|
||||
if (name != null && name != "") {
|
||||
/** 从set中删除 */
|
||||
webSocketSet.remove(name);
|
||||
/** 在线数减1 */
|
||||
subOnlineCount();
|
||||
log.info("有一连接"+name+"关闭!当前在线人数为" + getOnlineCount());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 收到客户端消息后调用的方法
|
||||
*
|
||||
* @param message 客户端发送过来的消息*/
|
||||
@OnMessage
|
||||
public void onMessage(String message, Session session) {
|
||||
log.info("来自客户端的消息:" + message);
|
||||
try {
|
||||
this.sendMessage("收到!");
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 发生错误时调用
|
||||
* **/
|
||||
@OnError
|
||||
public void onError(Session session, Throwable error) {
|
||||
log.error("发生错误");
|
||||
error.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
public void sendMessage(String message) throws IOException {
|
||||
synchronized (session) {
|
||||
getSession().getBasicRemote().sendText(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 给指定的人发送消息
|
||||
* @param message
|
||||
*/
|
||||
public void sendToMessageById(String id,String message) {
|
||||
try {
|
||||
if (webSocketSet.get(id) != null) {
|
||||
webSocketSet.get(id).sendMessage(message);
|
||||
} else {
|
||||
System.out.println("webSocketSet中没有此key,不推送消息");
|
||||
log.info("webSocketSet中没有此key,不推送消息");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 群发自定义消息
|
||||
* */
|
||||
public static void sendInfo(String message) {
|
||||
try {
|
||||
for (Map.Entry<String, QJDQWebSocketServer> entry : webSocketSet.entrySet()) {
|
||||
String name = entry.getKey();
|
||||
log.info("发送信息至客户端:"+name);
|
||||
QJDQWebSocketServer value = entry.getValue();
|
||||
value.sendMessage(message);
|
||||
}
|
||||
}catch(IOException e){
|
||||
log.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public Session getSession() {
|
||||
return session;
|
||||
}
|
||||
|
||||
public static synchronized int getOnlineCount() {
|
||||
return onlineCount;
|
||||
}
|
||||
|
||||
public static synchronized void addOnlineCount() {
|
||||
QJDQWebSocketServer.onlineCount++;
|
||||
}
|
||||
|
||||
public static synchronized void subOnlineCount() {
|
||||
QJDQWebSocketServer.onlineCount--;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,509 @@
|
|||
<?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.aiit.xiuos.dao.mappers.QjdqElectricMapper">
|
||||
<resultMap id="BaseResultMap" type="com.aiit.xiuos.model.QjdqElectric">
|
||||
<constructor>
|
||||
<idArg column="id" javaType="java.lang.Integer" jdbcType="INTEGER" />
|
||||
<arg column="electric2" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric3" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric4" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric5" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric6" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric7" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric8" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric9" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric10" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric11" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric12" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric13" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric14" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric15" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric16" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric17" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric18" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric19" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric20" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric21" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric22" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric23" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric24" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric25" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric26" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric27" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric28" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric29" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric30" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric31" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric32" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric33" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric34" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric35" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric36" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric37" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric38" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric39" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
<arg column="electric40" javaType="java.math.BigDecimal" jdbcType="NUMERIC" />
|
||||
</constructor>
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, electric2, electric3, electric4, electric5, electric6, electric7, electric8,
|
||||
electric9, electric10, electric11, electric12, electric13, electric14, electric15,
|
||||
electric16, electric17, electric18, electric19, electric20, electric21, electric22,
|
||||
electric23, electric24, electric25, electric26, electric27, electric28, electric29,
|
||||
electric30, electric31, electric32, electric33, electric34, electric35, electric36,
|
||||
electric37, electric38, electric39, electric40
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from qjdq_electric
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
delete from qjdq_electric
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.aiit.xiuos.model.QjdqElectric">
|
||||
insert into qjdq_electric (id, electric2, electric3,
|
||||
electric4, electric5, electric6,
|
||||
electric7, electric8, electric9,
|
||||
electric10, electric11, electric12,
|
||||
electric13, electric14, electric15,
|
||||
electric16, electric17, electric18,
|
||||
electric19, electric20, electric21,
|
||||
electric22, electric23, electric24,
|
||||
electric25, electric26, electric27,
|
||||
electric28, electric29, electric30,
|
||||
electric31, electric32, electric33,
|
||||
electric34, electric35, electric36,
|
||||
electric37, electric38, electric39,
|
||||
electric40)
|
||||
values (#{id,jdbcType=INTEGER}, #{electric2,jdbcType=NUMERIC}, #{electric3,jdbcType=NUMERIC},
|
||||
#{electric4,jdbcType=NUMERIC}, #{electric5,jdbcType=NUMERIC}, #{electric6,jdbcType=NUMERIC},
|
||||
#{electric7,jdbcType=NUMERIC}, #{electric8,jdbcType=NUMERIC}, #{electric9,jdbcType=NUMERIC},
|
||||
#{electric10,jdbcType=NUMERIC}, #{electric11,jdbcType=NUMERIC}, #{electric12,jdbcType=NUMERIC},
|
||||
#{electric13,jdbcType=NUMERIC}, #{electric14,jdbcType=NUMERIC}, #{electric15,jdbcType=NUMERIC},
|
||||
#{electric16,jdbcType=NUMERIC}, #{electric17,jdbcType=NUMERIC}, #{electric18,jdbcType=NUMERIC},
|
||||
#{electric19,jdbcType=NUMERIC}, #{electric20,jdbcType=NUMERIC}, #{electric21,jdbcType=NUMERIC},
|
||||
#{electric22,jdbcType=NUMERIC}, #{electric23,jdbcType=NUMERIC}, #{electric24,jdbcType=NUMERIC},
|
||||
#{electric25,jdbcType=NUMERIC}, #{electric26,jdbcType=NUMERIC}, #{electric27,jdbcType=NUMERIC},
|
||||
#{electric28,jdbcType=NUMERIC}, #{electric29,jdbcType=NUMERIC}, #{electric30,jdbcType=NUMERIC},
|
||||
#{electric31,jdbcType=NUMERIC}, #{electric32,jdbcType=NUMERIC}, #{electric33,jdbcType=NUMERIC},
|
||||
#{electric34,jdbcType=NUMERIC}, #{electric35,jdbcType=NUMERIC}, #{electric36,jdbcType=NUMERIC},
|
||||
#{electric37,jdbcType=NUMERIC}, #{electric38,jdbcType=NUMERIC}, #{electric39,jdbcType=NUMERIC},
|
||||
#{electric40,jdbcType=NUMERIC})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.aiit.xiuos.model.QjdqElectric">
|
||||
insert into qjdq_electric
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="electric2 != null">
|
||||
electric2,
|
||||
</if>
|
||||
<if test="electric3 != null">
|
||||
electric3,
|
||||
</if>
|
||||
<if test="electric4 != null">
|
||||
electric4,
|
||||
</if>
|
||||
<if test="electric5 != null">
|
||||
electric5,
|
||||
</if>
|
||||
<if test="electric6 != null">
|
||||
electric6,
|
||||
</if>
|
||||
<if test="electric7 != null">
|
||||
electric7,
|
||||
</if>
|
||||
<if test="electric8 != null">
|
||||
electric8,
|
||||
</if>
|
||||
<if test="electric9 != null">
|
||||
electric9,
|
||||
</if>
|
||||
<if test="electric10 != null">
|
||||
electric10,
|
||||
</if>
|
||||
<if test="electric11 != null">
|
||||
electric11,
|
||||
</if>
|
||||
<if test="electric12 != null">
|
||||
electric12,
|
||||
</if>
|
||||
<if test="electric13 != null">
|
||||
electric13,
|
||||
</if>
|
||||
<if test="electric14 != null">
|
||||
electric14,
|
||||
</if>
|
||||
<if test="electric15 != null">
|
||||
electric15,
|
||||
</if>
|
||||
<if test="electric16 != null">
|
||||
electric16,
|
||||
</if>
|
||||
<if test="electric17 != null">
|
||||
electric17,
|
||||
</if>
|
||||
<if test="electric18 != null">
|
||||
electric18,
|
||||
</if>
|
||||
<if test="electric19 != null">
|
||||
electric19,
|
||||
</if>
|
||||
<if test="electric20 != null">
|
||||
electric20,
|
||||
</if>
|
||||
<if test="electric21 != null">
|
||||
electric21,
|
||||
</if>
|
||||
<if test="electric22 != null">
|
||||
electric22,
|
||||
</if>
|
||||
<if test="electric23 != null">
|
||||
electric23,
|
||||
</if>
|
||||
<if test="electric24 != null">
|
||||
electric24,
|
||||
</if>
|
||||
<if test="electric25 != null">
|
||||
electric25,
|
||||
</if>
|
||||
<if test="electric26 != null">
|
||||
electric26,
|
||||
</if>
|
||||
<if test="electric27 != null">
|
||||
electric27,
|
||||
</if>
|
||||
<if test="electric28 != null">
|
||||
electric28,
|
||||
</if>
|
||||
<if test="electric29 != null">
|
||||
electric29,
|
||||
</if>
|
||||
<if test="electric30 != null">
|
||||
electric30,
|
||||
</if>
|
||||
<if test="electric31 != null">
|
||||
electric31,
|
||||
</if>
|
||||
<if test="electric32 != null">
|
||||
electric32,
|
||||
</if>
|
||||
<if test="electric33 != null">
|
||||
electric33,
|
||||
</if>
|
||||
<if test="electric34 != null">
|
||||
electric34,
|
||||
</if>
|
||||
<if test="electric35 != null">
|
||||
electric35,
|
||||
</if>
|
||||
<if test="electric36 != null">
|
||||
electric36,
|
||||
</if>
|
||||
<if test="electric37 != null">
|
||||
electric37,
|
||||
</if>
|
||||
<if test="electric38 != null">
|
||||
electric38,
|
||||
</if>
|
||||
<if test="electric39 != null">
|
||||
electric39,
|
||||
</if>
|
||||
<if test="electric40 != null">
|
||||
electric40,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="electric2 != null">
|
||||
#{electric2,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric3 != null">
|
||||
#{electric3,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric4 != null">
|
||||
#{electric4,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric5 != null">
|
||||
#{electric5,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric6 != null">
|
||||
#{electric6,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric7 != null">
|
||||
#{electric7,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric8 != null">
|
||||
#{electric8,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric9 != null">
|
||||
#{electric9,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric10 != null">
|
||||
#{electric10,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric11 != null">
|
||||
#{electric11,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric12 != null">
|
||||
#{electric12,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric13 != null">
|
||||
#{electric13,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric14 != null">
|
||||
#{electric14,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric15 != null">
|
||||
#{electric15,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric16 != null">
|
||||
#{electric16,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric17 != null">
|
||||
#{electric17,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric18 != null">
|
||||
#{electric18,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric19 != null">
|
||||
#{electric19,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric20 != null">
|
||||
#{electric20,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric21 != null">
|
||||
#{electric21,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric22 != null">
|
||||
#{electric22,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric23 != null">
|
||||
#{electric23,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric24 != null">
|
||||
#{electric24,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric25 != null">
|
||||
#{electric25,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric26 != null">
|
||||
#{electric26,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric27 != null">
|
||||
#{electric27,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric28 != null">
|
||||
#{electric28,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric29 != null">
|
||||
#{electric29,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric30 != null">
|
||||
#{electric30,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric31 != null">
|
||||
#{electric31,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric32 != null">
|
||||
#{electric32,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric33 != null">
|
||||
#{electric33,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric34 != null">
|
||||
#{electric34,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric35 != null">
|
||||
#{electric35,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric36 != null">
|
||||
#{electric36,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric37 != null">
|
||||
#{electric37,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric38 != null">
|
||||
#{electric38,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric39 != null">
|
||||
#{electric39,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric40 != null">
|
||||
#{electric40,jdbcType=NUMERIC},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.aiit.xiuos.model.QjdqElectric">
|
||||
update qjdq_electric
|
||||
<set>
|
||||
<if test="electric2 != null">
|
||||
electric2 = #{electric2,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric3 != null">
|
||||
electric3 = #{electric3,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric4 != null">
|
||||
electric4 = #{electric4,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric5 != null">
|
||||
electric5 = #{electric5,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric6 != null">
|
||||
electric6 = #{electric6,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric7 != null">
|
||||
electric7 = #{electric7,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric8 != null">
|
||||
electric8 = #{electric8,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric9 != null">
|
||||
electric9 = #{electric9,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric10 != null">
|
||||
electric10 = #{electric10,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric11 != null">
|
||||
electric11 = #{electric11,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric12 != null">
|
||||
electric12 = #{electric12,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric13 != null">
|
||||
electric13 = #{electric13,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric14 != null">
|
||||
electric14 = #{electric14,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric15 != null">
|
||||
electric15 = #{electric15,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric16 != null">
|
||||
electric16 = #{electric16,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric17 != null">
|
||||
electric17 = #{electric17,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric18 != null">
|
||||
electric18 = #{electric18,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric19 != null">
|
||||
electric19 = #{electric19,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric20 != null">
|
||||
electric20 = #{electric20,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric21 != null">
|
||||
electric21 = #{electric21,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric22 != null">
|
||||
electric22 = #{electric22,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric23 != null">
|
||||
electric23 = #{electric23,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric24 != null">
|
||||
electric24 = #{electric24,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric25 != null">
|
||||
electric25 = #{electric25,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric26 != null">
|
||||
electric26 = #{electric26,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric27 != null">
|
||||
electric27 = #{electric27,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric28 != null">
|
||||
electric28 = #{electric28,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric29 != null">
|
||||
electric29 = #{electric29,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric30 != null">
|
||||
electric30 = #{electric30,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric31 != null">
|
||||
electric31 = #{electric31,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric32 != null">
|
||||
electric32 = #{electric32,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric33 != null">
|
||||
electric33 = #{electric33,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric34 != null">
|
||||
electric34 = #{electric34,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric35 != null">
|
||||
electric35 = #{electric35,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric36 != null">
|
||||
electric36 = #{electric36,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric37 != null">
|
||||
electric37 = #{electric37,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric38 != null">
|
||||
electric38 = #{electric38,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric39 != null">
|
||||
electric39 = #{electric39,jdbcType=NUMERIC},
|
||||
</if>
|
||||
<if test="electric40 != null">
|
||||
electric40 = #{electric40,jdbcType=NUMERIC},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.aiit.xiuos.model.QjdqElectric">
|
||||
update qjdq_electric
|
||||
set electric2 = #{electric2,jdbcType=NUMERIC},
|
||||
electric3 = #{electric3,jdbcType=NUMERIC},
|
||||
electric4 = #{electric4,jdbcType=NUMERIC},
|
||||
electric5 = #{electric5,jdbcType=NUMERIC},
|
||||
electric6 = #{electric6,jdbcType=NUMERIC},
|
||||
electric7 = #{electric7,jdbcType=NUMERIC},
|
||||
electric8 = #{electric8,jdbcType=NUMERIC},
|
||||
electric9 = #{electric9,jdbcType=NUMERIC},
|
||||
electric10 = #{electric10,jdbcType=NUMERIC},
|
||||
electric11 = #{electric11,jdbcType=NUMERIC},
|
||||
electric12 = #{electric12,jdbcType=NUMERIC},
|
||||
electric13 = #{electric13,jdbcType=NUMERIC},
|
||||
electric14 = #{electric14,jdbcType=NUMERIC},
|
||||
electric15 = #{electric15,jdbcType=NUMERIC},
|
||||
electric16 = #{electric16,jdbcType=NUMERIC},
|
||||
electric17 = #{electric17,jdbcType=NUMERIC},
|
||||
electric18 = #{electric18,jdbcType=NUMERIC},
|
||||
electric19 = #{electric19,jdbcType=NUMERIC},
|
||||
electric20 = #{electric20,jdbcType=NUMERIC},
|
||||
electric21 = #{electric21,jdbcType=NUMERIC},
|
||||
electric22 = #{electric22,jdbcType=NUMERIC},
|
||||
electric23 = #{electric23,jdbcType=NUMERIC},
|
||||
electric24 = #{electric24,jdbcType=NUMERIC},
|
||||
electric25 = #{electric25,jdbcType=NUMERIC},
|
||||
electric26 = #{electric26,jdbcType=NUMERIC},
|
||||
electric27 = #{electric27,jdbcType=NUMERIC},
|
||||
electric28 = #{electric28,jdbcType=NUMERIC},
|
||||
electric29 = #{electric29,jdbcType=NUMERIC},
|
||||
electric30 = #{electric30,jdbcType=NUMERIC},
|
||||
electric31 = #{electric31,jdbcType=NUMERIC},
|
||||
electric32 = #{electric32,jdbcType=NUMERIC},
|
||||
electric33 = #{electric33,jdbcType=NUMERIC},
|
||||
electric34 = #{electric34,jdbcType=NUMERIC},
|
||||
electric35 = #{electric35,jdbcType=NUMERIC},
|
||||
electric36 = #{electric36,jdbcType=NUMERIC},
|
||||
electric37 = #{electric37,jdbcType=NUMERIC},
|
||||
electric38 = #{electric38,jdbcType=NUMERIC},
|
||||
electric39 = #{electric39,jdbcType=NUMERIC},
|
||||
electric40 = #{electric40,jdbcType=NUMERIC}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
Loading…
Reference in New Issue