Przeglądaj źródła

1.mosaic水数据对接

QuietShadow 3 lat temu
rodzic
commit
bfbf2033b6
33 zmienionych plików z 1435 dodań i 1770 usunięć
  1. 25 0
      pom.xml
  2. 108 7
      src/main/java/com/steerinfo/ems/emswaihoursumtab1/mapper/EmsWAiHourSumTab1Mapper.xml
  3. 62 2
      src/main/java/com/steerinfo/ems/emswaihoursumtab1/model/EmsWAiHourSumTab1.java
  4. 567 498
      src/main/java/com/steerinfo/ems/emswaihoursumtab1org/mapper/EmsWAiHourSumTab1OrgMapper.xml
  5. 63 2
      src/main/java/com/steerinfo/ems/emswaihoursumtab1org/model/EmsWAiHourSumTab1Org.java
  6. 12 6
      src/main/java/com/steerinfo/ems/emswaterrealtime/controller/EmsWaterRealtimeController.java
  7. 2 0
      src/main/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.java
  8. 22 2
      src/main/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.xml
  9. 15 0
      src/main/java/com/steerinfo/ems/emswaterrealtime/model/EmsWaterRealtime.java
  10. 3 0
      src/main/java/com/steerinfo/ems/emswaterrealtime/service/IEmsWaterRealtimeService.java
  11. 123 5
      src/main/java/com/steerinfo/ems/emswaterrealtime/service/impl/EmsWaterRealtimeServiceImpl.java
  12. 6 5
      src/main/java/com/steerinfo/ems/ifmesemsswapfile/service/impl/IfMesEmsSwapfileServiceImpl.java
  13. 1 1
      src/main/java/com/steerinfo/ems/trmlocation/mapper/TRmLocationMapper.xml
  14. 6 8
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/controller/TRmWorkprocMaterialValueController.java
  15. 34 25
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.java
  16. 61 5
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.xml
  17. 58 0
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/model/TRmWorkprocMaterialValue.java
  18. 15 2
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/ITRmWorkprocMaterialValueService.java
  19. 65 1
      src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/impl/TRmWorkprocMaterialValueServiceImpl.java
  20. 7 7
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/controller/TRmWorkprocProductValueController.java
  21. 8 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.java
  22. 14 1
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.xml
  23. 14 0
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/ITRmWorkprocProductValueService.java
  24. 74 9
      src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/impl/TRmWorkprocProductValueServiceImpl.java
  25. 55 25
      src/main/java/com/steerinfo/task/SpringCronTask.java
  26. 6 1
      src/main/resources/application.yml
  27. 9 9
      src/main/resources/bootstrap.yml
  28. 0 110
      src/test/java/com/steerinfo/ems/emswaterrealtime/controller/EmsWaterRealtimeController.java
  29. 0 10
      src/test/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.java
  30. 0 622
      src/test/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.xml
  31. 0 348
      src/test/java/com/steerinfo/ems/emswaterrealtime/model/EmsWaterRealtime.java
  32. 0 23
      src/test/java/com/steerinfo/ems/emswaterrealtime/service/IEmsWaterRealtimeService.java
  33. 0 36
      src/test/java/com/steerinfo/ems/emswaterrealtime/service/impl/EmsWaterRealtimeServiceImpl.java

+ 25 - 0
pom.xml

@@ -109,6 +109,31 @@
 <!--			<artifactId>org.apache.poi.xwpf.converter.xhtml</artifactId>-->
 <!--			<version>1.0.6</version>-->
 <!--		</dependency>-->
+		<dependency>
+		<groupId>com.mosalc</groupId>
+		<artifactId>mswebservice</artifactId>
+		<version>1.0.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.axis2</groupId>
+			<artifactId>axis2-kernel</artifactId>
+			<version>1.8.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.axis2</groupId>
+			<artifactId>axis2-adb</artifactId>
+			<version>1.8.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.axis2</groupId>
+			<artifactId>axis2-transport-local</artifactId>
+			<version>1.8.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.axis2</groupId>
+			<artifactId>axis2-transport-http</artifactId>
+			<version>1.8.0</version>
+		</dependency>
 	</dependencies>
 
 	<build>

+ 108 - 7
src/main/java/com/steerinfo/ems/emswaihoursumtab1/mapper/EmsWAiHourSumTab1Mapper.xml

@@ -105,6 +105,10 @@
     <result column="TAG100" jdbcType="FLOAT" property="tag100" />
     <result column="TAG101" jdbcType="FLOAT" property="tag101" />
     <result column="TAG45" jdbcType="FLOAT" property="tag45" />
+    <result column="TAG102" jdbcType="FLOAT" property="tag102" />
+    <result column="TAG103" jdbcType="FLOAT" property="tag103" />
+    <result column="TAG104" jdbcType="FLOAT" property="tag104" />
+    <result column="TAG105" jdbcType="FLOAT" property="tag105" />
   </resultMap>
   <sql id="columns">
     CLOCK, INSERT_TIME, TAG1, TAG2, TAG3, TAG4, TAG5, TAG6, TAG7, TAG8, TAG9, TAG10, 
@@ -115,7 +119,7 @@
     TAG60, TAG61, TAG62, TAG63, TAG64, TAG65, TAG66, TAG67, TAG68, TAG69, TAG70, TAG71, 
     TAG72, TAG73, TAG74, TAG75, TAG76, TAG77, TAG78, TAG79, TAG80, TAG81, TAG82, TAG83, 
     TAG84, TAG85, TAG86, TAG87, TAG88, TAG89, TAG90, TAG91, TAG92, TAG93, TAG94, TAG95, 
-    TAG96, TAG97, TAG98, TAG99, TAG100, TAG101, TAG45
+    TAG96, TAG97, TAG98, TAG99, TAG100, TAG101, TAG45, TAG102, TAG103, TAG104, TAG105
   </sql>
   <sql id="columns_alias">
     t.CLOCK, t.INSERT_TIME, t.TAG1, t.TAG2, t.TAG3, t.TAG4, t.TAG5, t.TAG6, t.TAG7, t.TAG8, 
@@ -129,7 +133,7 @@
     t.TAG74, t.TAG75, t.TAG76, t.TAG77, t.TAG78, t.TAG79, t.TAG80, t.TAG81, t.TAG82, 
     t.TAG83, t.TAG84, t.TAG85, t.TAG86, t.TAG87, t.TAG88, t.TAG89, t.TAG90, t.TAG91, 
     t.TAG92, t.TAG93, t.TAG94, t.TAG95, t.TAG96, t.TAG97, t.TAG98, t.TAG99, t.TAG100, 
-    t.TAG101, t.TAG45
+    t.TAG101, t.TAG45, t.TAG102, t.TAG103, t.TAG104, t.TAG105
   </sql>
   <sql id="select">
     SELECT <include refid="columns"/> FROM EMS_W_AI_HOUR_SUM_TAB1
@@ -445,6 +449,18 @@
       <if test="tag45 != null">
         and TAG45 = #{tag45}
       </if>
+      <if test="tag102 != null">
+        and TAG102 = #{tag102}
+      </if>
+      <if test="tag103 != null">
+        and TAG103 = #{tag103}
+      </if>
+      <if test="tag104 != null">
+        and TAG104 = #{tag104}
+      </if>
+      <if test="tag105 != null">
+        and TAG105 = #{tag105}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -755,6 +771,18 @@
       <if test="tag45 != null">
         and TAG45 = #{tag45}
       </if>
+      <if test="tag102 != null">
+        and TAG102 = #{tag102}
+      </if>
+      <if test="tag103 != null">
+        and TAG103 = #{tag103}
+      </if>
+      <if test="tag104 != null">
+        and TAG104 = #{tag104}
+      </if>
+      <if test="tag105 != null">
+        and TAG105 = #{tag105}
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -1070,6 +1098,18 @@
       <if test="tag45 != null">
         or TAG45 = #{tag45}
       </if>
