| | |
| | | @ApiModel("报废电池") |
| | | @JsonIgnoreProperties(ignoreUnknown = true) |
| | | public class BattScrap { |
| | | private int num ;//'主键', |
| | | private Integer num ;//'主键', |
| | | @TableField("battProducer") |
| | | private String battProducer ;//'电池品牌', |
| | | @TableField("BattModel") |
| | |
| | | @JsonIgnoreProperties(ignoreUnknown = true) |
| | | public class BattSpare { |
| | | @TableId(type = IdType.AUTO) |
| | | private int num ;//'主键', |
| | | private Integer num ;//'主键', |
| | | @TableField("battProducer") |
| | | private String battProducer ;//'电池品牌', |
| | | @TableField("battModel") |
| | |
| | | package com.whyc.webSocket; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.dto.paramter.BattScrapPar; |
| | | import com.whyc.service.BattScrapService; |
| | | import com.whyc.util.ActionUtil; |
| | |
| | | if (session.isOpen()) { |
| | | //推送信息 |
| | | synchronized (session) { |
| | | session.getBasicRemote().sendObject(service.searchByCondition(battScrapPar.getPageNum(),battScrapPar.getPageSize(),battScrapPar.getBattScrap())); |
| | | Response response = service.searchByCondition(battScrapPar.getPageNum(), battScrapPar.getPageSize(), battScrapPar.getBattScrap()); |
| | | session.getBasicRemote().sendObject(response); |
| | | } |
| | | threadFlagMap.put(thread.getId(),false); |
| | | } |
| | |
| | | and db_battinf.tb_battinf.stationname1 like CONCAT('%',#{stationName1},'%') |
| | | </if> |
| | | </where> |
| | | ORDER BY db_battinf.tb_battinf.stationname1,db_battinf.tb_battinf.BattGroupId |
| | | <!-- ORDER BY db_battinf.tb_battinf.stationname1,db_battinf.tb_battinf.BattGroupId--> |
| | | ORDER BY db_battinf.tb_battinf.stationname |
| | | </select> |
| | | <select id="searchBattGroupIdInGroup" resultType="com.whyc.pojo.Battinf"> |
| | | select distinct |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.whyc.mapper.BattSpareMapper" > |
| | | <insert id="insertId" useGeneratedKeys="true" keyProperty="num" parameterType="com.whyc.pojo.BattSpare"> |
| | | <selectKey resultType="int" order="AFTER" keyProperty="num"> |
| | | <!--<selectKey resultType="int" order="AFTER" keyProperty="num"> |
| | | select LAST_INSERT_ID() |
| | | </selectKey> |
| | | insert into db_battinf.tb_battspare (num,battProducer,battModel,battspare_time,MonCount,baojiGroup_id) |
| | | values (#{num},#{battProducer},#{battModel} ,#{battspareTime},#{monCount},#{baojiGroupId}) |
| | | </selectKey>--> |
| | | insert into db_battinf.tb_battspare (battProducer,battModel,battspare_time,MonCount,baojiGroup_id) |
| | | values (#{battProducer},#{battModel} ,#{battspareTime},#{monCount},#{baojiGroupId}) |
| | | </insert> |
| | | |
| | | |