Przeglądaj źródła

2021-10-19 zhangyan
1.新增大宗物料收发数据
2.新增炼钢日产量读取

QuietShadow 3 lat temu
rodzic
commit
6ec92f3947

+ 29 - 0
src/main/java/com/steerinfo/config/druidConfig/DruidConfig.java

@@ -29,12 +29,15 @@ public class DruidConfig {
     private String jdbcUrl1;//ds1数据源
     private String jdbcUrl2;//ds2数据源
     private String jdbcUrl3;
+    private String jdbcUrl4;
     private String username1;
     private String password1;
     private String username2;
     private String username3;
     private String password2;
     private String password3;
+    private String username4;
+    private String password4;
     private int maxActive;
     private int minIdle;
     private int initialSize;
@@ -124,21 +127,47 @@ public class DruidConfig {
         return druidDataSource;
     }
 
+    public DataSource getDs4() {
+        DruidDataSource druidDataSource = new DruidDataSource();
+        druidDataSource.setDriverClassName(driverClassNameSqlserver);
+        druidDataSource.setUrl(jdbcUrl4);
+        druidDataSource.setUsername(username4);
+        druidDataSource.setPassword(password4);
+        druidDataSource.setMaxActive(maxActive);
+        druidDataSource.setInitialSize(initialSize);
+        druidDataSource.setTimeBetweenConnectErrorMillis(timeBetweenEvictionRunsMillis);
+        druidDataSource.setValidationQuery(validationQuery);
+        druidDataSource.setTestWhileIdle(testWhileIdle);
+        druidDataSource.setTestOnBorrow(testOnBorrow);
+        druidDataSource.setTestOnReturn(testOnReturn);
+        druidDataSource.setPoolPreparedStatements(poolPreparedStatements);
+        druidDataSource.setMaxPoolPreparedStatementPerConnectionSize(maxPoolPreparedStatementPerConnectionSize);
+        try {
+            druidDataSource.setFilters(filters);
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        return druidDataSource;
+    }
+
     @Bean
     public DataSource dynamicDataSource() {
         Map<Object, Object> targetDataSources = new HashMap<>();
         DataSource ds1 = getDs1();
         DataSource ds2 = getDs2();
         DataSource ds3 = getDs3();
+        DataSource ds4 = getDs4();
         targetDataSources.put("ds1", ds1);
         targetDataSources.put("ds2", ds2);
         targetDataSources.put("ds3", ds3);
+        targetDataSources.put("ds4", ds4);
         DynamicDataSource dynamicDataSource = new DynamicDataSource();
         dynamicDataSource.setTargetDataSources(targetDataSources);
         dynamicDataSource.setDefaultTargetDataSource(ds1);
         DynamicDataSourceContextHolder.dataSourceIds.add("ds1");
         DynamicDataSourceContextHolder.dataSourceIds.add("ds2");
         DynamicDataSourceContextHolder.dataSourceIds.add("ds3");
+        DynamicDataSourceContextHolder.dataSourceIds.add("ds4");
         return dynamicDataSource;
     }
 

+ 37 - 0
src/main/java/com/steerinfo/product/dzmaterialsf/controller/DzMaterialSfController.java

@@ -0,0 +1,37 @@
+package com.steerinfo.product.dzmaterialsf.controller;
+
+import com.steerinfo.product.dzmaterialsf.model.DzMaterialSf;
+import com.steerinfo.product.dzmaterialsf.service.IDzMaterialSfService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * DzMaterialSf RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-15 03:25
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-15
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/dematerialSfDb")
+public class DzMaterialSfController  {
+
+    @Autowired
+    IDzMaterialSfService dzMaterialSfService;
+
+    @GetMapping("/getDzMaterialSf")
+    public List<DzMaterialSf> getDzMaterialSf(){
+        List<DzMaterialSf> all = dzMaterialSfService.getDzMaterialSf();
+        return all;
+    }
+}

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

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

+ 531 - 0
src/main/java/com/steerinfo/product/dzmaterialsf/mapper/DzMaterialSfMapper.xml

@@ -0,0 +1,531 @@
+<?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.product.dzmaterialsf.mapper.DzMaterialSfMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.product.dzmaterialsf.model.DzMaterialSf">
+    <id column="GBSJ" jdbcType="VARCHAR" property="gbsj" />
+    <result column="CINVCCODE" jdbcType="VARCHAR" property="cinvccode" />
+    <result column="CINVCNAME" jdbcType="VARCHAR" property="cinvcname" />
+    <result column="CINVCODE" jdbcType="VARCHAR" property="cinvcode" />
+    <result column="CINVNAME" jdbcType="VARCHAR" property="cinvname" />
+    <result column="CINVSTD" jdbcType="VARCHAR" property="cinvstd" />
+    <result column="CWHCODE" jdbcType="VARCHAR" property="cwhcode" />
+    <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, CINVCNAME, CINVCODE, CINVNAME, CINVSTD, CWHCODE, CWHNAME, MZ, PZ, 
+    JZ, TAB, CREATEMAN, CREATETIME, UPDATEMAN, UPDATETIME, READTIME
+  </sql>
+  <sql id="columns_alias">
+    t.GBSJ, t.CINVCCODE, t.CINVCNAME, t.CINVCODE, t.CINVNAME, t.CINVSTD, t.CWHCODE, 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="cinvcname != null and cinvcname != ''">
+        and CINVCNAME = #{cinvcname}
+      </if>
+      <if test="cinvcode != null and cinvcode != ''">
+        and CINVCODE = #{cinvcode}
+      </if>
+      <if test="cinvname != null and cinvname != ''">
+        and CINVNAME = #{cinvname}
+      </if>
+      <if test="cinvstd != null and cinvstd != ''">
+        and CINVSTD = #{cinvstd}
+      </if>
+      <if test="cwhcode != null and cwhcode != ''">
+        and CWHCODE = #{cwhcode}
+      </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="cinvcname != null and cinvcname != ''">
+        and CINVCNAME LIKE '%${cinvcname}%'
+      </if>
+      <if test="cinvcode != null and cinvcode != ''">
+        and CINVCODE LIKE '%${cinvcode}%'
+      </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="cwhcode != null and cwhcode != ''">
+        and CWHCODE LIKE '%${cwhcode}%'
+      </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="java.lang.String">
+    delete from DZ_MATERIAL_SF
+    where GBSJ = #{gbsj,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="cinvcname != null and cinvcname != ''">
+        or CINVCNAME = #{cinvcname}
+      </if>
+      <if test="cinvcode != null and cinvcode != ''">
+        or CINVCODE = #{cinvcode}
+      </if>
+      <if test="cinvname != null and cinvname != ''">
+        or CINVNAME = #{cinvname}
+      </if>
+      <if test="cinvstd != null and cinvstd != ''">
+        or CINVSTD = #{cinvstd}
+      </if>
+      <if test="cwhcode != null and cwhcode != ''">
+        or CWHCODE = #{cwhcode}
+      </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.product.dzmaterialsf.model.DzMaterialSf">
+    insert into DZ_MATERIAL_SF (GBSJ, CINVCCODE, CINVCNAME, 
+      CINVCODE, CINVNAME, CINVSTD, 
+      CWHCODE, CWHNAME, MZ, 
+      PZ, JZ, TAB, CREATEMAN, 
+      CREATETIME, UPDATEMAN, UPDATETIME, 
+      READTIME)
+    values (#{gbsj,jdbcType=VARCHAR}, #{cinvccode,jdbcType=VARCHAR}, #{cinvcname,jdbcType=VARCHAR}, 
+      #{cinvcode,jdbcType=VARCHAR}, #{cinvname,jdbcType=VARCHAR}, #{cinvstd,jdbcType=VARCHAR}, 
+      #{cwhcode,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.product.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="cinvcname != null">
+        CINVCNAME,
+      </if>
+      <if test="cinvcode != null">
+        CINVCODE,
+      </if>
+      <if test="cinvname != null">
+        CINVNAME,
+      </if>
+      <if test="cinvstd != null">
+        CINVSTD,
+      </if>
+      <if test="cwhcode != null">
+        CWHCODE,
+      </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="cinvcname != null">
+        #{cinvcname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvcode != null">
+        #{cinvcode,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvname != null">
+        #{cinvname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvstd != null">
+        #{cinvstd,jdbcType=VARCHAR},
+      </if>
+      <if test="cwhcode != null">
+        #{cwhcode,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.product.dzmaterialsf.model.DzMaterialSf">
+    update DZ_MATERIAL_SF
+    set CINVCCODE = #{cinvccode,jdbcType=VARCHAR},
+      CINVCNAME = #{cinvcname,jdbcType=VARCHAR},
+      CINVCODE = #{cinvcode,jdbcType=VARCHAR},
+      CINVNAME = #{cinvname,jdbcType=VARCHAR},
+      CINVSTD = #{cinvstd,jdbcType=VARCHAR},
+      CWHCODE = #{cwhcode,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}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.product.dzmaterialsf.model.DzMaterialSf">
+    update DZ_MATERIAL_SF
+    <set>
+      <if test="cinvccode != null">
+        CINVCCODE = #{cinvccode,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvcname != null">
+        CINVCNAME = #{cinvcname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvcode != null">
+        CINVCODE = #{cinvcode,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvname != null">
+        CINVNAME = #{cinvname,jdbcType=VARCHAR},
+      </if>
+      <if test="cinvstd != null">
+        CINVSTD = #{cinvstd,jdbcType=VARCHAR},
+      </if>
+      <if test="cwhcode != null">
+        CWHCODE = #{cwhcode,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}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where GBSJ = #{gbsj,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, CINVCNAME, CINVCODE, 
+      CINVNAME, CINVSTD, CWHCODE, 
+      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.cinvcname,jdbcType=VARCHAR}, #{item.cinvcode,jdbcType=VARCHAR}, 
+      #{item.cinvname,jdbcType=VARCHAR}, #{item.cinvstd,jdbcType=VARCHAR}, #{item.cwhcode,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>
+       ,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>
+       ,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>
+       ,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>
+       ,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>
+       ,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 in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.gbsj,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from DZ_MATERIAL_SF
+    where GBSJ in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </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>

+ 276 - 0
src/main/java/com/steerinfo/product/dzmaterialsf/model/DzMaterialSf.java

@@ -0,0 +1,276 @@
+package com.steerinfo.product.dzmaterialsf.model;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.Map;
+
+public class DzMaterialSf {
+    /**
+     * 日期(GBSJ,VARCHAR,20)
+     */
+    private String gbsj;
+
+    /**
+     * 物料类型id(CINVCCODE,VARCHAR,20)
+     */
+    private String cinvccode;
+
+    /**
+     * 物料ID(CINVCODE,VARCHAR,20)
+     */
+    private String cinvcode;
+
+    /**
+     * 物料仓库ID(CWHCODE,VARCHAR,20)
+     */
+    private String cwhcode;
+
+    /**
+     * 物料类型名称(CINVCNAME,VARCHAR,20)
+     */
+    private String cinvcname;
+
+    /**
+     * 物料名称(CINVNAME,VARCHAR,50)
+     */
+    private String cinvname;
+
+    /**
+     * 物料规格(备注)(CINVSTD,VARCHAR,100)
+     */
+    private String cinvstd;
+
+    /**
+     * 物料仓库名称(CWHNAME,VARCHAR,100)
+     */
+    private String cwhname;
+
+    /**
+     * 毛重(MZ,DECIMAL,20)
+     */
+    private BigDecimal mz;
+
+    /**
+     * 皮重(PZ,DECIMAL,20)
+     */
+    private BigDecimal pz;
+
+    /**
+     * 净重(JZ,DECIMAL,20)
+     */
+    private BigDecimal jz;
+
+    /**
+     * 表标识(TAB,VARCHAR,10)
+     */
+    private String tab;
+
+    /**
+     * 创建人(CREATEMAN,VARCHAR,50)
+     */
+    private String createman;
+
+    /**
+     * 创建时间(CREATETIME,VARCHAR,50)
+     */
+    private String createtime;
+
+    /**
+     * 修改人(UPDATEMAN,VARCHAR,50)
+     */
+    private String updateman;
+
+    /**
+     * 修改时间(UPDATETIME,VARCHAR,50)
+     */
+    private String updatetime;
+
+    /**
+     * 读取时间(READTIME,VARCHAR,50)
+     */
+    private String readtime;
+
+    private static final long serialVersionUID = 1L;
+
+    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;
+    }
+
+    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();
+    }
+}

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

