lirl 3 tahun lalu
induk
melakukan
239cad026a

+ 111 - 0
src/main/java/com/steerinfo/ems/bfhyd/controller/BfhydController.java

@@ -0,0 +1,111 @@
+package com.steerinfo.ems.bfhyd.controller;
+
+import com.steerinfo.ems.bfhyd.model.Bfhyd;
+import com.steerinfo.ems.bfhyd.service.IBfhydService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * Bfhyd RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-18 05:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-18
+ * 作者:generator
+ * 参考:
+ * 描述:Bfhyd RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/bfhyds")
+public class BfhydController extends BaseRESTfulController {
+
+    @Autowired
+    IBfhydService bfhydService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("bfhyd:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<Bfhyd> list = bfhydService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("bfhyd:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<Bfhyd> list = bfhydService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据Bfhyd对象创建")
+    @ApiImplicitParam(name = "bfhyd", value = "详细实体bfhyd", required = true, dataType = "Bfhyd")
+    //@RequiresPermissions("bfhyd:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute Bfhyd model){
+        Bfhyd bfhyd = bfhydService.add(model);
+        return success(bfhyd);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("bfhyd:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        Bfhyd bfhyd = bfhydService.getById(id);
+        return success(bfhyd);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的bfhyd信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "bfhyd", value = "详细实体bfhyd", required = true, dataType = "Bfhyd")
+    })
+    //@RequiresPermissions("bfhyd:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody Bfhyd model){
+        model.setId(id);
+        Bfhyd bfhyd = bfhydService.modify(model);
+        return success(bfhyd);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("bfhyd:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  bfhydService.delete(ids);
+    	}
+      return success();
+    }
+
+}

+ 18 - 0
src/main/java/com/steerinfo/ems/bfhyd/mapper/BfhydMapper.java

@@ -0,0 +1,18 @@
+package com.steerinfo.ems.bfhyd.mapper;
+
+import com.steerinfo.ems.bfhyd.model.Bfhyd;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface BfhydMapper extends IBaseMapper<Bfhyd, String> {
+
+    public List<Bfhyd> getAll();
+
+    public List<Bfhyd> getnewNo(@Param("startTime") String startTime);
+}

+ 541 - 0
src/main/java/com/steerinfo/ems/bfhyd/mapper/BfhydMapper.xml

