Browse Source

add ------
1.大宗物料收发数据,
2.炼钢日报
3.mosaic动力数据

QuietShadow 3 years ago
parent
commit
e37f09c762
23 changed files with 2943 additions and 3 deletions
  1. 104 0
      src/main/java/com/steerinfo/ems/dzmaterialsf/controller/DzMaterialSfController.java
  2. 13 0
      src/main/java/com/steerinfo/ems/dzmaterialsf/mapper/DzMaterialSfMapper.java
  3. 532 0
      src/main/java/com/steerinfo/ems/dzmaterialsf/mapper/DzMaterialSfMapper.xml
  4. 299 0
      src/main/java/com/steerinfo/ems/dzmaterialsf/model/DzMaterialSf.java
  5. 21 0
      src/main/java/com/steerinfo/ems/dzmaterialsf/service/DzMaterialSFDBServer.java
  6. 24 0
      src/main/java/com/steerinfo/ems/dzmaterialsf/service/IDzMaterialSfService.java
  7. 86 0
      src/main/java/com/steerinfo/ems/dzmaterialsf/service/impl/DzMaterialSfServiceImpl.java
  8. 1 1
      src/main/java/com/steerinfo/ems/emscordas/mapper/EmsCordasMapper.xml
  9. 107 0
      src/main/java/com/steerinfo/ems/emsscqklg/controller/EmsScqkLgController.java
  10. 11 0
      src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.java
  11. 595 0
      src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.xml
  12. 334 0
      src/main/java/com/steerinfo/ems/emsscqklg/model/EmsScqkLg.java
  13. 28 0
      src/main/java/com/steerinfo/ems/emsscqklg/service/EmsLgReportService.java
  14. 24 0
      src/main/java/com/steerinfo/ems/emsscqklg/service/IEmsScqkLgService.java
  15. 61 0
      src/main/java/com/steerinfo/ems/emsscqklg/service/impl/EmsScqkLgServiceImpl.java
  16. 108 0
      src/main/java/com/steerinfo/ems/rttable/controller/RttableController.java
  17. 19 0
      src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.java
  18. 284 0
      src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.xml
  19. 128 0
      src/main/java/com/steerinfo/ems/rttable/model/Rttable.java
  20. 27 0
      src/main/java/com/steerinfo/ems/rttable/service/IRttableService.java
  21. 109 0
      src/main/java/com/steerinfo/ems/rttable/service/impl/RttableServiceImpl.java
  22. 20 2
      src/main/java/com/steerinfo/task/SpringCronTask.java
  23. 8 0
      src/main/resources/bootstrap.yml

+ 104 - 0
src/main/java/com/steerinfo/ems/dzmaterialsf/controller/DzMaterialSfController.java