+    <if test="tag102 != null">
+      or TAG102 = #{tag102}
+    </if>
+    <if test="tag103 != null">
+      or TAG103 = #{tag103}
+    </if>
+    <if test="tag104 != null">
+      or TAG104 = #{tag104}
+    </if>
+    <if test="tag105 != null">
+      or TAG105 = #{tag105}
+    </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.ems.emswaihoursumtab1.model.EmsWAiHourSumTab1">
     insert into EMS_W_AI_HOUR_SUM_TAB1 (CLOCK, INSERT_TIME, TAG1, 
@@ -1097,7 +1137,7 @@
       TAG87, TAG88, TAG89, TAG90, 
       TAG91, TAG92, TAG93, TAG94, 
       TAG95, TAG96, TAG97, TAG98, 
-      TAG99, TAG100, TAG101, TAG45
+      TAG99, TAG100, TAG101, TAG45, TAG102, TAG103, TAG104, TAG105
       )
     values (#{clock,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{tag1,jdbcType=FLOAT}, 
       #{tag2,jdbcType=FLOAT}, #{tag3,jdbcType=FLOAT}, #{tag4,jdbcType=FLOAT}, #{tag5,jdbcType=FLOAT}, 
@@ -1124,7 +1164,8 @@
       #{tag87,jdbcType=FLOAT}, #{tag88,jdbcType=FLOAT}, #{tag89,jdbcType=FLOAT}, #{tag90,jdbcType=FLOAT}, 
       #{tag91,jdbcType=FLOAT}, #{tag92,jdbcType=FLOAT}, #{tag93,jdbcType=FLOAT}, #{tag94,jdbcType=FLOAT}, 
       #{tag95,jdbcType=FLOAT}, #{tag96,jdbcType=FLOAT}, #{tag97,jdbcType=FLOAT}, #{tag98,jdbcType=FLOAT}, 
-      #{tag99,jdbcType=FLOAT}, #{tag100,jdbcType=FLOAT}, #{tag101,jdbcType=FLOAT}, #{tag45,jdbcType=FLOAT}
+      #{tag99,jdbcType=FLOAT}, #{tag100,jdbcType=FLOAT}, #{tag101,jdbcType=FLOAT}, #{tag45,jdbcType=FLOAT},
+      #{tag102,jdbcType=FLOAT}, #{tag103,jdbcType=FLOAT}, #{tag104,jdbcType=FLOAT}, #{tag105,jdbcType=FLOAT}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.ems.emswaihoursumtab1.model.EmsWAiHourSumTab1">
@@ -1439,6 +1480,18 @@
       <if test="tag45 != null">
         TAG45,
       </if>
+      <if test="tag102 != null">
+        TAG102,
+      </if>
+      <if test="tag103 != null">
+        TAG103,
+      </if>
+      <if test="tag104 != null">
+        TAG104,
+      </if>
+      <if test="tag105 != null">
+        TAG105,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="clock != null">
@@ -1750,6 +1803,18 @@
       <if test="tag45 != null">
         #{tag45,jdbcType=FLOAT},
       </if>
+      <if test="tag102 != null">
+        #{tag102,jdbcType=FLOAT},
+      </if>
+      <if test="tag103 != null">
+        #{tag103,jdbcType=FLOAT},
+      </if>
+      <if test="tag104 != null">
+        #{tag104,jdbcType=FLOAT},
+      </if>
+      <if test="tag105 != null">
+        #{tag105,jdbcType=FLOAT},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.emswaihoursumtab1.model.EmsWAiHourSumTab1">
@@ -1855,6 +1920,10 @@
       TAG99 = #{tag99,jdbcType=FLOAT},
       TAG100 = #{tag100,jdbcType=FLOAT},
       TAG101 = #{tag101,jdbcType=FLOAT},
+      TAG102 = #{tag102,jdbcType=FLOAT},
+      TAG103 = #{tag103,jdbcType=FLOAT},
+      TAG104 = #{tag104,jdbcType=FLOAT},
+      TAG105 = #{tag105,jdbcType=FLOAT},
       TAG45 = #{tag45,jdbcType=FLOAT}
     where CLOCK = #{clock,jdbcType=VARCHAR}
   </update>
@@ -2167,6 +2236,18 @@
       <if test="tag45 != null">
         TAG45 = #{tag45,jdbcType=FLOAT},
       </if>
+      <if test="tag102 != null">
+     TAG102 = #{tag102,jdbcType=FLOAT},
+      </if>
+      <if test="tag103 != null">
+         TAG103 = #{tag103,jdbcType=FLOAT},
+      </if>
+      <if test="tag104 != null">
+         TAG104 = #{tag104,jdbcType=FLOAT},
+      </if>
+      <if test="tag105 != null">
+         TAG105 = #{tag105,jdbcType=FLOAT},
+      </if>
     </set>
     where CLOCK = #{clock,jdbcType=VARCHAR}
   </update>
@@ -2218,7 +2299,9 @@
       TAG91, TAG92, TAG93, 
       TAG94, TAG95, TAG96, 
       TAG97, TAG98, TAG99, 
-      TAG100, TAG101, TAG45
+      TAG100, TAG101, TAG45,
+      TAG102, TAG103, TAG104,
+      TAG105
       )
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
@@ -2256,8 +2339,10 @@
       #{item.tag91,jdbcType=FLOAT}, #{item.tag92,jdbcType=FLOAT}, #{item.tag93,jdbcType=FLOAT}, 
       #{item.tag94,jdbcType=FLOAT}, #{item.tag95,jdbcType=FLOAT}, #{item.tag96,jdbcType=FLOAT}, 
       #{item.tag97,jdbcType=FLOAT}, #{item.tag98,jdbcType=FLOAT}, #{item.tag99,jdbcType=FLOAT}, 
-      #{item.tag100,jdbcType=FLOAT}, #{item.tag101,jdbcType=FLOAT}, #{item.tag45,jdbcType=FLOAT}
-       from dual  
+      #{item.tag100,jdbcType=FLOAT}, #{item.tag101,jdbcType=FLOAT}, #{item.tag45,jdbcType=FLOAT},
+      #{item.tag102,jdbcType=FLOAT}, #{item.tag103,jdbcType=FLOAT}, #{item.tag104,jdbcType=FLOAT},
+      #{item.tag105,jdbcType=FLOAT}
+       from dual
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -2675,6 +2760,22 @@
        <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
           when #{item.clock,jdbcType=VARCHAR} then #{item.tag45,jdbcType=FLOAT}
        </foreach>
+    ,TAG102=
+    <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
+      when #{item.clock,jdbcType=VARCHAR} then #{item.tag102,jdbcType=FLOAT}
+    </foreach>
+    ,TAG103=
+    <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
+      when #{item.clock,jdbcType=VARCHAR} then #{item.tag103,jdbcType=FLOAT}
+    </foreach>
+    ,TAG104=
+    <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
+      when #{item.clock,jdbcType=VARCHAR} then #{item.tag104,jdbcType=FLOAT}
+    </foreach>
+    ,TAG105=
+    <foreach collection="list" item="item" index="index" separator=" " open="case CLOCK" close="end">
+      when #{item.clock,jdbcType=VARCHAR} then #{item.tag105,jdbcType=FLOAT}
+    </foreach>
      where CLOCK in 
      <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
     #{item.clock,jdbcType=VARCHAR}

+ 62 - 2
src/main/java/com/steerinfo/ems/emswaihoursumtab1/model/EmsWAiHourSumTab1.java