@@ -0,0 +1,541 @@
+<?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.steerinfo.ems.bfhyd.mapper.BfhydMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.bfhyd.model.Bfhyd">
+    <id column="BFHYD_ZJDH" jdbcType="VARCHAR" property="bfhydZjdh" />
+    <result column="BFHYD_SYRQ" jdbcType="VARCHAR" property="bfhydSyrq" />
+    <result column="BFHYD_HYRQ" jdbcType="VARCHAR" property="bfhydHyrq" />
+    <result column="BFHYD_26" jdbcType="VARCHAR" property="bfhyd26" />
+    <result column="BFHYD_27" jdbcType="VARCHAR" property="bfhyd27" />
+    <result column="BFHYD_01" jdbcType="DECIMAL" property="bfhyd01" />
+    <result column="BFHYD_02" jdbcType="DECIMAL" property="bfhyd02" />
+    <result column="BFHYD_03" jdbcType="DECIMAL" property="bfhyd03" />
+    <result column="BFHYD_04" jdbcType="DECIMAL" property="bfhyd04" />
+    <result column="BFHYD_05" jdbcType="DECIMAL" property="bfhyd05" />
+    <result column="BFHYD_06" jdbcType="DECIMAL" property="bfhyd06" />
+    <result column="BFHYD_07" jdbcType="DECIMAL" property="bfhyd07" />
+    <result column="BFHYD_08" jdbcType="DECIMAL" property="bfhyd08" />
+    <result column="BFHYD_09" jdbcType="DECIMAL" property="bfhyd09" />
+    <result column="BFHYD_10" jdbcType="DECIMAL" property="bfhyd10" />
+    <result column="BFHYD_11" jdbcType="DECIMAL" property="bfhyd11" />
+    <result column="BFHYD_12" jdbcType="DECIMAL" property="bfhyd12" />
+    <result column="BFHYD_ZJR" jdbcType="VARCHAR" property="bfhydZjr"/>
+    <result column="TS" jdbcType="TIMESTAMP" property="ts"/>
+  </resultMap>
+  <sql id="columns">
+    BFHYD_ZJDH, BFHYD_SYRQ, BFHYD_HYRQ, BFHYD_26, BFHYD_27, BFHYD_01, BFHYD_02, BFHYD_03, 
+    BFHYD_04, BFHYD_05, BFHYD_06, BFHYD_07, BFHYD_08, BFHYD_09, BFHYD_10, BFHYD_11, BFHYD_12,TS,BFHYD_ZJR
+  </sql>
+  <sql id="columns_alias">
+    t.BFHYD_ZJDH, t.BFHYD_SYRQ, t.BFHYD_HYRQ, t.BFHYD_26, t.BFHYD_27, t.BFHYD_01, t.BFHYD_02, 
+    t.BFHYD_03, t.BFHYD_04, t.BFHYD_05, t.BFHYD_06, t.BFHYD_07, t.BFHYD_08, t.BFHYD_09, 
+    t.BFHYD_10, t.BFHYD_11, t.BFHYD_12
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM BFHYD
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM BFHYD t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="bfhydZjdh != null and bfhydZjdh != ''">
+        and BFHYD_ZJDH = #{bfhydZjdh}
+      </if>
+      <if test="bfhydSyrq != null">
+        and TO_CHAR(BFHYD_SYRQ,'yyyy-MM-dd') = #{bfhydSyrq}
+      </if>
+      <if test="bfhydHyrq != null">
+        and TO_CHAR(BFHYD_HYRQ,'yyyy-MM-dd') = #{bfhydHyrq}
+      </if>
+      <if test="bfhyd26 != null and bfhyd26 != ''">
+        and BFHYD_26 = #{bfhyd26}
+      </if>
+      <if test="bfhyd27 != null and bfhyd27 != ''">
+        and BFHYD_27 = #{bfhyd27}
+      </if>
+      <if test="bfhyd01 != null">
+        and BFHYD_01 = #{bfhyd01}
+      </if>
+      <if test="bfhyd02 != null">
+        and BFHYD_02 = #{bfhyd02}
+      </if>
+      <if test="bfhyd03 != null">
+        and BFHYD_03 = #{bfhyd03}
+      </if>
+      <if test="bfhyd04 != null">
+        and BFHYD_04 = #{bfhyd04}
+      </if>
+      <if test="bfhyd05 != null">
+        and BFHYD_05 = #{bfhyd05}
+      </if>
+      <if test="bfhyd06 != null">
+        and BFHYD_06 = #{bfhyd06}
+      </if>
+      <if test="bfhyd07 != null">
+        and BFHYD_07 = #{bfhyd07}
+      </if>
+      <if test="bfhyd08 != null">
+        and BFHYD_08 = #{bfhyd08}
+      </if>
+      <if test="bfhyd09 != null">
+        and BFHYD_09 = #{bfhyd09}
+      </if>
+      <if test="bfhyd10 != null">
+        and BFHYD_10 = #{bfhyd10}
+      </if>
+      <if test="bfhyd11 != null">
+        and BFHYD_11 = #{bfhyd11}
+      </if>
+      <if test="bfhyd12 != null">
+        and BFHYD_12 = #{bfhyd12}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="bfhydZjdh != null and bfhydZjdh != ''">
+        and BFHYD_ZJDH LIKE '%${bfhydZjdh}%'
+      </if>
+      <if test="bfhydSyrq != null">
+        and TO_CHAR(BFHYD_SYRQ,'yyyy-MM-dd') = #{bfhydSyrq}
+      </if>
+      <if test="bfhydHyrq != null">
+        and TO_CHAR(BFHYD_HYRQ,'yyyy-MM-dd') = #{bfhydHyrq}
+      </if>
+      <if test="bfhyd26 != null and bfhyd26 != ''">
+        and BFHYD_26 LIKE '%${bfhyd26}%'
+      </if>
+      <if test="bfhyd27 != null and bfhyd27 != ''">
+        and BFHYD_27 LIKE '%${bfhyd27}%'
+      </if>
+      <if test="bfhyd01 != null">
+        and BFHYD_01 = #{bfhyd01}
+      </if>
+      <if test="bfhyd02 != null">
+        and BFHYD_02 = #{bfhyd02}
+      </if>
+      <if test="bfhyd03 != null">
+        and BFHYD_03 = #{bfhyd03}
+      </if>
+      <if test="bfhyd04 != null">
+        and BFHYD_04 = #{bfhyd04}
+      </if>
+      <if test="bfhyd05 != null">
+        and BFHYD_05 = #{bfhyd05}
+      </if>
+      <if test="bfhyd06 != null">
+        and BFHYD_06 = #{bfhyd06}
+      </if>
+      <if test="bfhyd07 != null">
+        and BFHYD_07 = #{bfhyd07}
+      </if>
+      <if test="bfhyd08 != null">
+        and BFHYD_08 = #{bfhyd08}
+      </if>
+      <if test="bfhyd09 != null">
+        and BFHYD_09 = #{bfhyd09}
+      </if>
+      <if test="bfhyd10 != null">
+        and BFHYD_10 = #{bfhyd10}
+      </if>
+      <if test="bfhyd11 != null">
+        and BFHYD_11 = #{bfhyd11}
+      </if>
+      <if test="bfhyd12 != null">
+        and BFHYD_12 = #{bfhyd12}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from BFHYD
+    where BFHYD_ZJDH = #{bfhydZjdh,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from BFHYD
+    where 1!=1 
+      <if test="bfhydSyrq != null">
+        or TO_CHAR(BFHYD_SYRQ,'yyyy-MM-dd') = '#{bfhydSyrq}'
+      </if>
+      <if test="bfhydHyrq != null">
+        or TO_CHAR(BFHYD_HYRQ,'yyyy-MM-dd') = '#{bfhydHyrq}'
+      </if>
+      <if test="bfhyd26 != null and bfhyd26 != ''">
+        or BFHYD_26 = #{bfhyd26}
+      </if>
+      <if test="bfhyd27 != null and bfhyd27 != ''">
+        or BFHYD_27 = #{bfhyd27}
+      </if>
+      <if test="bfhyd01 != null">
+        or BFHYD_01 = #{bfhyd01}
+      </if>
+      <if test="bfhyd02 != null">
+        or BFHYD_02 = #{bfhyd02}
+      </if>
+      <if test="bfhyd03 != null">
+        or BFHYD_03 = #{bfhyd03}
+      </if>
+      <if test="bfhyd04 != null">
+        or BFHYD_04 = #{bfhyd04}
+      </if>
+      <if test="bfhyd05 != null">
+        or BFHYD_05 = #{bfhyd05}
+      </if>
+      <if test="bfhyd06 != null">
+        or BFHYD_06 = #{bfhyd06}
+      </if>
+      <if test="bfhyd07 != null">
+        or BFHYD_07 = #{bfhyd07}
+      </if>
+      <if test="bfhyd08 != null">
+        or BFHYD_08 = #{bfhyd08}
+      </if>
+      <if test="bfhyd09 != null">
+        or BFHYD_09 = #{bfhyd09}
+      </if>
+      <if test="bfhyd10 != null">
+        or BFHYD_10 = #{bfhyd10}
+      </if>
+      <if test="bfhyd11 != null">
+        or BFHYD_11 = #{bfhyd11}
+      </if>
+      <if test="bfhyd12 != null">
+        or BFHYD_12 = #{bfhyd12}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
+    insert into BFHYD (BFHYD_ZJDH, BFHYD_SYRQ, BFHYD_HYRQ, 
+      BFHYD_26, BFHYD_27, BFHYD_01, 
+      BFHYD_02, BFHYD_03, BFHYD_04, 
+      BFHYD_05, BFHYD_06, BFHYD_07, 
+      BFHYD_08, BFHYD_09, BFHYD_10, 
+      BFHYD_11, BFHYD_12,TS,BFHYD_ZJR)
+    values (#{bfhydZjdh,jdbcType=VARCHAR}, #{bfhydSyrq,jdbcType=TIMESTAMP}, #{bfhydHyrq,jdbcType=TIMESTAMP}, 
+      #{bfhyd26,jdbcType=VARCHAR}, #{bfhyd27,jdbcType=VARCHAR}, #{bfhyd01,jdbcType=DECIMAL}, 
+      #{bfhyd02,jdbcType=DECIMAL}, #{bfhyd03,jdbcType=DECIMAL}, #{bfhyd04,jdbcType=DECIMAL}, 
+      #{bfhyd05,jdbcType=DECIMAL}, #{bfhyd06,jdbcType=DECIMAL}, #{bfhyd07,jdbcType=DECIMAL}, 
+      #{bfhyd08,jdbcType=DECIMAL}, #{bfhyd09,jdbcType=DECIMAL}, #{bfhyd10,jdbcType=DECIMAL}, 
+      #{bfhyd11,jdbcType=DECIMAL}, #{bfhyd12,jdbcType=DECIMAL},#{ts,jdbcType=TIMESTAMP},#{bfhydZjr,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
+    insert into BFHYD
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="bfhydZjdh != null">
+        BFHYD_ZJDH,
+      </if>
+      <if test="bfhydSyrq != null">
+        BFHYD_SYRQ,
+      </if>
+      <if test="bfhydHyrq != null">
+        BFHYD_HYRQ,
+      </if>
+      <if test="bfhyd26 != null">
+        BFHYD_26,
+      </if>
+      <if test="bfhyd27 != null">
+        BFHYD_27,
+      </if>
+      <if test="bfhyd01 != null">
+        BFHYD_01,
+      </if>
+      <if test="bfhyd02 != null">
+        BFHYD_02,
+      </if>
+      <if test="bfhyd03 != null">
+        BFHYD_03,
+      </if>
+      <if test="bfhyd04 != null">
+        BFHYD_04,
+      </if>
+      <if test="bfhyd05 != null">
+        BFHYD_05,
+      </if>
+      <if test="bfhyd06 != null">
+        BFHYD_06,
+      </if>
+      <if test="bfhyd07 != null">
+        BFHYD_07,
+      </if>
+      <if test="bfhyd08 != null">
+        BFHYD_08,
+      </if>
+      <if test="bfhyd09 != null">
+        BFHYD_09,
+      </if>
+      <if test="bfhyd10 != null">
+        BFHYD_10,
+      </if>
+      <if test="bfhyd11 != null">
+        BFHYD_11,
+      </if>
+      <if test="bfhyd12 != null">
+        BFHYD_12,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="bfhydZjdh != null">
+        #{bfhydZjdh,jdbcType=VARCHAR},
+      </if>
+      <if test="bfhydSyrq != null">
+        #{bfhydSyrq,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bfhydHyrq != null">
+        #{bfhydHyrq,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bfhyd26 != null">
+        #{bfhyd26,jdbcType=VARCHAR},
+      </if>
+      <if test="bfhyd27 != null">
+        #{bfhyd27,jdbcType=VARCHAR},
+      </if>
+      <if test="bfhyd01 != null">
+        #{bfhyd01,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd02 != null">
+        #{bfhyd02,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd03 != null">
+        #{bfhyd03,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd04 != null">
+        #{bfhyd04,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd05 != null">
+        #{bfhyd05,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd06 != null">
+        #{bfhyd06,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd07 != null">
+        #{bfhyd07,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd08 != null">
+        #{bfhyd08,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd09 != null">
+        #{bfhyd09,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd10 != null">
+        #{bfhyd10,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd11 != null">
+        #{bfhyd11,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd12 != null">
+        #{bfhyd12,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
+    update BFHYD
+    set BFHYD_SYRQ = #{bfhydSyrq,jdbcType=TIMESTAMP},
+      BFHYD_HYRQ = #{bfhydHyrq,jdbcType=TIMESTAMP},
+      BFHYD_26 = #{bfhyd26,jdbcType=VARCHAR},
+      BFHYD_27 = #{bfhyd27,jdbcType=VARCHAR},
+      BFHYD_01 = #{bfhyd01,jdbcType=DECIMAL},
+      BFHYD_02 = #{bfhyd02,jdbcType=DECIMAL},
+      BFHYD_03 = #{bfhyd03,jdbcType=DECIMAL},
+      BFHYD_04 = #{bfhyd04,jdbcType=DECIMAL},
+      BFHYD_05 = #{bfhyd05,jdbcType=DECIMAL},
+      BFHYD_06 = #{bfhyd06,jdbcType=DECIMAL},
+      BFHYD_07 = #{bfhyd07,jdbcType=DECIMAL},
+      BFHYD_08 = #{bfhyd08,jdbcType=DECIMAL},
+      BFHYD_09 = #{bfhyd09,jdbcType=DECIMAL},
+      BFHYD_10 = #{bfhyd10,jdbcType=DECIMAL},
+      BFHYD_11 = #{bfhyd11,jdbcType=DECIMAL},
+      BFHYD_12 = #{bfhyd12,jdbcType=DECIMAL},
+      TS = #{ts,jdbcType=TIMESTAMP},
+      BFHYD_ZJR = #{bfhydZjr,jdbcType=VARCHAR}
+    where BFHYD_ZJDH = #{bfhydZjdh,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.bfhyd.model.Bfhyd">
+    update BFHYD
+    <set>
+      <if test="bfhydSyrq != null">
+        BFHYD_SYRQ = #{bfhydSyrq,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bfhydHyrq != null">
+        BFHYD_HYRQ = #{bfhydHyrq,jdbcType=TIMESTAMP},
+      </if>
+      <if test="bfhyd26 != null">
+        BFHYD_26 = #{bfhyd26,jdbcType=VARCHAR},
+      </if>
+      <if test="bfhyd27 != null">
+        BFHYD_27 = #{bfhyd27,jdbcType=VARCHAR},
+      </if>
+      <if test="bfhyd01 != null">
+        BFHYD_01 = #{bfhyd01,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd02 != null">
+        BFHYD_02 = #{bfhyd02,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd03 != null">
+        BFHYD_03 = #{bfhyd03,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd04 != null">
+        BFHYD_04 = #{bfhyd04,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd05 != null">
+        BFHYD_05 = #{bfhyd05,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd06 != null">
+        BFHYD_06 = #{bfhyd06,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd07 != null">
+        BFHYD_07 = #{bfhyd07,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd08 != null">
+        BFHYD_08 = #{bfhyd08,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd09 != null">
+        BFHYD_09 = #{bfhyd09,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd10 != null">
+        BFHYD_10 = #{bfhyd10,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd11 != null">
+        BFHYD_11 = #{bfhyd11,jdbcType=DECIMAL},
+      </if>
+      <if test="bfhyd12 != null">
+        BFHYD_12 = #{bfhyd12,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where BFHYD_ZJDH = #{bfhydZjdh,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where BFHYD_ZJDH = #{bfhydZjdh,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into BFHYD 
+      (BFHYD_ZJDH, 
+      BFHYD_SYRQ, BFHYD_HYRQ, BFHYD_26, 
+      BFHYD_27, BFHYD_01, BFHYD_02, 
+      BFHYD_03, BFHYD_04, BFHYD_05, 
+      BFHYD_06, BFHYD_07, BFHYD_08, 
+      BFHYD_09, BFHYD_10, BFHYD_11, 
+      BFHYD_12)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.bfhydZjdh,jdbcType=VARCHAR}, 
+      #{item.bfhydSyrq,jdbcType=TIMESTAMP}, #{item.bfhydHyrq,jdbcType=TIMESTAMP}, #{item.bfhyd26,jdbcType=VARCHAR}, 
+      #{item.bfhyd27,jdbcType=VARCHAR}, #{item.bfhyd01,jdbcType=DECIMAL}, #{item.bfhyd02,jdbcType=DECIMAL}, 
+      #{item.bfhyd03,jdbcType=DECIMAL}, #{item.bfhyd04,jdbcType=DECIMAL}, #{item.bfhyd05,jdbcType=DECIMAL}, 
+      #{item.bfhyd06,jdbcType=DECIMAL}, #{item.bfhyd07,jdbcType=DECIMAL}, #{item.bfhyd08,jdbcType=DECIMAL}, 
+      #{item.bfhyd09,jdbcType=DECIMAL}, #{item.bfhyd10,jdbcType=DECIMAL}, #{item.bfhyd11,jdbcType=DECIMAL}, 
+      #{item.bfhyd12,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update BFHYD
+     set
+       BFHYD_ZJDH=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhydZjdh,jdbcType=VARCHAR}
+       </foreach>
+       ,BFHYD_SYRQ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhydSyrq,jdbcType=TIMESTAMP}
+       </foreach>
+       ,BFHYD_HYRQ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhydHyrq,jdbcType=TIMESTAMP}
+       </foreach>
+       ,BFHYD_26=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd26,jdbcType=VARCHAR}
+       </foreach>
+       ,BFHYD_27=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd27,jdbcType=VARCHAR}
+       </foreach>
+       ,BFHYD_01=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd01,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_02=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd02,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_03=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd03,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_04=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd04,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_05=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd05,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_06=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd06,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_07=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd07,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_08=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd08,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_09=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd09,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_10=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd10,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_11=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd11,jdbcType=DECIMAL}
+       </foreach>
+       ,BFHYD_12=
+       <foreach collection="list" item="item" index="index" separator=" " open="case BFHYD_ZJDH" close="end">
+          when #{item.bfhydZjdh,jdbcType=VARCHAR} then #{item.bfhyd12,jdbcType=DECIMAL}
+       </foreach>
+     where BFHYD_ZJDH in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.bfhydZjdh,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from BFHYD
+    where BFHYD_ZJDH in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+   <select id="getAll" resultMap="BaseResultMap">
+   SELECT TOP 150* from ( SELECT   BFHYD_ZJDH, BFHYD_SYRQ , BFHYD_HYRQ , BFHYD_26,
+                    BFHYD_27 , BFHYD_01 , BFHYD_02 , BFHYD_03 ,
+                    BFHYD_04 , BFHYD_05 , BFHYD_06, BFHYD_07,
+                    BFHYD_08 , BFHYD_09, BFHYD_10 , BFHYD_11 , BFHYD_12 ,
+                    TS
+    FROM      dbo.BFHYD
+    WHERE   (BFHYD_LRGS = 156) AND (BFHYD_QSRQ > '0') ) t order by t.BFHYD_HYRQ desc
+   </select>
+  <select id="getnewNo" parameterType="java.lang.String" resultMap="BaseResultMap">
+    select *
+  from BFHYD t
+ where t.BFHYD_ZJDH not in
+       (select t.BATCHNO
+          from t_cm_0348 t
+         where t.DATADATE BETWEEN to_date(#{startTime}, 'yyyy-mm-dd') and
+               sysdate + 1)
+   and t.TS BETWEEN to_date(#{startTime}, 'yyyy-mm-dd') and sysdate + 1
+  </select>
+</mapper>

+ 307 - 0
src/main/java/com/steerinfo/ems/bfhyd/model/Bfhyd.java

@@ -0,0 +1,307 @@
+package com.steerinfo.ems.bfhyd.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+
+@ApiModel(value="动力质量表")
+public class Bfhyd implements IBasePO<String> {
+    /**
+     * 化验单号(BFHYD_ZJDH,VARCHAR,200)
+     */
+    @ApiModelProperty(value="化验单号",required=true)
+    private String bfhydZjdh;
+
+    /**
+     * 采样日期(BFHYD_SYRQ,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="采样日期",required=false)
+    private String bfhydSyrq;
+
+    @ApiModelProperty(value = "质检人",required = false)
+    private String bfhydZjr;
+
+    /**
+     * 化验日期(BFHYD_HYRQ,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="化验日期",required=false)
+    private String  bfhydHyrq;
+
+    /**
+     * 取样地点(BFHYD_26,VARCHAR,100)
+     */
+    @ApiModelProperty(value="取样地点",required=false)
+    private String bfhyd26;
+
+    /**
+     * 样品名称(BFHYD_27,VARCHAR,100)
+     */
+    @ApiModelProperty(value="样品名称",required=false)
+    private String bfhyd27;
+
+    /**
+     * 含苯g/m3(BFHYD_01,DECIMAL,0)
+     */
+    @ApiModelProperty(value="含苯g/m3",required=false)
+    private Short bfhyd01;
+
+    /**
+     * 含H2S mg/m3(BFHYD_02,DECIMAL,0)
+     */
+    @ApiModelProperty(value="含H2S mg/m3",required=false)
+    private Short bfhyd02;
+
+    /**
+     * 含氨mg/m3(BFHYD_03,DECIMAL,0)
+     */
+    @ApiModelProperty(value="含氨mg/m3",required=false)
+    private Short bfhyd03;
+
+    /**
+     * 焦油和灰尘含量mg/m3(BFHYD_04,DECIMAL,0)
+     */
+    @ApiModelProperty(value="焦油和灰尘含量mg/m3",required=false)
+    private Short bfhyd04;
+
+    /**
+     * 低热值KJ/m3(BFHYD_05,DECIMAL,0)
+     */
+    @ApiModelProperty(value="低热值KJ/m3",required=false)
+    private Short bfhyd05;
+
+    /**
+     * O2%(BFHYD_06,DECIMAL,0)
+     */
+    @ApiModelProperty(value="O2%",required=false)
+    private Short bfhyd06;
+
+    /**
+     * N2%(BFHYD_07,DECIMAL,0)
+     */
+    @ApiModelProperty(value="N2%",required=false)
+    private Short bfhyd07;
+
+    /**
+     * CH4%(BFHYD_08,DECIMAL,0)
+     */
+    @ApiModelProperty(value="CH4%",required=false)
+    private Short bfhyd08;
+
+    /**
+     * CO%(BFHYD_09,DECIMAL,0)
+     */
+    @ApiModelProperty(value="CO%",required=false)
+    private Short bfhyd09;
+
+    /**
+     * CO2%(BFHYD_10,DECIMAL,0)
+     */
+    @ApiModelProperty(value="CO2%",required=false)
+    private Short bfhyd10;
+
+    /**
+     * C2H4%(BFHYD_11,DECIMAL,0)
+     */
+    @ApiModelProperty(value="C2H4%",required=false)
+    private Short bfhyd11;
+
+    /**
+     * H2%(BFHYD_12,DECIMAL,0)
+     */
+    @ApiModelProperty(value="H2%",required=false)
+    private Short bfhyd12;
+
+    @ApiModelProperty(value = "TS", required = true)
+    private Date ts;
+
+    public Date getTs() {
+        return ts;
+    }
+
+    public void setTs(Date ts) {
+        this.ts = ts;
+    }
+
+    private static final long serialVersionUID = 1L;
+    public String getBfhydZjr() {
+        return bfhydZjr;
+    }
+
+    public void setBfhydZjr(String bfhydZjr) {
+        this.bfhydZjr = bfhydZjr;
+    }
+    @Override
+    public String getId() {
+        return this.bfhydZjdh;
+    }
+
+    @Override
+    public void setId(String bfhydZjdh) {
+        this.bfhydZjdh = bfhydZjdh == null ? null : bfhydZjdh.trim();
+    }
+
+    public String getBfhydZjdh() {
+        return bfhydZjdh;
+    }
+
+    public void setBfhydZjdh(String bfhydZjdh) {
+        this.bfhydZjdh = bfhydZjdh == null ? null : bfhydZjdh.trim();
+    }
+
+    public String getBfhydSyrq() {
+        return bfhydSyrq;
+    }
+
+    public void setBfhydSyrq(String bfhydSyrq) {
+        this.bfhydSyrq = bfhydSyrq;
+    }
+
+    public String getBfhydHyrq() {
+        return bfhydHyrq;
+    }
+
+    public void setBfhydHyrq(String bfhydHyrq) {
+        this.bfhydHyrq = bfhydHyrq;
+    }
+
+    public String getBfhyd26() {
+        return bfhyd26;
+    }
+
+    public void setBfhyd26(String bfhyd26) {
+        this.bfhyd26 = bfhyd26 == null ? null : bfhyd26.trim();
+    }
+
+    public String getBfhyd27() {
+        return bfhyd27;
+    }
+
+    public void setBfhyd27(String bfhyd27) {
+        this.bfhyd27 = bfhyd27 == null ? null : bfhyd27.trim();
+    }
+
+    public Short getBfhyd01() {
+        return bfhyd01;
+    }
+
+    public void setBfhyd01(Short bfhyd01) {
+        this.bfhyd01 = bfhyd01;
+    }
+
+    public Short getBfhyd02() {
+        return bfhyd02;
+    }
+
+    public void setBfhyd02(Short bfhyd02) {
+        this.bfhyd02 = bfhyd02;
+    }
+
+    public Short getBfhyd03() {
+        return bfhyd03;
+    }
+
+    public void setBfhyd03(Short bfhyd03) {
+        this.bfhyd03 = bfhyd03;
+    }
+
+    public Short getBfhyd04() {
+        return bfhyd04;
+    }
+
+    public void setBfhyd04(Short bfhyd04) {
+        this.bfhyd04 = bfhyd04;
+    }
+
+    public Short getBfhyd05() {
+        return bfhyd05;
+    }
+
+    public void setBfhyd05(Short bfhyd05) {
+        this.bfhyd05 = bfhyd05;
+    }
+
+    public Short getBfhyd06() {
+        return bfhyd06;
+    }
+
+    public void setBfhyd06(Short bfhyd06) {
+        this.bfhyd06 = bfhyd06;
+    }
+
+    public Short getBfhyd07() {
+        return bfhyd07;
+    }
+
+    public void setBfhyd07(Short bfhyd07) {
+        this.bfhyd07 = bfhyd07;
+    }
+
+    public Short getBfhyd08() {
+        return bfhyd08;
+    }
+
+    public void setBfhyd08(Short bfhyd08) {
+        this.bfhyd08 = bfhyd08;
+    }
+
+    public Short getBfhyd09() {
+        return bfhyd09;
+    }
+
+    public void setBfhyd09(Short bfhyd09) {
+        this.bfhyd09 = bfhyd09;
+    }
+
+    public Short getBfhyd10() {
+        return bfhyd10;
+    }
+
+    public void setBfhyd10(Short bfhyd10) {
+        this.bfhyd10 = bfhyd10;
+    }
+
+    public Short getBfhyd11() {
+        return bfhyd11;
+    }
+
+    public void setBfhyd11(Short bfhyd11) {
+        this.bfhyd11 = bfhyd11;
+    }
+
+    public Short getBfhyd12() {
+        return bfhyd12;
+    }
+
+    public void setBfhyd12(Short bfhyd12) {
+        this.bfhyd12 = bfhyd12;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", bfhydZjdh=").append(bfhydZjdh);
+        sb.append(", bfhydSyrq=").append(bfhydSyrq);
+        sb.append(", bfhydHyrq=").append(bfhydHyrq);
+        sb.append(", bfhyd26=").append(bfhyd26);
+        sb.append(", bfhyd27=").append(bfhyd27);
+        sb.append(", bfhyd01=").append(bfhyd01);
+        sb.append(", bfhyd02=").append(bfhyd02);
+        sb.append(", bfhyd03=").append(bfhyd03);
+        sb.append(", bfhyd04=").append(bfhyd04);
+        sb.append(", bfhyd05=").append(bfhyd05);
+        sb.append(", bfhyd06=").append(bfhyd06);
+        sb.append(", bfhyd07=").append(bfhyd07);
+        sb.append(", bfhyd08=").append(bfhyd08);
+        sb.append(", bfhyd09=").append(bfhyd09);
+        sb.append(", bfhyd10=").append(bfhyd10);
+        sb.append(", bfhyd11=").append(bfhyd11);
+        sb.append(", bfhyd12=").append(bfhyd12);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 28 - 0
src/main/java/com/steerinfo/ems/bfhyd/service/IBfhydService.java

@@ -0,0 +1,28 @@
+package com.steerinfo.ems.bfhyd.service;
+
+import com.steerinfo.ems.bfhyd.model.Bfhyd;
+import com.steerinfo.framework.service.IBaseService;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * Bfhyd服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-18 05:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-18
+ * 作者:generator
+ * 参考:
+ * 描述:Bfhyd服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IBfhydService extends IBaseService<Bfhyd, String>{
+    public  void getBfhyds();
+    public List<Bfhyd> getnewNo(@Param("startTime")String startTime);
+
+}

+ 86 - 0
src/main/java/com/steerinfo/ems/bfhyd/service/impl/BfhydServiceImpl.java

@@ -0,0 +1,86 @@
+package com.steerinfo.ems.bfhyd.service.impl;
+
+import com.steerinfo.ems.bfhyd.mapper.BfhydMapper;
+import com.steerinfo.ems.bfhyd.model.Bfhyd;
+import com.steerinfo.ems.bfhyd.service.IBfhydService;
+import com.steerinfo.feigen.service.BfhydFeigenService;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.datasource.DataSourceKey;
+import com.steerinfo.framework.datasource.TargetDataSource;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.lang.annotation.Target;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * Bfhyd服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-18 05:03
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-18
+ * 作者:generator
+ * 参考:
+ * 描述:Bfhyd服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "bfhydService")
+public class BfhydServiceImpl extends BaseServiceImpl<Bfhyd, String> implements IBfhydService {
+
+    @Autowired
+    private BfhydMapper bfhydMapper;
+    @Autowired
+    private BfhydFeigenService bfhydFeigenService;
+
+    @Override
+    protected IBaseMapper<Bfhyd, String> getMapper() {
+        return bfhydMapper;
+    }
+
+    //获取最新的数据
+    public  void getBfhyds(){
+        List<Bfhyd> all = bfhydFeigenService.getAll();
+        if (all.size()>0) {
+            for (Bfhyd bfhyd : all) {
+                Bfhyd modle =  new Bfhyd();
+                modle.setBfhydZjdh(bfhyd.getBfhydZjdh());
+                modle.setBfhydHyrq(bfhyd.getBfhydHyrq());
+                modle.setBfhydSyrq(bfhyd.getBfhydSyrq());
+                modle.setBfhydZjr(bfhyd.getBfhydZjr());
+                modle.setBfhyd01(bfhyd.getBfhyd01());
+                modle.setBfhyd02(bfhyd.getBfhyd02());
+                modle.setBfhyd03(bfhyd.getBfhyd03());
+                modle.setBfhyd04(bfhyd.getBfhyd04());
+                modle.setBfhyd05(bfhyd.getBfhyd05());
+                modle.setBfhyd06(bfhyd.getBfhyd06());
+                modle.setBfhyd07(bfhyd.getBfhyd07());
+                modle.setBfhyd08(bfhyd.getBfhyd08());
+                modle.setBfhyd09(bfhyd.getBfhyd09());
+                modle.setBfhyd10(bfhyd.getBfhyd10());
+                modle.setBfhyd11(bfhyd.getBfhyd11());
+                modle.setBfhyd12(bfhyd.getBfhyd12());
+                modle.setBfhyd26(bfhyd.getBfhyd26());
+                modle.setBfhyd27(bfhyd.getBfhyd27());
+                modle.setTs(bfhyd.getTs());
+                Bfhyd bfhyd1 = bfhydMapper.selectByPrimaryKey(bfhyd.getBfhydZjdh());
+                if (bfhyd1 != null ) {
+                    bfhydMapper.updateByPrimaryKeySelective(modle);
+                }else {
+                    bfhydMapper.insert(modle);
+                }
+            }
+        }
+    }
+
+    @Override
+    public List<Bfhyd> getnewNo(String startTime) {
+        return bfhydMapper.getnewNo(startTime);
+    }
+
+}

+ 15 - 0
src/main/java/com/steerinfo/feigen/service/BfhydFeigenService.java

@@ -0,0 +1,15 @@
+package com.steerinfo.feigen.service;
+
+import com.steerinfo.ems.bfhyd.model.Bfhyd;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+
+import java.util.List;
+
+@FeignClient(value = "xt-ems-datasource",url = "192.168.3.145:8888")
+@Component
+public interface BfhydFeigenService {
+    @GetMapping("v1/bfhyds/getAll")
+    public List<Bfhyd> getAll ();
+}

+ 6 - 6
src/main/resources/bootstrap.yml

@@ -10,11 +10,11 @@ spring:
       #默认值为0.1f,现在为了测试设置100%采集
       percentage: 1.0
   cloud:
-    #    config:
-    #      fail-fast: true
-    #      discovery:
-    #        enabled: true
-    #        service-id: config-server
+        config:
+          fail-fast: true
+          discovery:
+            enabled: true
+            service-id: config-server
     bus:
       trace:
         enabled: false
@@ -26,7 +26,7 @@ server:
 eureka:
   client:
     serviceUrl:
-      defaultZone: http://root:root@${EUREKA_HOST:172.16.90.238}:${EUREKA_PORT:8086}/eureka/
+      defaultZone: http://root:root@${EUREKA_HOST:localhost}:${EUREKA_PORT:8086}/eureka/
     metadata-map:
       cluster: ribbon
   instance:

+ 110 - 0
src/test/java/com/steerinfo/ems/emswaterrealtime/controller/EmsWaterRealtimeController.java

@@ -0,0 +1,110 @@
+package com.steerinfo.ems.emswaterrealtime.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime;
+import com.steerinfo.ems.emswaterrealtime.service.IEmsWaterRealtimeService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * EmsWaterRealtime RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-24 07:52
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-24
+ * 作者:generator
+ * 参考:
+ * 描述:EmsWaterRealtime RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emswaterrealtimes")
+public class EmsWaterRealtimeController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsWaterRealtimeService emsWaterRealtimeService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emswaterrealtime:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsWaterRealtime> list = emsWaterRealtimeService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emswaterrealtime:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsWaterRealtime> list = emsWaterRealtimeService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsWaterRealtime对象创建")
+    @ApiImplicitParam(name = "emsWaterRealtime", value = "详细实体emsWaterRealtime", required = true, dataType = "EmsWaterRealtime")
+    //@RequiresPermissions("emswaterrealtime:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute EmsWaterRealtime model){
+        EmsWaterRealtime emsWaterRealtime = emsWaterRealtimeService.add(model);
+        return success(emsWaterRealtime);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("emswaterrealtime:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable Short id){
+        EmsWaterRealtime emsWaterRealtime = emsWaterRealtimeService.getById(id);
+        return success(emsWaterRealtime);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsWaterRealtime信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short"),
+        @ApiImplicitParam(name = "emsWaterRealtime", value = "详细实体emsWaterRealtime", required = true, dataType = "EmsWaterRealtime")
+    })
+    //@RequiresPermissions("emswaterrealtime:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable Short id, @RequestBody EmsWaterRealtime model){
+        model.setId(id);
+        EmsWaterRealtime emsWaterRealtime = emsWaterRealtimeService.modify(model);
+        return success(emsWaterRealtime);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Short")
+    //@RequiresPermissions("emswaterrealtime:delete")
+    @DeleteMapping(value = "/{id}")//Short
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<Short> ids = ListUtils.convertList(list);
+			  emsWaterRealtimeService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 10 - 0
src/test/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.java

@@ -0,0 +1,10 @@
+package com.steerinfo.ems.emswaterrealtime.mapper;
+
+import com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface EmsWaterRealtimeMapper extends IBaseMapper<EmsWaterRealtime, Short> {
+}

+ 622 - 0
src/test/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.xml

@@ -0,0 +1,622 @@
+<?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.steerinfo.ems.emswaterrealtime.mapper.EmsWaterRealtimeMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime">
+    <id column="MeterId" jdbcType="DECIMAL" property="meterid" />
+    <result column="PhoneNo" jdbcType="VARCHAR" property="phoneno" />
+    <result column="AddressCode" jdbcType="VARCHAR" property="addresscode" />
+    <result column="M_UserType" jdbcType="VARCHAR" property="mUsertype" />
+    <result column="M_Type" jdbcType="VARCHAR" property="mType" />
+    <result column="M_Name" jdbcType="VARCHAR" property="mName" />
+    <result column="M_DoorNo" jdbcType="VARCHAR" property="mDoorno" />
+    <result column="M_PipeDn" jdbcType="VARCHAR" property="mPipedn" />
+    <result column="M_Material" jdbcType="VARCHAR" property="mMaterial" />
+    <result column="M_Ratio" jdbcType="VARCHAR" property="mRatio" />
+    <result column="CreateTime" jdbcType="TIMESTAMP" property="createtime" />
+    <result column="ForValue" jdbcType="DECIMAL" property="forvalue" />
+    <result column="RevValue" jdbcType="DECIMAL" property="revvalue" />
+    <result column="PressValue" jdbcType="DECIMAL" property="pressvalue" />
+    <result column="RealValue" jdbcType="DECIMAL" property="realvalue" />
+    <result column="SumValue" jdbcType="DECIMAL" property="sumvalue" />
+    <result column="CelVal" jdbcType="DECIMAL" property="celval" />
+    <result column="NetVal" jdbcType="DECIMAL" property="netval" />
+    <result column="IsStat" jdbcType="CHAR" property="isstat" />
+    <result column="DeviceId" jdbcType="VARCHAR" property="deviceid" />
+    <result column="ReadTime" jdbcType="TIMESTAMP" property="readtime" />
+  </resultMap>
+  <sql id="columns">
+    MeterId, PhoneNo, AddressCode, M_UserType, M_Type, M_Name, M_DoorNo, M_PipeDn, M_Material, 
+    M_Ratio, CreateTime, ForValue, RevValue, PressValue, RealValue, SumValue, CelVal, 
+    NetVal, IsStat, DeviceId, ReadTime
+  </sql>
+  <sql id="columns_alias">
+    t.MeterId, t.PhoneNo, t.AddressCode, t.M_UserType, t.M_Type, t.M_Name, t.M_DoorNo, 
+    t.M_PipeDn, t.M_Material, t.M_Ratio, t.CreateTime, t.ForValue, t.RevValue, t.PressValue, 
+    t.RealValue, t.SumValue, t.CelVal, t.NetVal, t.IsStat, t.DeviceId, t.ReadTime
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_WATER_REALTIME
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_WATER_REALTIME t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="meterid != null">
+        and MeterId = #{meterid}
+      </if>
+      <if test="phoneno != null and phoneno != ''">
+        and PhoneNo = #{phoneno}
+      </if>
+      <if test="addresscode != null and addresscode != ''">
+        and AddressCode = #{addresscode}
+      </if>
+      <if test="mUsertype != null and mUsertype != ''">
+        and M_UserType = #{mUsertype}
+      </if>
+      <if test="mType != null and mType != ''">
+        and M_Type = #{mType}
+      </if>
+      <if test="mName != null and mName != ''">
+        and M_Name = #{mName}
+      </if>
+      <if test="mDoorno != null and mDoorno != ''">
+        and M_DoorNo = #{mDoorno}
+      </if>
+      <if test="mPipedn != null and mPipedn != ''">
+        and M_PipeDn = #{mPipedn}
+      </if>
+      <if test="mMaterial != null and mMaterial != ''">
+        and M_Material = #{mMaterial}
+      </if>
+      <if test="mRatio != null and mRatio != ''">
+        and M_Ratio = #{mRatio}
+      </if>
+      <if test="createtime != null">
+        and TO_CHAR(CreateTime,'yyyy-MM-dd') = #{createtime}
+      </if>
+      <if test="forvalue != null">
+        and ForValue = #{forvalue}
+      </if>
+      <if test="revvalue != null">
+        and RevValue = #{revvalue}
+      </if>
+      <if test="pressvalue != null">
+        and PressValue = #{pressvalue}
+      </if>
+      <if test="realvalue != null">
+        and RealValue = #{realvalue}
+      </if>
+      <if test="sumvalue != null">
+        and SumValue = #{sumvalue}
+      </if>
+      <if test="celval != null">
+        and CelVal = #{celval}
+      </if>
+      <if test="netval != null">
+        and NetVal = #{netval}
+      </if>
+      <if test="isstat != null">
+        and IsStat = #{isstat}
+      </if>
+      <if test="deviceid != null and deviceid != ''">
+        and DeviceId = #{deviceid}
+      </if>
+      <if test="readtime != null">
+        and TO_CHAR(ReadTime,'yyyy-MM-dd') = #{readtime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="meterid != null">
+        and MeterId = #{meterid}
+      </if>
+      <if test="phoneno != null and phoneno != ''">
+        and PhoneNo LIKE '%${phoneno}%'
+      </if>
+      <if test="addresscode != null and addresscode != ''">
+        and AddressCode LIKE '%${addresscode}%'
+      </if>
+      <if test="mUsertype != null and mUsertype != ''">
+        and M_UserType LIKE '%${mUsertype}%'
+      </if>
+      <if test="mType != null and mType != ''">
+        and M_Type LIKE '%${mType}%'
+      </if>
+      <if test="mName != null and mName != ''">
+        and M_Name LIKE '%${mName}%'
+      </if>
+      <if test="mDoorno != null and mDoorno != ''">
+        and M_DoorNo LIKE '%${mDoorno}%'
+      </if>
+      <if test="mPipedn != null and mPipedn != ''">
+        and M_PipeDn LIKE '%${mPipedn}%'
+      </if>
+      <if test="mMaterial != null and mMaterial != ''">
+        and M_Material LIKE '%${mMaterial}%'
+      </if>
+      <if test="mRatio != null and mRatio != ''">
+        and M_Ratio LIKE '%${mRatio}%'
+      </if>
+      <if test="createtime != null">
+        and TO_CHAR(CreateTime,'yyyy-MM-dd') = #{createtime}
+      </if>
+      <if test="forvalue != null">
+        and ForValue = #{forvalue}
+      </if>
+      <if test="revvalue != null">
+        and RevValue = #{revvalue}
+      </if>
+      <if test="pressvalue != null">
+        and PressValue = #{pressvalue}
+      </if>
+      <if test="realvalue != null">
+        and RealValue = #{realvalue}
+      </if>
+      <if test="sumvalue != null">
+        and SumValue = #{sumvalue}
+      </if>
+      <if test="celval != null">
+        and CelVal = #{celval}
+      </if>
+      <if test="netval != null">
+        and NetVal = #{netval}
+      </if>
+      <if test="isstat != null">
+        and IsStat = #{isstat}
+      </if>
+      <if test="deviceid != null and deviceid != ''">
+        and DeviceId LIKE '%${deviceid}%'
+      </if>
+      <if test="readtime != null">
+        and TO_CHAR(ReadTime,'yyyy-MM-dd') = #{readtime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from EMS_WATER_REALTIME
+    where MeterId = #{meterid,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_WATER_REALTIME
+    where 1!=1 
+      <if test="phoneno != null and phoneno != ''">
+        or PhoneNo = #{phoneno}
+      </if>
+      <if test="addresscode != null and addresscode != ''">
+        or AddressCode = #{addresscode}
+      </if>
+      <if test="mUsertype != null and mUsertype != ''">
+        or M_UserType = #{mUsertype}
+      </if>
+      <if test="mType != null and mType != ''">
+        or M_Type = #{mType}
+      </if>
+      <if test="mName != null and mName != ''">
+        or M_Name = #{mName}
+      </if>
+      <if test="mDoorno != null and mDoorno != ''">
+        or M_DoorNo = #{mDoorno}
+      </if>
+      <if test="mPipedn != null and mPipedn != ''">
+        or M_PipeDn = #{mPipedn}
+      </if>
+      <if test="mMaterial != null and mMaterial != ''">
+        or M_Material = #{mMaterial}
+      </if>
+      <if test="mRatio != null and mRatio != ''">
+        or M_Ratio = #{mRatio}
+      </if>
+      <if test="createtime != null">
+        or TO_CHAR(CreateTime,'yyyy-MM-dd') = '#{createtime}'
+      </if>
+      <if test="forvalue != null">
+        or ForValue = #{forvalue}
+      </if>
+      <if test="revvalue != null">
+        or RevValue = #{revvalue}
+      </if>
+      <if test="pressvalue != null">
+        or PressValue = #{pressvalue}
+      </if>
+      <if test="realvalue != null">
+        or RealValue = #{realvalue}
+      </if>
+      <if test="sumvalue != null">
+        or SumValue = #{sumvalue}
+      </if>
+      <if test="celval != null">
+        or CelVal = #{celval}
+      </if>
+      <if test="netval != null">
+        or NetVal = #{netval}
+      </if>
+      <if test="isstat != null">
+        or IsStat = #{isstat}
+      </if>
+      <if test="deviceid != null and deviceid != ''">
+        or DeviceId = #{deviceid}
+      </if>
+      <if test="readtime != null">
+        or TO_CHAR(ReadTime,'yyyy-MM-dd') = '#{readtime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime">
+    insert into EMS_WATER_REALTIME (MeterId, PhoneNo, AddressCode, 
+      M_UserType, M_Type, M_Name, 
+      M_DoorNo, M_PipeDn, M_Material, 
+      M_Ratio, CreateTime, ForValue, 
+      RevValue, PressValue, RealValue, 
+      SumValue, CelVal, NetVal, 
+      IsStat, DeviceId, ReadTime
+      )
+    values (#{meterid,jdbcType=DECIMAL}, #{phoneno,jdbcType=VARCHAR}, #{addresscode,jdbcType=VARCHAR}, 
+      #{mUsertype,jdbcType=VARCHAR}, #{mType,jdbcType=VARCHAR}, #{mName,jdbcType=VARCHAR}, 
+      #{mDoorno,jdbcType=VARCHAR}, #{mPipedn,jdbcType=VARCHAR}, #{mMaterial,jdbcType=VARCHAR}, 
+      #{mRatio,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP}, #{forvalue,jdbcType=DECIMAL}, 
+      #{revvalue,jdbcType=DECIMAL}, #{pressvalue,jdbcType=DECIMAL}, #{realvalue,jdbcType=DECIMAL}, 
+      #{sumvalue,jdbcType=DECIMAL}, #{celval,jdbcType=DECIMAL}, #{netval,jdbcType=DECIMAL}, 
+      #{isstat,jdbcType=CHAR}, #{deviceid,jdbcType=VARCHAR}, #{readtime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime">
+    insert into EMS_WATER_REALTIME
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="meterid != null">
+        MeterId,
+      </if>
+      <if test="phoneno != null">
+        PhoneNo,
+      </if>
+      <if test="addresscode != null">
+        AddressCode,
+      </if>
+      <if test="mUsertype != null">
+        M_UserType,
+      </if>
+      <if test="mType != null">
+        M_Type,
+      </if>
+      <if test="mName != null">
+        M_Name,
+      </if>
+      <if test="mDoorno != null">
+        M_DoorNo,
+      </if>
+      <if test="mPipedn != null">
+        M_PipeDn,
+      </if>
+      <if test="mMaterial != null">
+        M_Material,
+      </if>
+      <if test="mRatio != null">
+        M_Ratio,
+      </if>
+      <if test="createtime != null">
+        CreateTime,
+      </if>
+      <if test="forvalue != null">
+        ForValue,
+      </if>
+      <if test="revvalue != null">
+        RevValue,
+      </if>
+      <if test="pressvalue != null">
+        PressValue,
+      </if>
+      <if test="realvalue != null">
+        RealValue,
+      </if>
+      <if test="sumvalue != null">
+        SumValue,
+      </if>
+      <if test="celval != null">
+        CelVal,
+      </if>
+      <if test="netval != null">
+        NetVal,
+      </if>
+      <if test="isstat != null">
+        IsStat,
+      </if>
+      <if test="deviceid != null">
+        DeviceId,
+      </if>
+      <if test="readtime != null">
+        ReadTime,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="meterid != null">
+        #{meterid,jdbcType=DECIMAL},
+      </if>
+      <if test="phoneno != null">
+        #{phoneno,jdbcType=VARCHAR},
+      </if>
+      <if test="addresscode != null">
+        #{addresscode,jdbcType=VARCHAR},
+      </if>
+      <if test="mUsertype != null">
+        #{mUsertype,jdbcType=VARCHAR},
+      </if>
+      <if test="mType != null">
+        #{mType,jdbcType=VARCHAR},
+      </if>
+      <if test="mName != null">
+        #{mName,jdbcType=VARCHAR},
+      </if>
+      <if test="mDoorno != null">
+        #{mDoorno,jdbcType=VARCHAR},
+      </if>
+      <if test="mPipedn != null">
+        #{mPipedn,jdbcType=VARCHAR},
+      </if>
+      <if test="mMaterial != null">
+        #{mMaterial,jdbcType=VARCHAR},
+      </if>
+      <if test="mRatio != null">
+        #{mRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        #{createtime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="forvalue != null">
+        #{forvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="revvalue != null">
+        #{revvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="pressvalue != null">
+        #{pressvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="realvalue != null">
+        #{realvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="sumvalue != null">
+        #{sumvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="celval != null">
+        #{celval,jdbcType=DECIMAL},
+      </if>
+      <if test="netval != null">
+        #{netval,jdbcType=DECIMAL},
+      </if>
+      <if test="isstat != null">
+        #{isstat,jdbcType=CHAR},
+      </if>
+      <if test="deviceid != null">
+        #{deviceid,jdbcType=VARCHAR},
+      </if>
+      <if test="readtime != null">
+        #{readtime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime">
+    update EMS_WATER_REALTIME
+    set PhoneNo = #{phoneno,jdbcType=VARCHAR},
+      AddressCode = #{addresscode,jdbcType=VARCHAR},
+      M_UserType = #{mUsertype,jdbcType=VARCHAR},
+      M_Type = #{mType,jdbcType=VARCHAR},
+      M_Name = #{mName,jdbcType=VARCHAR},
+      M_DoorNo = #{mDoorno,jdbcType=VARCHAR},
+      M_PipeDn = #{mPipedn,jdbcType=VARCHAR},
+      M_Material = #{mMaterial,jdbcType=VARCHAR},
+      M_Ratio = #{mRatio,jdbcType=VARCHAR},
+      CreateTime = #{createtime,jdbcType=TIMESTAMP},
+      ForValue = #{forvalue,jdbcType=DECIMAL},
+      RevValue = #{revvalue,jdbcType=DECIMAL},
+      PressValue = #{pressvalue,jdbcType=DECIMAL},
+      RealValue = #{realvalue,jdbcType=DECIMAL},
+      SumValue = #{sumvalue,jdbcType=DECIMAL},
+      CelVal = #{celval,jdbcType=DECIMAL},
+      NetVal = #{netval,jdbcType=DECIMAL},
+      IsStat = #{isstat,jdbcType=CHAR},
+      DeviceId = #{deviceid,jdbcType=VARCHAR},
+      ReadTime = #{readtime,jdbcType=TIMESTAMP}
+    where MeterId = #{meterid,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime">
+    update EMS_WATER_REALTIME
+    <set>
+      <if test="phoneno != null">
+        PhoneNo = #{phoneno,jdbcType=VARCHAR},
+      </if>
+      <if test="addresscode != null">
+        AddressCode = #{addresscode,jdbcType=VARCHAR},
+      </if>
+      <if test="mUsertype != null">
+        M_UserType = #{mUsertype,jdbcType=VARCHAR},
+      </if>
+      <if test="mType != null">
+        M_Type = #{mType,jdbcType=VARCHAR},
+      </if>
+      <if test="mName != null">
+        M_Name = #{mName,jdbcType=VARCHAR},
+      </if>
+      <if test="mDoorno != null">
+        M_DoorNo = #{mDoorno,jdbcType=VARCHAR},
+      </if>
+      <if test="mPipedn != null">
+        M_PipeDn = #{mPipedn,jdbcType=VARCHAR},
+      </if>
+      <if test="mMaterial != null">
+        M_Material = #{mMaterial,jdbcType=VARCHAR},
+      </if>
+      <if test="mRatio != null">
+        M_Ratio = #{mRatio,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        CreateTime = #{createtime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="forvalue != null">
+        ForValue = #{forvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="revvalue != null">
+        RevValue = #{revvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="pressvalue != null">
+        PressValue = #{pressvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="realvalue != null">
+        RealValue = #{realvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="sumvalue != null">
+        SumValue = #{sumvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="celval != null">
+        CelVal = #{celval,jdbcType=DECIMAL},
+      </if>
+      <if test="netval != null">
+        NetVal = #{netval,jdbcType=DECIMAL},
+      </if>
+      <if test="isstat != null">
+        IsStat = #{isstat,jdbcType=CHAR},
+      </if>
+      <if test="deviceid != null">
+        DeviceId = #{deviceid,jdbcType=VARCHAR},
+      </if>
+      <if test="readtime != null">
+        ReadTime = #{readtime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where MeterId = #{meterid,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where MeterId = #{meterid,jdbcType=DECIMAL}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into EMS_WATER_REALTIME 
+      (MeterId, 
+      PhoneNo, AddressCode, M_UserType, 
+      M_Type, M_Name, M_DoorNo, 
+      M_PipeDn, M_Material, M_Ratio, 
+      CreateTime, ForValue, RevValue, 
+      PressValue, RealValue, SumValue, 
+      CelVal, NetVal, IsStat, 
+      DeviceId, ReadTime)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.meterid,jdbcType=DECIMAL}, 
+      #{item.phoneno,jdbcType=VARCHAR}, #{item.addresscode,jdbcType=VARCHAR}, #{item.mUsertype,jdbcType=VARCHAR}, 
+      #{item.mType,jdbcType=VARCHAR}, #{item.mName,jdbcType=VARCHAR}, #{item.mDoorno,jdbcType=VARCHAR}, 
+      #{item.mPipedn,jdbcType=VARCHAR}, #{item.mMaterial,jdbcType=VARCHAR}, #{item.mRatio,jdbcType=VARCHAR}, 
+      #{item.createtime,jdbcType=TIMESTAMP}, #{item.forvalue,jdbcType=DECIMAL}, #{item.revvalue,jdbcType=DECIMAL}, 
+      #{item.pressvalue,jdbcType=DECIMAL}, #{item.realvalue,jdbcType=DECIMAL}, #{item.sumvalue,jdbcType=DECIMAL}, 
+      #{item.celval,jdbcType=DECIMAL}, #{item.netval,jdbcType=DECIMAL}, #{item.isstat,jdbcType=CHAR}, 
+      #{item.deviceid,jdbcType=VARCHAR}, #{item.readtime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_WATER_REALTIME
+     set
+       MeterId=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.meterid,jdbcType=DECIMAL}
+       </foreach>
+       ,PhoneNo=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.phoneno,jdbcType=VARCHAR}
+       </foreach>
+       ,AddressCode=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.addresscode,jdbcType=VARCHAR}
+       </foreach>
+       ,M_UserType=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.mUsertype,jdbcType=VARCHAR}
+       </foreach>
+       ,M_Type=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.mType,jdbcType=VARCHAR}
+       </foreach>
+       ,M_Name=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.mName,jdbcType=VARCHAR}
+       </foreach>
+       ,M_DoorNo=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.mDoorno,jdbcType=VARCHAR}
+       </foreach>
+       ,M_PipeDn=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.mPipedn,jdbcType=VARCHAR}
+       </foreach>
+       ,M_Material=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.mMaterial,jdbcType=VARCHAR}
+       </foreach>
+       ,M_Ratio=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.mRatio,jdbcType=VARCHAR}
+       </foreach>
+       ,CreateTime=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.createtime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,ForValue=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.forvalue,jdbcType=DECIMAL}
+       </foreach>
+       ,RevValue=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.revvalue,jdbcType=DECIMAL}
+       </foreach>
+       ,PressValue=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.pressvalue,jdbcType=DECIMAL}
+       </foreach>
+       ,RealValue=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.realvalue,jdbcType=DECIMAL}
+       </foreach>
+       ,SumValue=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.sumvalue,jdbcType=DECIMAL}
+       </foreach>
+       ,CelVal=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.celval,jdbcType=DECIMAL}
+       </foreach>
+       ,NetVal=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.netval,jdbcType=DECIMAL}
+       </foreach>
+       ,IsStat=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.isstat,jdbcType=CHAR}
+       </foreach>
+       ,DeviceId=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.deviceid,jdbcType=VARCHAR}
+       </foreach>
+       ,ReadTime=
+       <foreach collection="list" item="item" index="index" separator=" " open="case MeterId" close="end">
+          when #{item.meterid,jdbcType=DECIMAL} then #{item.readtime,jdbcType=TIMESTAMP}
+       </foreach>
+     where MeterId in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.meterid,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_WATER_REALTIME
+    where MeterId in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 348 - 0
src/test/java/com/steerinfo/ems/emswaterrealtime/model/EmsWaterRealtime.java

@@ -0,0 +1,348 @@
+package com.steerinfo.ems.emswaterrealtime.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="null")
+public class EmsWaterRealtime implements IBasePO<Short> {
+    /**
+     * 表主键(MeterId,DECIMAL,0)
+     */
+    @ApiModelProperty(value="表主键",required=true)
+    private Short meterid;
+
+    /**
+     * SIM卡号(PhoneNo,VARCHAR,11)
+     */
+    @ApiModelProperty(value="SIM卡号",required=true)
+    private String phoneno;
+
+    /**
+     * 地址编码(AddressCode,VARCHAR,10)
+     */
+    @ApiModelProperty(value="地址编码",required=true)
+    private String addresscode;
+
+    /**
+     * 用水类型(M_UserType,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用水类型",required=true)
+    private String mUsertype;
+
+    /**
+     * 站点类型(M_Type,VARCHAR,50)
+     */
+    @ApiModelProperty(value="站点类型",required=false)
+    private String mType;
+
+    /**
+     * 站点名称(M_Name,VARCHAR,50)
+     */
+    @ApiModelProperty(value="站点名称",required=false)
+    private String mName;
+
+    /**
+     * 户号(M_DoorNo,VARCHAR,20)
+     */
+    @ApiModelProperty(value="户号",required=false)
+    private String mDoorno;
+
+    /**
+     * 管径大小(M_PipeDn,VARCHAR,20)
+     */
+    @ApiModelProperty(value="管径大小",required=false)
+    private String mPipedn;
+
+    /**
+     * 管线材质(M_Material,VARCHAR,20)
+     */
+    @ApiModelProperty(value="管线材质",required=false)
+    private String mMaterial;
+
+    /**
+     * 变比(M_Ratio,VARCHAR,5)
+     */
+    @ApiModelProperty(value="变比",required=false)
+    private String mRatio;
+
+    /**
+     * 刷新时间(CreateTime,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="刷新时间",required=false)
+    private Date createtime;
+
+    /**
+     * 正向读数(ForValue,DECIMAL,9)
+     */
+    @ApiModelProperty(value="正向读数",required=false)
+    private Integer forvalue;
+
+    /**
+     * 反向读数(RevValue,DECIMAL,9)
+     */
+    @ApiModelProperty(value="反向读数",required=false)
+    private Integer revvalue;
+
+    /**
+     * 管道压力(PressValue,DECIMAL,9)
+     */
+    @ApiModelProperty(value="管道压力",required=false)
+    private Integer pressvalue;
+
+    /**
+     * 瞬时流量(RealValue,DECIMAL,9)
+     */
+    @ApiModelProperty(value="瞬时流量",required=false)
+    private Integer realvalue;
+
+    /**
+     * 累计流量(SumValue,DECIMAL,9)
+     */
+    @ApiModelProperty(value="累计流量",required=false)
+    private Integer sumvalue;
+
+    /**
+     * 电池电压(CelVal,DECIMAL,5)
+     */
+    @ApiModelProperty(value="电池电压",required=false)
+    private Integer celval;
+
+    /**
+     * 网络信号(NetVal,DECIMAL,38)
+     */
+    @ApiModelProperty(value="网络信号",required=false)
+    private BigDecimal netval;
+
+    /**
+     * 状态标识(IsStat,CHAR,1)
+     */
+    @ApiModelProperty(value="状态标识",required=false)
+    private String isstat;
+
+    /**
+     * 设备id(DeviceId,VARCHAR,20)
+     */
+    @ApiModelProperty(value="设备id",required=false)
+    private String deviceid;
+
+    /**
+     * 读取时间(ReadTime,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="读取时间",required=false)
+    private Date readtime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public Short getId() {
+        return this.meterid;
+    }
+
+    @Override
+    public void setId(Short meterid) {
+        this.meterid = meterid;
+    }
+
+    public Short getMeterid() {
+        return meterid;
+    }
+
+    public void setMeterid(Short meterid) {
+        this.meterid = meterid;
+    }
+
+    public String getPhoneno() {
+        return phoneno;
+    }
+
+    public void setPhoneno(String phoneno) {
+        this.phoneno = phoneno == null ? null : phoneno.trim();
+    }
+
+    public String getAddresscode() {
+        return addresscode;
+    }
+
+    public void setAddresscode(String addresscode) {
+        this.addresscode = addresscode == null ? null : addresscode.trim();
+    }
+
+    public String getmUsertype() {
+        return mUsertype;
+    }
+
+    public void setmUsertype(String mUsertype) {
+        this.mUsertype = mUsertype == null ? null : mUsertype.trim();
+    }
+
+    public String getmType() {
+        return mType;
+    }
+
+    public void setmType(String mType) {
+        this.mType = mType == null ? null : mType.trim();
+    }
+
+    public String getmName() {
+        return mName;
+    }
+
+    public void setmName(String mName) {
+        this.mName = mName == null ? null : mName.trim();
+    }
+
+    public String getmDoorno() {
+        return mDoorno;
+    }
+
+    public void setmDoorno(String mDoorno) {
+        this.mDoorno = mDoorno == null ? null : mDoorno.trim();
+    }
+
+    public String getmPipedn() {
+        return mPipedn;
+    }
+
+    public void setmPipedn(String mPipedn) {
+        this.mPipedn = mPipedn == null ? null : mPipedn.trim();
+    }
+
+    public String getmMaterial() {
+        return mMaterial;
+    }
+
+    public void setmMaterial(String mMaterial) {
+        this.mMaterial = mMaterial == null ? null : mMaterial.trim();
+    }
+
+    public String getmRatio() {
+        return mRatio;
+    }
+
+    public void setmRatio(String mRatio) {
+        this.mRatio = mRatio == null ? null : mRatio.trim();
+    }
+
+    public Date getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(Date createtime) {
+        this.createtime = createtime;
+    }
+
+    public Integer getForvalue() {
+        return forvalue;
+    }
+
+    public void setForvalue(Integer forvalue) {
+        this.forvalue = forvalue;
+    }
+
+    public Integer getRevvalue() {
+        return revvalue;
+    }
+
+    public void setRevvalue(Integer revvalue) {
+        this.revvalue = revvalue;
+    }
+
+    public Integer getPressvalue() {
+        return pressvalue;
+    }
+
+    public void setPressvalue(Integer pressvalue) {
+        this.pressvalue = pressvalue;
+    }
+
+    public Integer getRealvalue() {
+        return realvalue;
+    }
+
+    public void setRealvalue(Integer realvalue) {
+        this.realvalue = realvalue;
+    }
+
+    public Integer getSumvalue() {
+        return sumvalue;
+    }
+
+    public void setSumvalue(Integer sumvalue) {
+        this.sumvalue = sumvalue;
+    }
+
+    public Integer getCelval() {
+        return celval;
+    }
+
+    public void setCelval(Integer celval) {
+        this.celval = celval;
+    }
+
+    public BigDecimal getNetval() {
+        return netval;
+    }
+
+    public void setNetval(BigDecimal netval) {
+        this.netval = netval;
+    }
+
+    public String getIsstat() {
+        return isstat;
+    }
+
+    public void setIsstat(String isstat) {
+        this.isstat = isstat == null ? null : isstat.trim();
+    }
+
+    public String getDeviceid() {
+        return deviceid;
+    }
+
+    public void setDeviceid(String deviceid) {
+        this.deviceid = deviceid == null ? null : deviceid.trim();
+    }
+
+    public Date getReadtime() {
+        return readtime;
+    }
+
+    public void setReadtime(Date readtime) {
+        this.readtime = readtime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", meterid=").append(meterid);
+        sb.append(", phoneno=").append(phoneno);
+        sb.append(", addresscode=").append(addresscode);
+        sb.append(", mUsertype=").append(mUsertype);
+        sb.append(", mType=").append(mType);
+        sb.append(", mName=").append(mName);
+        sb.append(", mDoorno=").append(mDoorno);
+        sb.append(", mPipedn=").append(mPipedn);
+        sb.append(", mMaterial=").append(mMaterial);
+        sb.append(", mRatio=").append(mRatio);
+        sb.append(", createtime=").append(createtime);
+        sb.append(", forvalue=").append(forvalue);
+        sb.append(", revvalue=").append(revvalue);
+        sb.append(", pressvalue=").append(pressvalue);
+        sb.append(", realvalue=").append(realvalue);
+        sb.append(", sumvalue=").append(sumvalue);
+        sb.append(", celval=").append(celval);
+        sb.append(", netval=").append(netval);
+        sb.append(", isstat=").append(isstat);
+        sb.append(", deviceid=").append(deviceid);
+        sb.append(", readtime=").append(readtime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 23 - 0
src/test/java/com/steerinfo/ems/emswaterrealtime/service/IEmsWaterRealtimeService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.ems.emswaterrealtime.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * EmsWaterRealtime服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-24 07:52
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-24
+ * 作者:generator
+ * 参考:
+ * 描述:EmsWaterRealtime服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IEmsWaterRealtimeService extends IBaseService<EmsWaterRealtime, Short>{
+
+}

+ 36 - 0
src/test/java/com/steerinfo/ems/emswaterrealtime/service/impl/EmsWaterRealtimeServiceImpl.java

@@ -0,0 +1,36 @@
+package com.steerinfo.ems.emswaterrealtime.service.impl;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime;
+import com.steerinfo.ems.emswaterrealtime.mapper.EmsWaterRealtimeMapper;
+import com.steerinfo.ems.emswaterrealtime.service.IEmsWaterRealtimeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * EmsWaterRealtime服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-24 07:52
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-24
+ * 作者:generator
+ * 参考:
+ * 描述:EmsWaterRealtime服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "emsWaterRealtimeService")
+public class EmsWaterRealtimeServiceImpl extends BaseServiceImpl<EmsWaterRealtime, Short> implements IEmsWaterRealtimeService {
+
+    @Autowired
+    private EmsWaterRealtimeMapper emsWaterRealtimeMapper;
+
+    @Override
+    protected IBaseMapper<EmsWaterRealtime, Short> getMapper() {
+        return emsWaterRealtimeMapper;
+    }
+}