@@ -0,0 +1,104 @@
+package com.steerinfo.ems.dzmaterialsf.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.dzmaterialsf.model.DzMaterialSf;
+import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
+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;
+
+/**
+ * DzMaterialSf RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-16 08:57
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-16
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dzmaterialsfs")
+public class DzMaterialSfController extends BaseRESTfulController {
+
+    @Autowired
+    IDzMaterialSfService dzMaterialSfService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("dzmaterialsf:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DzMaterialSf> list = dzMaterialSfService.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("dzmaterialsf:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<DzMaterialSf> list = dzMaterialSfService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据DzMaterialSf对象创建")
+    @ApiImplicitParam(name = "dzMaterialSf", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute DzMaterialSf model){
+        DzMaterialSf dzMaterialSf = dzMaterialSfService.add(model);
+        return success(dzMaterialSf);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(name = "model", value = "详细实体dzMaterialSf的id值", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:view")
+    @GetMapping(value = "/getById")
+    public RESTfulResult get(@ModelAttribute DzMaterialSf model){
+        DzMaterialSf dzMaterialSf = dzMaterialSfService.getById(model);
+        return success(dzMaterialSf);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的dzMaterialSf信息来更新详细信息")
+    @ApiImplicitParam(name = "dzMaterialSf", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:update")
+    @PutMapping(value = "/", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@RequestBody DzMaterialSf model){
+        DzMaterialSf dzMaterialSf = dzMaterialSfService.modify(model);
+        return success(dzMaterialSf);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(name = "models", value = "详细实体dzMaterialSf", required = true, dataType = "DzMaterialSf")
+    //@RequiresPermissions("dzmaterialsf:delete")
+    @DeleteMapping(value = "/")//DzMaterialSf
+    public RESTfulResult delete(@RequestBody List<DzMaterialSf> models){
+    	if(ListUtils.isNotEmpty(models)) {
+			  dzMaterialSfService.delete(models);
+    	}
+      return success();
+    }
+}

+ 13 - 0
src/main/java/com/steerinfo/ems/dzmaterialsf/mapper/DzMaterialSfMapper.java

@@ -0,0 +1,13 @@
+package com.steerinfo.ems.dzmaterialsf.mapper;
+
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import com.steerinfo.framework.mapper.ICBaseMapper;
+import java.math.*;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface DzMaterialSfMapper extends ICBaseMapper<DzMaterialSf, String> {
+    List<DzMaterialSf> getDzMaterialSf(String gbsj);
+}

+ 532 - 0
src/main/java/com/steerinfo/ems/dzmaterialsf/mapper/DzMaterialSfMapper.xml

@@ -0,0 +1,532 @@
+<?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.dzmaterialsf.mapper.DzMaterialSfMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
+    <id column="GBSJ" jdbcType="VARCHAR" property="gbsj" />
+    <id column="CINVCCODE" jdbcType="VARCHAR" property="cinvccode" />
+    <id column="CINVCODE" jdbcType="VARCHAR" property="cinvcode" />
+    <id column="CWHCODE" jdbcType="VARCHAR" property="cwhcode" />
+    <result column="CINVCNAME" jdbcType="VARCHAR" property="cinvcname" />
+    <result column="CINVNAME" jdbcType="VARCHAR" property="cinvname" />
+    <result column="CINVSTD" jdbcType="VARCHAR" property="cinvstd" />
+    <result column="CWHNAME" jdbcType="VARCHAR" property="cwhname" />
+    <result column="MZ" jdbcType="DECIMAL" property="mz" />
+    <result column="PZ" jdbcType="DECIMAL" property="pz" />
+    <result column="JZ" jdbcType="DECIMAL" property="jz" />
+    <result column="TAB" jdbcType="VARCHAR" property="tab" />
+    <result column="CREATEMAN" jdbcType="VARCHAR" property="createman" />
+    <result column="CREATETIME" jdbcType="VARCHAR" property="createtime" />
+    <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
+    <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
+    <result column="READTIME" jdbcType="VARCHAR" property="readtime" />
+  </resultMap>
+  <sql id="columns">
+    GBSJ, CINVCCODE, CINVCODE, CWHCODE, CINVCNAME, CINVNAME, CINVSTD, CWHNAME, MZ, PZ, 
+    JZ, TAB, CREATEMAN, CREATETIME, UPDATEMAN, UPDATETIME, READTIME
+  </sql>
+  <sql id="columns_alias">
+    t.GBSJ, t.CINVCCODE, t.CINVCODE, t.CWHCODE, t.CINVCNAME, t.CINVNAME, t.CINVSTD, t.CWHNAME, 
+    t.MZ, t.PZ, t.JZ, t.TAB, t.CREATEMAN, t.CREATETIME, t.UPDATEMAN, t.UPDATETIME, t.READTIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM DZ_MATERIAL_SF
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM DZ_MATERIAL_SF t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="gbsj != null and gbsj != ''">
+        and GBSJ = #{gbsj}
+      </if>
+      <if test="cinvccode != null and cinvccode != ''">
+        and CINVCCODE = #{cinvccode}
+      </if>
+      <if test="cinvcode != null and cinvcode != ''">
+        and CINVCODE = #{cinvcode}
+      </if>
+      <if test="cwhcode != null and cwhcode != ''">
+        and CWHCODE = #{cwhcode}
+      </if>
+      <if test="cinvcname != null and cinvcname != ''">
+        and CINVCNAME = #{cinvcname}
+      </if>
+      <if test="cinvname != null and cinvname != ''">
+        and CINVNAME = #{cinvname}
+      </if>
+      <if test="cinvstd != null and cinvstd != ''">
+        and CINVSTD = #{cinvstd}
+      </if>
+      <if test="cwhname != null and cwhname != ''">
+        and CWHNAME = #{cwhname}
+      </if>
+      <if test="mz != null">
+        and MZ = #{mz}
+      </if>
+      <if test="pz != null">
+        and PZ = #{pz}
+      </if>
+      <if test="jz != null">
+        and JZ = #{jz}
+      </if>
+      <if test="tab != null and tab != ''">
+        and TAB = #{tab}
+      </if>
+      <if test="createman != null and createman != ''">
+        and CREATEMAN = #{createman}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        and CREATETIME = #{createtime}
+      </if>
+      <if test="updateman != null and updateman != ''">
+        and UPDATEMAN = #{updateman}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        and UPDATETIME = #{updatetime}
+      </if>
+      <if test="readtime != null and readtime != ''">
+        and READTIME = #{readtime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="gbsj != null and gbsj != ''">
+        and GBSJ LIKE '%${gbsj}%'
+      </if>
+      <if test="cinvccode != null and cinvccode != ''">
+        and CINVCCODE LIKE '%${cinvccode}%'
+      </if>
+      <if test="cinvcode != null and cinvcode != ''">
+        and CINVCODE LIKE '%${cinvcode}%'
+      </if>
+      <if test="cwhcode != null and cwhcode != ''">
+        and CWHCODE LIKE '%${cwhcode}%'
+      </if>
+      <if test="cinvcname != null and cinvcname != ''">
+        and CINVCNAME LIKE '%${cinvcname}%'
+      </if>
+      <if test="cinvname != null and cinvname != ''">
+        and CINVNAME LIKE '%${cinvname}%'
+      </if>
+      <if test="cinvstd != null and cinvstd != ''">
+        and CINVSTD LIKE '%${cinvstd}%'
+      </if>
+      <if test="cwhname != null and cwhname != ''">
+        and CWHNAME LIKE '%${cwhname}%'
+      </if>
+      <if test="mz != null">
+        and MZ = #{mz}
+      </if>
+      <if test="pz != null">
+        and PZ = #{pz}
+      </if>
+      <if test="jz != null">
+        and JZ = #{jz}
+      </if>
+      <if test="tab != null and tab != ''">
+        and TAB LIKE '%${tab}%'
+      </if>
+      <if test="createman != null and createman != ''">
+        and CREATEMAN LIKE '%${createman}%'
+      </if>
+      <if test="createtime != null and createtime != ''">
+        and CREATETIME LIKE '%${createtime}%'
+      </if>
+      <if test="updateman != null and updateman != ''">
+        and UPDATEMAN LIKE '%${updateman}%'
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        and UPDATETIME LIKE '%${updatetime}%'
+      </if>
+      <if test="readtime != null and readtime != ''">
+        and READTIME LIKE '%${readtime}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="map">
+    delete from DZ_MATERIAL_SF
+    where GBSJ = #{gbsj,jdbcType=VARCHAR}
+      and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
+      and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
+      and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from DZ_MATERIAL_SF
+    where 1!=1 
+      <if test="cinvccode != null and cinvccode != ''">
+        or CINVCCODE = #{cinvccode}
+      </if>
+      <if test="cinvcode != null and cinvcode != ''">
+        or CINVCODE = #{cinvcode}
+      </if>
+      <if test="cwhcode != null and cwhcode != ''">
+        or CWHCODE = #{cwhcode}
+      </if>
+      <if test="cinvcname != null and cinvcname != ''">
+        or CINVCNAME = #{cinvcname}
+      </if>
+      <if test="cinvname != null and cinvname != ''">
+        or CINVNAME = #{cinvname}
+      </if>
+      <if test="cinvstd != null and cinvstd != ''">
+        or CINVSTD = #{cinvstd}
+      </if>
+      <if test="cwhname != null and cwhname != ''">
+        or CWHNAME = #{cwhname}
+      </if>
+      <if test="mz != null">
+        or MZ = #{mz}
+      </if>
+      <if test="pz != null">
+        or PZ = #{pz}
+      </if>
+      <if test="jz != null">
+        or JZ = #{jz}
+      </if>
+      <if test="tab != null and tab != ''">
+        or TAB = #{tab}
+      </if>
+      <if test="createman != null and createman != ''">
+        or CREATEMAN = #{createman}
+      </if>
+      <if test="createtime != null and createtime != ''">
+        or CREATETIME = #{createtime}
+      </if>
+      <if test="updateman != null and updateman != ''">
+        or UPDATEMAN = #{updateman}
+      </if>
+      <if test="updatetime != null and updatetime != ''">
+        or UPDATETIME = #{updatetime}
+      </if>
+      <if test="readtime != null and readtime != ''">
+        or READTIME = #{readtime}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
+    insert into DZ_MATERIAL_SF (GBSJ, CINVCCODE, CINVCODE, 
+      CWHCODE, CINVCNAME, CINVNAME, 
+      CINVSTD, CWHNAME, MZ, 
+      PZ, JZ, TAB, CREATEMAN, 
+      CREATETIME, UPDATEMAN, UPDATETIME, 
+      READTIME)
+    values (#{gbsj,jdbcType=VARCHAR}, #{cinvccode,jdbcType=VARCHAR}, #{cinvcode,jdbcType=VARCHAR}, 
+      #{cwhcode,jdbcType=VARCHAR}, #{cinvcname,jdbcType=VARCHAR}, #{cinvname,jdbcType=VARCHAR}, 
+      #{cinvstd,jdbcType=VARCHAR}, #{cwhname,jdbcType=VARCHAR}, #{mz,jdbcType=DECIMAL}, 
+      #{pz,jdbcType=DECIMAL}, #{jz,jdbcType=DECIMAL}, #{tab,jdbcType=VARCHAR}, #{createman,jdbcType=VARCHAR}, 
+      #{createtime,jdbcType=VARCHAR}, #{updateman,jdbcType=VARCHAR}, #{updatetime,jdbcType=VARCHAR}, 
+      #{readtime,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
+    insert into DZ_MATERIAL_SF
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="gbsj != null">
+        GBSJ,
+      </if>
+      <if test="cinvccode != null">
+        CINVCCODE,
+      </if>
+      <if test="cinvcode != null">
+        CINVCODE,
+      </if>
+      <if test="cwhcode != null">
+        CWHCODE,
+      </if>
+      <if test="cinvcname != null">
+        CINVCNAME,
+      </if>
+      <if test="cinvname != null">
+        CINVNAME,
+      </if>
+      <if test="cinvstd != null">
+        CINVSTD,
+      </if>
+      <if test="cwhname != null">
+        CWHNAME,
+      </if>
+      <if test="mz != null">
+        MZ,
+      </if>
+      <if test="pz != null">
+        PZ,
+      </if>
+      <if test="jz != null">
+        JZ,
+      </if>
+      <if test="tab != null">
+        TAB,
+      </if>
+      <if test="createman != null">
+        CREATEMAN,
+      </if>
+      <if test="createtime != null">
+        CREATETIME,
+      </if>
+      <if test="updateman != null">
+        UPDATEMAN,
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME,
+      </if>
+      <if test="readtime != null">
+        READTIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="gbsj != null">
+        #{gbsj,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvccode != null">
+        #{cinvccode,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvcode != null">
+        #{cinvcode,jdbcType=VARCHAR},
+      </if>
+      <if test="cwhcode != null">
+        #{cwhcode,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvcname != null">
+        #{cinvcname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvname != null">
+        #{cinvname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvstd != null">
+        #{cinvstd,jdbcType=VARCHAR},
+      </if>
+      <if test="cwhname != null">
+        #{cwhname,jdbcType=VARCHAR},
+      </if>
+      <if test="mz != null">
+        #{mz,jdbcType=DECIMAL},
+      </if>
+      <if test="pz != null">
+        #{pz,jdbcType=DECIMAL},
+      </if>
+      <if test="jz != null">
+        #{jz,jdbcType=DECIMAL},
+      </if>
+      <if test="tab != null">
+        #{tab,jdbcType=VARCHAR},
+      </if>
+      <if test="createman != null">
+        #{createman,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updateman != null">
+        #{updateman,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="readtime != null">
+        #{readtime,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
+    update DZ_MATERIAL_SF
+    set CINVCNAME = #{cinvcname,jdbcType=VARCHAR},
+      CINVNAME = #{cinvname,jdbcType=VARCHAR},
+      CINVSTD = #{cinvstd,jdbcType=VARCHAR},
+      CWHNAME = #{cwhname,jdbcType=VARCHAR},
+      MZ = #{mz,jdbcType=DECIMAL},
+      PZ = #{pz,jdbcType=DECIMAL},
+      JZ = #{jz,jdbcType=DECIMAL},
+      TAB = #{tab,jdbcType=VARCHAR},
+      CREATEMAN = #{createman,jdbcType=VARCHAR},
+      CREATETIME = #{createtime,jdbcType=VARCHAR},
+      UPDATEMAN = #{updateman,jdbcType=VARCHAR},
+      UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      READTIME = #{readtime,jdbcType=VARCHAR}
+    where GBSJ = #{gbsj,jdbcType=VARCHAR}
+      and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
+      and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
+      and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf">
+    update DZ_MATERIAL_SF
+    <set>
+      <if test="cinvcname != null">
+        CINVCNAME = #{cinvcname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvname != null">
+        CINVNAME = #{cinvname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvstd != null">
+        CINVSTD = #{cinvstd,jdbcType=VARCHAR},
+      </if>
+      <if test="cwhname != null">
+        CWHNAME = #{cwhname,jdbcType=VARCHAR},
+      </if>
+      <if test="mz != null">
+        MZ = #{mz,jdbcType=DECIMAL},
+      </if>
+      <if test="pz != null">
+        PZ = #{pz,jdbcType=DECIMAL},
+      </if>
+      <if test="jz != null">
+        JZ = #{jz,jdbcType=DECIMAL},
+      </if>
+      <if test="tab != null">
+        TAB = #{tab,jdbcType=VARCHAR},
+      </if>
+      <if test="createman != null">
+        CREATEMAN = #{createman,jdbcType=VARCHAR},
+      </if>
+      <if test="createtime != null">
+        CREATETIME = #{createtime,jdbcType=VARCHAR},
+      </if>
+      <if test="updateman != null">
+        UPDATEMAN = #{updateman,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      </if>
+      <if test="readtime != null">
+        READTIME = #{readtime,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where GBSJ = #{gbsj,jdbcType=VARCHAR}
+      and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
+      and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
+      and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where GBSJ = #{gbsj,jdbcType=VARCHAR}
+      and CINVCCODE = #{cinvccode,jdbcType=VARCHAR}
+      and CINVCODE = #{cinvcode,jdbcType=VARCHAR}
+      and CWHCODE = #{cwhcode,jdbcType=VARCHAR}
+      and TAB = #{tab,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 DZ_MATERIAL_SF 
+      (GBSJ, 
+      CINVCCODE, CINVCODE, CWHCODE, 
+      CINVCNAME, CINVNAME, CINVSTD, 
+      CWHNAME, MZ, PZ, 
+      JZ, TAB, CREATEMAN, 
+      CREATETIME, UPDATEMAN, UPDATETIME, 
+      READTIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.gbsj,jdbcType=VARCHAR}, 
+      #{item.cinvccode,jdbcType=VARCHAR}, #{item.cinvcode,jdbcType=VARCHAR}, #{item.cwhcode,jdbcType=VARCHAR}, 
+      #{item.cinvcname,jdbcType=VARCHAR}, #{item.cinvname,jdbcType=VARCHAR}, #{item.cinvstd,jdbcType=VARCHAR}, 
+      #{item.cwhname,jdbcType=VARCHAR}, #{item.mz,jdbcType=DECIMAL}, #{item.pz,jdbcType=DECIMAL}, 
+      #{item.jz,jdbcType=DECIMAL}, #{item.tab,jdbcType=VARCHAR}, #{item.createman,jdbcType=VARCHAR}, 
+      #{item.createtime,jdbcType=VARCHAR}, #{item.updateman,jdbcType=VARCHAR}, #{item.updatetime,jdbcType=VARCHAR}, 
+      #{item.readtime,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update DZ_MATERIAL_SF
+     set
+       GBSJ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.gbsj,jdbcType=VARCHAR}
+       </foreach>
+       ,CINVCCODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvccode,jdbcType=VARCHAR}
+       </foreach>
+       ,CINVCODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvcode,jdbcType=VARCHAR}
+       </foreach>
+       ,CWHCODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.cwhcode,jdbcType=VARCHAR}
+       </foreach>
+       ,CINVCNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvcname,jdbcType=VARCHAR}
+       </foreach>
+       ,CINVNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvname,jdbcType=VARCHAR}
+       </foreach>
+       ,CINVSTD=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.cinvstd,jdbcType=VARCHAR}
+       </foreach>
+       ,CWHNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.cwhname,jdbcType=VARCHAR}
+       </foreach>
+       ,MZ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.mz,jdbcType=DECIMAL}
+       </foreach>
+       ,PZ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.pz,jdbcType=DECIMAL}
+       </foreach>
+       ,JZ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.jz,jdbcType=DECIMAL}
+       </foreach>
+       ,TAB=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.tab,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATEMAN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.createman,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.createtime,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATEMAN=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.updateman,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.updatetime,jdbcType=VARCHAR}
+       </foreach>
+       ,READTIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GBSJ" close="end">
+          when #{item.gbsj,jdbcType=VARCHAR} then #{item.readtime,jdbcType=VARCHAR}
+       </foreach>
+    where (GBSJ,CINVCCODE,CINVCODE,CWHCODE) in
+    <foreach collection="list" item="item" open="(" close=")" separator=",">
+     (#{item.gbsj, jdbcType=VARCHAR},#{item.cinvccode, jdbcType=VARCHAR},#{item.cinvcode, jdbcType=VARCHAR},#{item.cwhcode, jdbcType=VARCHAR})
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DZ_MATERIAL_SF
+    where (GBSJ,CINVCCODE,CINVCODE,CWHCODE) in
+    <foreach collection="list" item="item" open="(" close=")" separator=",">
+     ( #{item.gbsj, jdbcType=VARCHAR}, #{item.cinvccode, jdbcType=VARCHAR}, #{item.cinvcode, jdbcType=VARCHAR}, #{item.cwhcode, jdbcType=VARCHAR})
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="getDzMaterialSf" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select * from (
+    SELECT CONVERT(varchar(100), gbsj, 23) as gbsj, cInvCCode, cInvCName, cInvCode, cInvName,
+    cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, 'sh' as tab
+    FROM v_nyjk_sh where gbsj >= #{gbsj,jdbcType=VARCHAR} and
+    cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
+    group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), gbsj, 23)
+    ) as sh union all (
+    SELECT CONVERT(varchar(100), gbsj, 23) as gbsj, cInvCCode, cInvCName, cInvCode, cInvName,
+    cInvStd, cWhCode, cWhName, sum(mz) as mz, sum(pz) as pz, sum(jz) as jz, 'fh' as tab
+    FROM v_nyjk_fh where gbsj >= #{gbsj,jdbcType=VARCHAR} and
+    cInvCName in('合金材料','国内矿粉','过滤材料','进口矿粉','原煤','外购精煤','国内球团','高炉干渣','进口块矿','石料')
+    group by cInvCCode, cInvCName, cInvCode, cInvName, cInvStd, cWhCode, cWhName, CONVERT(varchar(100), [gbsj], 23))
+  </select>
+</mapper>

+ 299 - 0
src/main/java/com/steerinfo/ems/dzmaterialsf/model/DzMaterialSf.java

@@ -0,0 +1,299 @@
+package com.steerinfo.ems.dzmaterialsf.model;
+
+import com.steerinfo.framework.model.ICBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+
+@ApiModel(value="大宗物料数据表")
+public class DzMaterialSf implements ICBasePO<DzMaterialSf> {
+    /**
+     * 日期(GBSJ,VARCHAR,20)
+     */
+    @ApiModelProperty(value="日期",required=true)
+    private String gbsj;
+
+    /**
+     * 物料类型id(CINVCCODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="物料类型id",required=true)
+    private String cinvccode;
+
+    /**
+     * 物料ID(CINVCODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="物料ID",required=true)
+    private String cinvcode;
+
+    /**
+     * 物料仓库ID(CWHCODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="物料仓库ID",required=true)
+    private String cwhcode;
+
+    /**
+     * 物料类型名称(CINVCNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="物料类型名称",required=false)
+    private String cinvcname;
+
+    /**
+     * 物料名称(CINVNAME,VARCHAR,50)
+     */
+    @ApiModelProperty(value="物料名称",required=false)
+    private String cinvname;
+
+    /**
+     * 物料规格(备注)(CINVSTD,VARCHAR,100)
+     */
+    @ApiModelProperty(value="物料规格(备注)",required=false)
+    private String cinvstd;
+
+    /**
+     * 物料仓库名称(CWHNAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="物料仓库名称",required=false)
+    private String cwhname;
+
+    /**
+     * 毛重(MZ,DECIMAL,20)
+     */
+    @ApiModelProperty(value="毛重",required=false)
+    private BigDecimal mz;
+
+    /**
+     * 皮重(PZ,DECIMAL,20)
+     */
+    @ApiModelProperty(value="皮重",required=false)
+    private BigDecimal pz;
+
+    /**
+     * 净重(JZ,DECIMAL,20)
+     */
+    @ApiModelProperty(value="净重",required=false)
+    private BigDecimal jz;
+
+    /**
+     * 表标识(TAB,VARCHAR,10)
+     */
+    @ApiModelProperty(value="表标识",required=false)
+    private String tab;
+
+    /**
+     * 创建人(CREATEMAN,VARCHAR,50)
+     */
+    @ApiModelProperty(value="创建人",required=false)
+    private String createman;
+
+    /**
+     * 创建时间(CREATETIME,VARCHAR,50)
+     */
+    @ApiModelProperty(value="创建时间",required=false)
+    private String createtime;
+
+    /**
+     * 修改人(UPDATEMAN,VARCHAR,50)
+     */
+    @ApiModelProperty(value="修改人",required=false)
+    private String updateman;
+
+    /**
+     * 修改时间(UPDATETIME,VARCHAR,50)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private String updatetime;
+
+    /**
+     * 读取时间(READTIME,VARCHAR,50)
+     */
+    @ApiModelProperty(value="读取时间",required=false)
+    private String readtime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public Map<String, Object> getId() {
+        Map<String, Object> params = new HashMap<>();
+        params.put("gbsj",this.gbsj);
+        params.put("cinvccode",this.cinvccode);
+        params.put("cinvcode",this.cinvcode);
+        params.put("cwhcode",this.cwhcode);
+        params.put("tab",this.tab);
+        return params;
+    }
+
+    @Override
+    public void setId(DzMaterialSf dzMaterialSf) {
+        this.gbsj = dzMaterialSf.getGbsj();
+        this.cinvccode = dzMaterialSf.getCinvccode();
+        this.cinvcode = dzMaterialSf.getCinvcode();
+        this.cwhcode = dzMaterialSf.getCwhcode();
+        this.tab = dzMaterialSf.getTab();
+    }
+
+    public String getGbsj() {
+        return gbsj;
+    }
+
+    public void setGbsj(String gbsj) {
+        this.gbsj = gbsj == null ? null : gbsj.trim();
+    }
+
+    public String getCinvccode() {
+        return cinvccode;
+    }
+
+    public void setCinvccode(String cinvccode) {
+        this.cinvccode = cinvccode == null ? null : cinvccode.trim();
+    }
+
+    public String getCinvcode() {
+        return cinvcode;
+    }
+
+    public void setCinvcode(String cinvcode) {
+        this.cinvcode = cinvcode == null ? null : cinvcode.trim();
+    }
+
+    public String getCwhcode() {
+        return cwhcode;
+    }
+
+    public void setCwhcode(String cwhcode) {
+        this.cwhcode = cwhcode == null ? null : cwhcode.trim();
+    }
+
+    public String getCinvcname() {
+        return cinvcname;
+    }
+
+    public void setCinvcname(String cinvcname) {
+        this.cinvcname = cinvcname == null ? null : cinvcname.trim();
+    }
+
+    public String getCinvname() {
+        return cinvname;
+    }
+
+    public void setCinvname(String cinvname) {
+        this.cinvname = cinvname == null ? null : cinvname.trim();
+    }
+
+    public String getCinvstd() {
+        return cinvstd;
+    }
+
+    public void setCinvstd(String cinvstd) {
+        this.cinvstd = cinvstd == null ? null : cinvstd.trim();
+    }
+
+    public String getCwhname() {
+        return cwhname;
+    }
+
+    public void setCwhname(String cwhname) {
+        this.cwhname = cwhname == null ? null : cwhname.trim();
+    }
+
+    public BigDecimal getMz() {
+        return mz;
+    }
+
+    public void setMz(BigDecimal mz) {
+        this.mz = mz;
+    }
+
+    public BigDecimal getPz() {
+        return pz;
+    }
+
+    public void setPz(BigDecimal pz) {
+        this.pz = pz;
+    }
+
+    public BigDecimal getJz() {
+        return jz;
+    }
+
+    public void setJz(BigDecimal jz) {
+        this.jz = jz;
+    }
+
+    public String getTab() {
+        return tab;
+    }
+
+    public void setTab(String tab) {
+        this.tab = tab == null ? null : tab.trim();
+    }
+
+    public String getCreateman() {
+        return createman;
+    }
+
+    public void setCreateman(String createman) {
+        this.createman = createman == null ? null : createman.trim();
+    }
+
+    public String getCreatetime() {
+        return createtime;
+    }
+
+    public void setCreatetime(String createtime) {
+        this.createtime = createtime == null ? null : createtime.trim();
+    }
+
+    public String getUpdateman() {
+        return updateman;
+    }
+
+    public void setUpdateman(String updateman) {
+        this.updateman = updateman == null ? null : updateman.trim();
+    }
+
+    public String getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(String updatetime) {
+        this.updatetime = updatetime == null ? null : updatetime.trim();
+    }
+
+    public String getReadtime() {
+        return readtime;
+    }
+
+    public void setReadtime(String readtime) {
+        this.readtime = readtime == null ? null : readtime.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", gbsj=").append(gbsj);
+        sb.append(", cinvccode=").append(cinvccode);
+        sb.append(", cinvcode=").append(cinvcode);
+        sb.append(", cwhcode=").append(cwhcode);
+        sb.append(", cinvcname=").append(cinvcname);
+        sb.append(", cinvname=").append(cinvname);
+        sb.append(", cinvstd=").append(cinvstd);
+        sb.append(", cwhname=").append(cwhname);
+        sb.append(", mz=").append(mz);
+        sb.append(", pz=").append(pz);
+        sb.append(", jz=").append(jz);
+        sb.append(", tab=").append(tab);
+        sb.append(", createman=").append(createman);
+        sb.append(", createtime=").append(createtime);
+        sb.append(", updateman=").append(updateman);
+        sb.append(", updatetime=").append(updatetime);
+        sb.append(", readtime=").append(readtime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 21 - 0
src/main/java/com/steerinfo/ems/dzmaterialsf/service/DzMaterialSFDBServer.java

@@ -0,0 +1,21 @@
+package com.steerinfo.ems.dzmaterialsf.service;
+
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+
+import java.util.List;
+
+/**
+ * @author Shadow
+ * @create 2021-10-15 18:11
+ * @project xt-ems-api-new
+ */
+@FeignClient(value = "xt-ems-datasource")
+@Component
+public interface DzMaterialSFDBServer {
+
+    @GetMapping("v1/dematerialSfDb/getDzMaterialSf")
+    public List<DzMaterialSf> getDzMaterialSf();
+}

+ 24 - 0
src/main/java/com/steerinfo/ems/dzmaterialsf/service/IDzMaterialSfService.java

@@ -0,0 +1,24 @@
+package com.steerinfo.ems.dzmaterialsf.service;
+
+import com.steerinfo.framework.service.ICBaseService;
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * DzMaterialSf服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-16 08:57
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-16
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDzMaterialSfService extends ICBaseService<DzMaterialSf, String>{
+
+    int dataGeneration();
+}

+ 86 - 0
src/main/java/com/steerinfo/ems/dzmaterialsf/service/impl/DzMaterialSfServiceImpl.java

@@ -0,0 +1,86 @@
+package com.steerinfo.ems.dzmaterialsf.service.impl;
+
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.ems.dzmaterialsf.mapper.DzMaterialSfMapper;
+import com.steerinfo.ems.dzmaterialsf.model.DzMaterialSf;
+import com.steerinfo.ems.dzmaterialsf.service.DzMaterialSFDBServer;
+import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
+import com.steerinfo.framework.mapper.ICBaseMapper;
+import com.steerinfo.framework.service.impl.CBaseServiceImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * DzMaterialSf服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-16 08:57
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-16
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "dzMaterialSfService")
+public class DzMaterialSfServiceImpl extends CBaseServiceImpl<DzMaterialSf, String> implements IDzMaterialSfService {
+
+    private static final Logger logger = LoggerFactory.getLogger(DzMaterialSfServiceImpl.class);
+
+    @Autowired
+    private DzMaterialSfMapper dzMaterialSfMapper;
+
+    @Autowired
+    private DzMaterialSFDBServer dzMaterialSFDBServer;
+
+    @Override
+    protected ICBaseMapper<DzMaterialSf, String> getMapper() {
+        return dzMaterialSfMapper;
+    }
+
+    @Override
+    public int dataGeneration() {
+        int addSize = 0;
+        int updateSize = 0;
+        try {
+            List<DzMaterialSf> dzMaterialSfList = dzMaterialSFDBServer.getDzMaterialSf();
+            //List<DzMaterialSf> models;
+            DzMaterialSf model;
+            HashMap<String, Object> hashMap = new HashMap<>();
+            for (DzMaterialSf dzMaterialSf : dzMaterialSfList){
+                dzMaterialSf.setReadtime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
+                hashMap.put("gbsj",dzMaterialSf.getGbsj());
+                hashMap.put("cinvccode",dzMaterialSf.getCinvccode());
+                hashMap.put("cinvcode",dzMaterialSf.getCinvcode());
+                hashMap.put("cwhcode",dzMaterialSf.getCwhcode());
+                hashMap.put("tab",dzMaterialSf.getTab());
+                //model = dzMaterialSfMapper.selectByParameters(hashMap);
+                model = dzMaterialSfMapper.selectByPrimaryKey(dzMaterialSf);
+                if(model != null){
+                    dzMaterialSf.setUpdateman("系统");
+                    dzMaterialSf.setUpdatetime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
+                    dzMaterialSfMapper.updateByPrimaryKey(dzMaterialSf);
+                    updateSize+=1;
+                    continue;
+                }else {
+                    dzMaterialSf.setCreateman("系统");
+                    dzMaterialSf.setCreatetime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
+                    addSize+= dzMaterialSfMapper.insert(dzMaterialSf);
+                }
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            logger.info("本次总共新增大宗物料收发数据条数:" + addSize);
+            logger.info("本次总共更新大宗物料收发数据条数:" + updateSize);
+        }
+        return addSize+updateSize;
+    }
+}

+ 1 - 1
src/main/java/com/steerinfo/ems/emscordas/mapper/EmsCordasMapper.xml

@@ -9,6 +9,6 @@
       <if test="cordasDataNames != null and cordasDataNames != ''">
         , ${cordasDataNames}
       </if>
-    from EMS_JH1, EMS_JH2, EMS_1LT, EMS_2LT, EMS_1LG, EMS_2LG, EMS_1ZG, EMS_2ZG, EMS_FLCJ, EMS_WATER
+    from EMS_JH1, EMS_JH2, EMS_1LT, EMS_2LT, EMS_1LG, EMS_2LG, EMS_1ZG, EMS_2ZG, EMS_FLCJ, EMS_WATER, EMS_POWER
   </select>
 </mapper>

+ 107 - 0
src/main/java/com/steerinfo/ems/emsscqklg/controller/EmsScqkLgController.java

@@ -0,0 +1,107 @@
+package com.steerinfo.ems.emsscqklg.controller;
+
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
+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.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * EmsScqkLg RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-19 10:43
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-19
+ * 作者:generator
+ * 参考:
+ * 描述:EmsScqkLg RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/emsscqklgs")
+public class EmsScqkLgController extends BaseRESTfulController {
+
+    @Autowired
+    IEmsScqkLgService emsScqkLgService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("emsscqklg:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsScqkLg> list = emsScqkLgService.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("emsscqklg:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<EmsScqkLg> list = emsScqkLgService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据EmsScqkLg对象创建")
+    @ApiImplicitParam(name = "emsScqkLg", value = "详细实体emsScqkLg", required = true, dataType = "EmsScqkLg")
+    //@RequiresPermissions("emsscqklg:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute EmsScqkLg model){
+        EmsScqkLg emsScqkLg = emsScqkLgService.add(model);
+        return success(emsScqkLg);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date")
+    //@RequiresPermissions("emsscqklg:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable Date id){
+        EmsScqkLg emsScqkLg = emsScqkLgService.getById(id);
+        return success(emsScqkLg);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的emsScqkLg信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date"),
+        @ApiImplicitParam(name = "emsScqkLg", value = "详细实体emsScqkLg", required = true, dataType = "EmsScqkLg")
+    })
+    //@RequiresPermissions("emsscqklg:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable Date id, @RequestBody EmsScqkLg model){
+        model.setId(id);
+        EmsScqkLg emsScqkLg = emsScqkLgService.modify(model);
+        return success(emsScqkLg);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "Date")
+    //@RequiresPermissions("emsscqklg:delete")
+    @DeleteMapping(value = "/{id}")//Date
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<Date> ids = ListUtils.convertList(list);
+			  emsScqkLgService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 11 - 0
src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.java