@@ -0,0 +1,24 @@
+package com.steerinfo.product.dzmaterialsf.service;
+
+import com.steerinfo.product.dzmaterialsf.model.DzMaterialSf;
+
+import java.util.List;
+
+/**
+ * DzMaterialSf服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-15 03:25
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-15
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IDzMaterialSfService {
+
+    List<DzMaterialSf> getDzMaterialSf();
+
+}

+ 53 - 0
src/main/java/com/steerinfo/product/dzmaterialsf/service/impl/DzMaterialSfServiceImpl.java

@@ -0,0 +1,53 @@
+package com.steerinfo.product.dzmaterialsf.service.impl;
+
+import com.steerinfo.config.dynamicDataSource.TargetDataSource;
+import com.steerinfo.product.dzmaterialsf.mapper.DzMaterialSfMapper;
+import com.steerinfo.product.dzmaterialsf.model.DzMaterialSf;
+import com.steerinfo.product.dzmaterialsf.service.IDzMaterialSfService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.List;
+
+/**
+ * DzMaterialSf服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-10-15 03:25
+ * 类描述
+ * 修订历史:
+ * 日期:2021-10-15
+ * 作者:generator
+ * 参考:
+ * 描述:DzMaterialSf服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "dzMaterialSfService")
+public class DzMaterialSfServiceImpl  implements IDzMaterialSfService {
+
+    private static final Logger logger = LoggerFactory.getLogger(DzMaterialSfServiceImpl.class);
+
+    @Autowired
+    private DzMaterialSfMapper dzMaterialSfMapper;
+
+
+    @Override
+    //@TargetDataSource(dataSourceKey = DataSourceKey.DB_SLAVE1)
+    @TargetDataSource(name = "ds3")
+    public List<DzMaterialSf> getDzMaterialSf() {
+
+        Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
+//可以转成你想要的格式 yyyy/MM/dd HH:mm:ss 等等
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        calendar.add(Calendar.DAY_OF_MONTH,-1);
+        String gbsj= format.format(calendar.getTime());
+
+        List<DzMaterialSf> dzMaterialSfList = dzMaterialSfMapper.getDzMaterialSf(gbsj);
+        return dzMaterialSfList;
+    }
+
+}

+ 33 - 0
src/main/java/com/steerinfo/weight/lgmes/controller/LgReportController.java

@@ -0,0 +1,33 @@
+package com.steerinfo.weight.lgmes.controller;
+
+import com.steerinfo.weight.lgmes.model.EmsScqkLg;
+import com.steerinfo.weight.lgmes.service.ILgReportService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.List;
+
+@RestController
+@RequestMapping("/${api.version}/lgreport")
+public class LgReportController {
+      @Autowired
+      private ILgReportService lgReportService;
+
+
+    @GetMapping("/queryReportByTime")
+    public List<EmsScqkLg> QueryWeightByTime(){
+        Calendar calendar = Calendar.getInstance(); //创建Calendar 的实例
+//可以转成你想要的格式 yyyy/MM/dd HH:mm:ss 等等
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        calendar.add(Calendar.DAY_OF_MONTH,-1);
+        String clock= format.format(calendar.getTime());
+        List<EmsScqkLg> emsScqkLgs = lgReportService.QueryReportByTime(clock);
+        return emsScqkLgs;
+    }
+
+
+}

+ 15 - 0
src/main/java/com/steerinfo/weight/lgmes/mapper/LgReportMapper.java

@@ -0,0 +1,15 @@
+package com.steerinfo.weight.lgmes.mapper;
+
+import com.steerinfo.weight.lgmes.model.EmsScqkLg;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @author Shadow
+ * @create 2021-10-19 9:42
+ * @project xt-ems-datasource
+ */
+public interface LgReportMapper {
+    public List<EmsScqkLg> QueryReportByTime(@Param("clock")String clock);
+}

+ 28 - 0
src/main/java/com/steerinfo/weight/lgmes/mapper/LgReportMapper.xml

@@ -0,0 +1,28 @@
+<?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.weight.lgmes.mapper.LgReportMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.weight.lgmes.model.EmsScqkLg">
+        <id column="RQ" jdbcType="VARCHAR" property="dates"/>
+<!--        <id column="TSRCL" jdbcType="VARCHAR" property="rcl"/>-->
+<!--        <id column="ZT" jdbcType="VARCHAR" property="zt"/>-->
+        <id column="JRKC" jdbcType="VARCHAR" property="kcl"/>
+        <id column="GPRCL" jdbcType="VARCHAR" property="rcl"/>
+        <id column="SJCL" jdbcType="VARCHAR" property="sjyl"/>
+        <id column="SCLS" jdbcType="VARCHAR" property="scls"/>
+<!--        <id column="TH" jdbcType="VARCHAR" property="th"/>-->
+        <id column="NBHST" jdbcType="VARCHAR" property="fgzlNbhst"/>
+        <id column="LLDLYL" jdbcType="VARCHAR" property="lldlyl"/>
+        <id column="LLB" jdbcType="VARCHAR" property="llb"/>
+        <id column="JTL" jdbcType="VARCHAR" property="jtsl"/>
+        <id column="ZL1LL" jdbcType="VARCHAR" property="ll1"/>
+        <id column="ZL2LL" jdbcType="VARCHAR" property="ll2"/>
+<!--        <id column="GPYLJ" jdbcType="VARCHAR" property="gpYlj"/>-->
+<!--        <id column="GPNLJ" jdbcType="VARCHAR" property="gpNlj"/>-->
+<!--        <id column="TSYLJ" jdbcType="VARCHAR" property="tsYlj"/>-->
+<!--        <id column="TSNLJ" jdbcType="VARCHAR" property="tsYlj"/>-->
+        <id column="JS" jdbcType="VARCHAR" property="memo"/>
+    </resultMap>
+    <select id="QueryReportByTime"  resultMap="BaseResultMap" parameterType="java.lang.String">
+        select * from table(jymes.IMP_EMS_REPORT(#{clock}))
+    </select>
+</mapper>

+ 118 - 0
src/main/java/com/steerinfo/weight/lgmes/model/EmsScqkLg.java

@@ -0,0 +1,118 @@
+package com.steerinfo.weight.lgmes.model;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+/**
+ * @author Shadow
+ * @create 2021-10-19 9:21
+ * @project xt-ems-datasource
+ */
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class EmsScqkLg {
+    /**
+     * 生产日期(DATES,TIMESTAMP,7)
+     */
+    private String dates;
+
+    /**
+     * 钢坯日产量(RCL,DECIMAL,0)
+     */
+    private String rcl;
+
+    /**
+     * 进入炼钢铁水量(JTSL,DECIMAL,0)
+     */
+    private String jtsl;
+
+    /**
+     * 炼钢实际用量(SJYL,DECIMAL,0)
+     */
+    private String sjyl;
+
+    /**
+     * 库存量(铁水)(KCL,DECIMAL,0)
+     */
+    private String kcl;
+
+    /**
+     * 未浇钢水量(WJZL,DECIMAL,0)
+     */
+    private String wjzl;
+
+    /**
+     * 生产炉数(SCLS,DECIMAL,0)
+     */
+    private String scls;
+
+    /**
+     * 1#炉龄(LL_1,DECIMAL,0)
+     */
+    private String ll1;
+
+    /**
+     * 2#炉龄(LL_2,DECIMAL,0)
+     */
+    private String ll2;
+
+    /**
+     * 废钢总量_内部含生铁(FGZL_NBHST,DECIMAL,0)
+     */
+    private String fgzlNbhst;
+
+    /**
+     * 废钢总量_外购(FGZL_WG,DECIMAL,0)
+     */
+    private String fgzlWg;
+
+    /**
+     * 冷料单炉用量(LLDLYL,DECIMAL,0)
+     */
+    private String lldlyl;
+
+    /**
+     * 外购废钢_进废钢坑(WGFG_JFGK,DECIMAL,0)
+     */
+    private String wgfgJfgk;
+
+    /**
+     * 外购废钢_去席村废钢量(WGFG_QXC,DECIMAL,0)
+     */
+    private String wgfgQxc;
+
+    /**
+     * 席村返回废钢量(XCF,DECIMAL,0)
+     */
+    private String xcf;
+
+    /**
+     * 记事(MEMO,VARCHAR,500)
+     */
+    private String memo;
+
+    /**
+     * 操作人(CZR,VARCHAR,10)
+     */
+    private String czr;
+
+    /**
+     * 操作时间(CZSJ,TIMESTAMP,7)
+     */
+    private Date czsj;
+
+    /**
+     * 外销钢坯产量(WXGPCL,DECIMAL,0)
+     */
+    private String wxgpcl;
+
+    /**
+     * 冷料比(LLB,DECIMAL,0)
+     */
+    private Short llb;
+
+}

+ 15 - 0
src/main/java/com/steerinfo/weight/lgmes/service/ILgReportService.java

@@ -0,0 +1,15 @@
+package com.steerinfo.weight.lgmes.service;
+
+import com.steerinfo.weight.lgmes.model.EmsScqkLg;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface ILgReportService {
+
+    /**
+     *     获取每日生产日报
+     */
+    public List<EmsScqkLg> QueryReportByTime(@Param("clock")String clock);
+
+}

+ 22 - 0
src/main/java/com/steerinfo/weight/lgmes/service/impl/LgReportImpl.java

@@ -0,0 +1,22 @@
+package com.steerinfo.weight.lgmes.service.impl;
+import com.steerinfo.config.dynamicDataSource.TargetDataSource;
+import com.steerinfo.weight.lgmes.mapper.LgReportMapper;
+import com.steerinfo.weight.lgmes.model.EmsScqkLg;
+import com.steerinfo.weight.lgmes.service.ILgReportService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+@Service("lgReportService")
+public class LgReportImpl implements ILgReportService {
+
+    @Autowired
+    private LgReportMapper lgReportMapper;
+
+    @TargetDataSource(name = "ds2")
+    public List<EmsScqkLg> QueryReportByTime(String clock) {
+        return lgReportMapper.QueryReportByTime(clock);
+    }
+
+}

+ 5 - 1
src/main/resources/bootstrap.properties

@@ -1,4 +1,4 @@
-#Á¬½Ó³ØµÄÅäÖÃÐÅÏ¢
+#\uFFFD\uFFFD\uFFFD\u04F3\u0635\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\uFFFD\u03E2
 spring.druid.jdbcUrl1=jdbc:oracle:thin:@192.168.0.247:1521:antwms
 spring.druid.username1=atwms
 spring.druid.password1=atwms
@@ -11,6 +11,10 @@ spring.druid.jdbcUrl3=jdbc:sqlserver://192.168.0.224:1433;DatabaseName=bfgl_001_
 spring.druid.username3=meiqihyd
 spring.druid.password3=atjt@123
 
+spring.druid.jdbcUrl4=jdbc:sqlserver://192.168.0.224:1433;DatabaseName=bfgl_001_2018
+spring.druid.username4=nengyuanjiankong
+spring.druid.password4=nyjk_123
+
 ##oracle
 spring.druid.driver-class-name-oracle=oracle.jdbc.driver.OracleDriver
 ##sqlserver