Przeglądaj źródła

1.炼钢数据日产量

QuietShadow 3 lat temu
rodzic
commit
7cb44e9024

+ 31 - 7
src/main/java/com/steerinfo/ems/emsscqklg/mapper/EmsScqkLgMapper.xml

@@ -22,15 +22,16 @@
     <result column="CZSJ" jdbcType="TIMESTAMP" property="czsj" />
     <result column="WXGPCL" jdbcType="DECIMAL" property="wxgpcl" />
     <result column="LLB" jdbcType="DECIMAL" property="llb" />
+    <result column="GSRCL" jdbcType="DECIMAL" property="gsrcl" />
   </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
+    WGFG_JFGK, WGFG_QXC, XCF, MEMO, CZR, CZSJ, WXGPCL, LLB, GSRCL
   </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
+    t.LLB, t.GSRCL
   </sql>
   <sql id="select">
     SELECT <include refid="columns"/> FROM EMS_SCQK_LG
@@ -100,6 +101,9 @@
       <if test="llb != null">
         and LLB = #{llb}
       </if>
+      <if test="gsrcl != null">
+        and GSRCL = #{gsrcl}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -164,6 +168,9 @@
       <if test="llb != null">
         and LLB = #{llb}
       </if>
+      <if test="gsrcl != null">
+        and GSRCL = #{gsrcl}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.util.Date">
@@ -230,6 +237,9 @@
       <if test="llb != null">
         or LLB = #{llb}
       </if>
+    <if test="gsrcl != null">
+      or GSRCL = #{gsrcl}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
     insert into EMS_SCQK_LG (DATES, RCL, JTSL, 
@@ -238,14 +248,14 @@
       FGZL_WG, LLDLYL, WGFG_JFGK, 
       WGFG_QXC, XCF, MEMO, 
       CZR, CZSJ, WXGPCL, 
-      LLB)
+      LLB,GSRCL)
     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})
+      #{llb,jdbcType=DECIMAL},#{gsrcl,jdbcType=DECIMAL})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
     insert into EMS_SCQK_LG
@@ -310,6 +320,9 @@
       <if test="llb != null">
         LLB,
       </if>
+      <if test="gsrcl != null">
+        GSRCL,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="dates != null">
@@ -372,6 +385,9 @@
       <if test="llb != null">
         #{llb,jdbcType=DECIMAL},
       </if>
+      <if test="gsrcl != null">
+        #{gsrcl,jdbcType=DECIMAL},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
@@ -394,7 +410,8 @@
       CZR = #{czr,jdbcType=VARCHAR},
       CZSJ = #{czsj,jdbcType=TIMESTAMP},
       WXGPCL = #{wxgpcl,jdbcType=DECIMAL},
-      LLB = #{llb,jdbcType=DECIMAL}
+      LLB = #{llb,jdbcType=DECIMAL},
+      GSRCL = #{gsrcl,jdbcType=DECIMAL}
     where DATES = #{dates,jdbcType=TIMESTAMP}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.emsscqklg.model.EmsScqkLg">
@@ -457,6 +474,9 @@
       <if test="llb != null">
         LLB = #{llb,jdbcType=DECIMAL},
       </if>
+      <if test="gsrcl != null">
+        GSRCL = #{gsrcl,jdbcType=DECIMAL},
+      </if>
     </set>
     where DATES = #{dates,jdbcType=TIMESTAMP}
   </update>
@@ -481,7 +501,7 @@
       FGZL_WG, LLDLYL, WGFG_JFGK, 
       WGFG_QXC, XCF, MEMO, 
       CZR, CZSJ, WXGPCL, 
-      LLB)
+      LLB, GSRCL)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.dates,jdbcType=TIMESTAMP}, 
@@ -491,7 +511,7 @@
       #{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  
+      #{item.llb,jdbcType=DECIMAL}, #{item.gsrcl,jdbcType=DECIMAL} from dual
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -577,6 +597,10 @@
        <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
           when #{item.dates,jdbcType=TIMESTAMP} then #{item.llb,jdbcType=DECIMAL}
        </foreach>
+    ,GSRCL=
+    <foreach collection="list" item="item" index="index" separator=" " open="case DATES" close="end">
+      when #{item.dates,jdbcType=TIMESTAMP} then #{item.gsrcl,jdbcType=DECIMAL}
+    </foreach>
      where DATES in 
      <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
     #{item.dates,jdbcType=TIMESTAMP}

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

@@ -129,6 +129,12 @@ public class EmsScqkLg implements IBasePO<Date> {
     @ApiModelProperty(value="冷料比",required=false)
     private BigDecimal llb;
 
+    /**
+     * 冷料比(LLB,DECIMAL,0)
+     */
+    @ApiModelProperty(value="钢水日产量",required=false)
+    private BigDecimal gsrcl;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -301,6 +307,14 @@ public class EmsScqkLg implements IBasePO<Date> {
         this.llb = llb;
     }
 
+    public BigDecimal getGsrcl() {
+        return gsrcl;
+    }
+
+    public void setGsrcl(BigDecimal gsrcl) {
+        this.gsrcl = gsrcl;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -327,6 +341,7 @@ public class EmsScqkLg implements IBasePO<Date> {
         sb.append(", czsj=").append(czsj);
         sb.append(", wxgpcl=").append(wxgpcl);
         sb.append(", llb=").append(llb);
+        sb.append(", gsrcl=").append(gsrcl);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

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

@@ -6,6 +6,7 @@ import com.steerinfo.ems.dzmaterialsf.service.IDzMaterialSfService;
 import com.steerinfo.ems.emsetiming.service.IEmsETimingService;
 import com.steerinfo.ems.emsgmpcjh.service.IEmsGmPcJhService;
 import com.steerinfo.ems.emsscqklg.service.IEmsScqkLgService;
+import com.steerinfo.ems.emsscqklg.service.ILgRealService;
 import com.steerinfo.ems.emswaterrealtime.service.IEmsWaterRealtimeService;
 import com.steerinfo.ems.ifemsmesactitem.service.IIfEmsMesActitemService;
 import com.steerinfo.ems.ifmesemsproductorder.service.IIfMesEmsProductorderService;
@@ -44,8 +45,10 @@ import org.springframework.scheduling.support.CronTrigger;
 import org.springframework.stereotype.Service;
 
 import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ScheduledFuture;
 
@@ -117,6 +120,8 @@ public class SpringCronTask implements SchedulingConfigurer{
 	IRttableService rttableService;
 	@Autowired
 	IEmsScqkLgService emsScqkLgService;
+	@Autowired
+	ILgRealService lgRealService;
 	/**
 	 * SchedulingConfigurer接口的方法实现,加载后自动运行
 	 */
@@ -300,7 +305,16 @@ public class SpringCronTask implements SchedulingConfigurer{
 					 dzMaterialSfService.dataGeneration();
 					 emsScqkLgService.dateGenerate();
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
+				 } else if (taskId.equalsIgnoreCase("124")) {
+				 // 每10秒获取一次炼钢实时数据传入mosaic
+				 long start = System.currentTimeMillis();
+				 try {
+					 lgRealService.QueryLgReals();
+				 } catch (AxisFault e) {
+					 e.printStackTrace();
 				 }
+				 logger.info("定时任务"+taskId+"执行时长:" + (System.currentTimeMillis() - start)/1000 + "秒");
+				}
 //				 else if (taskId.equalsIgnoreCase("124")) {
 //					 Date now = new Date();
 //					 SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");