@@ -481,6 +481,14 @@ public class EmsWAiHourSumTab1 implements IBasePO<String> {
 
     @ApiModelProperty(value="",required=false)
     private Double tag100;
+    @ApiModelProperty(value="",required=false)
+    private Double tag102;
+    @ApiModelProperty(value="",required=false)
+    private Double tag103;
+    @ApiModelProperty(value="",required=false)
+    private Double tag104;
+    @ApiModelProperty(value="",required=false)
+    private Double tag105;
 
     /**
      * 8万发电新水使用量(TAG101,FLOAT,126)
@@ -1322,6 +1330,38 @@ public class EmsWAiHourSumTab1 implements IBasePO<String> {
         this.tag101 = tag101;
     }
 
+    public Double getTag102() {
+        return tag102;
+    }
+
+    public void setTag102(Double tag102) {
+        this.tag101 = tag102;
+    }
+
+    public Double getTag103() {
+        return tag103;
+    }
+
+    public void setTag103(Double tag103) {
+        this.tag101 = tag103;
+    }
+
+    public Double getTag104() {
+        return tag104;
+    }
+
+    public void setTag104(Double tag104) {
+        this.tag104 = tag104;
+    }
+
+    public Double getTag105() {
+        return tag105;
+    }
+
+    public void setTag105(Double tag105) {
+        this.tag101 = tag105;
+    }
+
     public Double getTag45() {
         return tag45;
     }
@@ -1439,6 +1479,10 @@ public class EmsWAiHourSumTab1 implements IBasePO<String> {
         sb.append(", tag100=").append(tag100);
         sb.append(", tag101=").append(tag101);
         sb.append(", tag45=").append(tag45);
+        sb.append(", tag102=").append(tag102);
+        sb.append(", tag103=").append(tag103);
+        sb.append(", tag104=").append(tag104);
+        sb.append(", tag105=").append(tag105);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();
@@ -1653,7 +1697,15 @@ public class EmsWAiHourSumTab1 implements IBasePO<String> {
 			this.setTag100(val);
 		} else if (tag.equalsIgnoreCase("tag101")) {
 			this.setTag101(val);
-		}
+		} else if (tag.equalsIgnoreCase("tag102")) {
+            this.setTag102(val);
+        } else if (tag.equalsIgnoreCase("tag103")) {
+            this.setTag103(val);
+        } else if (tag.equalsIgnoreCase("tag104")) {
+            this.setTag104(val);
+        } else if (tag.equalsIgnoreCase("tag105")) {
+            this.setTag105(val);
+        }
     }
     
     /**
@@ -1864,7 +1916,15 @@ public class EmsWAiHourSumTab1 implements IBasePO<String> {
 			return this.getTag100();
 		} else if (tag.equalsIgnoreCase("tag101")) {
 			return this.getTag101();
-		} else {
+		} else if (tag.equalsIgnoreCase("tag102")) {
+            return this.getTag102();
+        } else if (tag.equalsIgnoreCase("tag103")) {
+            return this.getTag103();
+        } else if (tag.equalsIgnoreCase("tag104")) {
+            return this.getTag104();
+        } else if (tag.equalsIgnoreCase("tag105")) {
+            return this.getTag105();
+        } else {
 			return null;
 		}
     }

Plik diff jest za duży
+ 567 - 498
src/main/java/com/steerinfo/ems/emswaihoursumtab1org/mapper/EmsWAiHourSumTab1OrgMapper.xml


+ 63 - 2
src/main/java/com/steerinfo/ems/emswaihoursumtab1org/model/EmsWAiHourSumTab1Org.java

@@ -445,6 +445,47 @@ public class EmsWAiHourSumTab1Org implements IBasePO<String> {
 
     @ApiModelProperty(value="",required=false)
     private Double tag101;
+    @ApiModelProperty(value="",required=false)
+    private Double tag102;
+    @ApiModelProperty(value="",required=false)
+    private Double tag103;
+
+    public Double getTag102() {
+        return tag102;
+    }
+
+    public void setTag102(Double tag102) {
+        this.tag102 = tag102;
+    }
+
+    public Double getTag103() {
+        return tag103;
+    }
+
+    public void setTag103(Double tag103) {
+        this.tag103 = tag103;
+    }
+
+    public Double getTag104() {
+        return tag104;
+    }
+
+    public void setTag104(Double tag104) {
+        this.tag104 = tag104;
+    }
+
+    public Double getTag105() {
+        return tag105;
+    }
+
+    public void setTag105(Double tag105) {
+        this.tag105 = tag105;
+    }
+
+    @ApiModelProperty(value="",required=false)
+    private Double tag104;
+    @ApiModelProperty(value="",required=false)
+    private Double tag105;
 
     private static final long serialVersionUID = 1L;
 
@@ -1391,6 +1432,10 @@ public class EmsWAiHourSumTab1Org implements IBasePO<String> {
         sb.append(", tag99=").append(tag99);
         sb.append(", tag100=").append(tag100);
         sb.append(", tag101=").append(tag101);
+        sb.append(", tag102=").append(tag102);
+        sb.append(", tag103=").append(tag103);
+        sb.append(", tag104=").append(tag104);
+        sb.append(", tag105=").append(tag105);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();
@@ -1605,7 +1650,15 @@ public class EmsWAiHourSumTab1Org implements IBasePO<String> {
 			this.setTag100(val);
 		} else if (tag.equalsIgnoreCase("tag101")) {
 			this.setTag101(val);
-		}
+		} else if (tag.equalsIgnoreCase("tag102")) {
+            this.setTag102(val);
+        } else if (tag.equalsIgnoreCase("tag103")) {
+            this.setTag103(val);
+        } else if (tag.equalsIgnoreCase("tag104")) {
+            this.setTag104(val);
+        } else if (tag.equalsIgnoreCase("tag105")) {
+            this.setTag105(val);
+        }
     }
     
     /**
@@ -1816,7 +1869,15 @@ public class EmsWAiHourSumTab1Org implements IBasePO<String> {
 			return this.getTag100();
 		} else if (tag.equalsIgnoreCase("tag101")) {
 			return this.getTag101();
-		} else {
+		} else if (tag.equalsIgnoreCase("tag102")) {
+            return this.getTag102();
+        } else if (tag.equalsIgnoreCase("tag103")) {
+            return this.getTag103();
+        } else if (tag.equalsIgnoreCase("tag104")) {
+            return this.getTag104();
+        } else if (tag.equalsIgnoreCase("tag105")) {
+            return this.getTag105();
+        } else {
 			return null;
 		}
     }

+ 12 - 6
src/main/java/com/steerinfo/ems/emswaterrealtime/controller/EmsWaterRealtimeController.java

@@ -10,6 +10,7 @@ import com.steerinfo.framework.utils.collection.ListUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import org.apache.axis2.AxisFault;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -113,12 +114,17 @@ public class EmsWaterRealtimeController extends BaseRESTfulController {
     //@RequiresPermissions("emswaterrealtime:delete")
     @GetMapping(value = "/water")//Short
     public int water(){
-        emsWaterRealtimeService.getWaterListByArmMeter();
-         emsWaterRealtimeService.dataGeneration();
-        //emsWaterRealtimeService.getcalpoint();
-        emsWaterRealtimeService.getWaterTenMinutes();
-
-        tRmCalpointService.statHourData();
+        //emsWaterRealtimeService.getWaterListByArmMeter();
+        // emsWaterRealtimeService.dataGeneration();
+        ////emsWaterRealtimeService.getcalpoint();
+        //emsWaterRealtimeService.getWaterTenMinutes();
+        try {
+            emsWaterRealtimeService.getWaterListToMosaic();
+        } catch (AxisFault e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+        //tRmCalpointService.statHourData();
         return 1;
     }
 }

+ 2 - 0
src/main/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.java

@@ -23,4 +23,6 @@ public interface EmsWaterRealtimeMapper extends IBaseMapper<EmsWaterRealtime, St
     int updateWaterTenMinutes(HashMap<String, Object> HashMap);
 
     int updateWaterMinutes(HashMap<String, Object> HashMap);
+
+    List<EmsWaterRealtime> getWaterListToMosaic();
 }

+ 22 - 2
src/main/java/com/steerinfo/ems/emswaterrealtime/mapper/EmsWaterRealtimeMapper.xml

@@ -23,16 +23,17 @@
     <result column="IsStat" jdbcType="CHAR" property="isstat" />
     <result column="DeviceId" jdbcType="VARCHAR" property="deviceid" />
     <result column="ReadTime" jdbcType="TIMESTAMP" property="readtime" />
+    <result column="MOSAICID" jdbcType="VARCHAR" property="mosaicid" />
   </resultMap>
   <sql id="columns">
     MeterId, PhoneNo, AddressCode, M_UserType, M_Type, M_Name, M_DoorNo, M_PipeDn, M_Material, 
     M_Ratio, CreateTime, ForValue, RevValue, PressValue, RealValue, SumValue, CelVal, 
-    NetVal, IsStat, DeviceId, ReadTime
+    NetVal, IsStat, DeviceId, ReadTime, MOSAICID
   </sql>
   <sql id="columns_alias">
     t.MeterId, t.PhoneNo, t.AddressCode, t.M_UserType, t.M_Type, t.M_Name, t.M_DoorNo, 
     t.M_PipeDn, t.M_Material, t.M_Ratio, t.CreateTime, t.ForValue, t.RevValue, t.PressValue, 
-    t.RealValue, t.SumValue, t.CelVal, t.NetVal, t.IsStat, t.DeviceId, t.ReadTime
+    t.RealValue, t.SumValue, t.CelVal, t.NetVal, t.IsStat, t.DeviceId, t.ReadTime, t.MosaicId
   </sql>
   <sql id="select">
     SELECT <include refid="columns"/> FROM EMS_WATER_REALTIME
@@ -673,4 +674,23 @@
       ${sql}
     </set>
   </update>
+  <select id="getWaterListToMosaic" resultMap="BaseResultMap">
+  select ROW_NUMBER() over(order by MeterId asc) as MeterIdNo,MeterId,M_TYPE,SUMVALUE,M_Name,MOSAICID from (
+    select MeterId, M_Name, MOSAICID, ForValue as lj, PressValue as yl,RealValue as ss from EMS_WATER_REALTIME) mytable
+        unpivot(SUMVALUE for M_TYPE in(lj,yl,ss)) a
+  </select>
+  <select id="getDYHWaterListToMosaic" resultMap="BaseResultMap">
+    select ROW_NUMBER() over(order by MeterId asc) as MeterIdNo,MeterId,M_TYPE,SUMVALUE,M_Name from (
+    select  MeterId ,M_Name,
+    CAST(isnull(ForValue,0.00) as nvarchar) as 累计流量,
+    CAST(isnull(PressValue,0.00) as nvarchar) as 压力,
+    CAST(isnull(RealValue,0.00) as nvarchar) as 瞬时流量
+    from ARM_Meter
+    ) mytable
+    unpivot(
+    SUMVALUE for M_TYPE in(
+    累计流量,压力,瞬时流量
+    ))a
+    <!--        FROM Meter_Base.dbo.ARM_Meter-->
+  </select>
 </mapper>

+ 15 - 0
src/main/java/com/steerinfo/ems/emswaterrealtime/model/EmsWaterRealtime.java

@@ -134,6 +134,20 @@ public class EmsWaterRealtime implements IBasePO<String> {
     @ApiModelProperty(value="读取时间",required=false)
     private String readtime;
 
+    /**
+     * MOSAICID(ReadTime,TIMESTAMP,50)
+     */
+    @ApiModelProperty(value="读取时间",required=false)
+    private String mosaicid;
+
+    public String getMosaicid() {
+        return mosaicid;
+    }
+
+    public void setMosaicid(String mosaicid) {
+        this.mosaicid = mosaicid;
+    }
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -341,6 +355,7 @@ public class EmsWaterRealtime implements IBasePO<String> {
         sb.append(", isstat=").append(isstat);
         sb.append(", deviceid=").append(deviceid);
         sb.append(", readtime=").append(readtime);
+        sb.append(", mosaicid=").append(mosaicid);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 3 - 0
src/main/java/com/steerinfo/ems/emswaterrealtime/service/IEmsWaterRealtimeService.java

@@ -2,6 +2,7 @@ package com.steerinfo.ems.emswaterrealtime.service;
 
 import com.steerinfo.ems.emswaterrealtime.model.EmsWaterRealtime;
 import com.steerinfo.framework.service.IBaseService;
+import org.apache.axis2.AxisFault;
 
 import java.util.List;
 
@@ -27,4 +28,6 @@ public interface IEmsWaterRealtimeService extends IBaseService<EmsWaterRealtime,
     void getcalpoint();
 
     void getWaterTenMinutes();
+
+    void getWaterListToMosaic() throws AxisFault;
 }

+ 123 - 5
src/main/java/com/steerinfo/ems/emswaterrealtime/service/impl/EmsWaterRealtimeServiceImpl.java

@@ -1,5 +1,6 @@
 package com.steerinfo.ems.emswaterrealtime.service.impl;
 
+import com.client.MswebserviceStub;
 import com.steerinfo.auth.utils.JwtUtil;
 import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.emswaterrealtime.mapper.EmsWaterRealtimeMapper;
@@ -13,11 +14,13 @@ import com.steerinfo.framework.datasource.DataSourceKey;
 import com.steerinfo.framework.datasource.TargetDataSource;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.apache.axis2.AxisFault;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.rmi.RemoteException;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -69,7 +72,7 @@ public class EmsWaterRealtimeServiceImpl extends BaseServiceImpl<EmsWaterRealtim
             // emsWaterRealtimeMapper.selectByPrimaryKey("1");//.getWaterListByArmMeter();
             //List<EmsWaterRealtime> emsWaterRealtimeList = getWaterListByArmMeter();
             for (EmsWaterRealtime emsWaterRealtime : emsWaterRealtimeList){
-                emsWaterRealtime.setReadtime(DateUtils.dateStr(new Date(),"yyyy-MM-dd hh:mm:ss"));
+                emsWaterRealtime.setReadtime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
                 model = emsWaterRealtimeMapper.selectByPrimaryKey(emsWaterRealtime.getMeterid());
                 if(model !=null){
                     emsWaterRealtimeMapper.updateByPrimaryKey(emsWaterRealtime);
@@ -79,7 +82,7 @@ public class EmsWaterRealtimeServiceImpl extends BaseServiceImpl<EmsWaterRealtim
                     addSize+= emsWaterRealtimeMapper.insert(emsWaterRealtime);
                 }
             }
-            String clock = DateUtils.dateStr(new Date(),"yyyy-MM-dd hh:mm:ss");
+            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<EmsWaterRealtime> emsWaterRealtimeList = emsWaterRealtimeMapper.getWaterTenMinutes();
@@ -114,8 +117,8 @@ public class EmsWaterRealtimeServiceImpl extends BaseServiceImpl<EmsWaterRealtim
         try {
             EmsWaterRealtime model;
             // emsWaterRealtimeMapper.selectByPrimaryKey("1");//.getWaterListByArmMeter();
-            String clock1 = DateUtils.dateStr(new Date(),"yyyy-MM-dd hh:mm:ss");
-            String clock2 = DateUtils.dateStr(new Date(),"yyyy-MM-dd hh:mm:ss");
+            String clock1 = DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss");
+            String clock2 = DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss");
             HashMap<String,Object> hashMap = new HashMap<String,Object>();
             hashMap.put("clock1",clock1);
             hashMap.put("clock2",clock2);
@@ -132,7 +135,7 @@ public class EmsWaterRealtimeServiceImpl extends BaseServiceImpl<EmsWaterRealtim
                 String sql = ","+tag + " = " + "'" + emsWaterRealtime.getSumvalue() + "'";
                 sub.append(sql);
             }
-            clock2 = DateUtils.dateStr(new Date(),"yyyy-MM-dd hh:mm:ss");
+            clock2 = DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss");
             hashMap.put("table",table);
             hashMap.put("clock2",clock2);
             hashMap.put("sql",sub.toString());
@@ -146,6 +149,121 @@ public class EmsWaterRealtimeServiceImpl extends BaseServiceImpl<EmsWaterRealtim
         //return addSize+updateSize;
     }
 
+    static MswebserviceStub.UserInfo userInfo = new MswebserviceStub.UserInfo();
+
+    /***
+     * 从大用户水系统获取数据到Mosaic
+     */
+    @Override
+    public void getWaterListToMosaic() {
+        List<EmsWaterRealtime> emsWaterRealtimeList = emsWaterRealtimeMapper.getWaterListToMosaic();
+        MswebserviceStub stub;
+        userInfo = new MswebserviceStub.UserInfo();
+        //0x0069:032e:0 瞬时流量
+        //0x020b:483d:0 累计流量
+        //0x006b:41df:0 压力
+        final String SS="0x0069:032e:0";
+        final String LJ="0x020b:483d:0";
+        final String YL="0x006b:41df:0";
+        try {
+         stub=new MswebserviceStub("http://172.16.90.229:9900");
+        userInfo.setMdbName("scada");
+        userInfo.setMdbInstance("master");
+        userInfo.setComText("");
+        userInfo.setMIP("");
+        userInfo.setMUserID("");
+        userInfo.setMUserName("mosaic");
+        userInfo.setMUserPass("mosaic");
+        // Open
+        SetOpenConnSample(stub);
+        for(EmsWaterRealtime emswater:emsWaterRealtimeList) {
+            //Equip:Desig='11KV变电站' and Quantity:Name='累计流量'
+            if(emswater.getMosaicid()==null||"".equals(emswater.getMosaicid()))
+            {
+                continue;
+            }
+            String sql="update Ana set Eng='"+emswater.getSumvalue()+"' where Equip="+emswater.getMosaicid()+"";
+           switch (emswater.getmType()){
+               case "SS":
+                   sql+=" AND Quantity="+SS+"";
+               break;
+               case "YL":
+                   sql+=" AND Quantity="+YL+"";
+               break;
+               default:
+                   sql+=" AND Quantity="+LJ+"";
+               break;
+            }
+            // Update
+            SetUpdateValue(stub,sql);
+        }
+
+        // Close
+        SetCloseConnSample(stub);
+    } catch (AxisFault e) {
+        // TODO Auto-generated catch block
+        e.printStackTrace();
+    }
+
+    }
+
+    private static void SetOpenConnSample(MswebserviceStub stub) {
+        try {
+            MswebserviceStub.WSConnectOpen openReq = new MswebserviceStub.WSConnectOpen();
+            MswebserviceStub.WSConnectOpenResponse openResp = null;
+            // Open
+            openReq.setUserInfo(userInfo);
+
+            openResp = stub.wSConnectOpen(openReq);
+            System.out.println("打开mosaic链接成功");
+            // Save UserID
+            userInfo.setMUserID(openResp.getId());
+
+        } catch (RemoteException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            System.out.println("打开mosaic链接失败");
+        }
+
+    }
+
+    // 更新点的值
+    private static void SetUpdateValue(MswebserviceStub stub,String sql) {
+        // 0x0002:5365:2e
+        MswebserviceStub.DataResult queryData = new MswebserviceStub.DataResult();
+
+        try {
+
+            //String sql = "update Ana set(Eng,User)=(100,0x0002:5365:2e) where AltId='PUMP1_SPEED' ";
+            // Dig表为 update Dig set(Cs,User)=(1,0x0002:5365:2e) update Ana set Eng='1812482' where Equip='0x06f4:0bfe:1e' AND Quantity='0x006a:489c:22'
+
+            userInfo.setComText(sql);
+            MswebserviceStub.WSQueryExecute query = new MswebserviceStub.WSQueryExecute();
+            query.setUserInfo(userInfo);
+
+            queryData = stub.wSQueryExecute(query);
+            //System.out.println(queryData.getData());
+
+        } catch (RemoteException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
+    // 关闭mosaic链接
+    private static void SetCloseConnSample(MswebserviceStub stub) {
+        MswebserviceStub.WSConnectClose closeReq = new MswebserviceStub.WSConnectClose();
+        closeReq.setUserInfo(userInfo);
+        try {
+            stub.wSConnectClose(closeReq);
+            userInfo = null;
+            System.out.println("关闭mosaic链接成功");
+        } catch (RemoteException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+    }
+
     @Autowired
     IFormulaService formulaService;
 

+ 6 - 5
src/main/java/com/steerinfo/ems/ifmesemsswapfile/service/impl/IfMesEmsSwapfileServiceImpl.java

@@ -173,7 +173,7 @@ public class IfMesEmsSwapfileServiceImpl extends BaseServiceImpl<IfMesEmsSwapfil
 		for (LgWeight lgWeight : lgWeights) {
 			IfMesEmsSwapfile model = new IfMesEmsSwapfile();
 			model.setType(lgWeight.getType());
-			model.setWorks("1036LG1");
+			model.setWorks("AT2004");
 			model.setProdline("1036LG1");
 			model.setMaterialcode(lgWeight.getMaterialcode());
 			model.setProdate(lgWeight.getDate());
@@ -206,7 +206,8 @@ public class IfMesEmsSwapfileServiceImpl extends BaseServiceImpl<IfMesEmsSwapfil
 		for (LgWeight lgWeight : lgWeights) {
 			IfMesEmsSwapfile model = new IfMesEmsSwapfile();
 			model.setType(lgWeight.getType());
-			model.setWorks("1036LG1");
+			model.setWorks("AT2004");
+			model.setProdline("1036LG1");
 			model.setMaterialcode(lgWeight.getMaterialcode());
 			model.setProdate(lgWeight.getDate());
 			model.setMaterialname(lgWeight.getMaterialname());
@@ -290,8 +291,8 @@ public class IfMesEmsSwapfileServiceImpl extends BaseServiceImpl<IfMesEmsSwapfil
 				model.setMaterialcode(tRmWorkprocProduct.getMesMaterialcode());
 				model.setUnit(tRmWorkprocProduct.getUnitid());
 				model.setQty(new BigDecimal(0));
-				// DateUtils.dateStr(new Date(),"yyyy-MM-dd hh-mm-ss")
-				model.setCreatetime(DateUtils.dateStr(new Date(), "yyyy-MM-dd hh-mm-ss"));
+				// DateUtils.dateStr(new Date(),"yyyy-MM-dd HH-mm-ss")
+				model.setCreatetime(DateUtils.dateStr(new Date(), "yyyy-MM-dd HH:mm:ss"));
 				model.setStatus("0");
 				model.setFid(tRmWorkprocProduct.getProductid() + tRmWorkprocProduct.getMesProdline() + DateUtils.dateStr(new Date(), "yyyyMMdd"));
 				addSize += ifmesemsswapfilemapper.insert(model);
@@ -309,7 +310,7 @@ public class IfMesEmsSwapfileServiceImpl extends BaseServiceImpl<IfMesEmsSwapfil
 				model.setMaterialcode(tRmWorkprocMaterial.getMesMaterialcode());
 				model.setUnit(tRmWorkprocMaterial.getUnitid());
 				model.setQty(new BigDecimal(0));
-				model.setCreatetime(DateUtils.dateStr(new Date(), "yyyy-MM-dd hh-mm-ss"));
+				model.setCreatetime(DateUtils.dateStr(new Date(), "yyyy-MM-dd HH:mm:ss"));
 				model.setStatus("0");
 				model.setFid(tRmWorkprocMaterial.getMaterialid() + tRmWorkprocMaterial.getMesProdline() + DateUtils.dateStr(new Date(), "yyyyMMdd"));
 				addSize += ifmesemsswapfilemapper.insert(model);

+ 1 - 1
src/main/java/com/steerinfo/ems/trmlocation/mapper/TRmLocationMapper.xml

@@ -243,6 +243,6 @@
     select ID, NAME from T_RM_LOCATION order by NAME
   </select>
   <select id="getMaxId" resultType="java.lang.String">
-    select MAX(SUBSTR(ID, LENGTH(ID) - 1)) from T_RM_LOCATION
+    select MAX(TO_NUMBER(SUBSTR(ID,3))) from T_RM_LOCATION
   </select>
 </mapper>

+ 6 - 8
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/controller/TRmWorkprocMaterialValueController.java

@@ -1,24 +1,20 @@
 package com.steerinfo.ems.trmworkprocmaterialvalue.controller;
 
-import com.steerinfo.framework.controller.BaseRESTfulController;
-import com.steerinfo.framework.controller.RESTfulResult;
-import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.ems.formula.service.IFormulaService;
 import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
 import com.steerinfo.ems.trmworkprocmaterial.mapper.TRmWorkprocMaterialMapper;
 import com.steerinfo.ems.trmworkprocmaterial.model.TRmWorkprocMaterial;
-import com.steerinfo.ems.trmworkprocmaterialvalue.mapper.TRmWorkprocMaterialValueMapper;
 import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
 import com.steerinfo.ems.trmworkprocmaterialvalue.service.ITRmWorkprocMaterialValueService;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
 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.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -241,10 +237,12 @@ public class TRmWorkprocMaterialValueController extends BaseRESTfulController {
 		if (timegranid==null || timegranid.isEmpty()) {
     		return failed(null, "请传入时间粒度");
     	}
-		ifMesEmsSwapfileService.synchronousMesAnEmsData();
+		//ifMesEmsSwapfileService.synchronousMesAnEmsData();
 		tRmWorkprocMaterialValueService.synchronousData();
 		tRmWorkprocMaterialValueService.synchronousData4();
 		tRmWorkprocMaterialValueService.synchronousData5();
+        //根据报表中的原料数据生成
+        tRmWorkprocMaterialValueService.getReportValue(parmas);
 		parmas.put("useflag", "1");
 		// 查询需要统计的计量点信息
 		List<TRmWorkprocMaterial> l = tRmWorkprocMaterialMapper.selectByParameters(parmas);

+ 34 - 25
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.java

@@ -2,64 +2,73 @@ package com.steerinfo.ems.trmworkprocmaterialvalue.mapper;
 
 import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
 import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
 
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.ibatis.annotations.Mapper;
-
 @Mapper
 public interface TRmWorkprocMaterialValueMapper extends IBaseMapper<TRmWorkprocMaterialValue, HashMap<String, Object>> {
-	/**
-	 * 获得工序与原材料数据维护数据(能源平衡管理-工序与原材料数据维护页面,查询数据)
-	 * 
-	 * @return
-	 */
-	List<Map<String, Object>> getWorkprocMaterialDetail(Map<String, Object> parameters);
+    /**
+     * 获得工序与原材料数据维护数据(能源平衡管理-工序与原材料数据维护页面,查询数据)
+     *
+     * @return
+     */
+    List<Map<String, Object>> getWorkprocMaterialDetail(Map<String, Object> parameters);
 
-	/**
-	 * 根据联合主键查询对象
-	 * 
-	 * @param
-	 */
-	TRmWorkprocMaterialValue selectByUPrimaryKey(TRmWorkprocMaterialValue tRmWorkprocMaterialValue);
+    /**
+     * 根据联合主键查询对象
+     *
+     * @param
+     */
+    TRmWorkprocMaterialValue selectByUPrimaryKey(TRmWorkprocMaterialValue tRmWorkprocMaterialValue);
 
-	TRmWorkprocMaterialValue selectByPrimaryKey(HashMap<String, Object> m);
+    TRmWorkprocMaterialValue selectByPrimaryKey(HashMap<String, Object> m);
 
-	int updateValue(HashMap<String, Object> m);
+    int updateValue(HashMap<String, Object> m);
 
-	int insertValue(HashMap<String, Object> m);
+    int insertValue(HashMap<String, Object> m);
 
-	int deleteByPrimaryKey(HashMap<String, Object> m);
+    int deleteByPrimaryKey(HashMap<String, Object> m);
 
     /**
      * 获取累计值
+     *
      * @param params
      * @return
      */
-	Double getSumvalue(HashMap<String,Object> params);
+    Double getSumvalue(HashMap<String, Object> params);
 
     /**
      * 获取月实绩产量和累计产量
+     *
      * @param params
      * @return
      */
-    Map<String,Object>getMonthOutPut(HashMap<String,Object> params);
+    Map<String, Object> getMonthOutPut(HashMap<String, Object> params);
 
     /**
      * 获取项目值与数据来源FID(从IF_MES_EMS_SWAPFILE表,status=1的已处理数据)
-     * 
+     *
      * @param params
      * @return
      */
-    Map<String,Object> getItemval(HashMap<String,Object> params);
-    
+    Map<String, Object> getItemval(HashMap<String, Object> params);
+
     /**
      * 获取项目值与数据来源FID(从IF_MES_EMS_SWAPFILE表,所有数据)
-     * 
+     *
+     * @param params
+     * @return
+     */
+    Map<String, Object> getAllItemval(HashMap<String, Object> params);
+
+    /**
+     * 从报表视图(V_INPUTOUTPUT)获取数据
+     *
      * @param params
      * @return
      */
-    Map<String,Object> getAllItemval(HashMap<String,Object> params);
+    List<TRmWorkprocMaterialValue> getReportValue(HashMap<String, Object> params);
 }

+ 61 - 5
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/mapper/TRmWorkprocMaterialValueMapper.xml

@@ -14,6 +14,10 @@
     <result column="UCVALUE" jdbcType="DECIMAL" property="ucvalue" />
     <result column="SUMUCVALUE" jdbcType="DECIMAL" property="sumucvalue" />
     <result column="BZ" jdbcType="VARCHAR" property="bz" />
+    <result column="UPTIME" jdbcType="TIMESTAMP" property="uptime" />
+    <result column="UPMAN" jdbcType="VARCHAR" property="upman" />
+    <result column="UPDATETIME" jdbcType="VARCHAR" property="updatetime" />
+    <result column="USERID" jdbcType="VARCHAR" property="userid" />
   </resultMap>
   <delete id="deleteByPrimaryKey" parameterType="map">
     delete from T_RM_WORKPROC_MATERIAL_VALUE
@@ -62,12 +66,14 @@
     insert into T_RM_WORKPROC_MATERIAL_VALUE (CLOCK, TIMEGRANID, ITEMID, 
       SUMVALUE, ISLOCK, LOCKID, 
       ACTUALVALUE, CORRECTVALUE, APPORTVALUE, 
-      UCVALUE, SUMUCVALUE, BZ
+      UCVALUE, SUMUCVALUE, BZ, UPTIME, UPMAN, USERID, UPDATETIME
       )
     values (#{clock,jdbcType=VARCHAR}, #{timegranid,jdbcType=VARCHAR}, #{itemid,jdbcType=VARCHAR}, 
       #{sumvalue,jdbcType=DECIMAL}, #{islock,jdbcType=VARCHAR}, #{lockid,jdbcType=VARCHAR}, 
       #{actualvalue,jdbcType=DECIMAL}, #{correctvalue,jdbcType=DECIMAL}, #{apportvalue,jdbcType=DECIMAL}, 
-      #{ucvalue,jdbcType=DECIMAL}, #{sumucvalue,jdbcType=DECIMAL}, #{bz,jdbcType=VARCHAR}
+      #{ucvalue,jdbcType=DECIMAL}, #{sumucvalue,jdbcType=DECIMAL}, #{bz,jdbcType=VARCHAR},
+    to_date ( #{uptime,jdbcType=TIME} , 'YYYY-MM-DD HH24:MI:SS' ), #{upman,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR},
+    #{updatetime,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue">
@@ -109,6 +115,18 @@
       <if test="bz != null">
         BZ,
       </if>
+      <if test="upman != null">
+        UPMAN,
+      </if>
+      <if test="uptime != null">
+        UPTIME,
+      </if>
+      <if test="userid != null">
+        USERID,
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="clock != null">
@@ -147,6 +165,18 @@
       <if test="bz != null">
         #{bz,jdbcType=VARCHAR},
       </if>
+      <if test="upman != null">
+        #{upman,jdbcType=VARCHAR},
+      </if>
+      <if test="uptime != null">
+        to_date ( #{uptime,jdbcType=TIME} , 'YYYY-MM-DD HH24:MI:SS' )
+      </if>
+      <if test="userid != null">
+        #{userid,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        #{updatetime,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
 
@@ -242,6 +272,18 @@
       <if test="bz != null">
         BZ = #{bz,jdbcType=VARCHAR},
       </if>
+      <if test="upman != null">
+        UPMAN = #{upman,jdbcType=VARCHAR},
+      </if>
+      <if test="uptime != null">
+       UPTIME = to_date ( #{uptime,jdbcType=TIME} , 'YYYY-MM-DD HH24:MI:SS' )
+      </if>
+      <if test="userid != null">
+       USERID = #{userid,jdbcType=VARCHAR},
+      </if>
+      <if test="updatetime != null">
+        UPDATETIME = #{updatetime,jdbcType=VARCHAR},
+      </if>
     </set>
     where CLOCK = #{clock,jdbcType=VARCHAR}
       and TIMEGRANID = #{timegranid,jdbcType=VARCHAR}
@@ -249,7 +291,7 @@
   </update>
   <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
     select CLOCK, TIMEGRANID, ITEMID, SUMVALUE, ISLOCK, LOCKID, ACTUALVALUE, CORRECTVALUE, 
-    APPORTVALUE, UCVALUE, SUMUCVALUE, BZ
+    APPORTVALUE, UCVALUE, SUMUCVALUE, BZ, UPMAN, UPTIME, USERID, UPDATETIME
     from T_RM_WORKPROC_MATERIAL_VALUE
     where CLOCK = #{clock,jdbcType=VARCHAR}
       and TIMEGRANID = #{timegranid,jdbcType=VARCHAR}
@@ -265,7 +307,7 @@
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     select CLOCK, TIMEGRANID, ITEMID, SUMVALUE, ISLOCK, LOCKID, ACTUALVALUE, CORRECTVALUE, 
-    APPORTVALUE, UCVALUE, SUMUCVALUE, BZ
+    APPORTVALUE, UCVALUE, SUMUCVALUE, BZ, UPMAN, UPTIME, USERID, UPDATETIME
     from T_RM_WORKPROC_MATERIAL_VALUE
     <where> 
       <if test="timegranid != null and timegranid != ''">
@@ -304,11 +346,12 @@
       <if test="bz != null and bz != ''">
         and BZ = #{bz}
       </if>
+
     </where>
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     select CLOCK, TIMEGRANID, ITEMID, SUMVALUE, ISLOCK, LOCKID, ACTUALVALUE, CORRECTVALUE, 
-    APPORTVALUE, UCVALUE, SUMUCVALUE, BZ
+    APPORTVALUE, UCVALUE, SUMUCVALUE, BZ, UPMAN, UPTIME, USERID, UPDATETIME
     from T_RM_WORKPROC_MATERIAL_VALUE
     <where> 
       <if test="timegranid != null and timegranid != ''">
@@ -563,4 +606,17 @@
             and instr(',${prodline},', ','||prodline||',')>0
         </if>
     </select>
+
+  <!-- 从报表获取数据 -->
+  <select id="getReportValue" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT TO_CHAR(DATES,'yyyy-MM-dd') AS CLOCK,
+    CONCAT(PROCEDURE,CONCAT(MATERIAL,'R')) AS ITEMID,
+    WEIGHT AS APPORTVALUE FROM V_INPUTOUTPUT WHERE 1=1
+      <if test="clock != null and clock != ''">
+       AND DATES >= TO_DATE(#{clock}, 'yyyy-MM-dd')
+      </if>
+    <if test="clock1 != null and clock1 != ''">
+      AND DATES &lt;= TO_DATE(#{clock1}, 'yyyy-MM-dd')
+    </if>
+  </select>
 </mapper>

+ 58 - 0
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/model/TRmWorkprocMaterialValue.java

@@ -78,6 +78,60 @@ public class TRmWorkprocMaterialValue implements IBasePO<HashMap<String, Object>
     @ApiModelProperty(value="备注",required=true)
     private String bz;
 
+    public String getUpman() {
+        return upman;
+    }
+
+    public void setUpman(String upman) {
+        this.upman = upman;
+    }
+
+    public String getUptime() {
+        return uptime;
+    }
+
+    public void setUptime(String uptime) {
+        this.uptime = uptime;
+    }
+
+    public String getUserid() {
+        return userid;
+    }
+
+    public void setUserid(String userid) {
+        this.userid = userid;
+    }
+
+    public String getUpdatetime() {
+        return updatetime;
+    }
+
+    public void setUpdatetime(String updatetime) {
+        this.updatetime = updatetime;
+    }
+
+    /**
+     * 修改人(UPMAN,VARCHAR,400)
+     */
+    @ApiModelProperty(value="修改人",required=true)
+    private String upman;
+    /**
+     * 修改时间(UPTIME,VARCHAR,400)
+     */
+    @ApiModelProperty(value="修改时间",required=true)
+    private String uptime;
+    /**
+     * 创建人(USERID,VARCHAR,400)
+     */
+    @ApiModelProperty(value="创建人",required=true)
+    private String userid;
+
+    /**
+     * 创建时间(UPDATETIME,VARCHAR,400)
+     */
+    @ApiModelProperty(value="创建时间",required=true)
+    private String updatetime;
+
     private static final long serialVersionUID = 1L;
 
     public String getClock() {
@@ -194,6 +248,10 @@ public class TRmWorkprocMaterialValue implements IBasePO<HashMap<String, Object>
         sb.append(", ucvalue=").append(ucvalue);
         sb.append(", sumucvalue=").append(sumucvalue);
         sb.append(", bz=").append(bz);
+        sb.append(", upman=").append(upman);
+        sb.append(", uptime=").append(uptime);
+        sb.append(", userid=").append(userid);
+        sb.append(", updatetime=").append(updatetime);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 15 - 2
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/ITRmWorkprocMaterialValueService.java

@@ -1,5 +1,6 @@
 package com.steerinfo.ems.trmworkprocmaterialvalue.service;
 
+import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.framework.service.pagehelper.PageList;
 
@@ -7,8 +8,6 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
-import com.steerinfo.ems.trmworkprocmaterialvalue.model.TRmWorkprocMaterialValue;
-
 /**
  * TRmWorkprocMaterialValue服务接口:
  * @author generator
@@ -99,4 +98,18 @@ public interface ITRmWorkprocMaterialValueService extends IBaseService<TRmWorkpr
      * @return
      */
     String restatData(String itemid, String clock, String timegranid);
+
+	/**
+	 * 从报表视图(V_INPUTOUTPUT)获取数据并修改实绩消耗
+	 * @param params 开始时间,结束时间
+	 * @return
+	 */
+	void getReportValue(HashMap<String, Object> params);
+
+	/**
+	 * 从报表视图(V_INPUTOUTPUT)获取数据并修改实绩消耗
+	 * @param date 时间
+	 * @return
+	 */
+	void getReportValue(Date date);
 }

+ 65 - 1
src/main/java/com/steerinfo/ems/trmworkprocmaterialvalue/service/impl/TRmWorkprocMaterialValueServiceImpl.java

@@ -29,7 +29,6 @@ import java.math.BigDecimal;
 import java.math.RoundingMode;
 import java.text.SimpleDateFormat;
 import java.util.*;
-import org.springframework.transaction.annotation.Transactional;
 /**
  * TRmWorkprocMaterialValue服务实现:
  * @author generator
@@ -1020,4 +1019,69 @@ public class TRmWorkprocMaterialValueServiceImpl extends BaseServiceImpl<TRmWork
 		return null;
 	}
 
+	/***
+	 * 根据选择时间生成
+	 * @param params 开始时间,结束时间
+	 */
+	@Override
+	public void getReportValue(HashMap<String, Object> params) {
+		List<TRmWorkprocMaterialValue> trmlist= tRmWorkprocMaterialValueMapper.getReportValue(params);
+		TRmWorkprocMaterialValue trmModel=new TRmWorkprocMaterialValue();
+		for(TRmWorkprocMaterialValue trmWorkprocMaterialValue: trmlist)
+		{
+			trmWorkprocMaterialValue.setTimegranid("DAY");
+			trmModel= tRmWorkprocMaterialValueMapper.selectByUPrimaryKey(trmWorkprocMaterialValue);
+			if(trmModel==null){
+				//tRmWorkprocMaterialValueMapper.insertSelective(trmWorkprocMaterialValue);
+				continue;
+			}
+			trmWorkprocMaterialValue.setCorrectvalue(trmWorkprocMaterialValue.getApportvalue().subtract(trmModel.getActualvalue()));
+			trmWorkprocMaterialValue.setUpman("系统");
+			trmWorkprocMaterialValue.setUptime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
+			tRmWorkprocMaterialValueMapper.updateByPrimaryKeySelective(trmWorkprocMaterialValue);
+		}
+	}
+
+	/***
+	 * 获取昨日和今日数据并修改
+	 * @param date 时间
+	 */
+	@Override
+	public void getReportValue(Date date) {
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(date);
+		int dm = calendar.get(Calendar.DAY_OF_MONTH);
+		int dy = calendar.get(Calendar.DAY_OF_YEAR);
+		String today = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
+		String thisMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());
+		String thisYear = calendar.get(Calendar.YEAR) + "";
+		String lastYear = (calendar.get(Calendar.YEAR)-1) + "";
+		calendar.add(Calendar.DAY_OF_YEAR, -1); // 减1天获得昨日日期
+		String yesterday = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
+		calendar.add(Calendar.DAY_OF_YEAR, 1);
+		calendar.add(Calendar.MONTH, -1); // 减1月获得上月
+		String lastMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());
+
+		HashMap<String, Object> m = new HashMap<String, Object>();
+		m.put("clock", today);
+		m.put("clock1",yesterday);
+		tRmWorkprocMaterialValueMapper.getReportValue(m);
+		List<TRmWorkprocMaterialValue> trmlist= tRmWorkprocMaterialValueMapper.getReportValue(m);
+		TRmWorkprocMaterialValue trmModel=new TRmWorkprocMaterialValue();
+		for(TRmWorkprocMaterialValue trmWorkprocMaterialValue: trmlist)
+		{
+			trmWorkprocMaterialValue.setTimegranid("DAY");
+			trmModel= tRmWorkprocMaterialValueMapper.selectByUPrimaryKey(trmWorkprocMaterialValue);
+			if(trmModel==null){
+				//tRmWorkprocMaterialValueMapper.insertSelective(trmWorkprocMaterialValue);
+				continue;
+			}
+			trmWorkprocMaterialValue.setCorrectvalue(trmWorkprocMaterialValue.getApportvalue().subtract(trmModel.getActualvalue()));
+			trmWorkprocMaterialValue.setUpman("系统");
+			trmWorkprocMaterialValue.setUptime(DateUtils.dateStr(new Date(),"yyyy-MM-dd HH:mm:ss"));
+			tRmWorkprocMaterialValueMapper.updateByPrimaryKeySelective(trmWorkprocMaterialValue);
+		}
+	}
+
+
 }

+ 7 - 7
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/controller/TRmWorkprocProductValueController.java

@@ -7,13 +7,11 @@ import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
 import com.steerinfo.ems.trmworkprocproduct.mapper.TRmWorkprocProductMapper;
 import com.steerinfo.ems.trmworkprocproduct.model.TRmWorkprocProduct;
 import com.steerinfo.ems.trmworkprocproduct.service.ITRmWorkprocProductService;
-import com.steerinfo.feigen.model.LgWeight;
-import com.steerinfo.feigen.service.LgWeightFeigenService;
+import com.steerinfo.ems.trmworkprocproductvalue.model.TRmWorkprocProductValue;
+import com.steerinfo.ems.trmworkprocproductvalue.service.ITRmWorkprocProductValueService;
 import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
-import com.steerinfo.ems.trmworkprocproductvalue.model.TRmWorkprocProductValue;
-import com.steerinfo.ems.trmworkprocproductvalue.service.ITRmWorkprocProductValueService;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -58,8 +56,8 @@ public class TRmWorkprocProductValueController extends BaseRESTfulController {
     
     @Autowired
     IIfMesEmsSwapfileService ifMesEmsSwapfileService;
-    @Autowired
-    LgWeightFeigenService lgWeightFeigen;
+    //@Autowired
+    //LgWeightFeigenService lgWeightFeigen;
 
     @ApiOperation(value="获取列表", notes="分页查询")
     @ApiImplicitParams({
@@ -427,7 +425,7 @@ public class TRmWorkprocProductValueController extends BaseRESTfulController {
     		return failed(null, "请传入时间粒度");
     	}
 		parmas.put("useflag", "1");
-		ifMesEmsSwapfileService.synchronousMesAnEmsData();
+		//ifMesEmsSwapfileService.synchronousMesAnEmsData();
 		tRmWorkprocProductValueService.synchronousData();
 		tRmWorkprocProductValueService.synchronousOrderData();
 		// 查询需要统计的项目
@@ -437,6 +435,8 @@ public class TRmWorkprocProductValueController extends BaseRESTfulController {
 			TRmWorkprocProduct t = l.get(i);
 			res = formulaService.reItemVal(t.getItemid(),clock,timegranid,clocke);
 		}
+        //根据报表中的原料数据生成
+        tRmWorkprocProductValueService.getReportValue(parmas);
 		if(!res.isEmpty()){
 			return failed(null, res);
 		}

+ 8 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.java

@@ -126,4 +126,12 @@ public interface TRmWorkprocProductValueMapper extends IBaseMapper<TRmWorkprocPr
      */
 	Double getProductvalue(HashMap<String, Object> params);
 
+	/**
+	 * 从报表视图(V_INPUTOUTPUT)获取数据
+	 *
+	 * @param params
+	 * @return
+	 */
+	List<TRmWorkprocProductValue> getReportValue(HashMap<String, Object> params);
+
 }

+ 14 - 1
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/mapper/TRmWorkprocProductValueMapper.xml

@@ -300,7 +300,7 @@
     and TIMEGRANID = #{timegranid,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="map" resultMap="BaseResultMap">
-    select ITEMID,ITEMTYPE,CLOCK,TIMEGRANID, SUMVALUE,ISLOCK,LOCKID,ACTUALVALUE,CORRECTVALUE,APPORTVALUE,BZ,BZ2,QRMAN,QRTIME,RTPVALUE
+    select ITEMID,ITEMTYPE,CLOCK,TIMEGRANID, SUMVALUE,ISLOCK,LOCKID,ACTUALVALUE,CORRECTVALUE,APPORTVALUE,BZ,BZ2,QRMAN,QRTIME,RTPVALUE,UPMAN,UPTIME
     from T_RM_WORKPROC_PRODUCT_VALUE
     where ITEMID = #{itemid,jdbcType=VARCHAR}
       and ITEMTYPE = #{itemtype,jdbcType=VARCHAR}
@@ -787,4 +787,17 @@ FROM
             </if>
         </where>
     </select>
+
+  <!-- 从报表获取数据 -->
+  <select id="getReportValue" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT TO_CHAR(DATES,'yyyy-MM-dd') AS CLOCK,
+    CONCAT(PROCEDURE,CONCAT(MATERIAL,'R')) AS ITEMID,
+    WEIGHT AS APPORTVALUE FROM V_INPUTOUTPUT WHERE 1=1
+    <if test="clock != null and clock != ''">
+      AND DATES >= TO_DATE(#{clock}, 'yyyy-MM-dd')
+    </if>
+    <if test="clock1 != null and clock1 != ''">
+      AND DATES &lt;= TO_DATE(#{clock1}, 'yyyy-MM-dd')
+    </if>
+  </select>
 </mapper>

+ 14 - 0
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/ITRmWorkprocProductValueService.java

@@ -142,4 +142,18 @@ public interface ITRmWorkprocProductValueService extends IBaseService<TRmWorkpro
      * @return
      */
     Double getProductvalue(HashMap<String,Object> params);
+
+    /**
+     * 从报表视图(V_INPUTOUTPUT)获取数据并修改实绩消耗
+     * @param params 开始时间,结束时间
+     * @return
+     */
+    void getReportValue(HashMap<String, Object> params);
+
+    /**
+     * 从报表视图(V_INPUTOUTPUT)获取数据并修改实绩消耗
+     * @param date 时间
+     * @return
+     */
+    void getReportValue(Date date);
 }

+ 74 - 9
src/main/java/com/steerinfo/ems/trmworkprocproductvalue/service/impl/TRmWorkprocProductValueServiceImpl.java

@@ -1,14 +1,10 @@
 package com.steerinfo.ems.trmworkprocproductvalue.service.impl;
 
-import com.steerinfo.ems.formula.model.Formula;
-import com.steerinfo.ems.formula.service.IFormulaService;
-import com.steerinfo.ems.trmworkprocproduct.model.TRmWorkprocProduct;
-import com.steerinfo.framework.mapper.IBaseMapper;
-import com.steerinfo.framework.service.impl.BaseServiceImpl;
-import com.steerinfo.ems.trmworkprocproductvalue.model.TRmWorkprocProductValue;
 import com.steerinfo.ems.Utils.BigDecimalUtil;
 import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.common.DateTypeEnum;
+import com.steerinfo.ems.formula.model.Formula;
+import com.steerinfo.ems.formula.service.IFormulaService;
 import com.steerinfo.ems.ifmesemsproductorder.model.IfMesEmsProductorder;
 import com.steerinfo.ems.ifmesemsproductorder.service.IIfMesEmsProductorderService;
 import com.steerinfo.ems.ifmesemsswapfile.model.IfMesEmsSwapfile;
@@ -18,16 +14,20 @@ import com.steerinfo.ems.trmproduct.model.TRmProduct;
 import com.steerinfo.ems.trmproduct.service.ITRmProductService;
 import com.steerinfo.ems.trmworkproc.model.TRmWorkproc;
 import com.steerinfo.ems.trmworkproc.service.ITRmWorkprocService;
+import com.steerinfo.ems.trmworkprocproduct.model.TRmWorkprocProduct;
 import com.steerinfo.ems.trmworkprocproduct.service.ITRmWorkprocProductService;
 import com.steerinfo.ems.trmworkprocproductvalue.mapper.TRmWorkprocProductValueMapper;
+import com.steerinfo.ems.trmworkprocproductvalue.model.TRmWorkprocProductValue;
 import com.steerinfo.ems.trmworkprocproductvalue.service.ITRmWorkprocProductValueService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.framework.service.pagehelper.PageHelper;
 import com.steerinfo.framework.service.pagehelper.PageList;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
 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.math.RoundingMode;
 import java.text.SimpleDateFormat;
@@ -1115,4 +1115,69 @@ public class TRmWorkprocProductValueServiceImpl extends BaseServiceImpl<TRmWorkp
 		}
 		return tRmWorkprocProductValueMapper.getProductvalue(params);
 	}
+
+	/***
+	 * 根据选择时间生成
+	 * @param params 开始时间,结束时间
+	 */
+	@Override
+	public void getReportValue(HashMap<String, Object> params) {
+		List<TRmWorkprocProductValue> trmlist= tRmWorkprocProductValueMapper.getReportValue(params);
+		TRmWorkprocProductValue trmModel=new TRmWorkprocProductValue();
+		for(TRmWorkprocProductValue tRmWorkprocProductValue: trmlist)
+		{
+			tRmWorkprocProductValue.setTimegranid("DAY");
+			tRmWorkprocProductValue.setItemtype("R");
+			trmModel= tRmWorkprocProductValueMapper.selectByUPrimaryKey(tRmWorkprocProductValue);
+			if(trmModel==null){
+				//tRmWorkprocMaterialValueMapper.insertSelective(trmWorkprocMaterialValue);
+				continue;
+			}
+			tRmWorkprocProductValue.setCorrectvalue(tRmWorkprocProductValue.getApportvalue().subtract(trmModel.getActualvalue()));
+			tRmWorkprocProductValue.setUpman("系统");
+			tRmWorkprocProductValue.setUptime(new Date());
+			tRmWorkprocProductValueMapper.updateByPrimaryKeySelective(tRmWorkprocProductValue);
+		}
+	}
+
+	/***
+	 * 获取昨日和今日数据并修改
+	 * @param date 时间
+	 */
+	@Override
+	public void getReportValue(Date date) {
+		Calendar calendar = Calendar.getInstance();
+		calendar.setTime(date);
+		int dm = calendar.get(Calendar.DAY_OF_MONTH);
+		int dy = calendar.get(Calendar.DAY_OF_YEAR);
+		String today = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
+		String thisMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());
+		String thisYear = calendar.get(Calendar.YEAR) + "";
+		String lastYear = (calendar.get(Calendar.YEAR)-1) + "";
+		calendar.add(Calendar.DAY_OF_YEAR, -1); // 减1天获得昨日日期
+		String yesterday = new SimpleDateFormat("yyyy-MM-dd").format(calendar.getTime());
+		calendar.add(Calendar.DAY_OF_YEAR, 1);
+		calendar.add(Calendar.MONTH, -1); // 减1月获得上月
+		String lastMonth = new SimpleDateFormat("yyyy-MM").format(calendar.getTime());
+
+		HashMap<String, Object> m = new HashMap<String, Object>();
+		m.put("clock", today);
+		m.put("clock1",yesterday);
+		tRmWorkprocProductValueMapper.getReportValue(m);
+		List<TRmWorkprocProductValue> trmlist= tRmWorkprocProductValueMapper.getReportValue(m);
+		TRmWorkprocProductValue trmModel=new TRmWorkprocProductValue();
+		for(TRmWorkprocProductValue tRmWorkprocProductValue: trmlist)
+		{
+			tRmWorkprocProductValue.setTimegranid("DAY");
+			trmModel= tRmWorkprocProductValueMapper.selectByUPrimaryKey(tRmWorkprocProductValue);
+			if(trmModel==null){
+				//tRmWorkprocMaterialValueMapper.insertSelective(trmWorkprocMaterialValue);
+				continue;
+			}
+			tRmWorkprocProductValue.setCorrectvalue(tRmWorkprocProductValue.getApportvalue().subtract(trmModel.getActualvalue()));
+			tRmWorkprocProductValue.setUpman("系统");
+			tRmWorkprocProductValue.setUptime(new Date());
+			tRmWorkprocProductValueMapper.updateByPrimaryKeySelective(tRmWorkprocProductValue);
+		}
+	}
 }

+ 55 - 25
src/main/java/com/steerinfo/task/SpringCronTask.java

@@ -1,26 +1,31 @@
 package com.steerinfo.task;
 
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-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;
-
+import com.steerinfo.ems.Utils.DateUtils;
 import com.steerinfo.ems.bfhyd.service.IBfhydService;
+import com.steerinfo.ems.emsetiming.service.IEmsETimingService;
+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.tcm0312.controller.TCm0312Controller;
 import com.steerinfo.ems.tcm0318.service.ITCm0318Service;
-import com.steerinfo.ems.tcm0323.model.TCm0323;
 import com.steerinfo.ems.tcm0348.service.ITCm0348Service;
 import com.steerinfo.ems.trmactvalue.service.ITRmActValueService;
 import com.steerinfo.ems.trmbalancevalue.service.ITRmBalanceValueService;
 import com.steerinfo.ems.trmcalpoint.service.ITRmCalpointService;
-
+import com.steerinfo.ems.trmcalpointvalue.service.ITRmCalpointValueService;
+import com.steerinfo.ems.trmdfvalue.service.ITRmDfValueService;
+import com.steerinfo.ems.trmdwvalue.service.ITRmDwValueService;
+import com.steerinfo.ems.trmindexvalue.service.ITRmIndexValueService;
+import com.steerinfo.ems.trmplanvalue.service.ITRmPlanValueService;
+import com.steerinfo.ems.trmtransfereactvalue.service.ITRmTransfereActValueService;
+import com.steerinfo.ems.trmworkprocmaterialvalue.service.ITRmWorkprocMaterialValueService;
+import com.steerinfo.ems.trmworkprocproductvalue.service.ITRmWorkprocProductValueService;
+import com.steerinfo.ems.usagedata.service.IUsageDataService;
+import com.steerinfo.ems.zghbjkbzlog.service.IZghbjkbzLogService;
+import org.apache.axis2.AxisFault;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -34,20 +39,13 @@ import org.springframework.scheduling.config.ScheduledTaskRegistrar;
 import org.springframework.scheduling.support.CronTrigger;
 import org.springframework.stereotype.Service;
 
-import com.steerinfo.ems.Utils.DateUtils;
-import com.steerinfo.ems.emsetiming.service.IEmsETimingService;
-import com.steerinfo.ems.ifmesemsproductorder.service.IIfMesEmsProductorderService;
-import com.steerinfo.ems.ifmesemsswapfile.service.IIfMesEmsSwapfileService;
-import com.steerinfo.ems.trmcalpointvalue.service.ITRmCalpointValueService;
-import com.steerinfo.ems.trmdfvalue.service.ITRmDfValueService;
-import com.steerinfo.ems.trmdwvalue.service.ITRmDwValueService;
-import com.steerinfo.ems.trmindexvalue.service.ITRmIndexValueService;
-import com.steerinfo.ems.trmplanvalue.service.ITRmPlanValueService;
-import com.steerinfo.ems.trmtransfereactvalue.service.ITRmTransfereActValueService;
-import com.steerinfo.ems.trmworkprocmaterialvalue.service.ITRmWorkprocMaterialValueService;
-import com.steerinfo.ems.trmworkprocproductvalue.service.ITRmWorkprocProductValueService;
-import com.steerinfo.ems.usagedata.service.IUsageDataService;
-import com.steerinfo.ems.zghbjkbzlog.service.IZghbjkbzLogService;
+import java.text.ParseException;
+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;
 
 @EnableScheduling
 @Service(value = "springCronTask")
@@ -107,6 +105,8 @@ public class SpringCronTask implements SchedulingConfigurer{
 	ITCm0348Service tCm0348Service;
 	@Autowired
 	ITCm0318Service tCm0318Service;
+	@Autowired
+	IEmsWaterRealtimeService emsWaterRealtimeService;
 	/**
 	 * SchedulingConfigurer接口的方法实现,加载后自动运行
 	 */
@@ -254,6 +254,36 @@ public class SpringCronTask implements SchedulingConfigurer{
 					 tCm0318Service.getDataAsWscj(DateUtils.getDate());
 					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
 				}
+				 else if(taskId.equalsIgnoreCase("120")){
+					 // 获取大用户水系统数据 5分钟一次
+					 long start = new Date().getTime();
+					 emsWaterRealtimeService.getWaterListByArmMeter();
+					 emsWaterRealtimeService.dataGeneration();
+					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
+				 } else if(taskId.equalsIgnoreCase("121")){
+					 // 根据计量点配置生成水数据 10分钟一次
+					 long start = new Date().getTime();
+					 emsWaterRealtimeService.getWaterTenMinutes();
+					 try {
+						 emsWaterRealtimeService.getWaterListToMosaic();
+					 } catch (AxisFault e) {
+						 e.printStackTrace();
+					 } finally {
+						 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
+					 }
+				 }
+				 else if(taskId.equalsIgnoreCase("116")){
+					// 动力、水(计量点)小时表定时统计(自动补全24小时内的小时用量值)
+					long start = new Date().getTime();
+					tRmCalpointService.statHourData();
+					logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
+				}
+				 else if (taskId.equalsIgnoreCase("102")) {
+					 // 计量点定时任务(天)
+					 long start = new Date().getTime();
+					 tRmCalpointValueService.statData(new Date());
+					 logger.info("定时任务"+taskId+"执行时长:" + (new Date().getTime() - start)/1000 + "秒");
+				 }
 //				 else if (taskId.equalsIgnoreCase("106")) {
 //					// 获取MES水质监测数据
 //					long start = new Date().getTime();

+ 6 - 1
src/main/resources/application.yml

@@ -1,2 +1,7 @@
 api:
-  version:v1
+  version:v1
+spring:
+  servlet:
+    multipart:
+      max-file-size: 10MB
+      max-request-size: 10MB

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików