dengyj %!s(int64=3) %!d(string=hai) anos
pai
achega
32d1a5cba0
Modificáronse 18 ficheiros con 1642 adicións e 210 borrados
  1. 3 1
      src/main/java/com/steerinfo/baseinfo/meterbasecustomersupplier/mapper/MeterBaseCustomerSupplierMapper.java
  2. 7 1
      src/main/java/com/steerinfo/baseinfo/meterbasecustomersupplier/mapper/MeterBaseCustomerSupplierMapper.xml
  3. 3 1
      src/main/java/com/steerinfo/baseinfo/meterbasematterinfo/mapper/MeterBaseMatterInfoMapper.java
  4. 7 1
      src/main/java/com/steerinfo/baseinfo/meterbasematterinfo/mapper/MeterBaseMatterInfoMapper.xml
  5. 164 0
      src/main/java/com/steerinfo/baseinfo/meterbasematterunit/controller/MeterBaseMatterUnitController.java
  6. 10 0
      src/main/java/com/steerinfo/baseinfo/meterbasematterunit/mapper/MeterBaseMatterUnitMapper.java
  7. 266 0
      src/main/java/com/steerinfo/baseinfo/meterbasematterunit/mapper/MeterBaseMatterUnitMapper.xml
  8. 126 0
      src/main/java/com/steerinfo/baseinfo/meterbasematterunit/model/MeterBaseMatterUnit.java
  9. 30 0
      src/main/java/com/steerinfo/baseinfo/meterbasematterunit/service/IMeterBaseMatterUnitService.java
  10. 70 0
      src/main/java/com/steerinfo/baseinfo/meterbasematterunit/service/impl/MeterBaseMatterUnitServiceImpl.java
  11. 19 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java
  12. 57 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/controller/MeterWorkCheckFirstActualController.java
  13. 13 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.java
  14. 395 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.xml
  15. 8 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/service/IMeterWorkCheckFirstActualService.java
  16. 216 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/service/impl/MeterWorkCheckFirstActualServiceImpl.java
  17. 209 206
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.xml
  18. 39 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/service/impl/MeterWorkRailwayReceivedServiceImpl.java

+ 3 - 1
src/main/java/com/steerinfo/baseinfo/meterbasecustomersupplier/mapper/MeterBaseCustomerSupplierMapper.java

@@ -6,6 +6,7 @@ import com.steerinfo.framework.mapper.IBaseMapper;
 import feign.Param;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -26,4 +27,5 @@ public interface MeterBaseCustomerSupplierMapper extends IBaseMapper<MeterBaseCu
     //皮带秤客户查询 预报接收
     String selectByIdForBelt(@org.apache.ibatis.annotations.Param("customerSupplierName") String customerSupplierName);
 
-}
+    List<MeterBaseCustomerSupplier> selectByParametersOrder(HashMap map);
+}

+ 7 - 1
src/main/java/com/steerinfo/baseinfo/meterbasecustomersupplier/mapper/MeterBaseCustomerSupplierMapper.xml

@@ -614,4 +614,10 @@
     OR "CUSTOMER_SUPPLIER_NAME" LIKE '%2103-原料综合料场%')
     AND CUSTOMER_SUPPLIER_NO != '1150520'
   </select>
-</mapper>
+    <select id="selectByParametersOrder"
+            resultMap="BaseResultMap">
+      <include refid="select"/>
+      <include refid="where"/>
+      order by CUSTOMER_SUPPLIER_NAME desc
+    </select>
+</mapper>

+ 3 - 1
src/main/java/com/steerinfo/baseinfo/meterbasematterinfo/mapper/MeterBaseMatterInfoMapper.java

@@ -33,4 +33,6 @@ public interface MeterBaseMatterInfoMapper extends IBaseMapper<MeterBaseMatterIn
     String selectByMeterCodeForBelt(@Param("matterName") String matterName);
     //分配皮带秤类型
     int doUpdateBeltType(List<MeterBaseMatterInfo> list);
-}
+
+    List<MeterBaseMatterInfo> selectByParametersOrder(HashMap map);
+}

+ 7 - 1
src/main/java/com/steerinfo/baseinfo/meterbasematterinfo/mapper/MeterBaseMatterInfoMapper.xml

@@ -1043,4 +1043,10 @@
         'XB1带肋钢筋\\HRB400E Φ16.0 5m-9m','氧化铝\GB/T24487 氧化锂:0.01-0.05','肥煤\高硫 低灰 乌达','喷吹改质煤','喷吹无烟煤',
         '气煤\策克','主焦煤\288口岸','主焦煤\山西','主焦煤\中硫 高灰 乌达','球团')
     </select>
-</mapper>
+    <select id="selectByParametersOrder"
+            resultMap="BaseResultMap">
+        <include refid="select"/>
+        <include refid="where"/>
+        order by MATTER_NAME desc
+    </select>
+</mapper>

+ 164 - 0
src/main/java/com/steerinfo/baseinfo/meterbasematterunit/controller/MeterBaseMatterUnitController.java

@@ -0,0 +1,164 @@
+package com.steerinfo.baseinfo.meterbasematterunit.controller;
+
+import com.steerinfo.baseinfo.meterbasecustomersupplier.model.MeterBaseCustomerSupplier;
+import com.steerinfo.baseinfo.meterbasematterinfo.model.MeterBaseMatterInfo;
+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.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit;
+import com.steerinfo.baseinfo.meterbasematterunit.service.IMeterBaseMatterUnitService;
+import com.steerinfo.util.PublicMethod;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import oracle.jdbc.proxy.annotation.Post;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.apache.shiro.crypto.hash.Hash;
+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;
+
+/**
+ * MeterBaseMatterUnit RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-03-29 03:00
+ * 类描述
+ * 修订历史:
+ * 日期:2023-03-29
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseMatterUnit RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterbasematterunits")
+public class MeterBaseMatterUnitController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterBaseMatterUnitService meterBaseMatterUnitService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbasematterunit:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseMatterUnit> list = meterBaseMatterUnitService.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("meterbasematterunit:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseMatterUnit> list = meterBaseMatterUnitService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="创建", notes="根据MeterBaseMatterUnit对象创建")
+    @ApiImplicitParam(name = "meterBaseMatterUnit", value = "详细实体meterBaseMatterUnit", required = true, dataType = "MeterBaseMatterUnit")
+    //@RequiresPermissions("meterbasematterunit:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute MeterBaseMatterUnit model){
+        MeterBaseMatterUnit meterBaseMatterUnit = meterBaseMatterUnitService.add(model);
+        return success(meterBaseMatterUnit);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbasematterunit:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterBaseMatterUnit meterBaseMatterUnit = meterBaseMatterUnitService.getById(id);
+        return success(meterBaseMatterUnit);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterBaseMatterUnit信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterBaseMatterUnit", value = "详细实体meterBaseMatterUnit", required = true, dataType = "MeterBaseMatterUnit")
+    })
+    //@RequiresPermissions("meterbasematterunit:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterBaseMatterUnit model){
+        model.setId(id);
+        MeterBaseMatterUnit meterBaseMatterUnit = meterBaseMatterUnitService.modify(model);
+        return success(meterBaseMatterUnit);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbasematterunit:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  meterBaseMatterUnitService.delete(ids);
+    	}
+      return success();
+    }
+
+    //获取物料
+    @ApiOperation(value="获取物料", notes="")
+    @ApiImplicitParam(paramType = "String", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbasematterunit:delete")
+    @GetMapping(value = "/getMatterInfo")//String
+    public RESTfulResult getMatterInfo(@RequestBody(required = false) HashMap map){
+        List<MeterBaseMatterInfo> matterInfo = meterBaseMatterUnitService.getMatterInfo(map);
+        return success(matterInfo);
+    }
+
+    //获取收发货单位
+    @ApiOperation(value="获取物料", notes="")
+    @ApiImplicitParam(paramType = "String", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbasematterunit:delete")
+    @GetMapping(value = "/getCustomerSupplier")//String
+    public RESTfulResult getCustomerSupplier(@RequestBody(required = false) HashMap map){
+        List<MeterBaseCustomerSupplier> matterInfo = meterBaseMatterUnitService.getCustomerSupplier(map);
+        return success(matterInfo);
+    }
+
+    @ApiOperation(value="创建", notes="根据MeterBaseMatterUnit对象创建")
+    @ApiImplicitParam(name = "meterBaseMatterUnit", value = "详细实体meterBaseMatterUnit", required = true, dataType = "MeterBaseMatterUnit")
+    //@RequiresPermissions("meterbasematterunit:create")
+    @PostMapping(value = "addMatterUnit")
+    public RESTfulResult addMatterUnit(@RequestBody MeterBaseMatterUnit model){
+        try {
+            String id = PublicMethod.IdCreate(2);
+            model.setId(id);
+            MeterBaseMatterUnit meterBaseMatterUnit = meterBaseMatterUnitService.add(model);
+            return success(meterBaseMatterUnit);
+        }catch (Exception e){
+            e.printStackTrace();
+            throw e;
+        }
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbasematterunit:delete")
+    @PostMapping(value = "deleteMatterUnit/{id}")//String
+    public RESTfulResult deleteMatterUnit(@PathVariable String id){
+        List<String> list = Arrays.asList(id.split(","));
+        if(ListUtils.isNotEmpty(list)) {
+            List<String> ids = ListUtils.convertList(list);
+            meterBaseMatterUnitService.delete(ids);
+        }
+        return success();
+    }
+}

+ 10 - 0
src/main/java/com/steerinfo/baseinfo/meterbasematterunit/mapper/MeterBaseMatterUnitMapper.java

@@ -0,0 +1,10 @@
+package com.steerinfo.baseinfo.meterbasematterunit.mapper;
+
+import com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface MeterBaseMatterUnitMapper extends IBaseMapper<MeterBaseMatterUnit, String> {
+}

+ 266 - 0
src/main/java/com/steerinfo/baseinfo/meterbasematterunit/mapper/MeterBaseMatterUnitMapper.xml

@@ -0,0 +1,266 @@
+<?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.baseinfo.meterbasematterunit.mapper.MeterBaseMatterUnitMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo" />
+    <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName" />
+    <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo" />
+    <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName" />
+    <result column="RECEIVING_UINT_NO" jdbcType="VARCHAR" property="receivingUintNo" />
+    <result column="RECEIVING_UINT_NAME" jdbcType="VARCHAR" property="receivingUintName" />
+  </resultMap>
+  <sql id="columns">
+    ID, MATTER_NO, MATTER_NAME, FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, 
+    RECEIVING_UINT_NAME
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.MATTER_NO, t.MATTER_NAME, t.FORWARDING_UNIT_NO, t.FORWARDING_UNIT_NAME, t.RECEIVING_UINT_NO, 
+    t.RECEIVING_UINT_NAME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METER_BASE_MATTER_UNIT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METER_BASE_MATTER_UNIT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="matterNo != null and matterNo != ''">
+        and MATTER_NO = #{matterNo}
+      </if>
+      <if test="matterName != null and matterName != ''">
+        and MATTER_NAME = #{matterName}
+      </if>
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        and FORWARDING_UNIT_NO = #{forwardingUnitNo}
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        and FORWARDING_UNIT_NAME = #{forwardingUnitName}
+      </if>
+      <if test="receivingUintNo != null and receivingUintNo != ''">
+        and RECEIVING_UINT_NO = #{receivingUintNo}
+      </if>
+      <if test="receivingUintName != null and receivingUintName != ''">
+        and RECEIVING_UINT_NAME = #{receivingUintName}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="matterNo != null and matterNo != ''">
+        and MATTER_NO LIKE '%${matterNo}%'
+      </if>
+      <if test="matterName != null and matterName != ''">
+        and MATTER_NAME LIKE '%${matterName}%'
+      </if>
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
+      </if>
+      <if test="receivingUintNo != null and receivingUintNo != ''">
+        and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
+      </if>
+      <if test="receivingUintName != null and receivingUintName != ''">
+        and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_BASE_MATTER_UNIT
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_BASE_MATTER_UNIT
+    where 1!=1 
+      <if test="matterNo != null and matterNo != ''">
+        or MATTER_NO = #{matterNo}
+      </if>
+      <if test="matterName != null and matterName != ''">
+        or MATTER_NAME = #{matterName}
+      </if>
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        or FORWARDING_UNIT_NO = #{forwardingUnitNo}
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        or FORWARDING_UNIT_NAME = #{forwardingUnitName}
+      </if>
+      <if test="receivingUintNo != null and receivingUintNo != ''">
+        or RECEIVING_UINT_NO = #{receivingUintNo}
+      </if>
+      <if test="receivingUintName != null and receivingUintName != ''">
+        or RECEIVING_UINT_NAME = #{receivingUintName}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit">
+    insert into METER_BASE_MATTER_UNIT (ID, MATTER_NO, MATTER_NAME, 
+      FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, 
+      RECEIVING_UINT_NAME)
+    values (#{id,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR}, 
+      #{forwardingUnitNo,jdbcType=VARCHAR}, #{forwardingUnitName,jdbcType=VARCHAR}, #{receivingUintNo,jdbcType=VARCHAR}, 
+      #{receivingUintName,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit">
+    insert into METER_BASE_MATTER_UNIT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="matterNo != null">
+        MATTER_NO,
+      </if>
+      <if test="matterName != null">
+        MATTER_NAME,
+      </if>
+      <if test="forwardingUnitNo != null">
+        FORWARDING_UNIT_NO,
+      </if>
+      <if test="forwardingUnitName != null">
+        FORWARDING_UNIT_NAME,
+      </if>
+      <if test="receivingUintNo != null">
+        RECEIVING_UINT_NO,
+      </if>
+      <if test="receivingUintName != null">
+        RECEIVING_UINT_NAME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="matterNo != null">
+        #{matterNo,jdbcType=VARCHAR},
+      </if>
+      <if test="matterName != null">
+        #{matterName,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitNo != null">
+        #{forwardingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitName != null">
+        #{forwardingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintNo != null">
+        #{receivingUintNo,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintName != null">
+        #{receivingUintName,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit">
+    update METER_BASE_MATTER_UNIT
+    set MATTER_NO = #{matterNo,jdbcType=VARCHAR},
+      MATTER_NAME = #{matterName,jdbcType=VARCHAR},
+      FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
+      FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
+      RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
+      RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit">
+    update METER_BASE_MATTER_UNIT
+    <set>
+      <if test="matterNo != null">
+        MATTER_NO = #{matterNo,jdbcType=VARCHAR},
+      </if>
+      <if test="matterName != null">
+        MATTER_NAME = #{matterName,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitNo != null">
+        FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitName != null">
+        FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintNo != null">
+        RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintName != null">
+        RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="where"/>
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select"/>
+    <include refid="whereLike"/>
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into METER_BASE_MATTER_UNIT 
+      (ID, 
+      MATTER_NO, MATTER_NAME, FORWARDING_UNIT_NO, 
+      FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, 
+      RECEIVING_UINT_NAME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.matterNo,jdbcType=VARCHAR}, #{item.matterName,jdbcType=VARCHAR}, #{item.forwardingUnitNo,jdbcType=VARCHAR}, 
+      #{item.forwardingUnitName,jdbcType=VARCHAR}, #{item.receivingUintNo,jdbcType=VARCHAR}, 
+      #{item.receivingUintName,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_BASE_MATTER_UNIT
+     set
+       ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
+       </foreach>
+       ,MATTER_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
+       </foreach>
+       ,MATTER_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
+       </foreach>
+       ,FORWARDING_UNIT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
+       </foreach>
+       ,FORWARDING_UNIT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
+       </foreach>
+       ,RECEIVING_UINT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RECEIVING_UINT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
+       </foreach>
+     where ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.id,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_BASE_MATTER_UNIT
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  
+</mapper>

+ 126 - 0
src/main/java/com/steerinfo/baseinfo/meterbasematterunit/model/MeterBaseMatterUnit.java

@@ -0,0 +1,126 @@
+package com.steerinfo.baseinfo.meterbasematterunit.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+@ApiModel(value="物料收发货单位配置表")
+public class MeterBaseMatterUnit implements IBasePO<String> {
+    /**
+     * 计量作业编号(YYYYMMDD+4位流水)(ID,VARCHAR,50)
+     */
+    @ApiModelProperty(value="计量作业编号(YYYYMMDD+4位流水)",required=true)
+    private String id;
+
+    /**
+     * 物料编号(MATTER_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="物料编号",required=true)
+    private String matterNo;
+
+    /**
+     * 物料名称(MATTER_NAME,VARCHAR,200)
+     */
+    @ApiModelProperty(value="物料名称",required=true)
+    private String matterName;
+
+    /**
+     * 发货单位编号(FORWARDING_UNIT_NO,VARCHAR,30)
+     */
+    @ApiModelProperty(value="发货单位编号",required=true)
+    private String forwardingUnitNo;
+
+    /**
+     * 发货单位名称(FORWARDING_UNIT_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="发货单位名称",required=true)
+    private String forwardingUnitName;
+
+    /**
+     * 收货单位编号(RECEIVING_UINT_NO,VARCHAR,30)
+     */
+    @ApiModelProperty(value="收货单位编号",required=true)
+    private String receivingUintNo;
+
+    /**
+     * 收货单位名称(RECEIVING_UINT_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="收货单位名称",required=true)
+    private String receivingUintName;
+
+    private static final long serialVersionUID = 1L;
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    public String getMatterNo() {
+        return matterNo;
+    }
+
+    public void setMatterNo(String matterNo) {
+        this.matterNo = matterNo == null ? null : matterNo.trim();
+    }
+
+    public String getMatterName() {
+        return matterName;
+    }
+
+    public void setMatterName(String matterName) {
+        this.matterName = matterName == null ? null : matterName.trim();
+    }
+
+    public String getForwardingUnitNo() {
+        return forwardingUnitNo;
+    }
+
+    public void setForwardingUnitNo(String forwardingUnitNo) {
+        this.forwardingUnitNo = forwardingUnitNo == null ? null : forwardingUnitNo.trim();
+    }
+
+    public String getForwardingUnitName() {
+        return forwardingUnitName;
+    }
+
+    public void setForwardingUnitName(String forwardingUnitName) {
+        this.forwardingUnitName = forwardingUnitName == null ? null : forwardingUnitName.trim();
+    }
+
+    public String getReceivingUintNo() {
+        return receivingUintNo;
+    }
+
+    public void setReceivingUintNo(String receivingUintNo) {
+        this.receivingUintNo = receivingUintNo == null ? null : receivingUintNo.trim();
+    }
+
+    public String getReceivingUintName() {
+        return receivingUintName;
+    }
+
+    public void setReceivingUintName(String receivingUintName) {
+        this.receivingUintName = receivingUintName == null ? null : receivingUintName.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", matterNo=").append(matterNo);
+        sb.append(", matterName=").append(matterName);
+        sb.append(", forwardingUnitNo=").append(forwardingUnitNo);
+        sb.append(", forwardingUnitName=").append(forwardingUnitName);
+        sb.append(", receivingUintNo=").append(receivingUintNo);
+        sb.append(", receivingUintName=").append(receivingUintName);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 30 - 0
src/main/java/com/steerinfo/baseinfo/meterbasematterunit/service/IMeterBaseMatterUnitService.java

@@ -0,0 +1,30 @@
+package com.steerinfo.baseinfo.meterbasematterunit.service;
+
+import com.steerinfo.baseinfo.meterbasecustomersupplier.model.MeterBaseCustomerSupplier;
+import com.steerinfo.baseinfo.meterbasematterinfo.model.MeterBaseMatterInfo;
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseMatterUnit服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-03-29 03:00
+ * 类描述
+ * 修订历史:
+ * 日期:2023-03-29
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseMatterUnit服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterBaseMatterUnitService extends IBaseService<MeterBaseMatterUnit, String>{
+
+    List<MeterBaseMatterInfo> getMatterInfo(HashMap map);
+
+    List<MeterBaseCustomerSupplier> getCustomerSupplier(HashMap map);
+}

+ 70 - 0
src/main/java/com/steerinfo/baseinfo/meterbasematterunit/service/impl/MeterBaseMatterUnitServiceImpl.java

@@ -0,0 +1,70 @@
+package com.steerinfo.baseinfo.meterbasematterunit.service.impl;
+
+import com.steerinfo.baseinfo.meterbasecustomersupplier.mapper.MeterBaseCustomerSupplierMapper;
+import com.steerinfo.baseinfo.meterbasecustomersupplier.model.MeterBaseCustomerSupplier;
+import com.steerinfo.baseinfo.meterbasematterinfo.mapper.MeterBaseMatterInfoMapper;
+import com.steerinfo.baseinfo.meterbasematterinfo.model.MeterBaseMatterInfo;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit;
+import com.steerinfo.baseinfo.meterbasematterunit.mapper.MeterBaseMatterUnitMapper;
+import com.steerinfo.baseinfo.meterbasematterunit.service.IMeterBaseMatterUnitService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseMatterUnit服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-03-29 03:00
+ * 类描述
+ * 修订历史:
+ * 日期:2023-03-29
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseMatterUnit服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterBaseMatterUnitService")
+public class MeterBaseMatterUnitServiceImpl extends BaseServiceImpl<MeterBaseMatterUnit, String> implements IMeterBaseMatterUnitService {
+
+    @Autowired
+    private MeterBaseMatterUnitMapper meterBaseMatterUnitMapper;
+
+    @Resource
+    private MeterBaseMatterInfoMapper meterBaseMatterInfoMapper;
+
+    @Resource
+    private MeterBaseCustomerSupplierMapper meterBaseCustomerSupplierMapper;
+
+    @Override
+    protected IBaseMapper<MeterBaseMatterUnit, String> getMapper() {
+        return meterBaseMatterUnitMapper;
+    }
+
+    @Override
+    public List<MeterBaseMatterInfo> getMatterInfo(HashMap map) {
+        if(map==null){
+            map=new HashMap();
+        }
+        map.put("validFlag","1");
+        List<MeterBaseMatterInfo> list = meterBaseMatterInfoMapper.selectByParametersOrder(map);
+        return list;
+    }
+
+    @Override
+    public List<MeterBaseCustomerSupplier> getCustomerSupplier(HashMap map) {
+        if(map==null){
+            map=new HashMap();
+        }
+        map.put("validFlag","1");
+        List<MeterBaseCustomerSupplier> list = meterBaseCustomerSupplierMapper.selectByParametersOrder(map);
+        return list;
+    }
+}

+ 19 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java

@@ -15,6 +15,8 @@ import com.steerinfo.baseinfo.meterbasematterinfo.mapper.MeterBaseMatterInfoMapp
 import com.steerinfo.baseinfo.meterbasematterinfo.model.MeterBaseMatterInfo;
 import com.steerinfo.baseinfo.meterbasemattermap.mapper.MeterBaseMatterMapMapper;
 import com.steerinfo.baseinfo.meterbasemattermap.model.MeterBaseMatterMap;
+import com.steerinfo.baseinfo.meterbasematterunit.mapper.MeterBaseMatterUnitMapper;
+import com.steerinfo.baseinfo.meterbasematterunit.model.MeterBaseMatterUnit;
 import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLogMapper;
 import com.steerinfo.baseinfo.meterbaseoperationlog.model.MeterBaseOperationLog;
 import com.steerinfo.baseinfo.meterbasespotinfo.mapper.MeterBaseSpotInfoMapper;
@@ -183,6 +185,9 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
     @Resource
     private MeterWorkAddWeightMapper meterWorkAddWeightMapper;
 
+    @Resource
+    private MeterBaseMatterUnitMapper meterBaseMatterUnitMapper;
+
     @Override
     protected IBaseMapper<MeterWorkCarActualFirst, String> getMapper() {
         return meterWorkCarActualFirstMapper;
@@ -3764,6 +3769,20 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             scale02.setPredictionCombination(scale01.getPredictionNo() + "," + scale02.getPredictionNo());
             scale02.setMeasureStation(actualRow2.getNetSpot3No());
             scale02.setMeasureStationName(actualRow2.getNetSpot3Name());
+
+            //根据收发货单位查询配置信息
+            HashMap<String, Object> map = new HashMap<>();
+            map.put("receivingUintName",scale02.getReceivingUintNo());
+            map.put("receivingUintNo",scale02.getReceivingUintName());
+            map.put("forwardingUnitName",scale02.getForwardingUnitNo());
+            map.put("forwardingUnitNo",scale02.getReceivingUintName());
+            List<MeterBaseMatterUnit> meterBaseMatterUnits = meterBaseMatterUnitMapper.selectByParameters(map);
+            //判断收发货单位是否属于配置,然后修改物料信息
+            if(meterBaseMatterUnits!=null&&meterBaseMatterUnits.size()!=0&&meterBaseMatterUnits.get(0)!=null){
+                scale02.setMatterNo(meterBaseMatterUnits.get(0).getMatterNo());
+                scale02.setMatterName(meterBaseMatterUnits.get(0).getMatterName());
+            }
+
             preTrackScaleMapper.updateByPrimaryKeySelective(scale02);
             //11、修改计量监控
             updateMonitor(one.getBaseSpotNo());

+ 57 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/controller/MeterWorkCheckFirstActualController.java

@@ -279,4 +279,61 @@ public class MeterWorkCheckFirstActualController extends BaseRESTfulController {
             throw new MarkerMetException(500, "操作异常!!");
         }
     }
+
+    //动态轨道衡一次已核查详情
+    @ApiOperation(value = "汽车衡一次数据核查数统计-获取列表", notes = "关键词:startTime、endTime、pageNum、pageSize、baseSpotNo、baseSpotName")
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/railwayDynamicsFirstCountCheckNum")
+    public RESTfulResult railwayDynamicsFirstCountCheckNum(@RequestBody HashMap parmas) {
+        try {
+            PageList<RailwayFirstCountCheckNum> list = meterWorkCheckFirstActualService.railwayDynamicsFirstCountCheckNum(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    //动态轨道衡一次未核查详情
+    @ApiOperation(value = "动态衡一次数据核查明细未核查数明细-获取列表", notes = "关键词:startTime、endTime、pageNum、pageSize")
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/railwayDynamicsFirstLikeByDesc")
+    public RESTfulResult railwayDynamicsFirstLikeByDesc(@RequestBody HashMap parmas) {
+        try {
+            PageList<RailwayFirstCountCheckNum> list = meterWorkCheckFirstActualService.railwayDynamicsFirstLikeByDesc(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "动态轨道衡一次计量和结净数据图片与数据核查-获取列表",
+            notes = "不分页模糊查询;关键词:startTime、endTime、typeNo(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)" +
+                    "、typeName、valueFlag:0:一次数据、1:净重数据")
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/railwayDynamicsFirstImgDataList")
+    public RESTfulResult railwayDynamicsFirstImgDataList(@RequestBody(required = false) HashMap parmas) {
+        try {
+            List<HashMap> list = meterWorkCheckFirstActualService.railwayDynamicsFirstImgDataList(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    //动态轨道衡一次数据和净重数据核查明细
+    @ApiOperation(value = "一次数据和结净数据核查数明细-获取列表", notes = "关键词:startTime、endTime、pageNum、pageSize、checkId、typeNo、valueFlag")
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/railwayDynamicsLikeByDesc")
+    public RESTfulResult railwayDynamicsLikeByDesc(@RequestBody HashMap parmas) {
+        try {
+            PageList<MeterWorkCheckFirstActualRailwayTemp> list = meterWorkCheckFirstActualService.railwayDynamicsLikeByDesc(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
 }

+ 13 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.java

@@ -7,6 +7,7 @@ import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualF
 import com.steerinfo.meterwork.meterworkcheckfirstactual.model.*;
 import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
 import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
 import org.apache.ibatis.annotations.Mapper;
 
 import java.util.HashMap;
@@ -44,4 +45,16 @@ public interface MeterWorkCheckFirstActualMapper extends IBaseMapper<MeterWorkCh
     List<RailwayActualCountCheckNum> railwayActualLikeByDesc(HashMap params);
 
     List<MeterWorkCheckFirstActualRailwayTemp> railwayLikeByDesc(HashMap params);
+
+    List<RailwayFirstCountCheckNum> railwayDynamicsFirstCountCheckNum(HashMap params);
+
+    List<RailwayFirstCountCheckNum> railwayDynamicsFirstLikeByDesc(HashMap params);
+
+    List<MeterBaseSpotInfo> railwayDynamicsSpotInfoList(HashMap params);
+
+    List<MeterWorkRailwayReceived> railwayDynamicsFirstDataList(HashMap<String, Object> obj);
+
+    List<RailwayFirstActualImgData> railwayDynamicsFirstImgDataList(HashMap params);
+
+    List<MeterWorkCheckFirstActualRailwayTemp> railwayDynamicsLikeByDesc(HashMap params);
 }

+ 395 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.xml

@@ -1883,4 +1883,399 @@
     </if>
     order by checkStartTime desc
   </select>
+    <select id="railwayDynamicsFirstCountCheckNum"
+            resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayFirstCountCheckNum">
+      select count(1) countCheckNum,
+      sum(CHECK_USED_SECONDS) countSumCheckUsed,
+      avg(B.CHECK_USED_SECONDS) countAvgCheckUsed,
+      A.actual_first_no actualFirstNo,
+      case when A.meter_mode = '1' then '远程计量'
+      when A.meter_mode = '2' then '智能计量'
+      when A.meter_mode = '3' then '手工计量'
+      else A.meter_mode end meterMode,
+      A.prediction_no predictionNo,
+      A.railway_no railwayNo,
+      A.railway_model conveyanceType,
+      A.matter_no matterNo,
+      A.matter_name matterName,
+      to_char(round(A.meter_Weight/1000, 2),'FM9999999999999999.00') meterWeight,
+      case when A.weight_type = '0' then '毛重'
+      when A.weight_type = '1' then '皮重'
+      when A.weight_type = '2' then '期限皮'
+      else A.weight_type end weightType,
+      A.forwarding_unit_name forwardingUnitName,
+      A.receiving_uint_name receivingUintName,
+      case when A.meter_type_Name = 'SendToOutTms' then '外发'
+      when A.meter_type_Name = 'GM2GM' or A.meter_type_name = 'InnerTms' then '厂内转储'
+      when A.meter_type_Name = 'PO2GM' then '外进'
+      else A.meter_type_Name end meterTypeName,
+      A.create_man_name createManName,
+      A.create_time createTime,
+      A.base_spot_name baseSpotName,
+      case when A.value_flag = '0' then '作废'
+      when A.value_flag = '1' then '有效'
+      when A.value_flag = '2' then '结净'
+      else A.value_flag end valueFlag
+      from meter_work_railway_received A
+      left join meter_work_check_first_actual B
+      on A.actual_first_no = B.check_id
+      where 1 = 1
+      and A.actual_first_no in (
+      select distinct C.check_id
+      from meter_work_check_first_actual C
+      where 1 = 1
+      and C.value_flag = '0'
+      <if test="typeNo != null and typeName != ''">
+        and C.type_No in ('001019002','001019004')
+      </if>
+      <if test="typeName != null and typeName != ''">
+        and C.type_Name = in ('动态轨道衡','动态铁水衡')
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        and A.railway_type_no in ('001019002','001019004')
+      </if>)
+      and A.value_flag != '0'
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        and A.actual_first_no = #{actualFirstNo}
+      </if>
+      <if test="netSpot3NoStr != null and netSpot3NoStr != ''">
+        and A.base_spot_no in
+        <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
+          #{item}
+        </foreach>
+      </if>
+      <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+        and  A.create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+        and A.create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        and A.railway_type_no in ('001019002','001019004')
+      </if>
+      group by A.actual_first_no,
+      A.meter_mode,
+      A.prediction_no,
+      A.railway_no,
+      A.railway_model,
+      A.matter_no,
+      A.matter_name,
+      A.meter_weight,
+      A.weight_type,
+      A.forwarding_unit_name,
+      A.receiving_uint_name,
+      A.meter_type_Name,
+      A.create_man_name,
+      A.create_time,
+      A.base_spot_name,
+      A.value_flag
+    </select>
+  <select id="railwayDynamicsFirstLikeByDesc"
+          resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayFirstCountCheckNum">
+    select A.actual_first_no actualFirstNo,
+    case when A.meter_mode = '1' then '远程计量'
+    when A.meter_mode = '2' then '智能计量'
+    when A.meter_mode = '3' then '手工计量'
+    else A.meter_mode end meterMode,
+    A.prediction_no predictionNo,
+    A.railway_No railwayNo,
+    A.railway_model conveyanceType,
+    A.matter_no matterNo,
+    A.matter_name matterName,
+    to_char(round(A.meter_Weight/1000, 2),'FM9999999999999999.00') meterWeight,
+    case when A.weight_type = '0' then '毛重'
+    when A.weight_type = '1' then '皮重'
+    when A.weight_type = '2' then '期限皮'
+    else A.weight_type end weightType,
+    A.forwarding_unit_name forwardingUnitName,
+    A.receiving_uint_name receivingUintName,
+    case when A.meter_type_Name = 'SendToOutTms' then '外发'
+    when A.meter_type_Name = 'GM2GM' or A.meter_type_name = 'InnerTms' then '厂内转储'
+    when A.meter_type_Name = 'PO2GM' then '外进'
+    else A.meter_type_Name end meterTypeName,
+    A.create_man_name createManName,
+    A.create_time createTime,
+    A.base_spot_name baseSpotName,
+    case when A.value_flag = '0' then '作废'
+    when A.value_flag = '1' then '有效'
+    when A.value_flag = '2' then '结净'
+    else A.value_flag end valueFlag
+    from meter_work_railway_received A
+    left join meter_work_check_first_actual B
+    on A.actual_first_no = B.check_id
+    where 1 = 1
+    and A.actual_first_no not in (select distinct C.check_id
+    from meter_work_check_first_actual C
+    where 1 = 1
+    and C.value_flag = '0'
+    <if test="typeNo != null and typeName != ''">
+      and C.type_No in ('001019002','001019004')
+    </if>)
+    and A.value_flag != '0'
+    <if test="actualFirstNo != null and actualFirstNo != ''">
+      and A.actual_first_no = #{actualFirstNo}
+    </if>
+    <if test="netSpot3NoStr != null and netSpot3NoStr != ''">
+      and A.base_spot_no in
+      <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
+        #{item}
+      </foreach>
+    </if>
+    <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+      and  A.create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and A.create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and A.railway_type_no in ('001019002','001019004')
+    </if>
+    order by A.create_time desc
+  </select>
+  <select id="railwayDynamicsSpotInfoList"
+          resultType="com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo">
+    select baseSpotNo,
+    baseSpotName
+    from (
+    (
+    select A.base_spot_no baseSpotNo,
+    A.base_spot_name baseSpotName
+    from meter_work_railway_received A
+    left join meter_work_check_first_actual B
+    on A.actual_first_no = B.check_id
+    where 1 = 1
+    <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+      and  A.create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and A.create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and A.railway_type_no in ('001019002','001019004')
+    </if>
+    group by A.base_spot_no,
+    A.base_spot_name)
+    union
+    (select A.net_spot3_no baseSpotNo,
+    A.net_spot3_name baseSpotName
+    from meter_work_railway_actual A
+    left join meter_work_check_first_actual B
+    on A.actual_no = B.check_id
+    where 1 = 1
+    <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+      and  A.net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and A.net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and A.railway_type_no in ('001019002','001019004')
+    </if>
+    group by A.net_spot3_no,
+    A.net_spot3_name)
+    )
+    group by baseSpotNo,
+    baseSpotName
+    order by baseSpotName asc
+  </select>
+
+
+  <resultMap id="railwayDynamicsFirstDataListMap" type="com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived">
+    <id column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
+    <result column="PREDICTION_NO" jdbcType="VARCHAR" property="predictionNo" />
+    <result column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo" />
+    <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
+    <result column="RAILWAY_CARRIAGE_NO" jdbcType="VARCHAR" property="railwayCarriageNo" />
+    <result column="RAILWAY_WORK_NO" jdbcType="VARCHAR" property="railwayWorkNo" />
+    <result column="RAILWAY_SPEED" jdbcType="DECIMAL" property="railwaySpeed" />
+    <result column="RAILWAY_MODEL" jdbcType="VARCHAR" property="railwayModel" />
+    <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo" />
+    <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName" />
+    <result column="CONTRACT_NO" jdbcType="VARCHAR" property="contractNo" />
+    <result column="BATCH_NO" jdbcType="VARCHAR" property="batchNo" />
+    <result column="CUSTOMER_SUPPLIER_NO" jdbcType="VARCHAR" property="customerSupplierNo" />
+    <result column="CUSTOMER_SUPPLIER_NAME" jdbcType="VARCHAR" property="customerSupplierName" />
+    <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo" />
+    <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName" />
+    <result column="RECEIVING_UINT_NO" jdbcType="VARCHAR" property="receivingUintNo" />
+    <result column="RECEIVING_UINT_NAME" jdbcType="VARCHAR" property="receivingUintName" />
+    <result column="MATERIAL_NO" jdbcType="VARCHAR" property="materialNo" />
+    <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
+    <result column="SPEC_NO" jdbcType="VARCHAR" property="specNo" />
+    <result column="SPEC_NAME" jdbcType="VARCHAR" property="specName" />
+    <result column="SHIPMENT_GROSS_WEIGHT" jdbcType="DECIMAL" property="shipmentGrossWeight" />
+    <result column="SHIPMENT_NET_WEIGHT" jdbcType="DECIMAL" property="shipmentNetWeight" />
+    <result column="SHIPMENT_NUM" jdbcType="DECIMAL" property="shipmentNum" />
+    <result column="BIND_CARD_NO" jdbcType="VARCHAR" property="bindCardNo" />
+    <result column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo" />
+    <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName" />
+    <result column="SAMPLE_NO" jdbcType="VARCHAR" property="sampleNo" />
+    <result column="SAMPLE_VOUCHER" jdbcType="VARCHAR" property="sampleVoucher" />
+    <result column="CARRIER_UNIT_NO" jdbcType="VARCHAR" property="carrierUnitNo" />
+    <result column="CARRIER_UNIT_NAME" jdbcType="VARCHAR" property="carrierUnitName" />
+    <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
+    <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
+    <result column="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo" />
+    <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName" />
+    <result column="METER_PROCESS_NO" jdbcType="VARCHAR" property="meterProcessNo" />
+    <result column="METER_PROCESS_EDITION_NO" jdbcType="VARCHAR" property="meterProcessEditionNo" />
+    <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
+    <result column="WEIGHT_TYPE" jdbcType="VARCHAR" property="weightType" />
+    <result column="METER_SORT_WEIGHT" jdbcType="DECIMAL" property="meterSortWeight" />
+    <result column="METER_BALANCE_WEIGHT" jdbcType="DECIMAL" property="meterBalanceWeight" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
+    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
+    <result column="METER_CLASS" jdbcType="VARCHAR" property="meterClass" />
+    <result column="METER_GROUP" jdbcType="VARCHAR" property="meterGroup" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
+    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
+    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="CHECK_FLAG" jdbcType="VARCHAR" property="checkFlag" />
+    <result column="CHECK_MAN_NO" jdbcType="VARCHAR" property="checkManNo" />
+    <result column="CHECK_MAN_NAME" jdbcType="VARCHAR" property="checkManName" />
+    <result column="CHECK_TIME" jdbcType="TIMESTAMP" property="checkTime" />
+    <result column="METER_MODE" jdbcType="VARCHAR" property="meterMode" />
+    <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
+    <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
+    <result column="IS_CHEMICAL" jdbcType="VARCHAR" property="isChemical" />
+    <result column="LIMIT_WEIGHT" jdbcType="DECIMAL" property="limitWeight" />
+    <result column="RAILWAY_MODEL_NO" jdbcType="VARCHAR" property="railwayModelNo" />
+    <result column="RAILWAY_MODEL_NAME" jdbcType="VARCHAR" property="railwayModelName" />
+    <result column="IS_AUTO_OPERATION" jdbcType="VARCHAR" property="isAutoOperation" />
+    <result column="CHECK_MEMO" jdbcType="VARCHAR" property="checkMemo" />
+    <result column="CHECK_MAN1_NO" jdbcType="VARCHAR" property="checkMan1No" />
+    <result column="CHECK_MAN1_NAME" jdbcType="VARCHAR" property="checkMan1Name" />
+    <result column="CHECK_TIME1" jdbcType="TIMESTAMP" property="checkTime1" />
+    <result column="CHECK_MEMO1" jdbcType="VARCHAR" property="checkMemo1" />
+    <result column="CHECK_MAN2_NO" jdbcType="VARCHAR" property="checkMan2No" />
+    <result column="CHECK_MAN2_NAME" jdbcType="VARCHAR" property="checkMan2Name" />
+    <result column="CHECK_TIME2" jdbcType="TIMESTAMP" property="checkTime2" />
+    <result column="CHECK_MEMO2" jdbcType="VARCHAR" property="checkMemo2" />
+    <result column="CHECK_FLAG1" jdbcType="VARCHAR" property="checkFlag1" />
+    <result column="CHECK_FLAG2" jdbcType="VARCHAR" property="checkFlag2" />
+  </resultMap>
+  <select id="railwayDynamicsFirstDataList"
+          resultMap="railwayDynamicsFirstDataListMap">
+    select *
+    from meter_work_railway_received
+    where 1 = 1
+    and value_flag != '0'
+    <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+      and  create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and  create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and railway_type_no in ('001019002','001019004')
+    </if>
+  </select>
+  <select id="railwayDynamicsFirstImgDataList"
+          resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.RailwayFirstActualImgData">
+    select A.base_spot_no baseSpotNo,
+    A.base_spot_name baseSpotName
+    from meter_work_railway_received A
+    where 1 = 1
+    and A.actual_first_no not in (
+    select distinct C.check_id
+    from meter_work_check_first_actual C
+    where 1 = 1
+    and C.value_flag = '0'
+    <if test="typeNo != null and typeName != ''">
+      and C.type_No in ('001019002','001019004')
+    </if>
+    <if test="typeName != null and typeName != ''">
+      and C.type_Name in ('动态轨道衡','动态铁水衡')
+    </if>)
+    and A.value_flag != '0'
+    <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+      and  A.create_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and A.create_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and railway_type_no in ('001019002','001019004')
+    </if>
+  </select>
+  <select id="railwayDynamicsLikeByDesc"
+          resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActualRailwayTemp">
+    select baseSpotNo, baseSpotName,railwayNo,checkId,checkStartTime,checkEndTime,checkUsedSeconds,checkManNo,checkManName,checkResult,typeNo,typeName, valueFlag
+    from ((SELECT B.base_spot_no baseSpotNo,
+    B.base_spot_name baseSpotName,
+    B.railway_no railwayNo,
+    A.check_id checkId,
+    A.check_start_time checkStartTime,
+    A.check_end_time checkEndTime,
+    A.check_used_seconds checkUsedSeconds,
+    A.check_man_no checkManNo,
+    A.check_man_name checkManName,
+    A.check_result checkResult,
+    A.type_no typeNo,
+    A.type_name typeName,
+    A.value_flag valueFlag
+    FROM METER_WORK_CHECK_FIRST_ACTUAL A
+    inner join meter_work_railway_received B
+    on A.check_id = B.actual_first_no
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and B.railway_type_no in ('001019002','001019004')
+    </if>
+    <if test="typeNo != null and typeName != ''">
+      and A.type_No in ('001019002','001019004')
+    </if>
+    and A.value_flag = '0') union
+    (SELECT B.net_spot3_no   baseSpotNo,
+    B.net_spot3_name baseSpotName,
+    B.railway_no railwayNo,
+    A.check_id checkId,
+    A.check_start_time checkStartTime,
+    A.check_end_time checkEndTime,
+    A.check_used_seconds checkUsedSeconds,
+    A.check_man_no checkManNo,
+    A.check_man_name checkManName,
+    A.check_result checkResult,
+    A.type_no typeNo,
+    A.type_name typeName,
+    A.value_flag valueFlag
+    FROM METER_WORK_CHECK_FIRST_ACTUAL A
+    inner join meter_work_railway_actual B
+    on A.check_id = B.actual_no
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and B.railway_type_no in ('001019002','001019004')
+    </if>
+    <if test="typeNo != null and typeName != ''">
+      and A.type_No in ('001019002','001019004')
+    </if>
+    and A.value_flag = '1'))
+    where 1 = 1
+    <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+      and  checkStartTime  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and checkStartTime  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+    <if test="checkId != null and checkId != ''">
+      and checkId LIKE '%${checkId}%'
+    </if>
+    <if test="typeNo != null and typeNo != ''">
+      and typeNo in ('001019002','001019004')
+    </if>
+    <if test="carNo != null and carNo != ''">
+      and carNo LIKE '%${carNo}%'
+    </if>
+    <if test="valueFlag != null and valueFlag != ''">
+      and valueFlag = #{valueFlag}
+    </if>
+    <if test="minTime != null and minTime != ''">
+      and checkUsedSeconds >= #{minTime}
+    </if>
+    <if test="maxTime != null and maxTime != ''">
+      and checkUsedSeconds &lt;=  #{maxTime}
+    </if>
+    <if test="createManNoStr != null and createManNoStr != ''">
+      and checkManNo in
+      <foreach collection="manNoStr" item="item" open="(" separator="," close=")">
+        #{item}
+      </foreach>
+    </if>
+    <if test="netSpot3NoStr != null and netSpot3NoStr != ''">
+      and baseSpotNo in
+      <foreach collection="spotNoStr" item="item" open="(" separator="," close=")">
+        #{item}
+      </foreach>
+    </if>
+    order by checkStartTime desc
+  </select>
 </mapper>

+ 8 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/service/IMeterWorkCheckFirstActualService.java

@@ -42,4 +42,12 @@ public interface IMeterWorkCheckFirstActualService extends IBaseService<MeterWor
     PageList<RailwayActualCountCheckNum> railwayActualLikeByDesc(HashMap parmas);
 
     PageList<MeterWorkCheckFirstActualRailwayTemp> railwayLikeByDesc(HashMap parmas);
+
+    PageList<RailwayFirstCountCheckNum> railwayDynamicsFirstCountCheckNum(HashMap parmas);
+
+    PageList<RailwayFirstCountCheckNum> railwayDynamicsFirstLikeByDesc(HashMap parmas);
+
+    List<HashMap> railwayDynamicsFirstImgDataList(HashMap parmas);
+
+    PageList<MeterWorkCheckFirstActualRailwayTemp> railwayDynamicsLikeByDesc(HashMap parmas);
 }

+ 216 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/service/impl/MeterWorkCheckFirstActualServiceImpl.java

@@ -21,6 +21,8 @@ import com.steerinfo.meterwork.meterworkrailwayactfirst.mapper.MeterWorkRailwayA
 import com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst;
 import com.steerinfo.meterwork.meterworkrailwayactual.mapper.MeterWorkRailwayActualMapper;
 import com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual;
+import com.steerinfo.meterwork.meterworkrailwayreceived.mapper.MeterWorkRailwayReceivedMapper;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
 import com.steerinfo.util.PublicMethod;
 import com.steerinfo.util.StringUtils;
 import org.apache.shiro.crypto.hash.Hash;
@@ -73,6 +75,9 @@ public class MeterWorkCheckFirstActualServiceImpl extends BaseServiceImpl<MeterW
     @Resource
     private ComBaseInfoMapper comBaseInfoMapper;
 
+    @Resource
+    private MeterWorkRailwayReceivedMapper meterWorkRailwayReceivedMapper;
+
     @Override
     protected IBaseMapper<MeterWorkCheckFirstActual, String> getMapper() {
         return meterWorkCheckFirstActualMapper;
@@ -200,6 +205,101 @@ public class MeterWorkCheckFirstActualServiceImpl extends BaseServiceImpl<MeterW
                         }
                     }
                 }
+            }else if(model.getTypeNo().equals("001019002")||model.getTypeNo().equals("001019004")) {//动态轨道衡、动态铁水衡
+                if(model.getValueFlag().equals("0")) {
+                    if(meteringAdministratorModels.size() >= 1) {
+                        Long count = meteringAdministratorModels.stream().filter(item -> item.equals(userId)).count();
+                        if(count >= 1) {
+                            MeterWorkRailwayReceived firstModel = meterWorkRailwayReceivedMapper.selectByPrimaryKey(model.getCheckId());
+                            if(firstModel != null) {
+                                firstModel.setCheckMan2No(userId);
+                                firstModel.setCheckMan2Name(userName);
+                                firstModel.setCheckTime2(new Date());
+                                firstModel.setCheckFlag2("2");
+                                firstModel.setCheckMemo2(model.getCheckResult());
+                                meterWorkRailwayReceivedMapper.updateByPrimaryKeySelective(firstModel);
+                            }
+                            flag = true;
+                        }
+                    }
+                    if(flag == false && gaugerMonitorModels.size() >= 1){
+                        Long count = gaugerMonitorModels.stream().filter(item -> item.equals(userId)).count();
+                        if(count >= 1) {
+                            MeterWorkRailwayReceived firstModel = meterWorkRailwayReceivedMapper.selectByPrimaryKey(model.getCheckId());
+                            if(firstModel != null) {
+                                firstModel.setCheckMan1No(userId);
+                                firstModel.setCheckMan1Name(userName);
+                                firstModel.setCheckTime1(new Date());
+                                firstModel.setCheckFlag1("2");
+                                firstModel.setCheckMemo1(model.getCheckResult());
+                                meterWorkRailwayReceivedMapper.updateByPrimaryKeySelective(firstModel);
+                            }
+                            flag = true;
+                        }
+                    }
+                    if(flag == false && gaugerModels.size() >= 1) {
+                        Long count = gaugerModels.stream().filter(item -> item.equals(userId)).count();
+                        if(count >= 1) {
+                            MeterWorkRailwayReceived firstModel = meterWorkRailwayReceivedMapper.selectByPrimaryKey(model.getCheckId());
+                            if(firstModel != null) {
+                                firstModel.setCheckManNo(userId);
+                                firstModel.setCheckManName(userName);
+                                firstModel.setCheckTime(new Date());
+                                firstModel.setCheckFlag("2");
+                                firstModel.setCheckMemo(model.getCheckResult());
+                                meterWorkRailwayReceivedMapper.updateByPrimaryKeySelective(firstModel);
+                            }
+                            flag = true;
+                        }
+                    }
+                }else if(model.getValueFlag().equals("1")) {
+
+                    if(meteringAdministratorModels.size() >= 1) {
+                        Long count = meteringAdministratorModels.stream().filter(item -> item.equals(userId)).count();
+                        if(count >= 1) {
+                            MeterWorkRailwayActual actualModel = meterWorkRailwayActualMapper.selectByPrimaryKey(model.getCheckId());
+                            if(actualModel != null) {
+                                actualModel.setCheckMan2No(userId);
+                                actualModel.setCheckMan2Name(userName);
+                                actualModel.setCheckTime2(new Date());
+                                actualModel.setCheckFlag2("2");
+                                actualModel.setCheckMemo2(model.getCheckResult());
+                                meterWorkRailwayActualMapper.updateByPrimaryKeySelective(actualModel);
+                            }
+                            flag = true;
+                        }
+                    }
+                    if(flag == false && gaugerMonitorModels.size() >= 1){
+                        Long count = gaugerMonitorModels.stream().filter(item -> item.equals(userId)).count();
+                        if(count >= 1) {
+                            MeterWorkRailwayActual actualModel = meterWorkRailwayActualMapper.selectByPrimaryKey(model.getCheckId());
+                            if(actualModel != null) {
+                                actualModel.setCheckMan1No(userId);
+                                actualModel.setCheckMan1Name(userName);
+                                actualModel.setCheckTime1(new Date());
+                                actualModel.setCheckFlag1("2");
+                                actualModel.setCheckMemo1(model.getCheckResult());
+                                meterWorkRailwayActualMapper.updateByPrimaryKeySelective(actualModel);
+                            }
+                            flag = true;
+                        }
+                    }
+                    if(flag == false && gaugerModels.size() >= 1) {
+                        Long count = gaugerModels.stream().filter(item -> item.equals(userId)).count();
+                        if(count >= 1) {
+                            MeterWorkRailwayActual actualModel = meterWorkRailwayActualMapper.selectByPrimaryKey(model.getCheckId());
+                            if(actualModel != null) {
+                                actualModel.setCheckManNo(userId);
+                                actualModel.setCheckManName(userName);
+                                actualModel.setCheckTime(new Date());
+                                actualModel.setCheckFlag("2");
+                                actualModel.setCheckMemo(model.getCheckResult());
+                                meterWorkRailwayActualMapper.updateByPrimaryKeySelective(actualModel);
+                            }
+                            flag = true;
+                        }
+                    }
+                }
             }else {
                 if(model.getValueFlag().equals("0")) {
                     if(meteringAdministratorModels.size() >= 1) {
@@ -594,4 +694,120 @@ public class MeterWorkCheckFirstActualServiceImpl extends BaseServiceImpl<MeterW
         PageList pageInfo = new PageList(rows);
         return pageInfo;
     }
+
+    @Override
+    public PageList<RailwayFirstCountCheckNum> railwayDynamicsFirstCountCheckNum(HashMap params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        if(params.get("netSpot3NoStr") != null) {
+            String[] spotNoStr = params.get("netSpot3NoStr").toString().split(",");
+            params.put("spotNoStr", spotNoStr);
+        }
+        List<RailwayFirstCountCheckNum> rows = meterWorkCheckFirstActualMapper.railwayDynamicsFirstCountCheckNum(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public PageList<RailwayFirstCountCheckNum> railwayDynamicsFirstLikeByDesc(HashMap params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        if(params.get("netSpot3NoStr") != null) {
+            String[] spotNoStr = params.get("netSpot3NoStr").toString().split(",");
+            params.put("spotNoStr", spotNoStr);
+        }
+        List<RailwayFirstCountCheckNum> rows = meterWorkCheckFirstActualMapper.railwayDynamicsFirstLikeByDesc(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public List<HashMap> railwayDynamicsFirstImgDataList(HashMap params) {
+        // (001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)
+        //String typeNo = params.get("typeNo") != null? params.get("typeNo").toString(): "";
+        //// 0:一次数据、1:净重数据
+        //String valueFlag = params.get("valueFlag") != null? params.get("valueFlag").toString(): "";
+        //站点信息  baseSpotNo、baseSpotName
+        List<MeterBaseSpotInfo> spotList = meterWorkCheckFirstActualMapper.railwayDynamicsSpotInfoList(params);
+        //一次数据查询
+        String startTime = params.get("startTime").toString();
+        String endTime = params.get("endTime").toString();
+        String railwayTypeNo = params.get("railwayTypeNo").toString();
+        HashMap<String, Object> obj = new HashMap<>();
+        obj.put("startTime", startTime);
+        obj.put("endTime", endTime);
+        obj.put("railwayTypeNo",railwayTypeNo);
+        List<MeterWorkRailwayReceived> firstModels = meterWorkCheckFirstActualMapper.railwayDynamicsFirstDataList(obj);
+        List<MeterWorkRailwayActual> actualModels = meterWorkCheckFirstActualMapper.railwayActualDataList(obj);
+        //一次数据与核查表左连接
+        List<RailwayFirstActualImgData> firstImgDatamodels = meterWorkCheckFirstActualMapper.railwayDynamicsFirstImgDataList(params);
+        //净重数据与核查表左连接
+        List<RailwayFirstActualImgData> ActualImgDatamodels = meterWorkCheckFirstActualMapper.railwayActualImgDataList(params);
+        List<HashMap> mapList = new ArrayList<>();
+        if(spotList.size() >= 1) {
+            for(MeterBaseSpotInfo spotModel: spotList) {
+                long countFirstData = firstModels.stream().filter(item -> StringUtils.isNotEmpty(item.getBaseSpotNo())
+                        && StringUtils.isNotEmpty(item.getBaseSpotName())
+                        && StringUtils.isNotEmpty(spotModel.getBaseSpotNo())
+                        && StringUtils.isNotEmpty(spotModel.getBaseSpotName())
+                        && item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
+                        && item.getBaseSpotName().equals(spotModel.getBaseSpotName())).count();
+                long countCheckFirstDataYes = 0L;
+                long countCheckFirstDataNo = 0L;
+                if(firstImgDatamodels.size() >= 1) {
+                    countCheckFirstDataNo = firstImgDatamodels.stream().filter(item -> StringUtils.isNotEmpty(item.getBaseSpotNo())
+                            && StringUtils.isNotEmpty(item.getBaseSpotName())
+                            && StringUtils.isNotEmpty(spotModel.getBaseSpotNo())
+                            && StringUtils.isNotEmpty(spotModel.getBaseSpotName())
+                            && item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
+                            && item.getBaseSpotName().equals(spotModel.getBaseSpotName())).count();
+                }
+                countCheckFirstDataYes = countFirstData - countCheckFirstDataNo;
+
+                long countActualData = actualModels.stream().filter(item -> StringUtils.isNotEmpty(item.getNetSpot3No())
+                        && StringUtils.isNotEmpty(item.getNetSpot3Name())
+                        && StringUtils.isNotEmpty(spotModel.getBaseSpotNo())
+                        && StringUtils.isNotEmpty(spotModel.getBaseSpotName())
+                        && item.getNetSpot3No().equals(spotModel.getBaseSpotNo())
+                        && item.getNetSpot3Name().equals(spotModel.getBaseSpotName())).count();;
+                long countCheckActualDataYes = 0L;
+                long countCheckActualDataNo = 0L;
+                if(ActualImgDatamodels.size() >= 1) {
+                    countCheckActualDataNo = ActualImgDatamodels.stream().filter(item -> StringUtils.isNotEmpty(item.getBaseSpotNo())
+                            && StringUtils.isNotEmpty(item.getBaseSpotName())
+                            && StringUtils.isNotEmpty(spotModel.getBaseSpotNo())
+                            && StringUtils.isNotEmpty(spotModel.getBaseSpotName())
+                            && item.getBaseSpotNo().equals(spotModel.getBaseSpotNo())
+                            && item.getBaseSpotName().equals(spotModel.getBaseSpotName())).count();
+                }
+                countCheckActualDataYes = countActualData - countCheckActualDataNo;
+
+                HashMap<String, Object> map = new HashMap<>();
+                map.put("baseSpotNo", spotModel.getBaseSpotNo());
+                map.put("baseSpotName", spotModel.getBaseSpotName());
+                map.put("countFirstData", countFirstData);
+                map.put("countCheckFirstDataYes", countCheckFirstDataYes);
+                map.put("countCheckFirstDataNo", countCheckFirstDataNo);
+                map.put("countActualData", countActualData);
+                map.put("countCheckActualDataYes", countCheckActualDataYes);
+                map.put("countCheckActualDataNo", countCheckActualDataNo);
+                mapList.add(map);
+            }
+        }
+        return mapList;
+    }
+
+    @Override
+    public PageList<MeterWorkCheckFirstActualRailwayTemp> railwayDynamicsLikeByDesc(HashMap params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        if(params.get("createManNoStr") != null) {
+            String[] manNoStr = params.get("createManNoStr").toString().split(",");
+            params.put("manNoStr", manNoStr);
+        }
+        if(params.get("netSpot3NoStr") != null) {
+            String[] spotNoStr = params.get("netSpot3NoStr").toString().split(",");
+            params.put("spotNoStr", spotNoStr);
+        }
+        List<MeterWorkCheckFirstActualRailwayTemp> rows = meterWorkCheckFirstActualMapper.railwayDynamicsLikeByDesc(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
 }

+ 209 - 206
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/mapper/MeterWorkRailwayActFirstMapper.xml

@@ -111,47 +111,47 @@
     <result column="CHECK_FLAG2" jdbcType="VARCHAR" property="checkFlag2" />
   </resultMap>
   <sql id="columns">
-    ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
-    RAILWAY_SPEED, MATTER_NO, MATTER_NAME, CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, 
-    CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, 
-    RECEIVING_UINT_NAME, MATERIAL_NO, MATERIAL_NAME, SPEC_NO, SPEC_NAME, SHIPMENT_GROSS_WEIGHT, 
-    SHIPMENT_NET_WEIGHT, SHIPMENT_NUM, BIND_CARD_NO, LOAD_POINT_NO, LOAD_POINT_NAME, 
-    SAMPLE_NO, SAMPLE_VOUCHER, CARRIER_UNIT_NO, CARRIER_UNIT_NAME, PREDICTION_TYPE, PREDICTION_COMBINATION, 
-    METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO, METER_PROCESS_EDITION_NO, METER_WEIGHT, 
-    WEIGHT_TYPE, METER_SORT_WEIGHT, METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME, 
-    CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, METER_GROUP, MEMO, VALUE_FLAG, 
-    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, 
-    CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, LIMIT_WEIGHT, 
-    RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL, 
-    STATION, SOURCE_AREA, VOUCHER_IDENTITY, VOUCHER_ITEM, BUSINESS_GROUP, TEMP_CONVEYANCE, 
-    CONVEYANCE_TYPE, RESOURCE_SYSTEM, GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, PACKAGE_AMOUNT, 
-    PACKAGE_UNIT, THEORY_AMOUNT, MEASURE_BATCH, MEASURE_BATCH_COUNT, SENDER_TYPE, SENDER_REMARK, 
-    RECEIVER_TYPE, RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE, MEASURE_TASK_NUM, 
-    DATA_SOURCE, NOTE, TRAIN_NUMBER_NO, IS_PRE_SACALE, HC15, CANCEL_TYPE, LC_NO, CHECK_MEMO, 
-    CHECK_MAN1_NO, CHECK_MAN1_NAME, CHECK_TIME1, CHECK_MEMO1, CHECK_MAN2_NO, CHECK_MAN2_NAME, 
+    ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO,
+    RAILWAY_SPEED, MATTER_NO, MATTER_NAME, CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO,
+    CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO,
+    RECEIVING_UINT_NAME, MATERIAL_NO, MATERIAL_NAME, SPEC_NO, SPEC_NAME, SHIPMENT_GROSS_WEIGHT,
+    SHIPMENT_NET_WEIGHT, SHIPMENT_NUM, BIND_CARD_NO, LOAD_POINT_NO, LOAD_POINT_NAME,
+    SAMPLE_NO, SAMPLE_VOUCHER, CARRIER_UNIT_NO, CARRIER_UNIT_NAME, PREDICTION_TYPE, PREDICTION_COMBINATION,
+    METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO, METER_PROCESS_EDITION_NO, METER_WEIGHT,
+    WEIGHT_TYPE, METER_SORT_WEIGHT, METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME,
+    CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, METER_GROUP, MEMO, VALUE_FLAG,
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME,
+    CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, LIMIT_WEIGHT,
+    RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL,
+    STATION, SOURCE_AREA, VOUCHER_IDENTITY, VOUCHER_ITEM, BUSINESS_GROUP, TEMP_CONVEYANCE,
+    CONVEYANCE_TYPE, RESOURCE_SYSTEM, GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, PACKAGE_AMOUNT,
+    PACKAGE_UNIT, THEORY_AMOUNT, MEASURE_BATCH, MEASURE_BATCH_COUNT, SENDER_TYPE, SENDER_REMARK,
+    RECEIVER_TYPE, RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE, MEASURE_TASK_NUM,
+    DATA_SOURCE, NOTE, TRAIN_NUMBER_NO, IS_PRE_SACALE, HC15, CANCEL_TYPE, LC_NO, CHECK_MEMO,
+    CHECK_MAN1_NO, CHECK_MAN1_NAME, CHECK_TIME1, CHECK_MEMO1, CHECK_MAN2_NO, CHECK_MAN2_NAME,
     CHECK_TIME2, CHECK_MEMO2, CHECK_FLAG1, CHECK_FLAG2
   </sql>
   <sql id="columns_alias">
-    t.ACTUAL_FIRST_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO, 
-    t.RAILWAY_WORK_NO, t.RAILWAY_SPEED, t.MATTER_NO, t.MATTER_NAME, t.CONTRACT_NO, t.BATCH_NO, 
-    t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, t.FORWARDING_UNIT_NO, t.FORWARDING_UNIT_NAME, 
-    t.RECEIVING_UINT_NO, t.RECEIVING_UINT_NAME, t.MATERIAL_NO, t.MATERIAL_NAME, t.SPEC_NO, 
-    t.SPEC_NAME, t.SHIPMENT_GROSS_WEIGHT, t.SHIPMENT_NET_WEIGHT, t.SHIPMENT_NUM, t.BIND_CARD_NO, 
-    t.LOAD_POINT_NO, t.LOAD_POINT_NAME, t.SAMPLE_NO, t.SAMPLE_VOUCHER, t.CARRIER_UNIT_NO, 
-    t.CARRIER_UNIT_NAME, t.PREDICTION_TYPE, t.PREDICTION_COMBINATION, t.METER_TYPE_NO, 
-    t.METER_TYPE_NAME, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO, t.METER_WEIGHT, 
-    t.WEIGHT_TYPE, t.METER_SORT_WEIGHT, t.METER_BALANCE_WEIGHT, t.CREATE_MAN_NO, t.CREATE_MAN_NAME, 
-    t.CREATE_TIME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.METER_CLASS, t.METER_GROUP, t.MEMO, 
-    t.VALUE_FLAG, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.CHECK_FLAG, t.CHECK_MAN_NO, 
-    t.CHECK_MAN_NAME, t.CHECK_TIME, t.METER_MODE, t.RAILWAY_TYPE_NO, t.RAILWAY_TYPE_NAME, 
-    t.IS_CHEMICAL, t.LIMIT_WEIGHT, t.RAILWAY_MODEL_NO, t.RAILWAY_MODEL_NAME, t.RAILWAY_FACTORY_WEIGHT, 
-    t.WATER_NUM, t.ARRIVAL, t.STATION, t.SOURCE_AREA, t.VOUCHER_IDENTITY, t.VOUCHER_ITEM, 
-    t.BUSINESS_GROUP, t.TEMP_CONVEYANCE, t.CONVEYANCE_TYPE, t.RESOURCE_SYSTEM, t.GROUP_PACKAGE_AMOUNT, 
-    t.GROUP_PACKAGE_UNIT, t.PACKAGE_AMOUNT, t.PACKAGE_UNIT, t.THEORY_AMOUNT, t.MEASURE_BATCH, 
-    t.MEASURE_BATCH_COUNT, t.SENDER_TYPE, t.SENDER_REMARK, t.RECEIVER_TYPE, t.RECEIVER_REMARK, 
-    t.AMOUNT_UNIT, t.MEASURE_OBJECT_TYPE, t.MEASURE_TASK_NUM, t.DATA_SOURCE, t.NOTE, 
-    t.TRAIN_NUMBER_NO, t.IS_PRE_SACALE, t.HC15, t.CANCEL_TYPE, t.LC_NO, t.CHECK_MEMO, 
-    t.CHECK_MAN1_NO, t.CHECK_MAN1_NAME, t.CHECK_TIME1, t.CHECK_MEMO1, t.CHECK_MAN2_NO, 
+    t.ACTUAL_FIRST_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO,
+    t.RAILWAY_WORK_NO, t.RAILWAY_SPEED, t.MATTER_NO, t.MATTER_NAME, t.CONTRACT_NO, t.BATCH_NO,
+    t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, t.FORWARDING_UNIT_NO, t.FORWARDING_UNIT_NAME,
+    t.RECEIVING_UINT_NO, t.RECEIVING_UINT_NAME, t.MATERIAL_NO, t.MATERIAL_NAME, t.SPEC_NO,
+    t.SPEC_NAME, t.SHIPMENT_GROSS_WEIGHT, t.SHIPMENT_NET_WEIGHT, t.SHIPMENT_NUM, t.BIND_CARD_NO,
+    t.LOAD_POINT_NO, t.LOAD_POINT_NAME, t.SAMPLE_NO, t.SAMPLE_VOUCHER, t.CARRIER_UNIT_NO,
+    t.CARRIER_UNIT_NAME, t.PREDICTION_TYPE, t.PREDICTION_COMBINATION, t.METER_TYPE_NO,
+    t.METER_TYPE_NAME, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO, t.METER_WEIGHT,
+    t.WEIGHT_TYPE, t.METER_SORT_WEIGHT, t.METER_BALANCE_WEIGHT, t.CREATE_MAN_NO, t.CREATE_MAN_NAME,
+    t.CREATE_TIME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.METER_CLASS, t.METER_GROUP, t.MEMO,
+    t.VALUE_FLAG, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, t.CHECK_FLAG, t.CHECK_MAN_NO,
+    t.CHECK_MAN_NAME, t.CHECK_TIME, t.METER_MODE, t.RAILWAY_TYPE_NO, t.RAILWAY_TYPE_NAME,
+    t.IS_CHEMICAL, t.LIMIT_WEIGHT, t.RAILWAY_MODEL_NO, t.RAILWAY_MODEL_NAME, t.RAILWAY_FACTORY_WEIGHT,
+    t.WATER_NUM, t.ARRIVAL, t.STATION, t.SOURCE_AREA, t.VOUCHER_IDENTITY, t.VOUCHER_ITEM,
+    t.BUSINESS_GROUP, t.TEMP_CONVEYANCE, t.CONVEYANCE_TYPE, t.RESOURCE_SYSTEM, t.GROUP_PACKAGE_AMOUNT,
+    t.GROUP_PACKAGE_UNIT, t.PACKAGE_AMOUNT, t.PACKAGE_UNIT, t.THEORY_AMOUNT, t.MEASURE_BATCH,
+    t.MEASURE_BATCH_COUNT, t.SENDER_TYPE, t.SENDER_REMARK, t.RECEIVER_TYPE, t.RECEIVER_REMARK,
+    t.AMOUNT_UNIT, t.MEASURE_OBJECT_TYPE, t.MEASURE_TASK_NUM, t.DATA_SOURCE, t.NOTE,
+    t.TRAIN_NUMBER_NO, t.IS_PRE_SACALE, t.HC15, t.CANCEL_TYPE, t.LC_NO, t.CHECK_MEMO,
+    t.CHECK_MAN1_NO, t.CHECK_MAN1_NAME, t.CHECK_TIME1, t.CHECK_MEMO1, t.CHECK_MAN2_NO,
     t.CHECK_MAN2_NAME, t.CHECK_TIME2, t.CHECK_MEMO2, t.CHECK_FLAG1, t.CHECK_FLAG2
   </sql>
   <sql id="select">
@@ -161,7 +161,7 @@
     SELECT <include refid="columns_alias" /> FROM METER_WORK_RAILWAY_ACT_FIRST t
   </sql>
   <sql id="where">
-    <where> 
+    <where>
       <if test="actualFirstNo != null and actualFirstNo != ''">
         and ACTUAL_FIRST_NO = #{actualFirstNo}
       </if>
@@ -486,7 +486,7 @@
     </where>
   </sql>
   <sql id="whereLike">
-    <where> 
+    <where>
       <if test="actualFirstNo != null and actualFirstNo != ''">
         and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
       </if>
@@ -816,7 +816,7 @@
   </delete>
   <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
     delete from METER_WORK_RAILWAY_ACT_FIRST
-    where 1!=1 
+    where 1!=1
       <if test="predictionNo != null and predictionNo != ''">
         or PREDICTION_NO = #{predictionNo}
       </if>
@@ -1137,79 +1137,79 @@
       </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst">
-    insert into METER_WORK_RAILWAY_ACT_FIRST (ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, 
-      RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
-      RAILWAY_SPEED, MATTER_NO, MATTER_NAME, 
-      CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, 
-      CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO, 
-      FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME, 
-      MATERIAL_NO, MATERIAL_NAME, SPEC_NO, 
-      SPEC_NAME, SHIPMENT_GROSS_WEIGHT, SHIPMENT_NET_WEIGHT, 
-      SHIPMENT_NUM, BIND_CARD_NO, LOAD_POINT_NO, 
-      LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER, 
-      CARRIER_UNIT_NO, CARRIER_UNIT_NAME, PREDICTION_TYPE, 
-      PREDICTION_COMBINATION, METER_TYPE_NO, METER_TYPE_NAME, 
-      METER_PROCESS_NO, METER_PROCESS_EDITION_NO, 
-      METER_WEIGHT, WEIGHT_TYPE, METER_SORT_WEIGHT, 
-      METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME, 
-      CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, 
-      METER_CLASS, METER_GROUP, MEMO, 
-      VALUE_FLAG, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
-      UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, 
-      CHECK_MAN_NAME, CHECK_TIME, METER_MODE, 
-      RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, 
-      LIMIT_WEIGHT, RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME, 
-      RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL, 
-      STATION, SOURCE_AREA, VOUCHER_IDENTITY, 
-      VOUCHER_ITEM, BUSINESS_GROUP, TEMP_CONVEYANCE, 
-      CONVEYANCE_TYPE, RESOURCE_SYSTEM, GROUP_PACKAGE_AMOUNT, 
-      GROUP_PACKAGE_UNIT, PACKAGE_AMOUNT, PACKAGE_UNIT, 
-      THEORY_AMOUNT, MEASURE_BATCH, MEASURE_BATCH_COUNT, 
-      SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE, 
-      RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE, 
-      MEASURE_TASK_NUM, DATA_SOURCE, NOTE, 
-      TRAIN_NUMBER_NO, IS_PRE_SACALE, HC15, 
-      CANCEL_TYPE, LC_NO, CHECK_MEMO, 
-      CHECK_MAN1_NO, CHECK_MAN1_NAME, CHECK_TIME1, 
-      CHECK_MEMO1, CHECK_MAN2_NO, CHECK_MAN2_NAME, 
-      CHECK_TIME2, CHECK_MEMO2, CHECK_FLAG1, 
+    insert into METER_WORK_RAILWAY_ACT_FIRST (ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO,
+      RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO,
+      RAILWAY_SPEED, MATTER_NO, MATTER_NAME,
+      CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO,
+      CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO,
+      FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, RECEIVING_UINT_NAME,
+      MATERIAL_NO, MATERIAL_NAME, SPEC_NO,
+      SPEC_NAME, SHIPMENT_GROSS_WEIGHT, SHIPMENT_NET_WEIGHT,
+      SHIPMENT_NUM, BIND_CARD_NO, LOAD_POINT_NO,
+      LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER,
+      CARRIER_UNIT_NO, CARRIER_UNIT_NAME, PREDICTION_TYPE,
+      PREDICTION_COMBINATION, METER_TYPE_NO, METER_TYPE_NAME,
+      METER_PROCESS_NO, METER_PROCESS_EDITION_NO,
+      METER_WEIGHT, WEIGHT_TYPE, METER_SORT_WEIGHT,
+      METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME,
+      CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME,
+      METER_CLASS, METER_GROUP, MEMO,
+      VALUE_FLAG, UPDATE_MAN_NO, UPDATE_MAN_NAME,
+      UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO,
+      CHECK_MAN_NAME, CHECK_TIME, METER_MODE,
+      RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL,
+      LIMIT_WEIGHT, RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME,
+      RAILWAY_FACTORY_WEIGHT, WATER_NUM, ARRIVAL,
+      STATION, SOURCE_AREA, VOUCHER_IDENTITY,
+      VOUCHER_ITEM, BUSINESS_GROUP, TEMP_CONVEYANCE,
+      CONVEYANCE_TYPE, RESOURCE_SYSTEM, GROUP_PACKAGE_AMOUNT,
+      GROUP_PACKAGE_UNIT, PACKAGE_AMOUNT, PACKAGE_UNIT,
+      THEORY_AMOUNT, MEASURE_BATCH, MEASURE_BATCH_COUNT,
+      SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE,
+      RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE,
+      MEASURE_TASK_NUM, DATA_SOURCE, NOTE,
+      TRAIN_NUMBER_NO, IS_PRE_SACALE, HC15,
+      CANCEL_TYPE, LC_NO, CHECK_MEMO,
+      CHECK_MAN1_NO, CHECK_MAN1_NAME, CHECK_TIME1,
+      CHECK_MEMO1, CHECK_MAN2_NO, CHECK_MAN2_NAME,
+      CHECK_TIME2, CHECK_MEMO2, CHECK_FLAG1,
       CHECK_FLAG2)
-    values (#{actualFirstNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, 
-      #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{railwayWorkNo,jdbcType=VARCHAR}, 
-      #{railwaySpeed,jdbcType=DECIMAL}, #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR}, 
-      #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, #{customerSupplierNo,jdbcType=VARCHAR}, 
-      #{customerSupplierName,jdbcType=VARCHAR}, #{forwardingUnitNo,jdbcType=VARCHAR}, 
-      #{forwardingUnitName,jdbcType=VARCHAR}, #{receivingUintNo,jdbcType=VARCHAR}, #{receivingUintName,jdbcType=VARCHAR}, 
-      #{materialNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{specNo,jdbcType=VARCHAR}, 
-      #{specName,jdbcType=VARCHAR}, #{shipmentGrossWeight,jdbcType=DECIMAL}, #{shipmentNetWeight,jdbcType=DECIMAL}, 
-      #{shipmentNum,jdbcType=DECIMAL}, #{bindCardNo,jdbcType=VARCHAR}, #{loadPointNo,jdbcType=VARCHAR}, 
-      #{loadPointName,jdbcType=VARCHAR}, #{sampleNo,jdbcType=VARCHAR}, #{sampleVoucher,jdbcType=VARCHAR}, 
-      #{carrierUnitNo,jdbcType=VARCHAR}, #{carrierUnitName,jdbcType=VARCHAR}, #{predictionType,jdbcType=VARCHAR}, 
-      #{predictionCombination,jdbcType=VARCHAR}, #{meterTypeNo,jdbcType=VARCHAR}, #{meterTypeName,jdbcType=VARCHAR}, 
-      #{meterProcessNo,jdbcType=VARCHAR}, #{meterProcessEditionNo,jdbcType=VARCHAR}, 
-      #{meterWeight,jdbcType=DECIMAL}, #{weightType,jdbcType=VARCHAR}, #{meterSortWeight,jdbcType=DECIMAL}, 
-      #{meterBalanceWeight,jdbcType=DECIMAL}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, 
-      #{createTime,jdbcType=TIMESTAMP}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, 
-      #{meterClass,jdbcType=VARCHAR}, #{meterGroup,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR}, 
-      #{valueFlag,jdbcType=VARCHAR}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR}, 
-      #{updateTime,jdbcType=TIMESTAMP}, #{checkFlag,jdbcType=VARCHAR}, #{checkManNo,jdbcType=VARCHAR}, 
-      #{checkManName,jdbcType=VARCHAR}, #{checkTime,jdbcType=TIMESTAMP}, #{meterMode,jdbcType=VARCHAR}, 
-      #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,jdbcType=VARCHAR}, #{isChemical,jdbcType=VARCHAR}, 
-      #{limitWeight,jdbcType=DECIMAL}, #{railwayModelNo,jdbcType=VARCHAR}, #{railwayModelName,jdbcType=VARCHAR}, 
-      #{railwayFactoryWeight,jdbcType=DECIMAL}, #{waterNum,jdbcType=DECIMAL}, #{arrival,jdbcType=VARCHAR}, 
-      #{station,jdbcType=VARCHAR}, #{sourceArea,jdbcType=VARCHAR}, #{voucherIdentity,jdbcType=VARCHAR}, 
-      #{voucherItem,jdbcType=VARCHAR}, #{businessGroup,jdbcType=VARCHAR}, #{tempConveyance,jdbcType=VARCHAR}, 
-      #{conveyanceType,jdbcType=VARCHAR}, #{resourceSystem,jdbcType=VARCHAR}, #{groupPackageAmount,jdbcType=DECIMAL}, 
-      #{groupPackageUnit,jdbcType=VARCHAR}, #{packageAmount,jdbcType=DECIMAL}, #{packageUnit,jdbcType=VARCHAR}, 
-      #{theoryAmount,jdbcType=DECIMAL}, #{measureBatch,jdbcType=VARCHAR}, #{measureBatchCount,jdbcType=DECIMAL}, 
-      #{senderType,jdbcType=VARCHAR}, #{senderRemark,jdbcType=VARCHAR}, #{receiverType,jdbcType=VARCHAR}, 
-      #{receiverRemark,jdbcType=VARCHAR}, #{amountUnit,jdbcType=VARCHAR}, #{measureObjectType,jdbcType=VARCHAR}, 
-      #{measureTaskNum,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR}, 
-      #{trainNumberNo,jdbcType=VARCHAR}, #{isPreSacale,jdbcType=VARCHAR}, #{hc15,jdbcType=VARCHAR}, 
-      #{cancelType,jdbcType=VARCHAR}, #{lcNo,jdbcType=VARCHAR}, #{checkMemo,jdbcType=VARCHAR}, 
-      #{checkMan1No,jdbcType=VARCHAR}, #{checkMan1Name,jdbcType=VARCHAR}, #{checkTime1,jdbcType=TIMESTAMP}, 
-      #{checkMemo1,jdbcType=VARCHAR}, #{checkMan2No,jdbcType=VARCHAR}, #{checkMan2Name,jdbcType=VARCHAR}, 
-      #{checkTime2,jdbcType=TIMESTAMP}, #{checkMemo2,jdbcType=VARCHAR}, #{checkFlag1,jdbcType=VARCHAR}, 
+    values (#{actualFirstNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR},
+      #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{railwayWorkNo,jdbcType=VARCHAR},
+      #{railwaySpeed,jdbcType=DECIMAL}, #{matterNo,jdbcType=VARCHAR}, #{matterName,jdbcType=VARCHAR},
+      #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, #{customerSupplierNo,jdbcType=VARCHAR},
+      #{customerSupplierName,jdbcType=VARCHAR}, #{forwardingUnitNo,jdbcType=VARCHAR},
+      #{forwardingUnitName,jdbcType=VARCHAR}, #{receivingUintNo,jdbcType=VARCHAR}, #{receivingUintName,jdbcType=VARCHAR},
+      #{materialNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, #{specNo,jdbcType=VARCHAR},
+      #{specName,jdbcType=VARCHAR}, #{shipmentGrossWeight,jdbcType=DECIMAL}, #{shipmentNetWeight,jdbcType=DECIMAL},
+      #{shipmentNum,jdbcType=DECIMAL}, #{bindCardNo,jdbcType=VARCHAR}, #{loadPointNo,jdbcType=VARCHAR},
+      #{loadPointName,jdbcType=VARCHAR}, #{sampleNo,jdbcType=VARCHAR}, #{sampleVoucher,jdbcType=VARCHAR},
+      #{carrierUnitNo,jdbcType=VARCHAR}, #{carrierUnitName,jdbcType=VARCHAR}, #{predictionType,jdbcType=VARCHAR},
+      #{predictionCombination,jdbcType=VARCHAR}, #{meterTypeNo,jdbcType=VARCHAR}, #{meterTypeName,jdbcType=VARCHAR},
+      #{meterProcessNo,jdbcType=VARCHAR}, #{meterProcessEditionNo,jdbcType=VARCHAR},
+      #{meterWeight,jdbcType=DECIMAL}, #{weightType,jdbcType=VARCHAR}, #{meterSortWeight,jdbcType=DECIMAL},
+      #{meterBalanceWeight,jdbcType=DECIMAL}, #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR},
+      #{createTime,jdbcType=TIMESTAMP}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR},
+      #{meterClass,jdbcType=VARCHAR}, #{meterGroup,jdbcType=VARCHAR}, #{memo,jdbcType=VARCHAR},
+      #{valueFlag,jdbcType=VARCHAR}, #{updateManNo,jdbcType=VARCHAR}, #{updateManName,jdbcType=VARCHAR},
+      #{updateTime,jdbcType=TIMESTAMP}, #{checkFlag,jdbcType=VARCHAR}, #{checkManNo,jdbcType=VARCHAR},
+      #{checkManName,jdbcType=VARCHAR}, #{checkTime,jdbcType=TIMESTAMP}, #{meterMode,jdbcType=VARCHAR},
+      #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,jdbcType=VARCHAR}, #{isChemical,jdbcType=VARCHAR},
+      #{limitWeight,jdbcType=DECIMAL}, #{railwayModelNo,jdbcType=VARCHAR}, #{railwayModelName,jdbcType=VARCHAR},
+      #{railwayFactoryWeight,jdbcType=DECIMAL}, #{waterNum,jdbcType=DECIMAL}, #{arrival,jdbcType=VARCHAR},
+      #{station,jdbcType=VARCHAR}, #{sourceArea,jdbcType=VARCHAR}, #{voucherIdentity,jdbcType=VARCHAR},
+      #{voucherItem,jdbcType=VARCHAR}, #{businessGroup,jdbcType=VARCHAR}, #{tempConveyance,jdbcType=VARCHAR},
+      #{conveyanceType,jdbcType=VARCHAR}, #{resourceSystem,jdbcType=VARCHAR}, #{groupPackageAmount,jdbcType=DECIMAL},
+      #{groupPackageUnit,jdbcType=VARCHAR}, #{packageAmount,jdbcType=DECIMAL}, #{packageUnit,jdbcType=VARCHAR},
+      #{theoryAmount,jdbcType=DECIMAL}, #{measureBatch,jdbcType=VARCHAR}, #{measureBatchCount,jdbcType=DECIMAL},
+      #{senderType,jdbcType=VARCHAR}, #{senderRemark,jdbcType=VARCHAR}, #{receiverType,jdbcType=VARCHAR},
+      #{receiverRemark,jdbcType=VARCHAR}, #{amountUnit,jdbcType=VARCHAR}, #{measureObjectType,jdbcType=VARCHAR},
+      #{measureTaskNum,jdbcType=VARCHAR}, #{dataSource,jdbcType=VARCHAR}, #{note,jdbcType=VARCHAR},
+      #{trainNumberNo,jdbcType=VARCHAR}, #{isPreSacale,jdbcType=VARCHAR}, #{hc15,jdbcType=VARCHAR},
+      #{cancelType,jdbcType=VARCHAR}, #{lcNo,jdbcType=VARCHAR}, #{checkMemo,jdbcType=VARCHAR},
+      #{checkMan1No,jdbcType=VARCHAR}, #{checkMan1Name,jdbcType=VARCHAR}, #{checkTime1,jdbcType=TIMESTAMP},
+      #{checkMemo1,jdbcType=VARCHAR}, #{checkMan2No,jdbcType=VARCHAR}, #{checkMan2Name,jdbcType=VARCHAR},
+      #{checkTime2,jdbcType=TIMESTAMP}, #{checkMemo2,jdbcType=VARCHAR}, #{checkFlag1,jdbcType=VARCHAR},
       #{checkFlag2,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkrailwayactfirst.model.MeterWorkRailwayActFirst">
@@ -2308,95 +2308,95 @@
     <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
-    insert into METER_WORK_RAILWAY_ACT_FIRST 
-      (ACTUAL_FIRST_NO, 
-      PREDICTION_NO, NOTICE_NO, RAILWAY_NO, 
-      RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
-      RAILWAY_SPEED, MATTER_NO, MATTER_NAME, 
-      CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, 
-      CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO, 
-      FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, 
-      RECEIVING_UINT_NAME, MATERIAL_NO, 
-      MATERIAL_NAME, SPEC_NO, SPEC_NAME, 
-      SHIPMENT_GROSS_WEIGHT, SHIPMENT_NET_WEIGHT, 
-      SHIPMENT_NUM, BIND_CARD_NO, LOAD_POINT_NO, 
-      LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER, 
-      CARRIER_UNIT_NO, CARRIER_UNIT_NAME, 
-      PREDICTION_TYPE, PREDICTION_COMBINATION, 
-      METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO, 
-      METER_PROCESS_EDITION_NO, METER_WEIGHT, 
-      WEIGHT_TYPE, METER_SORT_WEIGHT, 
-      METER_BALANCE_WEIGHT, CREATE_MAN_NO, 
-      CREATE_MAN_NAME, CREATE_TIME, 
-      BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, 
-      METER_GROUP, MEMO, VALUE_FLAG, 
-      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
-      CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, 
-      CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, 
-      RAILWAY_TYPE_NAME, IS_CHEMICAL, 
-      LIMIT_WEIGHT, RAILWAY_MODEL_NO, 
-      RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT, 
-      WATER_NUM, ARRIVAL, STATION, 
-      SOURCE_AREA, VOUCHER_IDENTITY, 
-      VOUCHER_ITEM, BUSINESS_GROUP, TEMP_CONVEYANCE, 
-      CONVEYANCE_TYPE, RESOURCE_SYSTEM, 
-      GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, 
-      PACKAGE_AMOUNT, PACKAGE_UNIT, THEORY_AMOUNT, 
-      MEASURE_BATCH, MEASURE_BATCH_COUNT, 
-      SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE, 
-      RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE, 
-      MEASURE_TASK_NUM, DATA_SOURCE, NOTE, 
-      TRAIN_NUMBER_NO, IS_PRE_SACALE, HC15, 
-      CANCEL_TYPE, LC_NO, CHECK_MEMO, 
-      CHECK_MAN1_NO, CHECK_MAN1_NAME, CHECK_TIME1, 
-      CHECK_MEMO1, CHECK_MAN2_NO, CHECK_MAN2_NAME, 
-      CHECK_TIME2, CHECK_MEMO2, CHECK_FLAG1, 
+    insert into METER_WORK_RAILWAY_ACT_FIRST
+      (ACTUAL_FIRST_NO,
+      PREDICTION_NO, NOTICE_NO, RAILWAY_NO,
+      RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO,
+      RAILWAY_SPEED, MATTER_NO, MATTER_NAME,
+      CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO,
+      CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO,
+      FORWARDING_UNIT_NAME, RECEIVING_UINT_NO,
+      RECEIVING_UINT_NAME, MATERIAL_NO,
+      MATERIAL_NAME, SPEC_NO, SPEC_NAME,
+      SHIPMENT_GROSS_WEIGHT, SHIPMENT_NET_WEIGHT,
+      SHIPMENT_NUM, BIND_CARD_NO, LOAD_POINT_NO,
+      LOAD_POINT_NAME, SAMPLE_NO, SAMPLE_VOUCHER,
+      CARRIER_UNIT_NO, CARRIER_UNIT_NAME,
+      PREDICTION_TYPE, PREDICTION_COMBINATION,
+      METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO,
+      METER_PROCESS_EDITION_NO, METER_WEIGHT,
+      WEIGHT_TYPE, METER_SORT_WEIGHT,
+      METER_BALANCE_WEIGHT, CREATE_MAN_NO,
+      CREATE_MAN_NAME, CREATE_TIME,
+      BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS,
+      METER_GROUP, MEMO, VALUE_FLAG,
+      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME,
+      CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME,
+      CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO,
+      RAILWAY_TYPE_NAME, IS_CHEMICAL,
+      LIMIT_WEIGHT, RAILWAY_MODEL_NO,
+      RAILWAY_MODEL_NAME, RAILWAY_FACTORY_WEIGHT,
+      WATER_NUM, ARRIVAL, STATION,
+      SOURCE_AREA, VOUCHER_IDENTITY,
+      VOUCHER_ITEM, BUSINESS_GROUP, TEMP_CONVEYANCE,
+      CONVEYANCE_TYPE, RESOURCE_SYSTEM,
+      GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT,
+      PACKAGE_AMOUNT, PACKAGE_UNIT, THEORY_AMOUNT,
+      MEASURE_BATCH, MEASURE_BATCH_COUNT,
+      SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE,
+      RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE,
+      MEASURE_TASK_NUM, DATA_SOURCE, NOTE,
+      TRAIN_NUMBER_NO, IS_PRE_SACALE, HC15,
+      CANCEL_TYPE, LC_NO, CHECK_MEMO,
+      CHECK_MAN1_NO, CHECK_MAN1_NAME, CHECK_TIME1,
+      CHECK_MEMO1, CHECK_MAN2_NO, CHECK_MAN2_NAME,
+      CHECK_TIME2, CHECK_MEMO2, CHECK_FLAG1,
       CHECK_FLAG2)
-    ( <foreach collection="list" item="item" separator="union all"> 
-   select  
-      #{item.actualFirstNo,jdbcType=VARCHAR}, 
-      #{item.predictionNo,jdbcType=VARCHAR}, #{item.noticeNo,jdbcType=VARCHAR}, #{item.railwayNo,jdbcType=VARCHAR}, 
-      #{item.railwayCarriageNo,jdbcType=VARCHAR}, #{item.railwayWorkNo,jdbcType=VARCHAR}, 
-      #{item.railwaySpeed,jdbcType=DECIMAL}, #{item.matterNo,jdbcType=VARCHAR}, #{item.matterName,jdbcType=VARCHAR}, 
-      #{item.contractNo,jdbcType=VARCHAR}, #{item.batchNo,jdbcType=VARCHAR}, #{item.customerSupplierNo,jdbcType=VARCHAR}, 
-      #{item.customerSupplierName,jdbcType=VARCHAR}, #{item.forwardingUnitNo,jdbcType=VARCHAR}, 
-      #{item.forwardingUnitName,jdbcType=VARCHAR}, #{item.receivingUintNo,jdbcType=VARCHAR}, 
-      #{item.receivingUintName,jdbcType=VARCHAR}, #{item.materialNo,jdbcType=VARCHAR}, 
-      #{item.materialName,jdbcType=VARCHAR}, #{item.specNo,jdbcType=VARCHAR}, #{item.specName,jdbcType=VARCHAR}, 
-      #{item.shipmentGrossWeight,jdbcType=DECIMAL}, #{item.shipmentNetWeight,jdbcType=DECIMAL}, 
-      #{item.shipmentNum,jdbcType=DECIMAL}, #{item.bindCardNo,jdbcType=VARCHAR}, #{item.loadPointNo,jdbcType=VARCHAR}, 
-      #{item.loadPointName,jdbcType=VARCHAR}, #{item.sampleNo,jdbcType=VARCHAR}, #{item.sampleVoucher,jdbcType=VARCHAR}, 
-      #{item.carrierUnitNo,jdbcType=VARCHAR}, #{item.carrierUnitName,jdbcType=VARCHAR}, 
-      #{item.predictionType,jdbcType=VARCHAR}, #{item.predictionCombination,jdbcType=VARCHAR}, 
-      #{item.meterTypeNo,jdbcType=VARCHAR}, #{item.meterTypeName,jdbcType=VARCHAR}, #{item.meterProcessNo,jdbcType=VARCHAR}, 
-      #{item.meterProcessEditionNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, 
-      #{item.weightType,jdbcType=VARCHAR}, #{item.meterSortWeight,jdbcType=DECIMAL}, 
-      #{item.meterBalanceWeight,jdbcType=DECIMAL}, #{item.createManNo,jdbcType=VARCHAR}, 
-      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
-      #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.meterClass,jdbcType=VARCHAR}, 
-      #{item.meterGroup,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, 
-      #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
-      #{item.checkFlag,jdbcType=VARCHAR}, #{item.checkManNo,jdbcType=VARCHAR}, #{item.checkManName,jdbcType=VARCHAR}, 
-      #{item.checkTime,jdbcType=TIMESTAMP}, #{item.meterMode,jdbcType=VARCHAR}, #{item.railwayTypeNo,jdbcType=VARCHAR}, 
-      #{item.railwayTypeName,jdbcType=VARCHAR}, #{item.isChemical,jdbcType=VARCHAR}, 
-      #{item.limitWeight,jdbcType=DECIMAL}, #{item.railwayModelNo,jdbcType=VARCHAR}, 
-      #{item.railwayModelName,jdbcType=VARCHAR}, #{item.railwayFactoryWeight,jdbcType=DECIMAL}, 
-      #{item.waterNum,jdbcType=DECIMAL}, #{item.arrival,jdbcType=VARCHAR}, #{item.station,jdbcType=VARCHAR}, 
-      #{item.sourceArea,jdbcType=VARCHAR}, #{item.voucherIdentity,jdbcType=VARCHAR}, 
-      #{item.voucherItem,jdbcType=VARCHAR}, #{item.businessGroup,jdbcType=VARCHAR}, #{item.tempConveyance,jdbcType=VARCHAR}, 
-      #{item.conveyanceType,jdbcType=VARCHAR}, #{item.resourceSystem,jdbcType=VARCHAR}, 
-      #{item.groupPackageAmount,jdbcType=DECIMAL}, #{item.groupPackageUnit,jdbcType=VARCHAR}, 
-      #{item.packageAmount,jdbcType=DECIMAL}, #{item.packageUnit,jdbcType=VARCHAR}, #{item.theoryAmount,jdbcType=DECIMAL}, 
-      #{item.measureBatch,jdbcType=VARCHAR}, #{item.measureBatchCount,jdbcType=DECIMAL}, 
-      #{item.senderType,jdbcType=VARCHAR}, #{item.senderRemark,jdbcType=VARCHAR}, #{item.receiverType,jdbcType=VARCHAR}, 
-      #{item.receiverRemark,jdbcType=VARCHAR}, #{item.amountUnit,jdbcType=VARCHAR}, #{item.measureObjectType,jdbcType=VARCHAR}, 
-      #{item.measureTaskNum,jdbcType=VARCHAR}, #{item.dataSource,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, 
-      #{item.trainNumberNo,jdbcType=VARCHAR}, #{item.isPreSacale,jdbcType=VARCHAR}, #{item.hc15,jdbcType=VARCHAR}, 
-      #{item.cancelType,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR}, #{item.checkMemo,jdbcType=VARCHAR}, 
-      #{item.checkMan1No,jdbcType=VARCHAR}, #{item.checkMan1Name,jdbcType=VARCHAR}, #{item.checkTime1,jdbcType=TIMESTAMP}, 
-      #{item.checkMemo1,jdbcType=VARCHAR}, #{item.checkMan2No,jdbcType=VARCHAR}, #{item.checkMan2Name,jdbcType=VARCHAR}, 
-      #{item.checkTime2,jdbcType=TIMESTAMP}, #{item.checkMemo2,jdbcType=VARCHAR}, #{item.checkFlag1,jdbcType=VARCHAR}, 
-      #{item.checkFlag2,jdbcType=VARCHAR} from dual  
+    ( <foreach collection="list" item="item" separator="union all">
+   select
+      #{item.actualFirstNo,jdbcType=VARCHAR},
+      #{item.predictionNo,jdbcType=VARCHAR}, #{item.noticeNo,jdbcType=VARCHAR}, #{item.railwayNo,jdbcType=VARCHAR},
+      #{item.railwayCarriageNo,jdbcType=VARCHAR}, #{item.railwayWorkNo,jdbcType=VARCHAR},
+      #{item.railwaySpeed,jdbcType=DECIMAL}, #{item.matterNo,jdbcType=VARCHAR}, #{item.matterName,jdbcType=VARCHAR},
+      #{item.contractNo,jdbcType=VARCHAR}, #{item.batchNo,jdbcType=VARCHAR}, #{item.customerSupplierNo,jdbcType=VARCHAR},
+      #{item.customerSupplierName,jdbcType=VARCHAR}, #{item.forwardingUnitNo,jdbcType=VARCHAR},
+      #{item.forwardingUnitName,jdbcType=VARCHAR}, #{item.receivingUintNo,jdbcType=VARCHAR},
+      #{item.receivingUintName,jdbcType=VARCHAR}, #{item.materialNo,jdbcType=VARCHAR},
+      #{item.materialName,jdbcType=VARCHAR}, #{item.specNo,jdbcType=VARCHAR}, #{item.specName,jdbcType=VARCHAR},
+      #{item.shipmentGrossWeight,jdbcType=DECIMAL}, #{item.shipmentNetWeight,jdbcType=DECIMAL},
+      #{item.shipmentNum,jdbcType=DECIMAL}, #{item.bindCardNo,jdbcType=VARCHAR}, #{item.loadPointNo,jdbcType=VARCHAR},
+      #{item.loadPointName,jdbcType=VARCHAR}, #{item.sampleNo,jdbcType=VARCHAR}, #{item.sampleVoucher,jdbcType=VARCHAR},
+      #{item.carrierUnitNo,jdbcType=VARCHAR}, #{item.carrierUnitName,jdbcType=VARCHAR},
+      #{item.predictionType,jdbcType=VARCHAR}, #{item.predictionCombination,jdbcType=VARCHAR},
+      #{item.meterTypeNo,jdbcType=VARCHAR}, #{item.meterTypeName,jdbcType=VARCHAR}, #{item.meterProcessNo,jdbcType=VARCHAR},
+      #{item.meterProcessEditionNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL},
+      #{item.weightType,jdbcType=VARCHAR}, #{item.meterSortWeight,jdbcType=DECIMAL},
+      #{item.meterBalanceWeight,jdbcType=DECIMAL}, #{item.createManNo,jdbcType=VARCHAR},
+      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
+      #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.meterClass,jdbcType=VARCHAR},
+      #{item.meterGroup,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR},
+      #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+      #{item.checkFlag,jdbcType=VARCHAR}, #{item.checkManNo,jdbcType=VARCHAR}, #{item.checkManName,jdbcType=VARCHAR},
+      #{item.checkTime,jdbcType=TIMESTAMP}, #{item.meterMode,jdbcType=VARCHAR}, #{item.railwayTypeNo,jdbcType=VARCHAR},
+      #{item.railwayTypeName,jdbcType=VARCHAR}, #{item.isChemical,jdbcType=VARCHAR},
+      #{item.limitWeight,jdbcType=DECIMAL}, #{item.railwayModelNo,jdbcType=VARCHAR},
+      #{item.railwayModelName,jdbcType=VARCHAR}, #{item.railwayFactoryWeight,jdbcType=DECIMAL},
+      #{item.waterNum,jdbcType=DECIMAL}, #{item.arrival,jdbcType=VARCHAR}, #{item.station,jdbcType=VARCHAR},
+      #{item.sourceArea,jdbcType=VARCHAR}, #{item.voucherIdentity,jdbcType=VARCHAR},
+      #{item.voucherItem,jdbcType=VARCHAR}, #{item.businessGroup,jdbcType=VARCHAR}, #{item.tempConveyance,jdbcType=VARCHAR},
+      #{item.conveyanceType,jdbcType=VARCHAR}, #{item.resourceSystem,jdbcType=VARCHAR},
+      #{item.groupPackageAmount,jdbcType=DECIMAL}, #{item.groupPackageUnit,jdbcType=VARCHAR},
+      #{item.packageAmount,jdbcType=DECIMAL}, #{item.packageUnit,jdbcType=VARCHAR}, #{item.theoryAmount,jdbcType=DECIMAL},
+      #{item.measureBatch,jdbcType=VARCHAR}, #{item.measureBatchCount,jdbcType=DECIMAL},
+      #{item.senderType,jdbcType=VARCHAR}, #{item.senderRemark,jdbcType=VARCHAR}, #{item.receiverType,jdbcType=VARCHAR},
+      #{item.receiverRemark,jdbcType=VARCHAR}, #{item.amountUnit,jdbcType=VARCHAR}, #{item.measureObjectType,jdbcType=VARCHAR},
+      #{item.measureTaskNum,jdbcType=VARCHAR}, #{item.dataSource,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR},
+      #{item.trainNumberNo,jdbcType=VARCHAR}, #{item.isPreSacale,jdbcType=VARCHAR}, #{item.hc15,jdbcType=VARCHAR},
+      #{item.cancelType,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR}, #{item.checkMemo,jdbcType=VARCHAR},
+      #{item.checkMan1No,jdbcType=VARCHAR}, #{item.checkMan1Name,jdbcType=VARCHAR}, #{item.checkTime1,jdbcType=TIMESTAMP},
+      #{item.checkMemo1,jdbcType=VARCHAR}, #{item.checkMan2No,jdbcType=VARCHAR}, #{item.checkMan2Name,jdbcType=VARCHAR},
+      #{item.checkTime2,jdbcType=TIMESTAMP}, #{item.checkMemo2,jdbcType=VARCHAR}, #{item.checkFlag1,jdbcType=VARCHAR},
+      #{item.checkFlag2,jdbcType=VARCHAR} from dual
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -2830,14 +2830,14 @@
        <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
           when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkFlag2,jdbcType=VARCHAR}
        </foreach>
-     where ACTUAL_FIRST_NO in 
+     where ACTUAL_FIRST_NO in
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.actualFirstNo,jdbcType=VARCHAR}
-     </foreach> 
+     </foreach>
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_WORK_RAILWAY_ACT_FIRST
-    where ACTUAL_FIRST_NO in 
+    where ACTUAL_FIRST_NO in
     <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
@@ -3805,6 +3805,9 @@
       <if test="actualFirstNo != null and actualFirstNo != ''">
         and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
       </if>
+      <if test="meterMode != null and meterMode != ''">
+        and METER_MODE = #{meterMode}
+      </if>
       <if test="railwayNo != null and railwayNo != ''">
         and RAILWAY_NO LIKE '%${railwayNo}'
       </if>
@@ -4283,5 +4286,5 @@
     A.create_man_no,
     A.create_man_name
   </select>
-  
-</mapper>
+
+</mapper>

+ 39 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/service/impl/MeterWorkRailwayReceivedServiceImpl.java

@@ -4,6 +4,7 @@ import cn.hutool.db.handler.HandleHelper;
 import com.github.pagehelper.util.StringUtil;
 import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLogMapper;
 import com.steerinfo.baseinfo.meterbaseoperationlog.model.MeterBaseOperationLog;
+import com.steerinfo.baseinfo.meterbaseoperationlog.service.IMeterBaseOperationLogService;
 import com.steerinfo.baseinfo.meterbaserailwayaiweight.mapper.MeterBaseRailwayAiweightMapper;
 import com.steerinfo.baseinfo.meterbaserailwayaiweight.model.MeterBaseRailwayAiweight;
 import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
@@ -22,6 +23,7 @@ import com.steerinfo.meterwork.meterworkrailwayreceived.mapper.MeterWorkRailwayR
 import com.steerinfo.meterwork.meterworkrailwayreceived.service.IMeterWorkRailwayReceivedService;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.mapper.MeterWorkRailwayRecMainMapper;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain;
+import com.steerinfo.meterwork.meterworkstorageactual.model.MeterWorkStorageActual;
 import com.steerinfo.pretrack.prerailwayscale.mapper.PreRailwayScaleMapper;
 import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
 import com.steerinfo.util.PublicMethod;
@@ -77,6 +79,9 @@ public class MeterWorkRailwayReceivedServiceImpl extends BaseServiceImpl<MeterWo
     @Resource
     private PreRailwayScaleMapper preRailwayScaleMapper;
 
+    @Resource
+    private IMeterBaseOperationLogService meterBaseOperationLogService;
+
     @Override
     protected IBaseMapper<MeterWorkRailwayReceived, String> getMapper() {
         return meterWorkRailwayReceivedMapper;
@@ -529,12 +534,29 @@ public class MeterWorkRailwayReceivedServiceImpl extends BaseServiceImpl<MeterWo
             String userName = models.get(0).getUpdateManName();
             int count = 0;
             for(MeterWorkRailwayReceived model: models){
+
+                //获取修改前数据
+                MeterWorkRailwayReceived upBefore = meterWorkRailwayReceivedMapper.selectByPrimaryKey(model.getActualFirstNo());
+                //修改操作原因memo
+                String memo = model.getMemo();
+                String substring = memo.substring(memo.indexOf("作废原因:")+5, memo.indexOf(",数据信息:"));
+                model.setMemo(substring);
+
                 model.setValueFlag("0");
                 model.setIsAutoOperation("1");
                 model.setUpdateManNo(userId);
                 model.setUpdateManName(userName);
                 model.setUpdateTime(new Date());
                 meterWorkRailwayReceivedMapper.updateByPrimaryKeySelective(model);
+
+
+                //添加日志记录
+                MeterBaseOperationLog operationLog = new MeterBaseOperationLog();
+                operationLog.setOperationPage("C#端-动轨数据维护");
+                operationLog.setOperationFunction("作废");
+                insertOperateLog(upBefore, operationLog);
+
+
                 if(model.getPredictionNo() != null &&  StringUtils.isNotEmpty(model.getPredictionNo())){
                     PreRailwayScale preRailwayScale = new PreRailwayScale();
                     preRailwayScale.setValueFlag("1");
@@ -691,4 +713,21 @@ public class MeterWorkRailwayReceivedServiceImpl extends BaseServiceImpl<MeterWo
         }
         return rm;
     }
+
+    /**
+     * @param upBefore     修改前的数据
+     * @param operationLog 操作日志实体:此处传界面及
+     */
+    public void insertOperateLog(MeterWorkRailwayReceived upBefore, MeterBaseOperationLog operationLog) {
+
+        //修改后的数据
+        MeterWorkRailwayReceived upAfter = meterWorkRailwayReceivedMapper.selectByPrimaryKey(upBefore.getActualFirstNo());
+        //记录日志数据
+        operationLog.setCreateManNo(upAfter.getUpdateManNo());
+        operationLog.setCreateManName(upAfter.getUpdateManName());
+        operationLog.setOperationId(upBefore.getActualFirstNo());
+        operationLog.setOperationPredictionNo(upBefore.getPredictionNo());
+        operationLog.setOperationCarnNo(upBefore.getRailwayNo());
+        meterBaseOperationLogService.addComparePropertiesLog(upBefore, upAfter, operationLog);
+    }
 }