@@ -0,0 +1,11 @@
+package com.steerinfo.ems.emsscqklg.mapper;
+
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.Date;
+
+@Mapper
+public interface EmsScqkLgMapper extends IBaseMapper<EmsScqkLg, Date> {
+}

+ 595 - 0
src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.xml

@@ -0,0 +1,595 @@
+<?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.emsscqklg.mapper.EmsScqkLgMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    <id column="DATES" jdbcType="TIMESTAMP" property="dates" />
+    <result column="RCL" jdbcType="DECIMAL" property="rcl" />
+    <result column="JTSL" jdbcType="DECIMAL" property="jtsl" />
+    <result column="SJYL" jdbcType="DECIMAL" property="sjyl" />
+    <result column="KCL" jdbcType="DECIMAL" property="kcl" />
+    <result column="WJZL" jdbcType="DECIMAL" property="wjzl" />
+    <result column="SCLS" jdbcType="DECIMAL" property="scls" />
+    <result column="LL_1" jdbcType="DECIMAL" property="ll1" />
+    <result column="LL_2" jdbcType="DECIMAL" property="ll2" />
+    <result column="FGZL_NBHST" jdbcType="DECIMAL" property="fgzlNbhst" />
+    <result column="FGZL_WG" jdbcType="DECIMAL" property="fgzlWg" />
+    <result column="LLDLYL" jdbcType="DECIMAL" property="lldlyl" />
+    <result column="WGFG_JFGK" jdbcType="DECIMAL" property="wgfgJfgk" />
+    <result column="WGFG_QXC" jdbcType="DECIMAL" property="wgfgQxc" />
+    <result column="XCF" jdbcType="DECIMAL" property="xcf" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="CZR" jdbcType="VARCHAR" property="czr" />
+    <result column="CZSJ" jdbcType="TIMESTAMP" property="czsj" />
+    <result column="WXGPCL" jdbcType="DECIMAL" property="wxgpcl" />
+    <result column="LLB" jdbcType="DECIMAL" property="llb" />
+  </resultMap>
+  <sql id="columns">
+    DATES, RCL, JTSL, SJYL, KCL, WJZL, SCLS, LL_1, LL_2, FGZL_NBHST, FGZL_WG, LLDLYL, 
+    WGFG_JFGK, WGFG_QXC, XCF, MEMO, CZR, CZSJ, WXGPCL, LLB
+  </sql>
+  <sql id="columns_alias">
+    t.DATES, t.RCL, t.JTSL, t.SJYL, t.KCL, t.WJZL, t.SCLS, t.LL_1, t.LL_2, t.FGZL_NBHST, 
+    t.FGZL_WG, t.LLDLYL, t.WGFG_JFGK, t.WGFG_QXC, t.XCF, t.MEMO, t.CZR, t.CZSJ, t.WXGPCL, 
+    t.LLB
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM EMS_SCQK_LG
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM EMS_SCQK_LG t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="dates != null">
+        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
+      </if>
+      <if test="rcl != null">
+        and RCL = #{rcl}
+      </if>
+      <if test="jtsl != null">
+        and JTSL = #{jtsl}
+      </if>
+      <if test="sjyl != null">
+        and SJYL = #{sjyl}
+      </if>
+      <if test="kcl != null">
+        and KCL = #{kcl}
+      </if>
+      <if test="wjzl != null">
+        and WJZL = #{wjzl}
+      </if>
+      <if test="scls != null">
+        and SCLS = #{scls}
+      </if>
+      <if test="ll1 != null">
+        and LL_1 = #{ll1}
+      </if>
+      <if test="ll2 != null">
+        and LL_2 = #{ll2}
+      </if>
+      <if test="fgzlNbhst != null">
+        and FGZL_NBHST = #{fgzlNbhst}
+      </if>
+      <if test="fgzlWg != null">
+        and FGZL_WG = #{fgzlWg}
+      </if>
+      <if test="lldlyl != null">
+        and LLDLYL = #{lldlyl}
+      </if>
+      <if test="wgfgJfgk != null">
+        and WGFG_JFGK = #{wgfgJfgk}
+      </if>
+      <if test="wgfgQxc != null">
+        and WGFG_QXC = #{wgfgQxc}
+      </if>
+      <if test="xcf != null">
+        and XCF = #{xcf}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="czr != null and czr != ''">
+        and CZR = #{czr}
+      </if>
+      <if test="czsj != null">
+        and TO_CHAR(CZSJ,'yyyy-MM-dd') = #{czsj}
+      </if>
+      <if test="wxgpcl != null">
+        and WXGPCL = #{wxgpcl}
+      </if>
+      <if test="llb != null">
+        and LLB = #{llb}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="dates != null">
+        and TO_CHAR(DATES,'yyyy-MM-dd') = #{dates}
+      </if>
+      <if test="rcl != null">
+        and RCL = #{rcl}
+      </if>
+      <if test="jtsl != null">
+        and JTSL = #{jtsl}
+      </if>
+      <if test="sjyl != null">
+        and SJYL = #{sjyl}
+      </if>
+      <if test="kcl != null">
+        and KCL = #{kcl}
+      </if>
+      <if test="wjzl != null">
+        and WJZL = #{wjzl}
+      </if>
+      <if test="scls != null">
+        and SCLS = #{scls}
+      </if>
+      <if test="ll1 != null">
+        and LL_1 = #{ll1}
+      </if>
+      <if test="ll2 != null">
+        and LL_2 = #{ll2}
+      </if>
+      <if test="fgzlNbhst != null">
+        and FGZL_NBHST = #{fgzlNbhst}
+      </if>
+      <if test="fgzlWg != null">
+        and FGZL_WG = #{fgzlWg}
+      </if>
+      <if test="lldlyl != null">
+        and LLDLYL = #{lldlyl}
+      </if>
+      <if test="wgfgJfgk != null">
+        and WGFG_JFGK = #{wgfgJfgk}
+      </if>
+      <if test="wgfgQxc != null">
+        and WGFG_QXC = #{wgfgQxc}
+      </if>
+      <if test="xcf != null">
+        and XCF = #{xcf}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="czr != null and czr != ''">
+        and CZR LIKE '%${czr}%'
+      </if>
+      <if test="czsj != null">
+        and TO_CHAR(CZSJ,'yyyy-MM-dd') = #{czsj}
+      </if>
+      <if test="wxgpcl != null">
+        and WXGPCL = #{wxgpcl}
+      </if>
+      <if test="llb != null">
+        and LLB = #{llb}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.util.Date">
+    delete from EMS_SCQK_LG
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from EMS_SCQK_LG
+    where 1!=1 
+      <if test="rcl != null">
+        or RCL = #{rcl}
+      </if>
+      <if test="jtsl != null">
+        or JTSL = #{jtsl}
+      </if>
+      <if test="sjyl != null">
+        or SJYL = #{sjyl}
+      </if>
+      <if test="kcl != null">
+        or KCL = #{kcl}
+      </if>
+      <if test="wjzl != null">
+        or WJZL = #{wjzl}
+      </if>
+      <if test="scls != null">
+        or SCLS = #{scls}
+      </if>
+      <if test="ll1 != null">
+        or LL_1 = #{ll1}
+      </if>
+      <if test="ll2 != null">
+        or LL_2 = #{ll2}
+      </if>
+      <if test="fgzlNbhst != null">
+        or FGZL_NBHST = #{fgzlNbhst}
+      </if>
+      <if test="fgzlWg != null">
+        or FGZL_WG = #{fgzlWg}
+      </if>
+      <if test="lldlyl != null">
+        or LLDLYL = #{lldlyl}
+      </if>
+      <if test="wgfgJfgk != null">
+        or WGFG_JFGK = #{wgfgJfgk}
+      </if>
+      <if test="wgfgQxc != null">
+        or WGFG_QXC = #{wgfgQxc}
+      </if>
+      <if test="xcf != null">
+        or XCF = #{xcf}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="czr != null and czr != ''">
+        or CZR = #{czr}
+      </if>
+      <if test="czsj != null">
+        or TO_CHAR(CZSJ,'yyyy-MM-dd') = '#{czsj}'
+      </if>
+      <if test="wxgpcl != null">
+        or WXGPCL = #{wxgpcl}
+      </if>
+      <if test="llb != null">
+        or LLB = #{llb}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    insert into EMS_SCQK_LG (DATES, RCL, JTSL, 
+      SJYL, KCL, WJZL, SCLS, 
+      LL_1, LL_2, FGZL_NBHST, 
+      FGZL_WG, LLDLYL, WGFG_JFGK, 
+      WGFG_QXC, XCF, MEMO, 
+      CZR, CZSJ, WXGPCL, 
+      LLB)
+    values (#{dates,jdbcType=TIMESTAMP}, #{rcl,jdbcType=DECIMAL}, #{jtsl,jdbcType=DECIMAL}, 
+      #{sjyl,jdbcType=DECIMAL}, #{kcl,jdbcType=DECIMAL}, #{wjzl,jdbcType=DECIMAL}, #{scls,jdbcType=DECIMAL}, 
+      #{ll1,jdbcType=DECIMAL}, #{ll2,jdbcType=DECIMAL}, #{fgzlNbhst,jdbcType=DECIMAL}, 
+      #{fgzlWg,jdbcType=DECIMAL}, #{lldlyl,jdbcType=DECIMAL}, #{wgfgJfgk,jdbcType=DECIMAL}, 
+      #{wgfgQxc,jdbcType=DECIMAL}, #{xcf,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR}, 
+      #{czr,jdbcType=VARCHAR}, #{czsj,jdbcType=TIMESTAMP}, #{wxgpcl,jdbcType=DECIMAL}, 
+      #{llb,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    insert into EMS_SCQK_LG
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="dates != null">
+        DATES,
+      </if>
+      <if test="rcl != null">
+        RCL,
+      </if>
+      <if test="jtsl != null">
+        JTSL,
+      </if>
+      <if test="sjyl != null">
+        SJYL,
+      </if>
+      <if test="kcl != null">
+        KCL,
+      </if>
+      <if test="wjzl != null">
+        WJZL,
+      </if>
+      <if test="scls != null">
+        SCLS,
+      </if>
+      <if test="ll1 != null">
+        LL_1,
+      </if>
+      <if test="ll2 != null">
+        LL_2,
+      </if>
+      <if test="fgzlNbhst != null">
+        FGZL_NBHST,
+      </if>
+      <if test="fgzlWg != null">
+        FGZL_WG,
+      </if>
+      <if test="lldlyl != null">
+        LLDLYL,
+      </if>
+      <if test="wgfgJfgk != null">
+        WGFG_JFGK,
+      </if>
+      <if test="wgfgQxc != null">
+        WGFG_QXC,
+      </if>
+      <if test="xcf != null">
+        XCF,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="czr != null">
+        CZR,
+      </if>
+      <if test="czsj != null">
+        CZSJ,
+      </if>
+      <if test="wxgpcl != null">
+        WXGPCL,
+      </if>
+      <if test="llb != null">
+        LLB,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="dates != null">
+        #{dates,jdbcType=TIMESTAMP},
+      </if>
+      <if test="rcl != null">
+        #{rcl,jdbcType=DECIMAL},
+      </if>
+      <if test="jtsl != null">
+        #{jtsl,jdbcType=DECIMAL},
+      </if>
+      <if test="sjyl != null">
+        #{sjyl,jdbcType=DECIMAL},
+      </if>
+      <if test="kcl != null">
+        #{kcl,jdbcType=DECIMAL},
+      </if>
+      <if test="wjzl != null">
+        #{wjzl,jdbcType=DECIMAL},
+      </if>
+      <if test="scls != null">
+        #{scls,jdbcType=DECIMAL},
+      </if>
+      <if test="ll1 != null">
+        #{ll1,jdbcType=DECIMAL},
+      </if>
+      <if test="ll2 != null">
+        #{ll2,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlNbhst != null">
+        #{fgzlNbhst,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlWg != null">
+        #{fgzlWg,jdbcType=DECIMAL},
+      </if>
+      <if test="lldlyl != null">
+        #{lldlyl,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgJfgk != null">
+        #{wgfgJfgk,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgQxc != null">
+        #{wgfgQxc,jdbcType=DECIMAL},
+      </if>
+      <if test="xcf != null">
+        #{xcf,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="czr != null">
+        #{czr,jdbcType=VARCHAR},
+      </if>
+      <if test="czsj != null">
+        #{czsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="wxgpcl != null">
+        #{wxgpcl,jdbcType=DECIMAL},
+      </if>
+      <if test="llb != null">
+        #{llb,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    update EMS_SCQK_LG
+    set RCL = #{rcl,jdbcType=DECIMAL},
+      JTSL = #{jtsl,jdbcType=DECIMAL},
+      SJYL = #{sjyl,jdbcType=DECIMAL},
+      KCL = #{kcl,jdbcType=DECIMAL},
+      WJZL = #{wjzl,jdbcType=DECIMAL},
+      SCLS = #{scls,jdbcType=DECIMAL},
+      LL_1 = #{ll1,jdbcType=DECIMAL},
+      LL_2 = #{ll2,jdbcType=DECIMAL},
+      FGZL_NBHST = #{fgzlNbhst,jdbcType=DECIMAL},
+      FGZL_WG = #{fgzlWg,jdbcType=DECIMAL},
+      LLDLYL = #{lldlyl,jdbcType=DECIMAL},
+      WGFG_JFGK = #{wgfgJfgk,jdbcType=DECIMAL},
+      WGFG_QXC = #{wgfgQxc,jdbcType=DECIMAL},
+      XCF = #{xcf,jdbcType=DECIMAL},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      CZR = #{czr,jdbcType=VARCHAR},
+      CZSJ = #{czsj,jdbcType=TIMESTAMP},
+      WXGPCL = #{wxgpcl,jdbcType=DECIMAL},
+      LLB = #{llb,jdbcType=DECIMAL}
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
+    update EMS_SCQK_LG
+    <set>
+      <if test="rcl != null">
+        RCL = #{rcl,jdbcType=DECIMAL},
+      </if>
+      <if test="jtsl != null">
+        JTSL = #{jtsl,jdbcType=DECIMAL},
+      </if>
+      <if test="sjyl != null">
+        SJYL = #{sjyl,jdbcType=DECIMAL},
+      </if>
+      <if test="kcl != null">
+        KCL = #{kcl,jdbcType=DECIMAL},
+      </if>
+      <if test="wjzl != null">
+        WJZL = #{wjzl,jdbcType=DECIMAL},
+      </if>
+      <if test="scls != null">
+        SCLS = #{scls,jdbcType=DECIMAL},
+      </if>
+      <if test="ll1 != null">
+        LL_1 = #{ll1,jdbcType=DECIMAL},
+      </if>
+      <if test="ll2 != null">
+        LL_2 = #{ll2,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlNbhst != null">
+        FGZL_NBHST = #{fgzlNbhst,jdbcType=DECIMAL},
+      </if>
+      <if test="fgzlWg != null">
+        FGZL_WG = #{fgzlWg,jdbcType=DECIMAL},
+      </if>
+      <if test="lldlyl != null">
+        LLDLYL = #{lldlyl,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgJfgk != null">
+        WGFG_JFGK = #{wgfgJfgk,jdbcType=DECIMAL},
+      </if>
+      <if test="wgfgQxc != null">
+        WGFG_QXC = #{wgfgQxc,jdbcType=DECIMAL},
+      </if>
+      <if test="xcf != null">
+        XCF = #{xcf,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="czr != null">
+        CZR = #{czr,jdbcType=VARCHAR},
+      </if>
+      <if test="czsj != null">
+        CZSJ = #{czsj,jdbcType=TIMESTAMP},
+      </if>
+      <if test="wxgpcl != null">
+        WXGPCL = #{wxgpcl,jdbcType=DECIMAL},
+      </if>
+      <if test="llb != null">
+        LLB = #{llb,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.util.Date" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where DATES = #{dates,jdbcType=TIMESTAMP}
+  </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_SCQK_LG 
+      (DATES, 
+      RCL, JTSL, SJYL, 
+      KCL, WJZL, SCLS, 
+      LL_1, LL_2, FGZL_NBHST, 
+      FGZL_WG, LLDLYL, WGFG_JFGK, 
+      WGFG_QXC, XCF, MEMO, 
+      CZR, CZSJ, WXGPCL, 
+      LLB)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.dates,jdbcType=TIMESTAMP}, 
+      #{item.rcl,jdbcType=DECIMAL}, #{item.jtsl,jdbcType=DECIMAL}, #{item.sjyl,jdbcType=DECIMAL}, 
+      #{item.kcl,jdbcType=DECIMAL}, #{item.wjzl,jdbcType=DECIMAL}, #{item.scls,jdbcType=DECIMAL}, 
+      #{item.ll1,jdbcType=DECIMAL}, #{item.ll2,jdbcType=DECIMAL}, #{item.fgzlNbhst,jdbcType=DECIMAL}, 
+      #{item.fgzlWg,jdbcType=DECIMAL}, #{item.lldlyl,jdbcType=DECIMAL}, #{item.wgfgJfgk,jdbcType=DECIMAL}, 
+      #{item.wgfgQxc,jdbcType=DECIMAL}, #{item.xcf,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, 
+      #{item.czr,jdbcType=VARCHAR}, #{item.czsj,jdbcType=TIMESTAMP}, #{item.wxgpcl,jdbcType=DECIMAL}, 
+      #{item.llb,jdbcType=DECIMAL} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update EMS_SCQK_LG
+     set
+       DATES=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.dates,jdbcType=TIMESTAMP}
+       </foreach>
+       ,RCL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.rcl,jdbcType=DECIMAL}
+       </foreach>
+       ,JTSL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.jtsl,jdbcType=DECIMAL}
+       </foreach>
+       ,SJYL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.sjyl,jdbcType=DECIMAL}
+       </foreach>
+       ,KCL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.kcl,jdbcType=DECIMAL}
+       </foreach>
+       ,WJZL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wjzl,jdbcType=DECIMAL}
+       </foreach>
+       ,SCLS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.scls,jdbcType=DECIMAL}
+       </foreach>
+       ,LL_1=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.ll1,jdbcType=DECIMAL}
+       </foreach>
+       ,LL_2=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.ll2,jdbcType=DECIMAL}
+       </foreach>
+       ,FGZL_NBHST=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.fgzlNbhst,jdbcType=DECIMAL}
+       </foreach>
+       ,FGZL_WG=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.fgzlWg,jdbcType=DECIMAL}
+       </foreach>
+       ,LLDLYL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.lldlyl,jdbcType=DECIMAL}
+       </foreach>
+       ,WGFG_JFGK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wgfgJfgk,jdbcType=DECIMAL}
+       </foreach>
+       ,WGFG_QXC=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wgfgQxc,jdbcType=DECIMAL}
+       </foreach>
+       ,XCF=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.xcf,jdbcType=DECIMAL}
+       </foreach>
+       ,MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,CZR=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.czr,jdbcType=VARCHAR}
+       </foreach>
+       ,CZSJ=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.czsj,jdbcType=TIMESTAMP}
+       </foreach>
+       ,WXGPCL=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.wxgpcl,jdbcType=DECIMAL}
+       </foreach>
+       ,LLB=
+       <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+          when #{item.dates,jdbcType=TIMESTAMP} then #{item.llb,jdbcType=DECIMAL}
+       </foreach>
+     where DATES in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.dates,jdbcType=TIMESTAMP}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from EMS_SCQK_LG
+    where DATES in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 334 - 0
src/main/java/com/steerinfo/ems/emsscqklg/model/EmsScqkLg.java

@@ -0,0 +1,334 @@
+package com.steerinfo.ems.emsscqklg.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="生产情况-炼钢")
+public class EmsScqkLg implements IBasePO<Date> {
+    /**
+     * 生产日期(DATES,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="生产日期",required=true)
+    private Date dates;
+
+    /**
+     * 钢坯日产量(RCL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="钢坯日产量",required=false)
+    private BigDecimal rcl;
+
+    /**
+     * 进入炼钢铁水量(JTSL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="进入炼钢铁水量",required=false)
+    private BigDecimal jtsl;
+
+    /**
+     * 炼钢实际用量(SJYL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="炼钢实际用量",required=false)
+    private BigDecimal sjyl;
+
+    /**
+     * 库存量(铁水)(KCL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="库存量(铁水)",required=false)
+    private BigDecimal kcl;
+
+    /**
+     * 未浇钢水量(WJZL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="未浇钢水量",required=false)
+    private BigDecimal wjzl;
+
+    /**
+     * 生产炉数(SCLS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="生产炉数",required=false)
+    private BigDecimal scls;
+
+    /**
+     * 1#炉龄(LL_1,DECIMAL,0)
+     */
+    @ApiModelProperty(value="1#炉龄",required=false)
+    private BigDecimal ll1;
+
+    /**
+     * 2#炉龄(LL_2,DECIMAL,0)
+     */
+    @ApiModelProperty(value="2#炉龄",required=false)
+    private BigDecimal ll2;
+
+    /**
+     * 废钢总量_内部含生铁(FGZL_NBHST,DECIMAL,0)
+     */
+    @ApiModelProperty(value="废钢总量_内部含生铁",required=false)
+    private BigDecimal fgzlNbhst;
+
+    /**
+     * 废钢总量_外购(FGZL_WG,DECIMAL,0)
+     */
+    @ApiModelProperty(value="废钢总量_外购",required=false)
+    private BigDecimal fgzlWg;
+
+    /**
+     * 冷料单炉用量(LLDLYL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="冷料单炉用量",required=false)
+    private BigDecimal lldlyl;
+
+    /**
+     * 外购废钢_进废钢坑(WGFG_JFGK,DECIMAL,0)
+     */
+    @ApiModelProperty(value="外购废钢_进废钢坑",required=false)
+    private BigDecimal wgfgJfgk;
+
+    /**
+     * 外购废钢_去席村废钢量(WGFG_QXC,DECIMAL,0)
+     */
+    @ApiModelProperty(value="外购废钢_去席村废钢量",required=false)
+    private BigDecimal wgfgQxc;
+
+    /**
+     * 席村返回废钢量(XCF,DECIMAL,0)
+     */
+    @ApiModelProperty(value="席村返回废钢量",required=false)
+    private BigDecimal xcf;
+
+    /**
+     * 记事(MEMO,VARCHAR,500)
+     */
+    @ApiModelProperty(value="记事",required=false)
+    private String memo;
+
+    /**
+     * 操作人(CZR,VARCHAR,10)
+     */
+    @ApiModelProperty(value="操作人",required=false)
+    private String czr;
+
+    /**
+     * 操作时间(CZSJ,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="操作时间",required=false)
+    private Date czsj;
+
+    /**
+     * 外销钢坯产量(WXGPCL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="外销钢坯产量",required=false)
+    private BigDecimal wxgpcl;
+
+    /**
+     * 冷料比(LLB,DECIMAL,0)
+     */
+    @ApiModelProperty(value="冷料比",required=false)
+    private BigDecimal llb;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public Date getId() {
+        return this.dates;
+    }
+
+    @Override
+    public void setId(Date dates) {
+        this.dates = dates;
+    }
+
+    public Date getDates() {
+        return dates;
+    }
+
+    public void setDates(Date dates) {
+        this.dates = dates;
+    }
+
+    public BigDecimal getRcl() {
+        return rcl;
+    }
+
+    public void setRcl(BigDecimal rcl) {
+        this.rcl = rcl;
+    }
+
+    public BigDecimal getJtsl() {
+        return jtsl;
+    }
+
+    public void setJtsl(BigDecimal jtsl) {
+        this.jtsl = jtsl;
+    }
+
+    public BigDecimal getSjyl() {
+        return sjyl;
+    }
+
+    public void setSjyl(BigDecimal sjyl) {
+        this.sjyl = sjyl;
+    }
+
+    public BigDecimal getKcl() {
+        return kcl;
+    }
+
+    public void setKcl(BigDecimal kcl) {
+        this.kcl = kcl;
+    }
+
+    public BigDecimal getWjzl() {
+        return wjzl;
+    }
+
+    public void setWjzl(BigDecimal wjzl) {
+        this.wjzl = wjzl;
+    }
+
+    public BigDecimal getScls() {
+        return scls;
+    }
+
+    public void setScls(BigDecimal scls) {
+        this.scls = scls;
+    }
+
+    public BigDecimal getLl1() {
+        return ll1;
+    }
+
+    public void setLl1(BigDecimal ll1) {
+        this.ll1 = ll1;
+    }
+
+    public BigDecimal getLl2() {
+        return ll2;
+    }
+
+    public void setLl2(BigDecimal ll2) {
+        this.ll2 = ll2;
+    }
+
+    public BigDecimal getFgzlNbhst() {
+        return fgzlNbhst;
+    }
+
+    public void setFgzlNbhst(BigDecimal fgzlNbhst) {
+        this.fgzlNbhst = fgzlNbhst;
+    }
+
+    public BigDecimal getFgzlWg() {
+        return fgzlWg;
+    }
+
+    public void setFgzlWg(BigDecimal fgzlWg) {
+        this.fgzlWg = fgzlWg;
+    }
+
+    public BigDecimal getLldlyl() {
+        return lldlyl;
+    }
+
+    public void setLldlyl(BigDecimal lldlyl) {
+        this.lldlyl = lldlyl;
+    }
+
+    public BigDecimal getWgfgJfgk() {
+        return wgfgJfgk;
+    }
+
+    public void setWgfgJfgk(BigDecimal wgfgJfgk) {
+        this.wgfgJfgk = wgfgJfgk;
+    }
+
+    public BigDecimal getWgfgQxc() {
+        return wgfgQxc;
+    }
+
+    public void setWgfgQxc(BigDecimal wgfgQxc) {
+        this.wgfgQxc = wgfgQxc;
+    }
+
+    public BigDecimal getXcf() {
+        return xcf;
+    }
+
+    public void setXcf(BigDecimal xcf) {
+        this.xcf = xcf;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getCzr() {
+        return czr;
+    }
+
+    public void setCzr(String czr) {
+        this.czr = czr == null ? null : czr.trim();
+    }
+
+    public Date getCzsj() {
+        return czsj;
+    }
+
+    public void setCzsj(Date czsj) {
+        this.czsj = czsj;
+    }
+
+    public BigDecimal getWxgpcl() {
+        return wxgpcl;
+    }
+
+    public void setWxgpcl(BigDecimal wxgpcl) {
+        this.wxgpcl = wxgpcl;
+    }
+
+    public BigDecimal getLlb() {
+        return llb;
+    }
+
+    public void setLlb(BigDecimal llb) {
+        this.llb = llb;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", dates=").append(dates);
+        sb.append(", rcl=").append(rcl);
+        sb.append(", jtsl=").append(jtsl);
+        sb.append(", sjyl=").append(sjyl);
+        sb.append(", kcl=").append(kcl);
+        sb.append(", wjzl=").append(wjzl);
+        sb.append(", scls=").append(scls);
+        sb.append(", ll1=").append(ll1);
+        sb.append(", ll2=").append(ll2);
+        sb.append(", fgzlNbhst=").append(fgzlNbhst);
+        sb.append(", fgzlWg=").append(fgzlWg);
+        sb.append(", lldlyl=").append(lldlyl);
+        sb.append(", wgfgJfgk=").append(wgfgJfgk);
+        sb.append(", wgfgQxc=").append(wgfgQxc);
+        sb.append(", xcf=").append(xcf);
+        sb.append(", memo=").append(memo);
+        sb.append(", czr=").append(czr);
+        sb.append(", czsj=").append(czsj);
+        sb.append(", wxgpcl=").append(wxgpcl);
+        sb.append(", llb=").append(llb);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 28 - 0
src/main/java/com/steerinfo/ems/emsscqklg/service/EmsLgReportService.java

@@ -0,0 +1,28 @@
+package com.steerinfo.ems.emsscqklg.service;
+
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+
+import java.util.List;
+
+/**
+ * EmsScqkLg服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-19 10:43
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-19
+ * 作者:generator
+ * 参考:
+ * 描述:EmsScqkLg服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@FeignClient(value = "xt-ems-datasource")
+@Component
+public interface EmsLgReportService {
+    @GetMapping("v1/lgreport/queryReportByTime")
+    public List<EmsScqkLg> queryReportByTime();
+}

+ 24 - 0
src/main/java/com/steerinfo/ems/emsscqklg/service/IEmsScqkLgService.java

@@ -0,0 +1,24 @@
+package com.steerinfo.ems.emsscqklg.service;
+
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.Date;
+
+/**
+ * EmsScqkLg服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-19 10:43
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-19
+ * 作者:generator
+ * 参考:
+ * 描述:EmsScqkLg服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+
+public interface IEmsScqkLgService extends IBaseService<EmsScqkLg, Date>{
+    int dateGenerate();
+}

+ 61 - 0
src/main/java/com/steerinfo/ems/emsscqklg/service/impl/EmsScqkLgServiceImpl.java

@@ -0,0 +1,61 @@
+package com.steerinfo.ems.emsscqklg.service.impl;
+
+import com.steerinfo.ems.emsscqklg.mapper.EmsScqkLgMapper;
+import com.steerinfo.ems.emsscqklg.model.EmsScqkLg;
+import com.steerinfo.ems.emsscqklg.service.EmsLgReportService;
+import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
+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.util.Date;
+import java.util.List;
+
+/**
+ * EmsScqkLg服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-19 10:43
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-19
+ * 作者:generator
+ * 参考:
+ * 描述:EmsScqkLg服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "emsScqkLgService")
+public class EmsScqkLgServiceImpl extends BaseServiceImpl<EmsScqkLg, Date> implements IEmsScqkLgService {
+
+    @Autowired
+    private EmsScqkLgMapper emsScqkLgMapper;
+
+    @Autowired
+    private EmsLgReportService emsLgReportService;
+
+    @Override
+    protected IBaseMapper<EmsScqkLg, Date> getMapper() {
+        return emsScqkLgMapper;
+    }
+
+
+    @Override
+    public int dateGenerate() {
+       List<EmsScqkLg> emsScqkLgs =  emsLgReportService.queryReportByTime();
+       EmsScqkLg model;
+       Integer number=0;
+       for(EmsScqkLg emsScqkLg :emsScqkLgs)
+       {
+           emsScqkLg.setCzr("炼钢MES");
+           emsScqkLg.setCzsj(new Date());
+           model = emsScqkLgMapper.selectByPrimaryKey(emsScqkLg.getId());
+           if(model == null){
+              number += emsScqkLgMapper.insert(emsScqkLg);
+              continue;
+           }
+           number += emsScqkLgMapper.updateByPrimaryKeySelective(emsScqkLg);
+       }
+        return number;
+    }
+}

+ 108 - 0
src/main/java/com/steerinfo/ems/rttable/controller/RttableController.java

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

+ 19 - 0
src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.java

@@ -0,0 +1,19 @@
+package com.steerinfo.ems.rttable.mapper;
+
+import com.steerinfo.ems.rttable.model.Rttable;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+
+@Mapper
+public interface RttableMapper extends IBaseMapper<Rttable, BigDecimal> {
+
+    int insertPowerTenMinutes(HashMap<String, Object> HashMap);
+
+    int updatePowerTenMinutes(HashMap<String, Object> HashMap);
+
+    int updatePowerMinutes(HashMap<String, Object> HashMap);
+
+}

+ 284 - 0
src/main/java/com/steerinfo/ems/rttable/mapper/RttableMapper.xml

@@ -0,0 +1,284 @@
+<?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.rttable.mapper.RttableMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.ems.rttable.model.Rttable">
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="ALTID" jdbcType="VARCHAR" property="altid" />
+    <result column="RTVALUE" jdbcType="DECIMAL" property="rtvalue" />
+    <result column="ALARMSTATUS" jdbcType="DECIMAL" property="alarmstatus" />
+    <result column="COMMSTATUS" jdbcType="DECIMAL" property="commstatus" />
+    <result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
+    <result column="NOTE" jdbcType="VARCHAR" property="note" />
+  </resultMap>
+  <sql id="columns">
+    ID, ALTID, RTVALUE, ALARMSTATUS, COMMSTATUS, UPDATETIME, NOTE
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.ALTID, t.RTVALUE, t.ALARMSTATUS, t.COMMSTATUS, t.UPDATETIME, t.NOTE
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM RTTABLE
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM RTTABLE t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null">
+        and ID = #{id}
+      </if>
+      <if test="altid != null and altid != ''">
+        and ALTID = #{altid}
+      </if>
+      <if test="rtvalue != null">
+        and RTVALUE = #{rtvalue}
+      </if>
+      <if test="alarmstatus != null">
+        and ALARMSTATUS = #{alarmstatus}
+      </if>
+      <if test="commstatus != null">
+        and COMMSTATUS = #{commstatus}
+      </if>
+      <if test="updatetime != null">
+        and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE = #{note}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null">
+        and ID = #{id}
+      </if>
+      <if test="altid != null and altid != ''">
+        and ALTID LIKE '%${altid}%'
+      </if>
+      <if test="rtvalue != null">
+        and RTVALUE = #{rtvalue}
+      </if>
+      <if test="alarmstatus != null">
+        and ALARMSTATUS = #{alarmstatus}
+      </if>
+      <if test="commstatus != null">
+        and COMMSTATUS = #{commstatus}
+      </if>
+      <if test="updatetime != null">
+        and TO_CHAR(UPDATETIME,'yyyy-MM-dd') = #{updatetime}
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE LIKE '%${note}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from RTTABLE
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from RTTABLE
+    where 1!=1 
+      <if test="altid != null and altid != ''">
+        or ALTID = #{altid}
+      </if>
+      <if test="rtvalue != null">
+        or RTVALUE = #{rtvalue}
+      </if>
+      <if test="alarmstatus != null">
+        or ALARMSTATUS = #{alarmstatus}
+      </if>
+      <if test="commstatus != null">
+        or COMMSTATUS = #{commstatus}
+      </if>
+      <if test="updatetime != null">
+        or TO_CHAR(UPDATETIME,'yyyy-MM-dd') = '#{updatetime}'
+      </if>
+      <if test="note != null and note != ''">
+        or NOTE = #{note}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    insert into RTTABLE (ID, ALTID, RTVALUE, 
+      ALARMSTATUS, COMMSTATUS, UPDATETIME, 
+      NOTE)
+    values (#{id,jdbcType=DECIMAL}, #{altid,jdbcType=VARCHAR}, #{rtvalue,jdbcType=DECIMAL}, 
+      #{alarmstatus,jdbcType=DECIMAL}, #{commstatus,jdbcType=DECIMAL}, #{updatetime,jdbcType=TIMESTAMP}, 
+      #{note,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    insert into RTTABLE
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="altid != null">
+        ALTID,
+      </if>
+      <if test="rtvalue != null">
+        RTVALUE,
+      </if>
+      <if test="alarmstatus != null">
+        ALARMSTATUS,
+      </if>
+      <if test="commstatus != null">
+        COMMSTATUS,
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME,
+      </if>
+      <if test="note != null">
+        NOTE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="altid != null">
+        #{altid,jdbcType=VARCHAR},
+      </if>
+      <if test="rtvalue != null">
+        #{rtvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="alarmstatus != null">
+        #{alarmstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="commstatus != null">
+        #{commstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="note != null">
+        #{note,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    update RTTABLE
+    set ALTID = #{altid,jdbcType=VARCHAR},
+      RTVALUE = #{rtvalue,jdbcType=DECIMAL},
+      ALARMSTATUS = #{alarmstatus,jdbcType=DECIMAL},
+      COMMSTATUS = #{commstatus,jdbcType=DECIMAL},
+      UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
+      NOTE = #{note,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.rttable.model.Rttable">
+    update RTTABLE
+    <set>
+      <if test="altid != null">
+        ALTID = #{altid,jdbcType=VARCHAR},
+      </if>
+      <if test="rtvalue != null">
+        RTVALUE = #{rtvalue,jdbcType=DECIMAL},
+      </if>
+      <if test="alarmstatus != null">
+        ALARMSTATUS = #{alarmstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="commstatus != null">
+        COMMSTATUS = #{commstatus,jdbcType=DECIMAL},
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME = #{updatetime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="note != null">
+        NOTE = #{note,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,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 RTTABLE 
+      (ID, 
+      ALTID, RTVALUE, ALARMSTATUS, 
+      COMMSTATUS, UPDATETIME, NOTE
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=DECIMAL}, 
+      #{item.altid,jdbcType=VARCHAR}, #{item.rtvalue,jdbcType=DECIMAL}, #{item.alarmstatus,jdbcType=DECIMAL}, 
+      #{item.commstatus,jdbcType=DECIMAL}, #{item.updatetime,jdbcType=TIMESTAMP}, #{item.note,jdbcType=VARCHAR}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update RTTABLE
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.id,jdbcType=DECIMAL}
+       </foreach>
+       ,ALTID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.altid,jdbcType=VARCHAR}
+       </foreach>
+       ,RTVALUE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.rtvalue,jdbcType=DECIMAL}
+       </foreach>
+       ,ALARMSTATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.alarmstatus,jdbcType=DECIMAL}
+       </foreach>
+       ,COMMSTATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.commstatus,jdbcType=DECIMAL}
+       </foreach>
+       ,UPDATETIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.updatetime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,NOTE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=DECIMAL} then #{item.note,jdbcType=VARCHAR}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from RTTABLE
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <insert id="insertPowerTenMinutes" parameterType="java.util.HashMap">
+    INSERT INTO EMS_POWER_TIMING(TMSTMP) VALUES
+    (to_date (#{clock1,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
+    )
+  </insert>
+  <update id="updatePowerTenMinutes" parameterType="java.util.HashMap">
+    update EMS_POWER_TIMING
+    <set>
+      ${sql}
+    </set>
+    where TMSTMP =to_date (#{clock1,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
+  </update>
+  <update id="updatePowerMinutes" parameterType="java.util.HashMap">
+    update ${table}
+    <set>
+      <if test="clock != null and clock != ''">
+        TMSTMP = to_date (#{clock,jdbcType=TIME}, 'YYYY-MM-DD HH24:MI:SS' )
+      </if>
+      ${sql}
+    </set>
+  </update>
+</mapper>

+ 128 - 0
src/main/java/com/steerinfo/ems/rttable/model/Rttable.java

@@ -0,0 +1,128 @@
+package com.steerinfo.ems.rttable.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 Rttable implements IBasePO<BigDecimal> {
+    /**
+     * ID随机(ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="ID随机",required=true)
+    private BigDecimal id;
+
+    /**
+     * MOX数据库唯一ID号(EMS+分厂+工序+介质+仪表)(ALTID,VARCHAR,30)
+     */
+    @ApiModelProperty(value="MOX数据库唯一ID号(EMS+分厂+工序+介质+仪表)",required=true)
+    private String altid;
+
+    /**
+     * 数据(RTVALUE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="数据",required=false)
+    private BigDecimal rtvalue;
+
+    /**
+     * 报警(ALARMSTATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="报警",required=false)
+    private BigDecimal alarmstatus;
+
+    /**
+     * 通讯状态(COMMSTATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="通讯状态",required=false)
+    private BigDecimal commstatus;
+
+    /**
+     * 更新时间(UPDATETIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="更新时间",required=false)
+    private Date updatetime;
+
+    /**
+     * EMS+分厂+工序+介质+仪表(NOTE,VARCHAR,200)
+     */
+    @ApiModelProperty(value="EMS+分厂+工序+介质+仪表",required=false)
+    private String note;
+
+    private static final long serialVersionUID = 1L;
+
+    public BigDecimal getId() {
+        return id;
+    }
+
+    public void setId(BigDecimal id) {
+        this.id = id;
+    }
+
+    public String getAltid() {
+        return altid;
+    }
+
+    public void setAltid(String altid) {
+        this.altid = altid == null ? null : altid.trim();
+    }
+
+    public BigDecimal getRtvalue() {
+        return rtvalue;
+    }
+
+    public void setRtvalue(String rtvalue) {
+        this.rtvalue = new BigDecimal(rtvalue);
+    }
+
+    public BigDecimal getAlarmstatus() {
+        return alarmstatus;
+    }
+
+    public void setAlarmstatus(String alarmstatus) {
+        this.alarmstatus = new BigDecimal(alarmstatus);
+    }
+
+    public BigDecimal getCommstatus() {
+        return commstatus;
+    }
+
+    public void setCommstatus(String commstatus) {
+        this.commstatus = new BigDecimal(commstatus);
+    }
+
+    public Date getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(Date updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note == null ? null : note.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", altid=").append(altid);
+        sb.append(", rtvalue=").append(rtvalue);
+        sb.append(", alarmstatus=").append(alarmstatus);
+        sb.append(", commstatus=").append(commstatus);
+        sb.append(", updatetime=").append(updatetime);
+        sb.append(", note=").append(note);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 27 - 0
src/main/java/com/steerinfo/ems/rttable/service/IRttableService.java

@@ -0,0 +1,27 @@
+package com.steerinfo.ems.rttable.service;
+
+import com.steerinfo.ems.rttable.model.Rttable;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+
+/**
+ * Rttable服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-15 03:37
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-15
+ * 作者:generator
+ * 参考:
+ * 描述:Rttable服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IRttableService extends IBaseService<Rttable, BigDecimal>{
+
+    int dataGeneration();
+
+    int getPowerTenMinutes();
+
+}

+ 109 - 0
src/main/java/com/steerinfo/ems/rttable/service/impl/RttableServiceImpl.java

@@ -0,0 +1,109 @@
+package com.steerinfo.ems.rttable.service.impl;
+
+import com.steerinfo.ems.Utils.DateUtils;
+import com.steerinfo.ems.rttable.mapper.RttableMapper;
+import com.steerinfo.ems.rttable.model.Rttable;
+import com.steerinfo.ems.rttable.service.IRttableService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * Rttable服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-15 03:37
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-15
+ * 作者:generator
+ * 参考:
+ * 描述:Rttable服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "rttableService")
+public class RttableServiceImpl extends BaseServiceImpl<Rttable, BigDecimal> implements IRttableService {
+    private static final Logger logger = LoggerFactory.getLogger(RttableServiceImpl.class);
+    @Autowired
+    private RttableMapper rttableMapper;
+
+    @Override
+    protected IBaseMapper<Rttable, BigDecimal> getMapper() {
+        return rttableMapper;
+    }
+
+    @Override
+    public int dataGeneration() {
+
+        int addSize = 0;
+        int updateSize = 0;
+        try {
+            Rttable model;
+            // emsWaterRealtimeMapper.selectByPrimaryKey("1");//.getWaterListByArmMeter();
+            //List<EmsWaterRealtime> emsWaterRealtimeList = getWaterListByArmMeter();
+            String clock = DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss");
+            HashMap<String,Object> hashMap = new HashMap<String,Object>();
+            hashMap.put("clock",clock);
+            List<Rttable> rttableList = rttableMapper.selectByParameters(hashMap);
+            StringBuffer sub = new StringBuffer();
+            String table="EMS_POWER";
+            for (Rttable rttable : rttableList){
+                addSize ++ ;
+                //多个表生成数据就填加table;
+                String sql = ",TAG"+ addSize+ " = " + "'" + rttable.getRtvalue() + "'";
+                sub.append(sql);
+            }
+            hashMap.put("table",table);
+            hashMap.put("sql",sub.toString());
+            updateSize += rttableMapper.updatePowerMinutes(hashMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            logger.info("本次总共新增动力数据条数:" + addSize);
+            logger.info("本次总共更新动力数据条数:" + updateSize);
+        }
+        return addSize+updateSize;
+    }
+
+
+    @Override
+    public int getPowerTenMinutes() {
+        int addSize = 0;
+        int updateSize = 0;
+        int i = 0;
+        try {
+            Rttable model;
+            // emsWaterRealtimeMapper.selectByPrimaryKey("1");//.getWaterListByArmMeter();
+            String clock1 = DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss");
+            HashMap<String,Object> hashMap = new HashMap<String,Object>();
+            hashMap.put("clock1",clock1);
+            addSize += rttableMapper.insertPowerTenMinutes(hashMap);
+            StringBuffer sub = new StringBuffer();
+            List<Rttable> rttableList = rttableMapper.selectByParameters(hashMap);
+            String table="EMS_POWER_TIMING";
+            for (Rttable rttable : rttableList){
+                i++;
+                String sql = "TAG"+ i+ " = " + "'" + rttable.getRtvalue() + "',";
+                sub.append(sql);
+            }
+            hashMap.put("table",table);
+            hashMap.put("sql",sub.toString());
+            updateSize += rttableMapper.updatePowerTenMinutes(hashMap);
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+            logger.info("本次总共新增动力十分钟数据条数:" + addSize);
+            logger.info("本次总共更新动力十分钟数据条数:" + updateSize);
+        }
+
+        return addSize+updateSize;
+    }
+}

+ 20 - 2
src/main/java/com/steerinfo/task/SpringCronTask.java

@@ -2,13 +2,16 @@ package com.steerinfo.task;
 
 import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.bfhyd.service.IBfhydService;
+import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
 import com.steerinfo.ems.emsetiming.service.IEmsETimingService;
+import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
 import com.steerinfo.ems.emswaterrealtime.service.IEmsWaterRealtimeService;
 import com.steerinfo.ems.ifemsmesactitem.service.IIfEmsMesActitemService;
 import com.steerinfo.ems.ifmesemsproductorder.service.IIfMesEmsProductorderService;
 import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
 import com.steerinfo.ems.ifmesemswatermonitor.service.IIfMesEmsWatermonitorService;
 import com.steerinfo.ems.mesemsdieseloil.service.IMesEmsDieseloilService;
+import com.steerinfo.ems.rttable.service.IRttableService;
 import com.steerinfo.ems.tcm0312.controller.TCm0312Controller;
 import com.steerinfo.ems.tcm0318.service.ITCm0318Service;
 import com.steerinfo.ems.tcm0348.service.ITCm0348Service;
@@ -107,6 +110,12 @@ public class SpringCronTask implements SchedulingConfigurer{
 	ITCm0318Service tCm0318Service;
 	@Autowired
 	IEmsWaterRealtimeService emsWaterRealtimeService;
+	@Autowired
+	IDzMaterialSfService dzMaterialSfService;
+	@Autowired
+	IRttableService rttableService;
+	@Autowired
+	IEmsScqkLgService emsScqkLgService;
 	/**
 	 * SchedulingConfigurer接口的方法实现,加载后自动运行
 	 */
@@ -255,15 +264,17 @@ public class SpringCronTask implements SchedulingConfigurer{
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
 				}
 				 else if(taskId.equalsIgnoreCase("120")){
-					 // 获取大用户水系统数据 5分钟一次
+					 // 获取大用户水系统数据;获取mosaic动力数据 5分钟一次
 					 long start = new Date().getTime();
 					 emsWaterRealtimeService.getWaterListByArmMeter();
 					 emsWaterRealtimeService.dataGeneration();
+					 rttableService.dataGeneration();
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
 				 } else if(taskId.equalsIgnoreCase("121")){
-					 // 根据计量点配置生成水数据 10分钟一次
+					 // 根据计量点配置生成水数据;自动生成动力数据 10分钟一次
 					 long start = new Date().getTime();
 					 emsWaterRealtimeService.getWaterTenMinutes();
+					 rttableService.getPowerTenMinutes();
 					 try {
 						 emsWaterRealtimeService.getWaterListToMosaic();
 					 } catch (AxisFault e) {
@@ -284,6 +295,13 @@ public class SpringCronTask implements SchedulingConfigurer{
 					 tRmCalpointValueService.statData(new Date());
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
 				 }
+				 else if (taskId.equalsIgnoreCase("123")) {
+					 // 大宗物料收发数据(每天1点);炼钢mes生成日报每天(0点57分,4点57分)
+					 long start = new Date().getTime();
+					 dzMaterialSfService.dataGeneration();
+					 emsScqkLgService.dateGenerate();
+					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
+				 }
 //				 else if (taskId.equalsIgnoreCase("106")) {
 //					// 获取MES水质监测数据
 //					long start = new Date().getTime();

+ 8 - 0
src/main/resources/bootstrap.yml

@@ -19,6 +19,14 @@ spring:
       trace:
         enabled: false
       enabled: false
+#feign的超时时间
+feign:
+  client:
+    config:
+      default:
+        connectTimeout: 5000
+        readTimeout: 10000
+        loggerLevel: full
 server:
   port: ${SERVER_PORT:8086}
   tomcat: