dengyj 3 jaren geleden
bovenliggende
commit
3d91f8fa38
34 gewijzigde bestanden met toevoegingen van 2881 en 109 verwijderingen
  1. 44 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/controller/MeterBaseRailwayHisTareDataController.java
  2. 111 8
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/mapper/MeterBaseRailwayHisTareDataMapper.xml
  3. 62 2
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/model/MeterBaseRailwayHisTareData.java
  4. 4 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/service/IMeterBaseRailwayHisTareDataService.java
  5. 67 1
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/service/impl/MeterBaseRailwayHisTareDataServiceImpl.java
  6. 40 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/controller/MeterBaseRailwayHisTareDetailController.java
  7. 53 27
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/mapper/MeterBaseRailwayHisTareDetailMapper.xml
  8. 16 1
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/model/MeterBaseRailwayHisTareDetail.java
  9. 3 0
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/IMeterBaseRailwayHisTareDetailService.java
  10. 64 1
      src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/impl/MeterBaseRailwayHisTareDetailServiceImpl.java
  11. 128 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/controller/MeterBaseUserSpotConfigController.java
  12. 13 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/mapper/MeterBaseUserSpotConfigMapper.java
  13. 341 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/mapper/MeterBaseUserSpotConfigMapper.xml
  14. 158 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/model/MeterBaseUserSpotConfig.java
  15. 26 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/service/IMeterBaseUserSpotConfigService.java
  16. 105 0
      src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/service/impl/MeterBaseUserSpotConfigServiceImpl.java
  17. 6 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractual/service/impl/MeterWorkCarActualServiceImpl.java
  18. 87 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/controller/MeterWorkCheckFirstActualController.java
  19. 20 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.java
  20. 683 25
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.xml
  21. 250 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/CarActualCountCheckNum.java
  22. 168 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/CarFirstCountCheckNum.java
  23. 136 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/FirstActualImgData.java
  24. 46 1
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/MeterWorkCheckFirstActual.java
  25. 12 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/service/IMeterWorkCheckFirstActualService.java
  26. 128 0
      src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/service/impl/MeterWorkCheckFirstActualServiceImpl.java
  27. 1 0
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.java
  28. 11 0
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.xml
  29. 28 1
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/model/MeterWorkMonitor.java
  30. 1 1
      src/main/java/com/steerinfo/meterwork/meterworkmonitor/service/impl/MeterWorkMonitorServiceImpl.java
  31. 29 1
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java
  32. 34 34
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.xml
  33. 6 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java
  34. 0 6
      src/main/java/com/steerinfo/meterwork/meterworkscheduledhelp/mapper/MeterWorkScheduledHelpMapper.xml

+ 44 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/controller/MeterBaseRailwayHisTareDataController.java

@@ -1,15 +1,19 @@
 package com.steerinfo.baseinfo.meterbaserailwayhistaredata.controller;
 
+import com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.service.IMeterBaseRailwayHisTareDataService;
 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.util.StringUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
@@ -118,4 +122,44 @@ public class MeterBaseRailwayHisTareDataController extends BaseRESTfulController
 
         return rm;
     }
+
+    @ApiOperation(value = "启用-网页", notes = "根据传过来的MeterBaseHisTareData集合信息来更新详细信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "MeterBaseRailwayHisTareData", value = "详细实体MeterBaseRailwayHisTareData", required = true, dataType = "MeterBaseRailwayHisTareData")
+    })
+    @Transactional
+    @PostMapping(value = "/Recovery")
+    public RESTfulResult Recovery(@RequestBody MeterBaseRailwayHisTareData model) {
+        try {
+            String msg = meterBaseRailwayHisTareDataService.Recovery(model);
+            if (StringUtils.isNotEmpty(msg)) {
+                return failed(null, msg);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+        return success();
+    }
+
+    @ApiOperation(value = "逻辑删除-网页", notes = "根据传过来的MeterBaseHisTareData集合信息来更新详细信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "MeterBaseRailwayHisTareData", value = "详细实体MeterBaseRailwayHisTareData", required = true, dataType = "MeterBaseRailwayHisTareData")
+    })
+    @Transactional
+    @PostMapping(value = "/abolish")
+    public RESTfulResult abolish(@RequestBody MeterBaseRailwayHisTareData model) {
+        try {
+            String msg = meterBaseRailwayHisTareDataService.abolish(model);
+            if (StringUtils.isNotEmpty(msg)) {
+                return failed(null, msg);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+        return success();
+    }
 }

+ 111 - 8
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/mapper/MeterBaseRailwayHisTareDataMapper.xml

@@ -16,15 +16,21 @@
     <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="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="NOTE" jdbcType="VARCHAR" property="note" />
   </resultMap>
   <sql id="columns">
     DATA_NO, BASE_SPOT_NO, BASE_SPOT_NAME, RAILWAY_NO, METER_WEIGHT, METER_NAME, METER_TIME, 
-    UP_WEIGHT, AVG_WEIGHT, METER_NUM, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME
+    UP_WEIGHT, AVG_WEIGHT, METER_NUM, VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME, 
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, NOTE
   </sql>
   <sql id="columns_alias">
     t.DATA_NO, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.RAILWAY_NO, t.METER_WEIGHT, t.METER_NAME, 
     t.METER_TIME, t.UP_WEIGHT, t.AVG_WEIGHT, t.METER_NUM, t.VALUE_FLAG, t.CREATE_MAN_NO, 
-    t.CREATE_MAN_NAME, t.CREATE_TIME
+    t.CREATE_MAN_NAME, t.CREATE_TIME, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, 
+    t.NOTE
   </sql>
   <sql id="select">
     SELECT <include refid="columns" /> FROM METER_BASE_RAILWAY_HIS_TARE_DATA
@@ -76,6 +82,18 @@
       <if test="createTime != null">
         and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
       </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE = #{note}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -122,6 +140,18 @@
       <if test="createTime != null">
         and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
       </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="note != null and note != ''">
+        and NOTE LIKE '%${note}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -170,18 +200,34 @@
       <if test="createTime != null">
         or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
       </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="note != null and note != ''">
+        or NOTE = #{note}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData">
     insert into METER_BASE_RAILWAY_HIS_TARE_DATA (DATA_NO, BASE_SPOT_NO, BASE_SPOT_NAME, 
       RAILWAY_NO, METER_WEIGHT, METER_NAME, 
       METER_TIME, UP_WEIGHT, AVG_WEIGHT, 
       METER_NUM, VALUE_FLAG, CREATE_MAN_NO, 
-      CREATE_MAN_NAME, CREATE_TIME)
+      CREATE_MAN_NAME, CREATE_TIME, UPDATE_MAN_NO, 
+      UPDATE_MAN_NAME, UPDATE_TIME, NOTE
+      )
     values (#{dataNo,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, 
       #{railwayNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, #{meterName,jdbcType=VARCHAR}, 
       #{meterTime,jdbcType=TIMESTAMP}, #{upWeight,jdbcType=DECIMAL}, #{avgWeight,jdbcType=DECIMAL}, 
       #{meterNum,jdbcType=DECIMAL}, #{valueFlag,jdbcType=VARCHAR}, #{createManNo,jdbcType=VARCHAR}, 
-      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
+      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateManNo,jdbcType=VARCHAR}, 
+      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{note,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData">
     insert into METER_BASE_RAILWAY_HIS_TARE_DATA
@@ -228,6 +274,18 @@
       <if test="createTime != null">
         CREATE_TIME,
       </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO,
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="note != null">
+        NOTE,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="dataNo != null">
@@ -272,6 +330,18 @@
       <if test="createTime != null">
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="updateManNo != null">
+        #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="note != null">
+        #{note,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData">
@@ -288,7 +358,11 @@
       VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
       CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
       CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
-      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      NOTE = #{note,jdbcType=VARCHAR}
     where DATA_NO = #{dataNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData">
@@ -333,6 +407,18 @@
       <if test="createTime != null">
         CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="note != null">
+        NOTE = #{note,jdbcType=VARCHAR},
+      </if>
     </set>
     where DATA_NO = #{dataNo,jdbcType=VARCHAR}
   </update>
@@ -355,7 +441,8 @@
       METER_WEIGHT, METER_NAME, METER_TIME, 
       UP_WEIGHT, AVG_WEIGHT, METER_NUM, 
       VALUE_FLAG, CREATE_MAN_NO, CREATE_MAN_NAME, 
-      CREATE_TIME)
+      CREATE_TIME, UPDATE_MAN_NO, UPDATE_MAN_NAME, 
+      UPDATE_TIME, NOTE)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.dataNo,jdbcType=VARCHAR}, 
@@ -363,7 +450,8 @@
       #{item.meterWeight,jdbcType=DECIMAL}, #{item.meterName,jdbcType=VARCHAR}, #{item.meterTime,jdbcType=TIMESTAMP}, 
       #{item.upWeight,jdbcType=DECIMAL}, #{item.avgWeight,jdbcType=DECIMAL}, #{item.meterNum,jdbcType=DECIMAL}, 
       #{item.valueFlag,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
-      #{item.createTime,jdbcType=TIMESTAMP} from dual  
+      #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.note,jdbcType=VARCHAR} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
@@ -425,6 +513,22 @@
        <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
           when #{item.dataNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
+          when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
+          when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
+          when #{item.dataNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,NOTE=
+       <foreach close="end" collection="list" index="index" item="item" open="case DATA_NO" separator=" ">
+          when #{item.dataNo,jdbcType=VARCHAR} then #{item.note,jdbcType=VARCHAR}
+       </foreach>
      where DATA_NO in 
      <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.dataNo,jdbcType=VARCHAR}
@@ -439,7 +543,6 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-
   <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
     SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(data_no, LENGTH(data_no) - 3))),0) + 1, 4, '0') data_no
     FROM meter_base_railway_his_tare_data

+ 62 - 2
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/model/MeterBaseRailwayHisTareData.java

@@ -9,7 +9,7 @@ import java.util.Date;
 @ApiModel(value="轨道衡数据维护表")
 public class MeterBaseRailwayHisTareData implements IBasePO<String> {
     /**
-     * 数据编号(YYYYMMDD+4位流水)(DATA_NO,VARCHAR,20)
+     * 数据编号(YYYYMMDD+4位流水)(DATA_NO,VARCHAR,50)
      */
     @ApiModelProperty(value="数据编号(YYYYMMDD+4位流水)",required=true)
     private String dataNo;
@@ -39,7 +39,7 @@ public class MeterBaseRailwayHisTareData implements IBasePO<String> {
     private Long meterWeight;
 
     /**
-     * 皮重计量员(METER_NAME,VARCHAR,20)
+     * 皮重计量员(METER_NAME,VARCHAR,200)
      */
     @ApiModelProperty(value="皮重计量员",required=false)
     private String meterName;
@@ -92,6 +92,30 @@ public class MeterBaseRailwayHisTareData implements IBasePO<String> {
     @ApiModelProperty(value="创建时间(YYYY-MM-DD HH:mm:ss)",required=false)
     private Date createTime;
 
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(YYYY-MM-DD HH:mm:SS)(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间(YYYY-MM-DD HH:mm:SS)",required=false)
+    private Date updateTime;
+
+    /**
+     * 操作原因(NOTE,VARCHAR,255)
+     */
+    @ApiModelProperty(value="操作原因",required=false)
+    private String note;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -216,6 +240,38 @@ public class MeterBaseRailwayHisTareData implements IBasePO<String> {
         this.createTime = createTime;
     }
 
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getNote() {
+        return note;
+    }
+
+    public void setNote(String note) {
+        this.note = note == null ? null : note.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -236,6 +292,10 @@ public class MeterBaseRailwayHisTareData implements IBasePO<String> {
         sb.append(", createManNo=").append(createManNo);
         sb.append(", createManName=").append(createManName);
         sb.append(", createTime=").append(createTime);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", note=").append(note);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 4 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/service/IMeterBaseRailwayHisTareDataService.java

@@ -1,5 +1,6 @@
 package com.steerinfo.baseinfo.meterbaserailwayhistaredata.service;
 
+import com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
@@ -19,4 +20,7 @@ import com.steerinfo.framework.service.IBaseService;
  */
 public interface IMeterBaseRailwayHisTareDataService extends IBaseService<MeterBaseRailwayHisTareData, String>{
     RESTfulResult railwayHisTare(String railwayNo, String meterWeight, String meterName, String baseSpotNo, String baseSpotName);
+    String Recovery(MeterBaseRailwayHisTareData model);
+
+    String abolish(MeterBaseRailwayHisTareData model);
 }

+ 67 - 1
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredata/service/impl/MeterBaseRailwayHisTareDataServiceImpl.java

@@ -1,5 +1,8 @@
 package com.steerinfo.baseinfo.meterbaserailwayhistaredata.service.impl;
 
+import com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData;
+import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLogMapper;
+import com.steerinfo.baseinfo.meterbaseoperationlog.model.MeterBaseOperationLog;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.mapper.MeterBaseRailwayHisTareDataMapper;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredata.service.IMeterBaseRailwayHisTareDataService;
@@ -7,9 +10,12 @@ import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.framework.user.UserPayload;
+import com.steerinfo.util.PublicMethod;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
+import javax.annotation.Resource;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.HashMap;
@@ -31,9 +37,12 @@ import java.util.List;
 @Service(value = "meterBaseRailwayHisTareDataService")
 public class MeterBaseRailwayHisTareDataServiceImpl extends BaseServiceImpl<MeterBaseRailwayHisTareData, String> implements IMeterBaseRailwayHisTareDataService {
 
-    @Autowired
+    @Autowired(required = false)
     private MeterBaseRailwayHisTareDataMapper meterBaseRailwayHisTareDataMapper;
 
+    @Resource
+    private MeterBaseOperationLogMapper meterBaseOperationLogMapper;
+
     @Override
     protected IBaseMapper<MeterBaseRailwayHisTareData, String> getMapper() {
         return meterBaseRailwayHisTareDataMapper;
@@ -114,4 +123,61 @@ public class MeterBaseRailwayHisTareDataServiceImpl extends BaseServiceImpl<Mete
         return rm;
     }
 
+    @Override
+    public String Recovery(MeterBaseRailwayHisTareData model) {
+        try {
+            HashMap<String, Object> obj = new HashMap<>();
+            obj.put("valueFlag","0");
+            obj.put("carNo",model.getRailwayNo());
+            obj.put("dataNo",model.getDataNo());
+            List<MeterBaseRailwayHisTareData> list=meterBaseRailwayHisTareDataMapper.selectByParameters(obj);
+            if ( ! list.isEmpty()){
+                return "该车号已存在有效数据,无法启用!";
+            }
+            model.setId(model.getId());
+            model.setValueFlag("0");
+            meterBaseRailwayHisTareDataMapper.updateByPrimaryKey(model);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return "操作异常,请联系管理员";
+        }
+        return "";
+    }
+
+    @Override
+    public String abolish(MeterBaseRailwayHisTareData model) {
+        try {
+
+            UserPayload payload = UserPayload.getCurrUser();
+            String userId = payload.getUserCode();
+            String userName = payload.getUserName();
+
+            model.setId(model.getId());
+            model.setValueFlag("1");
+            model.setUpdateManNo(userId);
+            model.setUpdateManName(userName);
+            model.setUpdateTime(new Date());
+            model.setNote(model.getNote());
+            meterBaseRailwayHisTareDataMapper.updateByPrimaryKeySelective(model);
+
+            MeterBaseOperationLog logModel = new MeterBaseOperationLog();
+            logModel.setId(PublicMethod.IdCreate(2));
+            logModel.setCreateManNo(userId);
+            logModel.setCreateManName(userName);
+            logModel.setCreateTime(new Date());
+            logModel.setOperationPage("web端-轨道衡历史皮重数据维护");
+            logModel.setOperationFunction("作废");
+            logModel.setOperationId(model.getId());
+            logModel.setOperationCarnNo(model.getRailwayNo());
+            logModel.setOperationBeforeFix(model.getNote());
+            meterBaseOperationLogMapper.insertSelective(logModel);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return "操作异常,请联系管理员";
+        }
+        return "";
+    }
+
 }

+ 40 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/controller/MeterBaseRailwayHisTareDetailController.java

@@ -1,15 +1,19 @@
 package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.controller;
 
+import com.steerinfo.baseinfo.meterbasehistaredetail.model.MeterBaseHisTareDetail;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.IMeterBaseRailwayHisTareDetailService;
 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.util.StringUtils;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
@@ -116,4 +120,40 @@ public class MeterBaseRailwayHisTareDetailController extends BaseRESTfulControll
         return success(list);
     }
 
+    @ApiOperation(value = "启用-网页", notes = "根据传过来的MeterBaseRailwayHisTareDetail集合信息来更新详细信息")
+    @ApiImplicitParam(name = "MeterBaseRailwayHisTareDetail", value = "详细实体MeterBaseHisTareDetail", required = true, dataType = "MeterBaseRailwayHisTareDetail")
+    @Transactional
+    @PostMapping(value = "/Recovery")
+    public RESTfulResult Recovery(@RequestBody MeterBaseRailwayHisTareDetail model) {
+        try {
+            String msg = meterBaseRailwayHisTareDetailService.Recovery(model);
+            if (StringUtils.isNotEmpty(msg)) {
+                return failed(null, msg);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+        return success();
+    }
+
+    @ApiOperation(value = "逻辑删除-网页", notes = "根据传过来的MeterBaseRailwayHisTareDetail集合信息来更新详细信息")
+    @ApiImplicitParam(name = "MeterBaseRailwayHisTareDetail", value = "详细实体MeterBaseRailwayHisTareDetail", required = true, dataType = "MeterBaseRailwayHisTareDetail")
+    @Transactional
+    @PostMapping(value = "/abolish")
+    public RESTfulResult abolish(@RequestBody MeterBaseRailwayHisTareDetail model) {
+        try {
+            String msg = meterBaseRailwayHisTareDetailService.abolish(model);
+            if (StringUtils.isNotEmpty(msg)) {
+                return failed(null, msg);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+        return success();
+    }
+
 }

+ 53 - 27
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/mapper/MeterBaseRailwayHisTareDetailMapper.xml

@@ -11,20 +11,21 @@
     <result column="METER_NAME" jdbcType="VARCHAR" property="meterName" />
     <result column="METER_TIME" jdbcType="TIMESTAMP" property="meterTime" />
     <result column="METER_ORDER" jdbcType="VARCHAR" property="meterOrder" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
   </resultMap>
   <sql id="columns">
     DETAIL_NO, ACTUAL_FIRST_NO, BASE_SPOT_NO, BASE_SPOT_NAME, CAR_NO, METER_WEIGHT, METER_NAME, 
-    METER_TIME, METER_ORDER
+    METER_TIME, METER_ORDER, VALUE_FLAG
   </sql>
   <sql id="columns_alias">
     t.DETAIL_NO, t.ACTUAL_FIRST_NO, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.CAR_NO, t.METER_WEIGHT, 
-    t.METER_NAME, t.METER_TIME, t.METER_ORDER
+    t.METER_NAME, t.METER_TIME, t.METER_ORDER, t.VALUE_FLAG
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM METER_BASE_RAILWAY_HIS_TARE_DETAIL
+    SELECT <include refid="columns" /> FROM METER_BASE_RAILWAY_HIS_TARE_DETAIL
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM METER_BASE_RAILWAY_HIS_TARE_DETAIL t
+    SELECT <include refid="columns_alias" /> FROM METER_BASE_RAILWAY_HIS_TARE_DETAIL t
   </sql>
   <sql id="where">
     <where> 
@@ -55,6 +56,9 @@
       <if test="meterOrder != null and meterOrder != ''">
         and METER_ORDER = #{meterOrder}
       </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -86,6 +90,9 @@
       <if test="meterOrder != null and meterOrder != ''">
         and METER_ORDER LIKE '%${meterOrder}%'
       </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -119,16 +126,19 @@
       <if test="meterOrder != null and meterOrder != ''">
         or METER_ORDER = #{meterOrder}
       </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        or VALUE_FLAG = #{valueFlag}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
     insert into METER_BASE_RAILWAY_HIS_TARE_DETAIL (DETAIL_NO, ACTUAL_FIRST_NO, BASE_SPOT_NO, 
       BASE_SPOT_NAME, CAR_NO, METER_WEIGHT, 
-      METER_NAME, METER_TIME, METER_ORDER
-      )
+      METER_NAME, METER_TIME, METER_ORDER, 
+      VALUE_FLAG)
     values (#{detailNo,jdbcType=VARCHAR}, #{actualFirstNo,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, 
       #{baseSpotName,jdbcType=VARCHAR}, #{carNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, 
-      #{meterName,jdbcType=VARCHAR}, #{meterTime,jdbcType=TIMESTAMP}, #{meterOrder,jdbcType=VARCHAR}
-      )
+      #{meterName,jdbcType=VARCHAR}, #{meterTime,jdbcType=TIMESTAMP}, #{meterOrder,jdbcType=VARCHAR}, 
+      #{valueFlag,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
     insert into METER_BASE_RAILWAY_HIS_TARE_DETAIL
@@ -160,6 +170,9 @@
       <if test="meterOrder != null">
         METER_ORDER,
       </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="detailNo != null">
@@ -189,6 +202,9 @@
       <if test="meterOrder != null">
         #{meterOrder,jdbcType=VARCHAR},
       </if>
+      <if test="valueFlag != null">
+        #{valueFlag,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
@@ -200,7 +216,8 @@
       METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
       METER_NAME = #{meterName,jdbcType=VARCHAR},
       METER_TIME = #{meterTime,jdbcType=TIMESTAMP},
-      METER_ORDER = #{meterOrder,jdbcType=VARCHAR}
+      METER_ORDER = #{meterOrder,jdbcType=VARCHAR},
+      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR}
     where DETAIL_NO = #{detailNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail">
@@ -230,83 +247,92 @@
       <if test="meterOrder != null">
         METER_ORDER = #{meterOrder,jdbcType=VARCHAR},
       </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      </if>
     </set>
     where DETAIL_NO = #{detailNo,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where DETAIL_NO = #{detailNo,jdbcType=VARCHAR}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into METER_BASE_RAILWAY_HIS_TARE_DETAIL 
       (DETAIL_NO, 
       ACTUAL_FIRST_NO, BASE_SPOT_NO, BASE_SPOT_NAME, 
       CAR_NO, METER_WEIGHT, METER_NAME, 
-      METER_TIME, METER_ORDER)
+      METER_TIME, METER_ORDER, VALUE_FLAG
+      )
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.detailNo,jdbcType=VARCHAR}, 
       #{item.actualFirstNo,jdbcType=VARCHAR}, #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, 
       #{item.carNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, #{item.meterName,jdbcType=VARCHAR}, 
-      #{item.meterTime,jdbcType=TIMESTAMP}, #{item.meterOrder,jdbcType=VARCHAR} from dual  
+      #{item.meterTime,jdbcType=TIMESTAMP}, #{item.meterOrder,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}
+       from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
      update METER_BASE_RAILWAY_HIS_TARE_DETAIL
      set
        DETAIL_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.detailNo,jdbcType=VARCHAR}
        </foreach>
        ,ACTUAL_FIRST_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.actualFirstNo,jdbcType=VARCHAR}
        </foreach>
        ,BASE_SPOT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
        </foreach>
        ,BASE_SPOT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
        </foreach>
        ,CAR_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.carNo,jdbcType=VARCHAR}
        </foreach>
        ,METER_WEIGHT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
        </foreach>
        ,METER_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterName,jdbcType=VARCHAR}
        </foreach>
        ,METER_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterTime,jdbcType=TIMESTAMP}
        </foreach>
        ,METER_ORDER=
-       <foreach collection="list" item="item" index="index" separator=" " open="case DETAIL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
           when #{item.detailNo,jdbcType=VARCHAR} then #{item.meterOrder,jdbcType=VARCHAR}
        </foreach>
+       ,VALUE_FLAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case DETAIL_NO" separator=" ">
+          when #{item.detailNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
+       </foreach>
      where DETAIL_NO in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.detailNo,jdbcType=VARCHAR}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_BASE_RAILWAY_HIS_TARE_DETAIL
     where DETAIL_NO in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>

+ 16 - 1
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/model/MeterBaseRailwayHisTareDetail.java

@@ -15,7 +15,7 @@ public class MeterBaseRailwayHisTareDetail implements IBasePO<String> {
     private String detailNo;
 
     /**
-     * 作业编号(ACTUAL_FIRST_NO,VARCHAR,20)
+     * 作业编号(ACTUAL_FIRST_NO,VARCHAR,50)
      */
     @ApiModelProperty(value="作业编号",required=false)
     private String actualFirstNo;
@@ -62,6 +62,12 @@ public class MeterBaseRailwayHisTareDetail implements IBasePO<String> {
     @ApiModelProperty(value="计量次序(1:一次计量;2:二次计量; 3:期限皮重)",required=true)
     private String meterOrder;
 
+    /**
+     * 状态(0:有效;1:无效)(VALUE_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态(0:有效;1:无效)",required=false)
+    private String valueFlag;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -146,6 +152,14 @@ public class MeterBaseRailwayHisTareDetail implements IBasePO<String> {
         this.meterOrder = meterOrder == null ? null : meterOrder.trim();
     }
 
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag == null ? null : valueFlag.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -161,6 +175,7 @@ public class MeterBaseRailwayHisTareDetail implements IBasePO<String> {
         sb.append(", meterName=").append(meterName);
         sb.append(", meterTime=").append(meterTime);
         sb.append(", meterOrder=").append(meterOrder);
+        sb.append(", valueFlag=").append(valueFlag);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 3 - 0
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/IMeterBaseRailwayHisTareDetailService.java

@@ -1,5 +1,6 @@
 package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service;
 
+import com.steerinfo.baseinfo.meterbasehistaredetail.model.MeterBaseHisTareDetail;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.framework.service.pagehelper.PageList;
@@ -21,4 +22,6 @@ import java.util.Map;
  */
 public interface IMeterBaseRailwayHisTareDetailService extends IBaseService<MeterBaseRailwayHisTareDetail, String>{
     PageList<MeterBaseRailwayHisTareDetail> listByDesc(Map<String, Object> parameters, Integer pageNum, Integer pageSize);
+    String Recovery(MeterBaseRailwayHisTareDetail model);
+    String abolish(MeterBaseRailwayHisTareDetail model);
 }

+ 64 - 1
src/main/java/com/steerinfo/baseinfo/meterbaserailwayhistaredetail/service/impl/MeterBaseRailwayHisTareDetailServiceImpl.java

@@ -1,5 +1,8 @@
 package com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.impl;
 
+import com.steerinfo.baseinfo.meterbasehistaredata.model.MeterBaseHisTareData;
+import com.steerinfo.baseinfo.meterbaserailwayhistaredata.mapper.MeterBaseRailwayHisTareDataMapper;
+import com.steerinfo.baseinfo.meterbaserailwayhistaredata.model.MeterBaseRailwayHisTareData;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.mapper.MeterBaseRailwayHisTareDetailMapper;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.model.MeterBaseRailwayHisTareDetail;
 import com.steerinfo.baseinfo.meterbaserailwayhistaredetail.service.IMeterBaseRailwayHisTareDetailService;
@@ -9,7 +12,10 @@ import com.steerinfo.framework.service.pagehelper.PageHelper;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
+import javax.annotation.Resource;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -29,9 +35,12 @@ import java.util.Map;
 @Service(value = "meterBaseRailwayHisTareDetailService")
 public class MeterBaseRailwayHisTareDetailServiceImpl extends BaseServiceImpl<MeterBaseRailwayHisTareDetail, String> implements IMeterBaseRailwayHisTareDetailService {
 
-    @Autowired
+    @Autowired(required = false)
     private MeterBaseRailwayHisTareDetailMapper meterBaseRailwayHisTareDetailMapper;
 
+    @Resource
+    private MeterBaseRailwayHisTareDataMapper meterBaseRailwayHisTareDataMapper;
+
     @Override
     protected IBaseMapper<MeterBaseRailwayHisTareDetail, String> getMapper() {
         return meterBaseRailwayHisTareDetailMapper;
@@ -43,4 +52,58 @@ public class MeterBaseRailwayHisTareDetailServiceImpl extends BaseServiceImpl<Me
         PageList pageInfo = new PageList(rows);
         return pageInfo;
     }
+
+    @Override
+    public String Recovery(MeterBaseRailwayHisTareDetail model) {
+        try{
+            if(!model.getValueFlag().equals("1")) {
+                return "请选择作废数据";
+            }
+            HashMap<String, Object> obj = new HashMap<>();
+            obj.put("carNo", model.getCarNo());
+            obj.put("valueFlag", "0");
+            List<MeterBaseRailwayHisTareData> hisTareDataList = meterBaseRailwayHisTareDataMapper.selectByParameters(obj);
+            if(obj.size() >= 1) {
+                MeterBaseRailwayHisTareData hisData = hisTareDataList.get(0);
+                long avg = ((hisData.getAvgWeight()*hisData.getMeterNum())+model.getMeterWeight())/(hisData.getMeterNum()+1);
+                hisData.setAvgWeight(avg);
+                hisData.setMeterNum(hisData.getMeterNum()+1);
+                meterBaseRailwayHisTareDataMapper.updateByPrimaryKeySelective(hisData);
+            }
+            model.setValueFlag("0");
+            meterBaseRailwayHisTareDetailMapper.updateByPrimaryKeySelective(model);
+        }catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return "操作异常,请联系管理员";
+        }
+        return "";
+    }
+
+    @Override
+    public String abolish(MeterBaseRailwayHisTareDetail model) {
+        try{
+            if(!model.getValueFlag().equals("0")) {
+                return "请选择有效数据";
+            }
+            HashMap<String, Object> obj = new HashMap<>();
+            obj.put("carNo", model.getCarNo());
+            obj.put("valueFlag", "0");
+            List<MeterBaseRailwayHisTareData> hisTareDataList = meterBaseRailwayHisTareDataMapper.selectByParameters(obj);
+            if(obj.size() >= 1) {
+                MeterBaseRailwayHisTareData hisData = hisTareDataList.get(0);
+                long avg = ((hisData.getAvgWeight()*hisData.getMeterNum())-model.getMeterWeight())/(hisData.getMeterNum()-1);
+                hisData.setAvgWeight(avg);
+                hisData.setMeterNum(hisData.getMeterNum()-1);
+                meterBaseRailwayHisTareDataMapper.updateByPrimaryKeySelective(hisData);
+            }
+            model.setValueFlag("1");
+            meterBaseRailwayHisTareDetailMapper.updateByPrimaryKeySelective(model);
+        }catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return "操作异常,请联系管理员";
+        }
+        return "";
+    }
 }

+ 128 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/controller/MeterBaseUserSpotConfigController.java

@@ -0,0 +1,128 @@
+package com.steerinfo.baseinfo.meterbaseuserspotconfig.controller;
+
+import com.steerinfo.baseinfo.meterbaseuserspot.model.MeterBaseUserSpot;
+import com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig;
+import com.steerinfo.baseinfo.meterbaseuserspotconfig.service.IMeterBaseUserSpotConfigService;
+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.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseUserSpotConfig RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-01-08 11:31
+ * 类描述
+ * 修订历史:
+ * 日期:2023-01-08
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUserSpotConfig RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterbaseuserspotconfigs")
+public class MeterBaseUserSpotConfigController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterBaseUserSpotConfigService meterBaseUserSpotConfigService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterbaseuserspotconfig:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseUserSpotConfig> list = meterBaseUserSpotConfigService.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("meterbaseuserspotconfig:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterBaseUserSpotConfig> list = meterBaseUserSpotConfigService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterBaseUserSpotConfig对象创建")
+    @ApiImplicitParam(name = "meterBaseUserSpotConfig", value = "详细实体meterBaseUserSpotConfig", required = true, dataType = "MeterBaseUserSpotConfig")
+    //@RequiresPermissions("meterbaseuserspotconfig:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@ModelAttribute MeterBaseUserSpotConfig model){
+        MeterBaseUserSpotConfig meterBaseUserSpotConfig = meterBaseUserSpotConfigService.add(model);
+        return success(meterBaseUserSpotConfig);
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaseuserspotconfig:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterBaseUserSpotConfig meterBaseUserSpotConfig = meterBaseUserSpotConfigService.getById(id);
+        return success(meterBaseUserSpotConfig);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterBaseUserSpotConfig信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterBaseUserSpotConfig", value = "详细实体meterBaseUserSpotConfig", required = true, dataType = "MeterBaseUserSpotConfig")
+    })
+    //@RequiresPermissions("meterbaseuserspotconfig:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterBaseUserSpotConfig model){
+        model.setId(id);
+        MeterBaseUserSpotConfig meterBaseUserSpotConfig = meterBaseUserSpotConfigService.modify(model);
+        return success(meterBaseUserSpotConfig);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterbaseuserspotconfig: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);
+			  meterBaseUserSpotConfigService.delete(ids);
+    	}
+      return success();
+    }
+
+    @ApiOperation(value="根据用户和计量点ID创建对象", notes="根据sso.sys_user表和meter_base_spot_info表的id创建MeterBaseUserSpotConfig对象")
+    @PostMapping(value = "/addModel")
+    public RESTfulResult addModel(@RequestBody List<MeterBaseUserSpotConfig> models){
+        RESTfulResult rm  = meterBaseUserSpotConfigService.addModel(models);
+        return success(rm);
+    }
+
+    @ApiOperation(value = "获取列表", notes = "不分页查询")
+    @GetMapping(value = "/noPage")
+    public RESTfulResult noPage(@RequestParam HashMap parmas) {
+        try {
+            List<MeterBaseUserSpot> list = meterBaseUserSpotConfigService.noPage(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+}

+ 13 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/mapper/MeterBaseUserSpotConfigMapper.java

@@ -0,0 +1,13 @@
+package com.steerinfo.baseinfo.meterbaseuserspotconfig.mapper;
+
+import com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.HashMap;
+import java.util.List;
+
+@Mapper
+public interface MeterBaseUserSpotConfigMapper extends IBaseMapper<MeterBaseUserSpotConfig, String> {
+    List<MeterBaseUserSpotConfig> noPage(HashMap<String, Object> params);
+}

+ 341 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/mapper/MeterBaseUserSpotConfigMapper.xml

@@ -0,0 +1,341 @@
+<?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.meterbaseuserspotconfig.mapper.MeterBaseUserSpotConfigMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig">
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="USER_ID" jdbcType="VARCHAR" property="userId" />
+    <result column="USER_CODE" jdbcType="VARCHAR" property="userCode" />
+    <result column="USER_NAME" jdbcType="VARCHAR" property="userName" />
+    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
+    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
+    <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" />
+  </resultMap>
+  <sql id="columns">
+    ID, USER_ID, USER_CODE, USER_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, CREATE_MAN_NO, CREATE_MAN_NAME, 
+    CREATE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.ID, t.USER_ID, t.USER_CODE, t.USER_NAME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.CREATE_MAN_NO, 
+    t.CREATE_MAN_NAME, t.CREATE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM METER_BASE_USER_SPOT_CONFIG
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM METER_BASE_USER_SPOT_CONFIG t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID = #{id}
+      </if>
+      <if test="userId != null and userId != ''">
+        and USER_ID = #{userId}
+      </if>
+      <if test="userCode != null and userCode != ''">
+        and USER_CODE = #{userCode}
+      </if>
+      <if test="userName != null and userName != ''">
+        and USER_NAME = #{userName}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="id != null and id != ''">
+        and ID LIKE '%${id}%'
+      </if>
+      <if test="userId != null and userId != ''">
+        and USER_ID LIKE '%${userId}%'
+      </if>
+      <if test="userCode != null and userCode != ''">
+        and USER_CODE LIKE '%${userCode}%'
+      </if>
+      <if test="userName != null and userName != ''">
+        and USER_NAME LIKE '%${userName}%'
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_BASE_USER_SPOT_CONFIG
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_BASE_USER_SPOT_CONFIG
+    where 1!=1 
+      <if test="userId != null and userId != ''">
+        or USER_ID = #{userId}
+      </if>
+      <if test="userCode != null and userCode != ''">
+        or USER_CODE = #{userCode}
+      </if>
+      <if test="userName != null and userName != ''">
+        or USER_NAME = #{userName}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        or BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        or BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig">
+    insert into METER_BASE_USER_SPOT_CONFIG (ID, USER_ID, USER_CODE, 
+      USER_NAME, BASE_SPOT_NO, BASE_SPOT_NAME, 
+      CREATE_MAN_NO, CREATE_MAN_NAME, CREATE_TIME
+      )
+    values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{userCode,jdbcType=VARCHAR}, 
+      #{userName,jdbcType=VARCHAR}, #{baseSpotNo,jdbcType=VARCHAR}, #{baseSpotName,jdbcType=VARCHAR}, 
+      #{createManNo,jdbcType=VARCHAR}, #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig">
+    insert into METER_BASE_USER_SPOT_CONFIG
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="userId != null">
+        USER_ID,
+      </if>
+      <if test="userCode != null">
+        USER_CODE,
+      </if>
+      <if test="userName != null">
+        USER_NAME,
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO,
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="userId != null">
+        #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="userCode != null">
+        #{userCode,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig">
+    update METER_BASE_USER_SPOT_CONFIG
+    set USER_ID = #{userId,jdbcType=VARCHAR},
+      USER_CODE = #{userCode,jdbcType=VARCHAR},
+      USER_NAME = #{userName,jdbcType=VARCHAR},
+      BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig">
+    update METER_BASE_USER_SPOT_CONFIG
+    <set>
+      <if test="userId != null">
+        USER_ID = #{userId,jdbcType=VARCHAR},
+      </if>
+      <if test="userCode != null">
+        USER_CODE = #{userCode,jdbcType=VARCHAR},
+      </if>
+      <if test="userName != null">
+        USER_NAME = #{userName,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </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_USER_SPOT_CONFIG 
+      (ID, 
+      USER_ID, USER_CODE, USER_NAME, 
+      BASE_SPOT_NO, BASE_SPOT_NAME, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.id,jdbcType=VARCHAR}, 
+      #{item.userId,jdbcType=VARCHAR}, #{item.userCode,jdbcType=VARCHAR}, #{item.userName,jdbcType=VARCHAR}, 
+      #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.createManNo,jdbcType=VARCHAR}, 
+      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_BASE_USER_SPOT_CONFIG
+     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>
+       ,USER_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.userId,jdbcType=VARCHAR}
+       </foreach>
+       ,USER_CODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.userCode,jdbcType=VARCHAR}
+       </foreach>
+       ,USER_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.userName,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+          when #{item.id,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </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_USER_SPOT_CONFIG
+    where ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <select id="noPage" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    where 1 = 1
+      <if test="userId != null and userId != ''">
+        and USER_ID LIKE '%${userId}%'
+      </if>
+      <if test="userCode != null and userCode != ''">
+        and USER_CODE LIKE '%${userCode}%'
+      </if>
+      <if test="userName != null and userName != ''">
+        and USER_NAME LIKE '%${userName}%'
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      order by create_time desc
+  </select>
+</mapper>

+ 158 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/model/MeterBaseUserSpotConfig.java

@@ -0,0 +1,158 @@
+package com.steerinfo.baseinfo.meterbaseuserspotconfig.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+@ApiModel(value="null")
+public class MeterBaseUserSpotConfig implements IBasePO<String> {
+    /**
+     * 用户计量点映射Id(ID,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用户计量点映射Id",required=true)
+    private String id;
+
+    /**
+     * 用户ID(USER_ID,VARCHAR,40)
+     */
+    @ApiModelProperty(value="用户ID",required=false)
+    private String userId;
+
+    /**
+     * 用户编号(USER_CODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用户编号",required=false)
+    private String userCode;
+
+    /**
+     * 用户姓名(USER_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="用户姓名",required=false)
+    private String userName;
+
+    /**
+     * 计量点编号(BASE_SPOT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量点编号",required=false)
+    private String baseSpotNo;
+
+    /**
+     * 计量点名称(BASE_SPOT_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="计量点名称",required=false)
+    private String baseSpotName;
+
+    /**
+     * 创建人编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="创建人编号",required=false)
+    private String createManNo;
+
+    /**
+     * 创建人名称(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="创建人名称",required=false)
+    private String createManName;
+
+    /**
+     * 创建时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="创建时间",required=false)
+    private Date createTime;
+
+    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 getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId == null ? null : userId.trim();
+    }
+
+    public String getUserCode() {
+        return userCode;
+    }
+
+    public void setUserCode(String userCode) {
+        this.userCode = userCode == null ? null : userCode.trim();
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName == null ? null : userName.trim();
+    }
+
+    public String getBaseSpotNo() {
+        return baseSpotNo;
+    }
+
+    public void setBaseSpotNo(String baseSpotNo) {
+        this.baseSpotNo = baseSpotNo == null ? null : baseSpotNo.trim();
+    }
+
+    public String getBaseSpotName() {
+        return baseSpotName;
+    }
+
+    public void setBaseSpotName(String baseSpotName) {
+        this.baseSpotName = baseSpotName == null ? null : baseSpotName.trim();
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @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(", userId=").append(userId);
+        sb.append(", userCode=").append(userCode);
+        sb.append(", userName=").append(userName);
+        sb.append(", baseSpotNo=").append(baseSpotNo);
+        sb.append(", baseSpotName=").append(baseSpotName);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 26 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/service/IMeterBaseUserSpotConfigService.java

@@ -0,0 +1,26 @@
+package com.steerinfo.baseinfo.meterbaseuserspotconfig.service;
+
+import com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseUserSpotConfig服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-01-08 11:31
+ * 类描述
+ * 修订历史:
+ * 日期:2023-01-08
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUserSpotConfig服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterBaseUserSpotConfigService extends IBaseService<MeterBaseUserSpotConfig, String>{
+    RESTfulResult addModel(List<MeterBaseUserSpotConfig> models);
+    List<MeterBaseUserSpotConfig> noPage(HashMap<String, Object> map);
+}

+ 105 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseuserspotconfig/service/impl/MeterBaseUserSpotConfigServiceImpl.java

@@ -0,0 +1,105 @@
+package com.steerinfo.baseinfo.meterbaseuserspotconfig.service.impl;
+
+import cn.hutool.core.lang.Assert;
+import com.steerinfo.baseinfo.meterbaseuserspotconfig.mapper.MeterBaseUserSpotConfigMapper;
+import com.steerinfo.baseinfo.meterbaseuserspotconfig.model.MeterBaseUserSpotConfig;
+import com.steerinfo.baseinfo.meterbaseuserspotconfig.service.IMeterBaseUserSpotConfigService;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.framework.user.UserPayload;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual;
+import com.steerinfo.util.PublicMethod;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.transaction.interceptor.TransactionAspectSupport;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * MeterBaseUserSpotConfig服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2023-01-08 11:31
+ * 类描述
+ * 修订历史:
+ * 日期:2023-01-08
+ * 作者:generator
+ * 参考:
+ * 描述:MeterBaseUserSpotConfig服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterBaseUserSpotConfigService")
+public class MeterBaseUserSpotConfigServiceImpl extends BaseServiceImpl<MeterBaseUserSpotConfig, String> implements IMeterBaseUserSpotConfigService {
+
+    @Autowired(required = false)
+    private MeterBaseUserSpotConfigMapper meterBaseUserSpotConfigMapper;
+
+    @Override
+    protected IBaseMapper<MeterBaseUserSpotConfig, String> getMapper() {
+        return meterBaseUserSpotConfigMapper;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public RESTfulResult addModel(List<MeterBaseUserSpotConfig> models) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
+        try{
+            Assert.isTrue(models.size() >= 1, "用户站点分配信息不能为空,请重试");
+            String userId = "";
+            String userName = "";
+            try{
+                UserPayload userPayload = UserPayload.getCurrUser();
+                userId = userPayload.getUserCode();
+                userName = userPayload.getUserName();
+            }catch(Exception e) {
+                userId = "admin";
+                userName = "admins";
+            }
+            int count = 0;
+            for(MeterBaseUserSpotConfig model: models) {
+                //根据秤点查询用户站点信息配置表,始终要保证秤点唯一对应一个人员信息
+                HashMap<String, Object> map = new HashMap<>();
+                map.put("baseSpotNo", model.getBaseSpotNo());
+                map.put("baseSpotName", model.getBaseSpotName());
+                List<MeterBaseUserSpotConfig> configModels = meterBaseUserSpotConfigMapper.selectByParameters(map);
+                if(configModels.size() >= 1) {
+                    MeterBaseUserSpotConfig config = configModels.get(0);
+                    config.setUserId(model.getUserId());
+                    config.setUserCode(model.getUserCode());
+                    config.setUserName(model.getUserName());
+                    config.setCreateManNo(userId);
+                    config.setCreateManName(userName);
+                    config.setCreateTime(new Date());
+                    meterBaseUserSpotConfigMapper.updateByPrimaryKeySelective(config);
+                }else {
+                    model.setId(PublicMethod.IdCreate(3));
+                    model.setCreateManNo(userId);
+                    model.setCreateManName(userName);
+                    model.setCreateTime(new Date());
+                    meterBaseUserSpotConfigMapper.insertSelective(model);
+                }
+                count ++;
+            }
+            rm.setSucceed(true);
+            rm.setCode("200");
+            rm.setData(count);
+            rm.setMessage("操作成功,总共" + count + "条人员秤点信息分配完成");
+        }catch(Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            rm.setMessage("操作异常:" + e.getMessage());
+        }
+        return rm;
+    }
+
+    @Override
+    public List<MeterBaseUserSpotConfig> noPage(HashMap<String, Object> map) {
+        return meterBaseUserSpotConfigMapper.noPage(map);
+    }
+}

+ 6 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractual/service/impl/MeterWorkCarActualServiceImpl.java

@@ -345,10 +345,16 @@ public class MeterWorkCarActualServiceImpl extends BaseServiceImpl<MeterWorkCarA
             if (mwcaf1 == null) {
                 throw new MarkerMetException(500, "未查询到相应的毛重数据!!");
             }
+            if (mwcaf1.getValueFlag().equals("2")) {
+                throw new MarkerMetException(500, "毛重数据已结净,请重试!!");
+            }
             MeterWorkCarActualFirst mwcaf2 = meterWorkCarActualFirstMapper.selectByPrimaryKey(dataNo);
             if (mwcaf2 == null) {
                 throw new MarkerMetException(500, "未查询到相应的皮重数据!!");
             }
+            if (mwcaf2.getValueFlag().equals("2")) {
+                throw new MarkerMetException(500, "皮重数据已结净,请重试!!");
+            }
             //判断皮毛重量是否符合要求
             if (mwcaf2.getMeterWeight().compareTo(mwcaf1.getMeterWeight()) == 1) {
                 throw new MarkerMetException(500, "皮重重量大于毛重重量!!");

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

@@ -4,8 +4,13 @@ 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.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarActualCountCheckNum;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarFirstCountCheckNum;
 import com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual;
 import com.steerinfo.meterwork.meterworkcheckfirstactual.service.IMeterWorkCheckFirstActualService;
+import com.steerinfo.meterwork.meterworkdatacount.model.RailwayActualGrossWeightComparison;
 import com.steerinfo.meterwork.meterworkshiftreportgroup.model.MeterWorkShiftReportGroup;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -111,4 +116,86 @@ public class MeterWorkCheckFirstActualController extends BaseRESTfulController {
         MeterWorkCheckFirstActual meterWorkCheckFirstActual = meterWorkCheckFirstActualService.addModel(model);
         return success(meterWorkCheckFirstActual);
     }
+
+    @ApiOperation(value = "汽车衡一次计量和结净数据图片与数据核查-获取列表",
+            notes = "不分页模糊查询;关键词:startTime、endTime、typeNo(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)" +
+                    "、typeName、valueFlag:0:一次数据、1:净重数据")
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/carFirstActualImgDataList")
+    public RESTfulResult carFirstImgDataList(@RequestBody(required = false) HashMap parmas) {
+        try {
+            List<HashMap> list = meterWorkCheckFirstActualService.carFirstActualImgDataList(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "汽车衡净重数据核查数统计-获取列表", notes = "关键词:startTime、endTime、pageNum、pageSize、baseSpotNo、baseSpotName")
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/carActualCountCheckNum")
+    public RESTfulResult carActualCountCheckNum(@RequestBody HashMap parmas) {
+        try {
+            PageList<CarActualCountCheckNum> list = meterWorkCheckFirstActualService.carActualCountCheckNum(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+    @ApiOperation(value = "汽车衡一次数据核查数统计-获取列表", notes = "关键词:startTime、endTime、pageNum、pageSize、baseSpotNo、baseSpotName")
+    //@RequiresPermissions("meterworkcaractualfirst:view")
+    @PostMapping(value = "/carFirstCountCheckNum")
+    public RESTfulResult carFirstCountCheckNum(@RequestBody HashMap parmas) {
+        try {
+            PageList<CarFirstCountCheckNum> list = meterWorkCheckFirstActualService.carFirstCountCheckNum(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 = "/likeByDesc")
+    public RESTfulResult likeByDesc(@RequestBody HashMap parmas) {
+        try {
+            PageList<MeterWorkCheckFirstActual> list = meterWorkCheckFirstActualService.likeByDesc(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 = "/carFirstLikeByDesc")
+    public RESTfulResult carFirstLikeByDesc(@RequestBody HashMap parmas) {
+        try {
+            PageList<CarFirstCountCheckNum> list = meterWorkCheckFirstActualService.carFirstLikeByDesc(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 = "/carActualLikeByDesc")
+    public RESTfulResult carActualLikeByDesc(@RequestBody HashMap parmas) {
+        try {
+            PageList<CarActualCountCheckNum> list = meterWorkCheckFirstActualService.carActualLikeByDesc(parmas);
+            return success(list);
+        } catch (Exception ex) {
+            ex.printStackTrace();
+            throw new MarkerMetException(500, "操作异常!!");
+        }
+    }
+
+
 }

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

@@ -1,9 +1,29 @@
 package com.steerinfo.meterwork.meterworkcheckfirstactual.mapper;
 
+import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
 import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
+import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarActualCountCheckNum;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarFirstCountCheckNum;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.FirstActualImgData;
 import com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual;
 import org.apache.ibatis.annotations.Mapper;
 
+import java.util.HashMap;
+import java.util.List;
+
 @Mapper
 public interface MeterWorkCheckFirstActualMapper extends IBaseMapper<MeterWorkCheckFirstActual, String> {
+    List<MeterBaseSpotInfo> spotInfoList(HashMap<String, Object> pararms);
+    List<MeterWorkCarActualFirst> carFirstDataList(HashMap<String, Object> pararms);
+    List<FirstActualImgData> carFirstImgDataList(HashMap<String, Object> pararms);
+    List<MeterWorkCarActual> carActualDataList(HashMap<String, Object> pararms);
+    List<FirstActualImgData> carActualImgDataList(HashMap<String, Object> pararms);
+    List<CarActualCountCheckNum> carActualCountCheckNum(HashMap<String, Object> pararms);
+    List<CarFirstCountCheckNum> carFirstCountCheckNum(HashMap<String, Object> pararms);
+    List<MeterWorkCheckFirstActual> likeByDesc(HashMap<String, Object> pararms);
+    List<CarFirstCountCheckNum> carFirstLikeByDesc(HashMap<String, Object> pararms);
+    List<CarActualCountCheckNum> carActualLikeByDesc(HashMap<String, Object> pararms);
+
 }

+ 683 - 25
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/mapper/MeterWorkCheckFirstActualMapper.xml

@@ -10,20 +10,23 @@
     <result column="CHECK_MAN_NO" jdbcType="VARCHAR" property="checkManNo" />
     <result column="CHECK_MAN_NAME" jdbcType="VARCHAR" property="checkManName" />
     <result column="CHECK_RESULT" jdbcType="VARCHAR" property="checkResult" />
+    <result column="TYPE_NO" jdbcType="VARCHAR" property="typeNo" />
+    <result column="TYPE_NAME" jdbcType="VARCHAR" property="typeName" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
   </resultMap>
   <sql id="columns">
     ID, CHECK_ID, CHECK_START_TIME, CHECK_END_TIME, CHECK_USED_SECONDS, CHECK_MAN_NO, 
-    CHECK_MAN_NAME, CHECK_RESULT
+    CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO, TYPE_NAME, VALUE_FLAG
   </sql>
   <sql id="columns_alias">
     t.ID, t.CHECK_ID, t.CHECK_START_TIME, t.CHECK_END_TIME, t.CHECK_USED_SECONDS, t.CHECK_MAN_NO, 
-    t.CHECK_MAN_NAME, t.CHECK_RESULT
+    t.CHECK_MAN_NAME, t.CHECK_RESULT, t.TYPE_NO, t.TYPE_NAME, t.VALUE_FLAG
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM METER_WORK_CHECK_FIRST_ACTUAL
+    SELECT <include refid="columns" /> FROM METER_WORK_CHECK_FIRST_ACTUAL
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM METER_WORK_CHECK_FIRST_ACTUAL t
+    SELECT <include refid="columns_alias" /> FROM METER_WORK_CHECK_FIRST_ACTUAL t
   </sql>
   <sql id="where">
     <where> 
@@ -51,6 +54,15 @@
       <if test="checkResult != null and checkResult != ''">
         and CHECK_RESULT = #{checkResult}
       </if>
+      <if test="typeNo != null and typeNo != ''">
+        and TYPE_NO = #{typeNo}
+      </if>
+      <if test="typeName != null and typeName != ''">
+        and TYPE_NAME = #{typeName}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </if>
     </where>
   </sql>
   <sql id="whereLike">
@@ -79,6 +91,15 @@
       <if test="checkResult != null and checkResult != ''">
         and CHECK_RESULT LIKE '%${checkResult}%'
       </if>
+      <if test="typeNo != null and typeNo != ''">
+        and TYPE_NO LIKE '%${typeNo}%'
+      </if>
+      <if test="typeName != null and typeName != ''">
+        and TYPE_NAME LIKE '%${typeName}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
     </where>
   </sql>
   <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
@@ -109,14 +130,25 @@
       <if test="checkResult != null and checkResult != ''">
         or CHECK_RESULT = #{checkResult}
       </if>
+      <if test="typeNo != null and typeNo != ''">
+        or TYPE_NO = #{typeNo}
+      </if>
+      <if test="typeName != null and typeName != ''">
+        or TYPE_NAME = #{typeName}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        or VALUE_FLAG = #{valueFlag}
+      </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual">
     insert into METER_WORK_CHECK_FIRST_ACTUAL (ID, CHECK_ID, CHECK_START_TIME, 
       CHECK_END_TIME, CHECK_USED_SECONDS, CHECK_MAN_NO, 
-      CHECK_MAN_NAME, CHECK_RESULT)
+      CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO, 
+      TYPE_NAME, VALUE_FLAG)
     values (#{id,jdbcType=VARCHAR}, #{checkId,jdbcType=VARCHAR}, #{checkStartTime,jdbcType=TIMESTAMP}, 
       #{checkEndTime,jdbcType=TIMESTAMP}, #{checkUsedSeconds,jdbcType=DECIMAL}, #{checkManNo,jdbcType=VARCHAR}, 
-      #{checkManName,jdbcType=VARCHAR}, #{checkResult,jdbcType=VARCHAR})
+      #{checkManName,jdbcType=VARCHAR}, #{checkResult,jdbcType=VARCHAR}, #{typeNo,jdbcType=VARCHAR}, 
+      #{typeName,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual">
     insert into METER_WORK_CHECK_FIRST_ACTUAL
@@ -145,6 +177,15 @@
       <if test="checkResult != null">
         CHECK_RESULT,
       </if>
+      <if test="typeNo != null">
+        TYPE_NO,
+      </if>
+      <if test="typeName != null">
+        TYPE_NAME,
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -171,6 +212,15 @@
       <if test="checkResult != null">
         #{checkResult,jdbcType=VARCHAR},
       </if>
+      <if test="typeNo != null">
+        #{typeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="typeName != null">
+        #{typeName,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        #{valueFlag,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual">
@@ -181,7 +231,10 @@
       CHECK_USED_SECONDS = #{checkUsedSeconds,jdbcType=DECIMAL},
       CHECK_MAN_NO = #{checkManNo,jdbcType=VARCHAR},
       CHECK_MAN_NAME = #{checkManName,jdbcType=VARCHAR},
-      CHECK_RESULT = #{checkResult,jdbcType=VARCHAR}
+      CHECK_RESULT = #{checkResult,jdbcType=VARCHAR},
+      TYPE_NO = #{typeNo,jdbcType=VARCHAR},
+      TYPE_NAME = #{typeName,jdbcType=VARCHAR},
+      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR}
     where ID = #{id,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual">
@@ -208,83 +261,688 @@
       <if test="checkResult != null">
         CHECK_RESULT = #{checkResult,jdbcType=VARCHAR},
       </if>
+      <if test="typeNo != null">
+        TYPE_NO = #{typeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="typeName != null">
+        TYPE_NAME = #{typeName,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      </if>
     </set>
     where ID = #{id,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where ID = #{id,jdbcType=VARCHAR}
   </select>
   <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="where"/>
+    <include refid="select" />
+    <include refid="where" />
   </select>
   <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-    <include refid="select"/>
-    <include refid="whereLike"/>
+    <include refid="select" />
+    <include refid="whereLike" />
   </select>
   <insert id="batchInsert" parameterType="java.util.List">
     insert into METER_WORK_CHECK_FIRST_ACTUAL 
       (ID, 
       CHECK_ID, CHECK_START_TIME, CHECK_END_TIME, 
       CHECK_USED_SECONDS, CHECK_MAN_NO, 
-      CHECK_MAN_NAME, CHECK_RESULT)
+      CHECK_MAN_NAME, CHECK_RESULT, TYPE_NO, 
+      TYPE_NAME, VALUE_FLAG)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.id,jdbcType=VARCHAR}, 
       #{item.checkId,jdbcType=VARCHAR}, #{item.checkStartTime,jdbcType=TIMESTAMP}, #{item.checkEndTime,jdbcType=TIMESTAMP}, 
       #{item.checkUsedSeconds,jdbcType=DECIMAL}, #{item.checkManNo,jdbcType=VARCHAR}, 
-      #{item.checkManName,jdbcType=VARCHAR}, #{item.checkResult,jdbcType=VARCHAR} from dual  
+      #{item.checkManName,jdbcType=VARCHAR}, #{item.checkResult,jdbcType=VARCHAR}, #{item.typeNo,jdbcType=VARCHAR}, 
+      #{item.typeName,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
      update METER_WORK_CHECK_FIRST_ACTUAL
      set
        ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.id,jdbcType=VARCHAR}
        </foreach>
        ,CHECK_ID=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.checkId,jdbcType=VARCHAR}
        </foreach>
        ,CHECK_START_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.checkStartTime,jdbcType=TIMESTAMP}
        </foreach>
        ,CHECK_END_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.checkEndTime,jdbcType=TIMESTAMP}
        </foreach>
        ,CHECK_USED_SECONDS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.checkUsedSeconds,jdbcType=DECIMAL}
        </foreach>
        ,CHECK_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.checkManNo,jdbcType=VARCHAR}
        </foreach>
        ,CHECK_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.checkManName,jdbcType=VARCHAR}
        </foreach>
        ,CHECK_RESULT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ID" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
           when #{item.id,jdbcType=VARCHAR} then #{item.checkResult,jdbcType=VARCHAR}
        </foreach>
+       ,TYPE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
+          when #{item.id,jdbcType=VARCHAR} then #{item.typeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,TYPE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
+          when #{item.id,jdbcType=VARCHAR} then #{item.typeName,jdbcType=VARCHAR}
+       </foreach>
+       ,VALUE_FLAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case ID" separator=" ">
+          when #{item.id,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
+       </foreach>
      where ID in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.id,jdbcType=VARCHAR}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_WORK_CHECK_FIRST_ACTUAL
     where ID in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+
+  <!-- 查询汽车衡一次和净重数据所有的站点信息 -->
+  <select id="spotInfoList" parameterType="java.util.HashMap" 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_car_actual_first 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>
+    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_car_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>
+    group by A.net_spot3_no,
+             A.net_spot3_name)
+    )
+    group by baseSpotNo,
+             baseSpotName
+  </select>
+
+  <resultMap id="CarFirstBaseResultMap" type="com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst">
+    <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="CAR_NO" jdbcType="VARCHAR" property="carNo" />
+    <result column="TRAILER_NO" jdbcType="VARCHAR" property="trailerNo" />
+    <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="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
+    <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="ADD_WEIGHT" jdbcType="DECIMAL" property="addWeight" />
+    <result column="METER_NUM" jdbcType="DECIMAL" property="meterNum" />
+    <result column="WEIGHT_TYPE" jdbcType="VARCHAR" property="weightType" />
+    <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="METER_REASON_NO" jdbcType="VARCHAR" property="meterReasonNo" />
+    <result column="METER_REASON_NAME" jdbcType="VARCHAR" property="meterReasonName" />
+    <result column="LOAD_END_TIME" jdbcType="TIMESTAMP" property="loadEndTime" />
+    <result column="ADD_WGT_NO" jdbcType="VARCHAR" property="addWgtNo" />
+    <result column="ADD_WGT_PK" jdbcType="VARCHAR" property="addWgtPk" />
+    <result column="LIMS_SAMPLING_FLAG" jdbcType="VARCHAR" property="limsSamplingFlag" />
+    <result column="HEAT_NO" jdbcType="VARCHAR" property="heatNo" />
+    <result column="METER_PIER_NAME" jdbcType="VARCHAR" property="meterPierName" />
+    <result column="METER_PIER_NO" jdbcType="VARCHAR" property="meterPierNo" />
+    <result column="SHIP_NO" jdbcType="VARCHAR" property="shipNo" />
+    <result column="NOTE" jdbcType="VARCHAR" property="note" />
+    <result column="VOUCHER_IDENTITY" jdbcType="VARCHAR" property="voucherIdentity" />
+    <result column="VOUCHER_ITEM" jdbcType="VARCHAR" property="voucherItem" />
+    <result column="BUSINESS_GROUP" jdbcType="VARCHAR" property="businessGroup" />
+    <result column="TEMP_CONVEYANCE" jdbcType="VARCHAR" property="tempConveyance" />
+    <result column="CONVEYANCE_TYPE" jdbcType="VARCHAR" property="conveyanceType" />
+    <result column="RESOURCE_SYSTEM" jdbcType="VARCHAR" property="resourceSystem" />
+    <result column="GROUP_PACKAGE_AMOUNT" jdbcType="DECIMAL" property="groupPackageAmount" />
+    <result column="GROUP_PACKAGE_UNIT" jdbcType="VARCHAR" property="groupPackageUnit" />
+    <result column="PACKAGE_AMOUNT" jdbcType="DECIMAL" property="packageAmount" />
+    <result column="PACKAGE_UNIT" jdbcType="VARCHAR" property="packageUnit" />
+    <result column="THEORY_AMOUNT" jdbcType="DECIMAL" property="theoryAmount" />
+    <result column="MEASURE_BATCH" jdbcType="VARCHAR" property="measureBatch" />
+    <result column="MEASURE_BATCH_COUNT" jdbcType="DECIMAL" property="measureBatchCount" />
+    <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType" />
+    <result column="SENDER_REMARK" jdbcType="VARCHAR" property="senderRemark" />
+    <result column="RECEIVER_TYPE" jdbcType="VARCHAR" property="receiverType" />
+    <result column="RECEIVER_REMARK" jdbcType="VARCHAR" property="receiverRemark" />
+    <result column="AMOUNT_UNIT" jdbcType="VARCHAR" property="amountUnit" />
+    <result column="MEASURE_OBJECT_TYPE" jdbcType="VARCHAR" property="measureObjectType" />
+    <result column="MEASURE_TASK_NUM" jdbcType="VARCHAR" property="measureTaskNum" />
+    <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
+    <result column="IS_PRE_SCALE" jdbcType="VARCHAR" property="isPreScale" />
+  </resultMap>
+
+  <select id="carFirstDataList" parameterType="java.util.HashMap" resultMap="CarFirstBaseResultMap">
+    select *
+    from meter_work_car_actual_first
+    where 1 = 1
+    <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>
+  </select>
+
+  <select id="carFirstImgDataList" parameterType="java.util.HashMap" resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.FirstActualImgData">
+    select A.base_spot_no baseSpotNo,
+    A.base_spot_name baseSpotName,
+    B.*
+    from meter_work_car_actual_first 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 = #{typeNo}
+    </if>
+    <if test="typeName != null and typeName != ''">
+      and C.type_Name = #{typeName}
+    </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>
+  </select>
+
+  <resultMap id="CarActualBaseResultMap" type="com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual">
+    <id column="ACTUAL_NO" jdbcType="VARCHAR" property="actualNo" />
+    <result column="PREDICTION_NO" jdbcType="VARCHAR" property="predictionNo" />
+    <result column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo" />
+    <result column="CAR_NO" jdbcType="VARCHAR" property="carNo" />
+    <result column="TRAILER_NO" jdbcType="VARCHAR" property="trailerNo" />
+    <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="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="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="ACTUAL_FIRST1_NO" jdbcType="VARCHAR" property="actualFirst1No" />
+    <result column="GROSS_WEIGHT" jdbcType="DECIMAL" property="grossWeight" />
+    <result column="GROSS_MAN_NO" jdbcType="VARCHAR" property="grossManNo" />
+    <result column="GROSS_MAN_NAME" jdbcType="VARCHAR" property="grossManName" />
+    <result column="GROSS_TIME" jdbcType="TIMESTAMP" property="grossTime" />
+    <result column="BASE_SPOT1_NO" jdbcType="VARCHAR" property="baseSpot1No" />
+    <result column="BASE_SPOT1_NAME" jdbcType="VARCHAR" property="baseSpot1Name" />
+    <result column="GROSS_CLASS" jdbcType="VARCHAR" property="grossClass" />
+    <result column="GROSS_GROUP" jdbcType="VARCHAR" property="grossGroup" />
+    <result column="GROSS_MODE" jdbcType="VARCHAR" property="grossMode" />
+    <result column="ACTUAL_FIRST2_NO" jdbcType="VARCHAR" property="actualFirst2No" />
+    <result column="TARE_WEIGHT" jdbcType="DECIMAL" property="tareWeight" />
+    <result column="TARE_MAN_NO" jdbcType="VARCHAR" property="tareManNo" />
+    <result column="TARE_MAN_NAME" jdbcType="VARCHAR" property="tareManName" />
+    <result column="TARE_TIME" jdbcType="TIMESTAMP" property="tareTime" />
+    <result column="BASE_SPOT2_NO" jdbcType="VARCHAR" property="baseSpot2No" />
+    <result column="BASE_SPOT2_NAME" jdbcType="VARCHAR" property="baseSpot2Name" />
+    <result column="TARE_CLASS" jdbcType="VARCHAR" property="tareClass" />
+    <result column="TARE_GROUP" jdbcType="VARCHAR" property="tareGroup" />
+    <result column="TARE_MODE" jdbcType="VARCHAR" property="tareMode" />
+    <result column="NET_WEIGHT" jdbcType="DECIMAL" property="netWeight" />
+    <result column="METER_NUM" jdbcType="DECIMAL" property="meterNum" />
+    <result column="NET_MAN_NO" jdbcType="VARCHAR" property="netManNo" />
+    <result column="NET_MAN_NAME" jdbcType="VARCHAR" property="netManName" />
+    <result column="NET_TIME" jdbcType="TIMESTAMP" property="netTime" />
+    <result column="NET_SPOT3_NO" jdbcType="VARCHAR" property="netSpot3No" />
+    <result column="NET_SPOT3_NAME" jdbcType="VARCHAR" property="netSpot3Name" />
+    <result column="NET_GROUP" jdbcType="VARCHAR" property="netGroup" />
+    <result column="NET_MODE" jdbcType="VARCHAR" property="netMode" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
+    <result column="UPLOAD_FLAG" jdbcType="VARCHAR" property="uploadFlag" />
+    <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="UPLOAD_MAN_NO" jdbcType="VARCHAR" property="uploadManNo" />
+    <result column="UPLOAD_MAN_NAME" jdbcType="VARCHAR" property="uploadManName" />
+    <result column="UPLOAD_TIME" jdbcType="TIMESTAMP" property="uploadTime" />
+    <result column="ADD_WEIGHT" jdbcType="DECIMAL" property="addWeight" />
+    <result column="NET_CLASS" jdbcType="VARCHAR" property="netClass" />
+    <result column="TB_FLAGE" jdbcType="VARCHAR" property="tbFlage" />
+    <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
+    <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="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="HEAT_NO" jdbcType="VARCHAR" property="heatNo" />
+    <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="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
+    <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
+    <result column="METER_PIER_NAME" jdbcType="VARCHAR" property="meterPierName" />
+    <result column="METER_PIER_NO" jdbcType="VARCHAR" property="meterPierNo" />
+    <result column="SHIP_NO" jdbcType="VARCHAR" property="shipNo" />
+    <result column="NOTE" jdbcType="VARCHAR" property="note" />
+    <result column="VOUCHER_IDENTITY" jdbcType="VARCHAR" property="voucherIdentity" />
+    <result column="VOUCHER_ITEM" jdbcType="VARCHAR" property="voucherItem" />
+    <result column="BUSINESS_GROUP" jdbcType="VARCHAR" property="businessGroup" />
+    <result column="TEMP_CONVEYANCE" jdbcType="VARCHAR" property="tempConveyance" />
+    <result column="CONVEYANCE_TYPE" jdbcType="VARCHAR" property="conveyanceType" />
+    <result column="RESOURCE_SYSTEM" jdbcType="VARCHAR" property="resourceSystem" />
+    <result column="GROUP_PACKAGE_AMOUNT" jdbcType="DECIMAL" property="groupPackageAmount" />
+    <result column="GROUP_PACKAGE_UNIT" jdbcType="VARCHAR" property="groupPackageUnit" />
+    <result column="PACKAGE_AMOUNT" jdbcType="DECIMAL" property="packageAmount" />
+    <result column="PACKAGE_UNIT" jdbcType="VARCHAR" property="packageUnit" />
+    <result column="THEORY_AMOUNT" jdbcType="DECIMAL" property="theoryAmount" />
+    <result column="MEASURE_BATCH" jdbcType="VARCHAR" property="measureBatch" />
+    <result column="MEASURE_BATCH_COUNT" jdbcType="DECIMAL" property="measureBatchCount" />
+    <result column="SENDER_TYPE" jdbcType="VARCHAR" property="senderType" />
+    <result column="SENDER_REMARK" jdbcType="VARCHAR" property="senderRemark" />
+    <result column="RECEIVER_TYPE" jdbcType="VARCHAR" property="receiverType" />
+    <result column="RECEIVER_REMARK" jdbcType="VARCHAR" property="receiverRemark" />
+    <result column="AMOUNT_UNIT" jdbcType="VARCHAR" property="amountUnit" />
+    <result column="MEASURE_OBJECT_TYPE" jdbcType="VARCHAR" property="measureObjectType" />
+    <result column="MEASURE_TASK_NUM" jdbcType="VARCHAR" property="measureTaskNum" />
+    <result column="BILL_TYPE" jdbcType="VARCHAR" property="billType" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
+    <result column="IS_PRE_SCALE" jdbcType="VARCHAR" property="isPreScale" />
+    <result column="BOUND_LIST_URL" jdbcType="VARCHAR" property="boundListUrl" />
+    <result column="IS_BOUND_LIST" jdbcType="VARCHAR" property="isBoundList" />
+    <result column="CONTRACT_ID" jdbcType="VARCHAR" property="contractId" />
+    <result column="IS_BOUND_LIST_DOWNLOADED" jdbcType="VARCHAR" property="isBoundListDownloaded" />
+    <result column="DOCUMENT_ID" jdbcType="VARCHAR" property="documentId" />
+  </resultMap>
+
+  <select id="carActualDataList" parameterType="java.util.HashMap" resultMap="CarActualBaseResultMap">
+    select *
+    from meter_work_car_actual
+    where 1 = 1
+    <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+      and  net_time  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+      and  net_time  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+  </select>
+
+  <select id="carActualImgDataList" parameterType="java.util.HashMap" resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.FirstActualImgData">
+    select A.net_spot3_no baseSpotNo,
+           A.net_spot3_name baseSpotName,
+           B.*
+    from meter_work_car_actual A
+        left join meter_work_check_first_actual B
+            on A.actual_no = B.check_id
+    where 1 = 1
+    and A.actual_no in (
+        select distinct C.check_id
+            from meter_work_check_first_actual C
+        where 1 = 1
+              and C.value_flag = '1'
+              <if test="typeNo != null and typeName != ''">
+                and C.type_No = #{typeNo}
+              </if>
+              <if test="typeName != null and typeName != ''">
+                and C.type_Name = #{typeName}
+              </if>
+    )
+    <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>
+  </select>
+
+  <select id="carActualCountCheckNum" parameterType="java.util.HashMap" resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarActualCountCheckNum">
+    select count(1) countCheckNum,
+          sum(CHECK_USED_SECONDS) countSumCheckUsed,
+          avg(B.CHECK_USED_SECONDS) countAvgCheckUsed,
+          A.actual_no actualNo,
+          A.actual_first1_no actualFirst1No,
+          A.actual_first2_no actualFirst2No,
+          case when A.net_mode = '1' then '远程计量'
+              when A.net_mode = '2' then '智能计量'
+              when A.net_mode = '3' then '手工计量'
+              else A.net_mode end netMode,
+          A.prediction_no predictionNo,
+          A.car_No carNo,
+          A.conveyance_type conveyanceType,
+          A.matter_no matterNo,
+          A.matter_name matterName,
+          to_char(round(A.gross_Weight/1000, 2),'FM9999999999999999.00') grossWeight,
+          to_char(round(A.tare_weight/1000, 2),'FM9999999999999999.00') tareWeight,
+          to_char(round(A.net_weight/1000, 2),'FM9999999999999999.00') netWeight,
+          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.theory_amount theoryAmount,
+          A.gross_time grossTime,
+          A.base_spot1_name baseSpot1Name,
+          A.gross_man_name grossManName,
+          A.tare_time tareTime,
+          A.base_spot2_name baseSpot2Name,
+          A.tare_man_name tareManName,
+          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,
+          case when A.upload_flag = '1' then '待上传'
+              when A.upload_flag = '2' then '已上传'
+              else A.upload_flag end uploadFlag
+    from meter_work_car_actual A
+        left join meter_work_check_first_actual B
+            on A.actual_no = B.check_id
+    where 1 = 1
+        and A.actual_no in (
+            select distinct C.check_id
+                from meter_work_check_first_actual C
+                where 1 = 1
+                    and C.value_flag = '1'
+                  <if test="typeNo != null and typeName != ''">
+                    and C.type_No = #{typeNo}
+                  </if>
+                  <if test="typeName != null and typeName != ''">
+                    and C.type_Name = #{typeName}
+                  </if>)
+    <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>
+    group by A.actual_no,
+            A.actual_first1_no,
+            A.actual_first2_no,
+            A.net_mode,
+            A.prediction_no,
+            A.car_no,
+            A.conveyance_type,
+            A.matter_no,
+            A.matter_name,
+            A.gross_weight,
+            A.tare_weight,
+            A.net_weight,
+            A.forwarding_unit_name,
+            A.receiving_uint_name,
+            A.meter_type_Name,
+            A.theory_amount,
+            A.gross_time,
+            A.base_spot1_name,
+            A.gross_man_name,
+            A.tare_time,
+            A.base_spot2_name,
+            A.tare_man_name,
+            A.value_flag,
+            A.upload_flag
+  </select>
+
+  <select id="carFirstCountCheckNum" parameterType="java.util.HashMap" resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarFirstCountCheckNum">
+    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.car_No carNo,
+          A.conveyance_type conveyanceType,
+          A.matter_no matterNo,
+          A.matter_name matterName,
+          to_char(round(A.meter_Weight/1000, 2),'FM9999999999999999.00') meterWeight,
+          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.theory_amount theoryAmount,
+          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_car_actual_first 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 = #{typeNo}
+              </if>
+              <if test="typeName != null and typeName != ''">
+                and C.type_Name = #{typeName}
+              </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>
+    group by A.actual_first_no,
+            A.meter_mode,
+            A.prediction_no,
+            A.car_no,
+            A.conveyance_type,
+            A.matter_no,
+            A.matter_name,
+            A.meter_weight,
+            A.forwarding_unit_name,
+            A.receiving_uint_name,
+            A.meter_type_Name,
+            A.theory_amount,
+            A.create_time,
+            A.base_spot_name,
+            A.create_man_name,
+            A.value_flag
+  </select>
+
+  <select id="likeByDesc" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <where>
+      <if test="checkId != null and checkId != ''">
+        and CHECK_ID LIKE '%${checkId}%'
+      </if>
+      <if test="typeNo != null and typeNo != ''">
+        and TYPE_NO LIKE '%${typeNo}%'
+      </if>
+      <if test="typeName != null and typeName != ''">
+        and TYPE_NAME LIKE '%${typeName}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+    </where>
+    order by check_start_time desc
+  </select>
+
+  <select id="carFirstLikeByDesc" parameterType="java.util.HashMap"
+          resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarFirstCountCheckNum">
+    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.car_No carNo,
+        A.conveyance_type conveyanceType,
+        A.matter_no matterNo,
+        A.matter_name matterName,
+        to_char(round(A.meter_Weight/1000, 2),'FM9999999999999999.00') meterWeight,
+        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.theory_amount theoryAmount,
+        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_car_actual_first 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'
+                  and C.type_no = '001002001')
+      <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>
+    order by A.create_time desc
+  </select>
+
+  <select id="carActualLikeByDesc" parameterType="java.util.HashMap"
+          resultType="com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarActualCountCheckNum">
+    select A.actual_no actualNo,
+          A.actual_first1_no actualFirst1No,
+          A.actual_first2_no actualFirst2No,
+          case when A.net_mode = '1' then '远程计量'
+              when A.net_mode = '2' then '智能计量'
+              when A.net_mode = '3' then '手工计量'
+              else A.net_mode end netMode,
+          A.prediction_no predictionNo,
+          A.car_No carNo,
+          A.conveyance_type conveyanceType,
+          A.matter_no matterNo,
+          A.matter_name matterName,
+          to_char(round(A.gross_Weight/1000, 2),'FM9999999999999999.00') grossWeight,
+          to_char(round(A.tare_weight/1000, 2),'FM9999999999999999.00') tareWeight,
+          to_char(round(A.net_weight/1000, 2),'FM9999999999999999.00') netWeight,
+          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.theory_amount theoryAmount,
+          A.gross_time grossTime,
+          A.base_spot1_name baseSpot1Name,
+          A.gross_man_name grossManName,
+          A.tare_time tareTime,
+          A.base_spot2_name baseSpot2Name,
+          A.tare_man_name tareManName,
+          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,
+          case when A.upload_flag = '1' then '待上传'
+              when A.upload_flag = '2' then '已上传'
+              else A.upload_flag end uploadFlag
+    from meter_work_car_actual A
+        left join meter_work_check_first_actual B
+            on A.actual_no = B.check_id
+    where 1 = 1
+        and A.actual_no not in (
+            select distinct C.check_id
+                from meter_work_check_first_actual C
+            where 1 = 1
+              and B.value_flag = '1'
+              and B.type_no = '001002001')
+    <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>
+    order by A.net_time desc
+  </select>
 </mapper>

+ 250 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/CarActualCountCheckNum.java

@@ -0,0 +1,250 @@
+package com.steerinfo.meterwork.meterworkcheckfirstactual.model;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class CarActualCountCheckNum {
+    private BigDecimal countCheckNum;
+    private BigDecimal countSumCheckUsed;
+    private BigDecimal countAvgCheckUsed;
+    private String actualNo;
+    private String actualFirst1No;
+    private String actualFirst2No;
+    private String netMode;
+    private String predictionNo;
+    private String carNo;
+    private String conveyanceType;
+    private String matterNo;
+    private String matterName;
+    private BigDecimal grossWeight;
+    private BigDecimal tareWeight;
+    private BigDecimal netWeight;
+    private String forwardingUnitName;
+    private String receivingUintName;
+    private String meterTypeName;
+    private String theoryAmount;
+    private Date grossTime;
+    private String baseSpot1Name;
+    private String grossManName;
+    private Date tareTime;
+    private String baseSpot2Name;
+    private String tareManName;
+    private String valueFlag;
+    private String uploadFlag;
+
+    public BigDecimal getCountCheckNum() {
+        return countCheckNum;
+    }
+
+    public void setCountCheckNum(BigDecimal countCheckNum) {
+        this.countCheckNum = countCheckNum;
+    }
+
+    public BigDecimal getCountSumCheckUsed() {
+        return countSumCheckUsed;
+    }
+
+    public void setCountSumCheckUsed(BigDecimal countSumCheckUsed) {
+        this.countSumCheckUsed = countSumCheckUsed;
+    }
+
+    public BigDecimal getCountAvgCheckUsed() {
+        return countAvgCheckUsed;
+    }
+
+    public void setCountAvgCheckUsed(BigDecimal countAvgCheckUsed) {
+        this.countAvgCheckUsed = countAvgCheckUsed;
+    }
+
+    public String getActualNo() {
+        return actualNo;
+    }
+
+    public void setActualNo(String actualNo) {
+        this.actualNo = actualNo;
+    }
+
+    public String getActualFirst1No() {
+        return actualFirst1No;
+    }
+
+    public void setActualFirst1No(String actualFirst1No) {
+        this.actualFirst1No = actualFirst1No;
+    }
+
+    public String getActualFirst2No() {
+        return actualFirst2No;
+    }
+
+    public void setActualFirst2No(String actualFirst2No) {
+        this.actualFirst2No = actualFirst2No;
+    }
+
+    public String getNetMode() {
+        return netMode;
+    }
+
+    public void setNetMode(String netMode) {
+        this.netMode = netMode;
+    }
+
+    public String getPredictionNo() {
+        return predictionNo;
+    }
+
+    public void setPredictionNo(String predictionNo) {
+        this.predictionNo = predictionNo;
+    }
+
+    public String getCarNo() {
+        return carNo;
+    }
+
+    public void setCarNo(String carNo) {
+        this.carNo = carNo;
+    }
+
+    public String getConveyanceType() {
+        return conveyanceType;
+    }
+
+    public void setConveyanceType(String conveyanceType) {
+        this.conveyanceType = conveyanceType;
+    }
+
+    public String getMatterNo() {
+        return matterNo;
+    }
+
+    public void setMatterNo(String matterNo) {
+        this.matterNo = matterNo;
+    }
+
+    public String getMatterName() {
+        return matterName;
+    }
+
+    public void setMatterName(String matterName) {
+        this.matterName = matterName;
+    }
+
+    public BigDecimal getGrossWeight() {
+        return grossWeight;
+    }
+
+    public void setGrossWeight(BigDecimal grossWeight) {
+        this.grossWeight = grossWeight;
+    }
+
+    public BigDecimal getTareWeight() {
+        return tareWeight;
+    }
+
+    public void setTareWeight(BigDecimal tareWeight) {
+        this.tareWeight = tareWeight;
+    }
+
+    public BigDecimal getNetWeight() {
+        return netWeight;
+    }
+
+    public void setNetWeight(BigDecimal netWeight) {
+        this.netWeight = netWeight;
+    }
+
+    public String getForwardingUnitName() {
+        return forwardingUnitName;
+    }
+
+    public void setForwardingUnitName(String forwardingUnitName) {
+        this.forwardingUnitName = forwardingUnitName;
+    }
+
+    public String getReceivingUintName() {
+        return receivingUintName;
+    }
+
+    public void setReceivingUintName(String receivingUintName) {
+        this.receivingUintName = receivingUintName;
+    }
+
+    public String getMeterTypeName() {
+        return meterTypeName;
+    }
+
+    public void setMeterTypeName(String meterTypeName) {
+        this.meterTypeName = meterTypeName;
+    }
+
+    public String getTheoryAmount() {
+        return theoryAmount;
+    }
+
+    public void setTheoryAmount(String theoryAmount) {
+        this.theoryAmount = theoryAmount;
+    }
+
+    public Date getGrossTime() {
+        return grossTime;
+    }
+
+    public void setGrossTime(Date grossTime) {
+        this.grossTime = grossTime;
+    }
+
+    public String getBaseSpot1Name() {
+        return baseSpot1Name;
+    }
+
+    public void setBaseSpot1Name(String baseSpot1Name) {
+        this.baseSpot1Name = baseSpot1Name;
+    }
+
+    public String getGrossManName() {
+        return grossManName;
+    }
+
+    public void setGrossManName(String grossManName) {
+        this.grossManName = grossManName;
+    }
+
+    public Date getTareTime() {
+        return tareTime;
+    }
+
+    public void setTareTime(Date tareTime) {
+        this.tareTime = tareTime;
+    }
+
+    public String getBaseSpot2Name() {
+        return baseSpot2Name;
+    }
+
+    public void setBaseSpot2Name(String baseSpot2Name) {
+        this.baseSpot2Name = baseSpot2Name;
+    }
+
+    public String getTareManName() {
+        return tareManName;
+    }
+
+    public void setTareManName(String tareManName) {
+        this.tareManName = tareManName;
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag;
+    }
+
+    public String getUploadFlag() {
+        return uploadFlag;
+    }
+
+    public void setUploadFlag(String uploadFlag) {
+        this.uploadFlag = uploadFlag;
+    }
+}

+ 168 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/CarFirstCountCheckNum.java

@@ -0,0 +1,168 @@
+package com.steerinfo.meterwork.meterworkcheckfirstactual.model;
+
+import java.math.BigDecimal;
+
+public class CarFirstCountCheckNum {
+    private BigDecimal countCheckNum;
+    private BigDecimal countSumCheckUsed;
+    private BigDecimal countAvgCheckUsed;
+    private String actualFirstNo;
+    private String meterMode;
+    private String predictionNo;
+    private String carNo;
+    private String conveyanceType;
+    private String matterNo;
+    private String mattterName;
+    private BigDecimal meterWeight;
+    private String forwardingUnitName;
+    private String receivingUintName;
+    private String meterTypeName;
+    private String theoryAmount;
+    private String createTime;
+    private String baseSpotName;
+    private String valueFlag;
+
+    public BigDecimal getCountCheckNum() {
+        return countCheckNum;
+    }
+
+    public void setCountCheckNum(BigDecimal countCheckNum) {
+        this.countCheckNum = countCheckNum;
+    }
+
+    public BigDecimal getCountSumCheckUsed() {
+        return countSumCheckUsed;
+    }
+
+    public void setCountSumCheckUsed(BigDecimal countSumCheckUsed) {
+        this.countSumCheckUsed = countSumCheckUsed;
+    }
+
+    public BigDecimal getCountAvgCheckUsed() {
+        return countAvgCheckUsed;
+    }
+
+    public void setCountAvgCheckUsed(BigDecimal countAvgCheckUsed) {
+        this.countAvgCheckUsed = countAvgCheckUsed;
+    }
+
+    public String getActualFirstNo() {
+        return actualFirstNo;
+    }
+
+    public void setActualFirstNo(String actualFirstNo) {
+        this.actualFirstNo = actualFirstNo;
+    }
+
+    public String getMeterMode() {
+        return meterMode;
+    }
+
+    public void setMeterMode(String meterMode) {
+        this.meterMode = meterMode;
+    }
+
+    public String getPredictionNo() {
+        return predictionNo;
+    }
+
+    public void setPredictionNo(String predictionNo) {
+        this.predictionNo = predictionNo;
+    }
+
+    public String getCarNo() {
+        return carNo;
+    }
+
+    public void setCarNo(String carNo) {
+        this.carNo = carNo;
+    }
+
+    public String getConveyanceType() {
+        return conveyanceType;
+    }
+
+    public void setConveyanceType(String conveyanceType) {
+        this.conveyanceType = conveyanceType;
+    }
+
+    public String getMatterNo() {
+        return matterNo;
+    }
+
+    public void setMatterNo(String matterNo) {
+        this.matterNo = matterNo;
+    }
+
+    public String getMattterName() {
+        return mattterName;
+    }
+
+    public void setMattterName(String mattterName) {
+        this.mattterName = mattterName;
+    }
+
+    public BigDecimal getMeterWeight() {
+        return meterWeight;
+    }
+
+    public void setMeterWeight(BigDecimal meterWeight) {
+        this.meterWeight = meterWeight;
+    }
+
+    public String getForwardingUnitName() {
+        return forwardingUnitName;
+    }
+
+    public void setForwardingUnitName(String forwardingUnitName) {
+        this.forwardingUnitName = forwardingUnitName;
+    }
+
+    public String getReceivingUintName() {
+        return receivingUintName;
+    }
+
+    public void setReceivingUintName(String receivingUintName) {
+        this.receivingUintName = receivingUintName;
+    }
+
+    public String getMeterTypeName() {
+        return meterTypeName;
+    }
+
+    public void setMeterTypeName(String meterTypeName) {
+        this.meterTypeName = meterTypeName;
+    }
+
+    public String getTheoryAmount() {
+        return theoryAmount;
+    }
+
+    public void setTheoryAmount(String theoryAmount) {
+        this.theoryAmount = theoryAmount;
+    }
+
+    public String getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(String createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getBaseSpotName() {
+        return baseSpotName;
+    }
+
+    public void setBaseSpotName(String baseSpotName) {
+        this.baseSpotName = baseSpotName;
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag;
+    }
+}

+ 136 - 0
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/FirstActualImgData.java

@@ -0,0 +1,136 @@
+package com.steerinfo.meterwork.meterworkcheckfirstactual.model;
+
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class FirstActualImgData {
+    private String baseSpotNo;
+    private String baseSpotName;
+    private String id;
+    @ApiModelProperty(value="一次或结净主键",required=true)
+    private String checkId;
+    @ApiModelProperty(value="核查开始时间",required=false)
+    private Date checkStartTime;
+    @ApiModelProperty(value="核查结束时间",required=false)
+    private Date checkEndTime;
+    @ApiModelProperty(value="核查用时",required=false)
+    private BigDecimal checkUsedSeconds;
+    @ApiModelProperty(value="核查人编号",required=false)
+    private String checkManNo;
+    @ApiModelProperty(value="核查人",required=false)
+    private String checkManName;
+    @ApiModelProperty(value="核查结果",required=false)
+    private String checkResult;
+    @ApiModelProperty(value="衡器类型(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)",required=false)
+    private String typeNo;
+    @ApiModelProperty(value="衡器类型名称(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)",required=false)
+    private String typeName;
+    @ApiModelProperty(value="0:一次数据、1:净重数据",required=false)
+    private String valueFlag;
+
+    public String getBaseSpotNo() {
+        return baseSpotNo;
+    }
+
+    public void setBaseSpotNo(String baseSpotNo) {
+        this.baseSpotNo = baseSpotNo;
+    }
+
+    public String getBaseSpotName() {
+        return baseSpotName;
+    }
+
+    public void setBaseSpotName(String baseSpotName) {
+        this.baseSpotName = baseSpotName;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getCheckId() {
+        return checkId;
+    }
+
+    public void setCheckId(String checkId) {
+        this.checkId = checkId;
+    }
+
+    public Date getCheckStartTime() {
+        return checkStartTime;
+    }
+
+    public void setCheckStartTime(Date checkStartTime) {
+        this.checkStartTime = checkStartTime;
+    }
+
+    public Date getCheckEndTime() {
+        return checkEndTime;
+    }
+
+    public void setCheckEndTime(Date checkEndTime) {
+        this.checkEndTime = checkEndTime;
+    }
+
+    public BigDecimal getCheckUsedSeconds() {
+        return checkUsedSeconds;
+    }
+
+    public void setCheckUsedSeconds(BigDecimal checkUsedSeconds) {
+        this.checkUsedSeconds = checkUsedSeconds;
+    }
+
+    public String getCheckManNo() {
+        return checkManNo;
+    }
+
+    public void setCheckManNo(String checkManNo) {
+        this.checkManNo = checkManNo;
+    }
+
+    public String getCheckManName() {
+        return checkManName;
+    }
+
+    public void setCheckManName(String checkManName) {
+        this.checkManName = checkManName;
+    }
+
+    public String getCheckResult() {
+        return checkResult;
+    }
+
+    public void setCheckResult(String checkResult) {
+        this.checkResult = checkResult;
+    }
+
+    public String getTypeNo() {
+        return typeNo;
+    }
+
+    public void setTypeNo(String typeNo) {
+        this.typeNo = typeNo;
+    }
+
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName;
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag;
+    }
+}

+ 46 - 1
src/main/java/com/steerinfo/meterwork/meterworkcheckfirstactual/model/MeterWorkCheckFirstActual.java

@@ -34,7 +34,7 @@ public class MeterWorkCheckFirstActual implements IBasePO<String> {
     private Date checkEndTime;
 
     /**
-     * 核查用时(CHECK_USED_SECONDS,DECIMAL,38)
+     * 核查用时(CHECK_USED_SECONDS,DECIMAL,0)
      */
     @ApiModelProperty(value="核查用时",required=false)
     private BigDecimal checkUsedSeconds;
@@ -57,6 +57,24 @@ public class MeterWorkCheckFirstActual implements IBasePO<String> {
     @ApiModelProperty(value="核查结果",required=false)
     private String checkResult;
 
+    /**
+     * 衡器类型(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)(TYPE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="衡器类型(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)",required=false)
+    private String typeNo;
+
+    /**
+     * 衡器类型名称(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)(TYPE_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="衡器类型名称(001002001:汽车衡、001019001:静态轨道衡、001019002:动态轨道衡、001019003:静态铁水轨道衡、001019004:动态铁水轨道衡、001019005:吊钩秤)",required=false)
+    private String typeName;
+
+    /**
+     * 0:一次数据、1:净重数据(VALUE_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="0:一次数据、1:净重数据",required=false)
+    private String valueFlag;
+
     private static final long serialVersionUID = 1L;
 
     public String getId() {
@@ -123,6 +141,30 @@ public class MeterWorkCheckFirstActual implements IBasePO<String> {
         this.checkResult = checkResult == null ? null : checkResult.trim();
     }
 
+    public String getTypeNo() {
+        return typeNo;
+    }
+
+    public void setTypeNo(String typeNo) {
+        this.typeNo = typeNo == null ? null : typeNo.trim();
+    }
+
+    public String getTypeName() {
+        return typeName;
+    }
+
+    public void setTypeName(String typeName) {
+        this.typeName = typeName == null ? null : typeName.trim();
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag == null ? null : valueFlag.trim();
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -137,6 +179,9 @@ public class MeterWorkCheckFirstActual implements IBasePO<String> {
         sb.append(", checkManNo=").append(checkManNo);
         sb.append(", checkManName=").append(checkManName);
         sb.append(", checkResult=").append(checkResult);
+        sb.append(", typeNo=").append(typeNo);
+        sb.append(", typeName=").append(typeName);
+        sb.append(", valueFlag=").append(valueFlag);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

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

@@ -1,9 +1,15 @@
 package com.steerinfo.meterwork.meterworkcheckfirstactual.service;
 
 import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarActualCountCheckNum;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarFirstCountCheckNum;
 import com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual;
 import com.steerinfo.meterwork.meterworkshiftreportgroup.model.MeterWorkShiftReportGroup;
 
+import java.util.HashMap;
+import java.util.List;
+
 /**
  * MeterWorkCheckFirstActual服务接口:
  * @author generator
@@ -19,4 +25,10 @@ import com.steerinfo.meterwork.meterworkshiftreportgroup.model.MeterWorkShiftRep
  */
 public interface IMeterWorkCheckFirstActualService extends IBaseService<MeterWorkCheckFirstActual, String>{
     MeterWorkCheckFirstActual addModel(MeterWorkCheckFirstActual model);
+    List<HashMap> carFirstActualImgDataList(HashMap<String, Object> params);
+    PageList<CarActualCountCheckNum> carActualCountCheckNum(HashMap<String, Object> params);
+    PageList<CarFirstCountCheckNum> carFirstCountCheckNum(HashMap<String, Object> params);
+    PageList<MeterWorkCheckFirstActual> likeByDesc(HashMap<String, Object> params);
+    PageList<CarFirstCountCheckNum> carFirstLikeByDesc(HashMap<String, Object> params);
+    PageList<CarActualCountCheckNum> carActualLikeByDesc(HashMap<String, Object> params);
 }

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

@@ -1,18 +1,32 @@
 package com.steerinfo.meterwork.meterworkcheckfirstactual.service.impl;
 
+import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.user.UserPayload;
+import com.steerinfo.meterwork.meterworkcaractual.model.MeterWorkCarActual;
+import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
 import com.steerinfo.meterwork.meterworkcheckfirstactual.mapper.MeterWorkCheckFirstActualMapper;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarActualCountCheckNum;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.CarFirstCountCheckNum;
+import com.steerinfo.meterwork.meterworkcheckfirstactual.model.FirstActualImgData;
 import com.steerinfo.meterwork.meterworkcheckfirstactual.model.MeterWorkCheckFirstActual;
 import com.steerinfo.meterwork.meterworkcheckfirstactual.service.IMeterWorkCheckFirstActualService;
+import com.steerinfo.meterwork.meterworkdatacount.model.RfidIdentifyAnalysis;
 import com.steerinfo.util.PublicMethod;
+import com.steerinfo.util.StringUtils;
+import org.apache.shiro.crypto.hash.Hash;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
+import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
 
 /**
  * MeterWorkCheckFirstActual服务实现:
@@ -59,4 +73,118 @@ public class MeterWorkCheckFirstActualServiceImpl extends BaseServiceImpl<MeterW
         meterWorkCheckFirstActualMapper.insert(model);
         return model;
     }
+
+    @Override
+    public List<HashMap> carFirstActualImgDataList(HashMap<String, Object> 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.spotInfoList(params);
+        //一次数据查询
+        String startTime = params.get("startTime").toString();
+        String endTime = params.get("endTime").toString();
+        HashMap<String, Object> obj = new HashMap<>();
+        obj.put("startTime", startTime);
+        obj.put("endTime", endTime);
+        List<MeterWorkCarActualFirst> firstModels = meterWorkCheckFirstActualMapper.carFirstDataList(obj);
+        List<MeterWorkCarActual> actualModels = meterWorkCheckFirstActualMapper.carActualDataList(obj);
+        //一次数据与核查表左连接
+        List<FirstActualImgData> firstImgDatamodels = meterWorkCheckFirstActualMapper.carFirstImgDataList(params);
+        //净重数据与核查表左连接
+        List<FirstActualImgData> ActualImgDatamodels = meterWorkCheckFirstActualMapper.carActualImgDataList(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) {
+                    countCheckFirstDataYes = 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();
+                }
+                countCheckFirstDataNo = countFirstData - countCheckFirstDataYes;
+
+                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) {
+                    countCheckActualDataYes = 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();
+                }
+                countCheckActualDataNo = countActualData - countCheckActualDataYes;
+
+                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<CarActualCountCheckNum> carActualCountCheckNum(HashMap<String, Object> params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        List<CarActualCountCheckNum> rows = meterWorkCheckFirstActualMapper.carActualCountCheckNum(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public PageList<CarFirstCountCheckNum> carFirstCountCheckNum(HashMap<String, Object> params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        List<CarFirstCountCheckNum> rows = meterWorkCheckFirstActualMapper.carFirstCountCheckNum(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public PageList<MeterWorkCheckFirstActual> likeByDesc(HashMap<String, Object> params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        List<MeterWorkCheckFirstActual> rows = meterWorkCheckFirstActualMapper.likeByDesc(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public PageList<CarFirstCountCheckNum> carFirstLikeByDesc(HashMap<String, Object> params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        List<CarFirstCountCheckNum> rows = meterWorkCheckFirstActualMapper.carFirstLikeByDesc(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
+
+    @Override
+    public PageList<CarActualCountCheckNum> carActualLikeByDesc(HashMap<String, Object> params) {
+        PageHelper.startPage(Integer.parseInt(params.get("pageNum").toString()), Integer.parseInt(params.get("pageSize").toString()));
+        List<CarActualCountCheckNum> rows = meterWorkCheckFirstActualMapper.carActualLikeByDesc(params);
+        PageList pageInfo = new PageList(rows);
+        return pageInfo;
+    }
 }

+ 1 - 0
src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.java

@@ -23,4 +23,5 @@ public interface MeterWorkMonitorMapper extends IBaseMapper<MeterWorkMonitor, St
     int UpdateUserNo(List<MeterWorkMonitor> list);
 
     List<MeterWorkMonitor> weightByCarNo(HashMap<String, Object> map);
+    List<MeterWorkMonitor> monitorLeftJoinUserSpotConfig(HashMap<String, Object> map);
 }

+ 11 - 0
src/main/java/com/steerinfo/meterwork/meterworkmonitor/mapper/MeterWorkMonitorMapper.xml

@@ -67,6 +67,8 @@
     <result column="IS_VALID_SCAN" jdbcType="VARCHAR" property="isValidScan" />
     <result column="IS_ENABLE_SOUND" jdbcType="VARCHAR" property="isEnableSound" />
     <result column="PHOTO_CAR2" jdbcType="VARCHAR" property="photoCar2" />
+    <result column="user_code" jdbcType="VARCHAR" property="userId" />
+    <result column="user_name" jdbcType="VARCHAR" property="userName" />
   </resultMap>
   <sql id="columns">
     POINT_NO, POINT_NAME, VALID_WGT, VALID_CARNO, VALID_TARE_TIME, VALID_TIME_INTERVAL,
@@ -2171,4 +2173,13 @@
       or EDIT_CAR = #{editCar}
     </if>
   </select>
+
+
+  <select id="monitorLeftJoinUserSpotConfig" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    select A.*, B.user_Code, B.user_name
+    from meter_work_monitor A
+        left join meter_base_user_spot_config B
+            on A.point_no = B.base_spot_no
+    <include refid="where" />
+  </select>
 </mapper>

+ 28 - 1
src/main/java/com/steerinfo/meterwork/meterworkmonitor/model/MeterWorkMonitor.java

@@ -398,6 +398,11 @@ public class MeterWorkMonitor implements IBasePO<String> {
     @ApiModelProperty(value="抓拍车号2",required=false)
     private String photoCar2;
 
+    @ApiModelProperty(value="监管人编号", required = false)
+    private String userId;
+    @ApiModelProperty(value="监管人", required = false)
+    private String userName;
+
     private static final long serialVersionUID = 1L;
 
     @Override
@@ -930,11 +935,27 @@ public class MeterWorkMonitor implements IBasePO<String> {
         this.photoCar2 = photoCar2 == null ? null : photoCar2.trim();
     }
 
+    public String getUserId() {
+        return userId;
+    }
+
+    public void setUserId(String userId) {
+        this.userId = userId;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
     public MeterWorkMonitor() {
 
     }
 
-    public MeterWorkMonitor(String pointNo, String pointName, String validWgt, String validCarno, String validTareTime, String validTimeInterval, String validParkStatus, String validExceedWgt, String validPredictionDiff, String validFlag, String validMatTime, String carMonitor, Short carMonitorLvl, String isHelp, String isTakeOver, String ledWriter, Short printNum, String collectionCode, String isOverWgt, String userNo, String monitorUserNo, String setCar, String ledKeep, String rfidCar, String photoCar, String scanCar, String editCar, String carErr, String wgtErr, Date lastTime, String stopOverTime, String msgInfo, Long wgt, String isRemote, String weighInstrumentModel, String weighInstrumentParam, String moxaIp, String moxaPort, String validLianda, String isOpenScanning, String validIsPre, String userIp, String powerState, String dvrState, String moxaState, String plcState, String leftInfraredRayState, String rightInfraredRayState, String amplifierState, String lampState, String spotTypeNo, String redGreenLightState, String frontInfraredRayState, String rearInfraredRayState, String rfidState, String validArea, String weightStatus, String ferroalloyConfirm, String ferroalloyResult, String zeroState, short zeroWeight, String isZeroState, String isEnableSound) {
+    public MeterWorkMonitor(String pointNo, String pointName, String validWgt, String validCarno, String validTareTime, String validTimeInterval, String validParkStatus, String validExceedWgt, String validPredictionDiff, String validFlag, String validMatTime, String carMonitor, Short carMonitorLvl, String isHelp, String isTakeOver, String ledWriter, Short printNum, String collectionCode, String isOverWgt, String userNo, String monitorUserNo, String setCar, String ledKeep, String rfidCar, String photoCar, String scanCar, String editCar, String carErr, String wgtErr, Date lastTime, String stopOverTime, String msgInfo, Long wgt, String isRemote, String weighInstrumentModel, String weighInstrumentParam, String moxaIp, String moxaPort, String validLianda, String isOpenScanning, String validIsPre, String userIp, String powerState, String dvrState, String moxaState, String plcState, String leftInfraredRayState, String rightInfraredRayState, String amplifierState, String lampState, String spotTypeNo, String redGreenLightState, String frontInfraredRayState, String rearInfraredRayState, String rfidState, String validArea, String weightStatus, String ferroalloyConfirm, String ferroalloyResult, String zeroState, short zeroWeight, String isZeroState, String isEnableSound, String userId, String userName) {
         this.pointNo = pointNo;
         this.pointName = pointName;
         this.validWgt = validWgt;
@@ -998,6 +1019,8 @@ public class MeterWorkMonitor implements IBasePO<String> {
         this.zeroWeight = zeroWeight;
         this.isZeroState = isZeroState;
         this.isEnableSound = isEnableSound;
+        this.userId = userId;
+        this.userName = userName;
     }
 
     public MeterWorkMonitor(MeterWorkMonitor meterWorkMonitor) {
@@ -1065,6 +1088,8 @@ public class MeterWorkMonitor implements IBasePO<String> {
         this.zeroWeight = meterWorkMonitor.zeroWeight;
         this.isZeroState = meterWorkMonitor.isZeroState;
         this.isEnableSound = meterWorkMonitor.isEnableSound;
+        this.userId = meterWorkMonitor.userId;
+        this.userName = meterWorkMonitor.userName;
     }
 
     @Override
@@ -1138,6 +1163,8 @@ public class MeterWorkMonitor implements IBasePO<String> {
         sb.append(", isValidScan=").append(isValidScan);
         sb.append(", isEnableSound=").append(isEnableSound);
         sb.append(", photoCar2=").append(photoCar2);
+        sb.append(", userId=").append(userId);
+        sb.append(", userName=").append(userName);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 1 - 1
src/main/java/com/steerinfo/meterwork/meterworkmonitor/service/impl/MeterWorkMonitorServiceImpl.java

@@ -164,7 +164,7 @@ public class MeterWorkMonitorServiceImpl extends BaseServiceImpl<MeterWorkMonito
     @Override
     public PageList<MeterWorkMonitorDto> queryForPage2(HashMap parmas, Integer pageNum, Integer pageSize) {
         PageHelper.startPage(pageNum, pageSize);
-        List<MeterWorkMonitor> rows = this.getMapper().selectByParameters(parmas);
+        List<MeterWorkMonitor> rows = meterWorkMonitorMapper.monitorLeftJoinUserSpotConfig(parmas);
 
         List<MeterWorkMonitorDto> list = new ArrayList<>();
         for (MeterWorkMonitor meterWorkMonitor : rows){

+ 29 - 1
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java

@@ -283,6 +283,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult updateList(List<MeterWorkRailwayActFirst> models) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -862,6 +863,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doAddNetHZHX(MeterWorkRailwayActFirst first02, MeterWorkRailwayActual carModel, MeterWorkRailwayActFirst first03, MeterMonitorNote note) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -1090,6 +1092,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doNetAddTwo(MeterWorkRailwayActFirst one, MeterWorkRailwayActual two, PreRailwayScale three, PreRailwayScale four) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -1329,6 +1332,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doNetAddTwo02(List<MeterWorkRailwayActFirst> selectedFirsts, List<MeterWorkRailwayActFirst> addFirsts, List<PreRailwayScale> scales, String note,Boolean needUpload){
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -1486,7 +1490,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
 //                    addFirsts.get(i).setActualFirstNo(actualFirstNo);
                         String actualFirstNo = PublicMethod.IdCreate(3);
                         addFirsts.get(i).setActualFirstNo(actualFirstNo);
-                        addFirsts.get(i).setValueFlag("2");
+                        addFirsts.get(i).setValueFlag("1");
                         addFirsts.get(i).setUpdateManNo("system");
                         addFirsts.get(i).setUpdateManName("双委托更新");
                         addFirsts.get(i).setUpdateTime(new Date());
@@ -1685,6 +1689,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doAddNetHZHXTwo(PreRailwayScale scale, MeterWorkRailwayActFirst
             first01, MeterWorkRailwayActFirst first02, MeterMonitorNote note, String flag) {
         RESTfulResult rm = new RESTfulResult();
@@ -2200,6 +2205,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doNetAddTwoDouble(PreRailwayScale scale01, PreRailwayScale
             scale02, MeterWorkRailwayActFirst first01, MeterWorkRailwayActFirst first02) {
         RESTfulResult rm = new RESTfulResult();
@@ -2472,6 +2478,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String doubleEntrustMatch(String actualNo1, String actualNo2, String predictionNo1, String predictionNo2) {
 
         try {
@@ -2706,6 +2713,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String mixedLoading(String actualNo1, String actualNo2, String actualNo3, String predictionNo1, String
             predictionNo2) {
         try {
@@ -2932,6 +2940,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String mixedDischarge(String actualNo1, String actualNo2, String actualNo3, String predictionNo1, String
             predictionNo2) {
         try {
@@ -3163,6 +3172,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public String fixedTare(String actualNo, String tareWeight, String predictionNo) {
 
         if (com.steerinfo.util.StringUtils.isEmpty(actualNo)) {
@@ -3297,6 +3307,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult HistoricalTare(String actualNo, String predictionNo) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -4572,6 +4583,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
 
     }
 
+    @Transactional(rollbackFor = Exception.class)
     public void doSaveTare(MeterWorkRailwayActFirst model) {
         //获取ID
         SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
@@ -5138,6 +5150,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     //覆盖期限皮重
+    @Transactional(rollbackFor = Exception.class)
     private void updateRailWeight(MeterWorkRailwayActFirst model) {
         try {
             SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -5200,6 +5213,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doAddRailWf(List<MeterWorkRailwayActFirst> models) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -5259,6 +5273,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doAddRailNetWf
             (List<MeterWorkRailwayMotorialReceived> grossModels, List<MeterWorkRailwayActFirst> tareModels) {
         RESTfulResult rm = new RESTfulResult();
@@ -5393,6 +5408,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doNetAddMotoriaRailway
             (MeterWorkRailwayMotorialReceived received, MeterWorkRailwayActFirst first, PreRailwayScale tempScale) {
         RESTfulResult rm = new RESTfulResult();
@@ -5605,6 +5621,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doAddRailAINetWf
             (List<MeterWorkRailwayMotorialReceived> grossModels, List<MeterBaseRailwayAiweight> tareModels) {
         RESTfulResult rm = new RESTfulResult();
@@ -5757,6 +5774,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
 
     ///动轨标识皮结净
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doAddNetInnerWf(MeterWorkRailwayMotorialReceived received, MeterBaseRailwayAiweight first, PreRailwayScale tempScale) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -5996,6 +6014,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
 
     ///动态衡标准皮结净
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doAddNetWeight(MeterWorkRailwayMotorialReceived received, MeterBaseRailwayCarriageWeight first01, PreRailwayScale tempScale) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -6220,6 +6239,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     //一次记录进行结净,根据scale进行有委托或者无委托结净
+    @Transactional(rollbackFor = Exception.class)
     public void doMatch(MeterWorkRailwayActFirst grossModel, MeterWorkRailwayActFirst tareModel, PreRailwayScale scale, MeterWorkRailwayActual actualRow) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
         if(scale != null) {
@@ -6358,6 +6378,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult selfServiceMeasurement(MeterWorkRailwayActFirst first) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -6502,6 +6523,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
 
+    @Transactional(rollbackFor = Exception.class)
     public String matchPreClean(MeterWorkRailwayActFirst grossModel, MeterWorkRailwayActFirst tareModel) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
         String sfl = sdf.format(new Date());
@@ -6710,6 +6732,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult batchUpdateLcNo(List<MeterWorkRailwayActFirst> models) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -6747,6 +6770,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
 
     //静轨标识皮结净
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doIdentifyWeight(MeterWorkRailwayActFirst model, boolean needUpload) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -6974,6 +6998,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult doStandardMatch(HashMap<String, Object> param) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -7451,6 +7476,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult DynamicBatchMatchCarriageWeight(List<MeterWorkRailwayReceived> receivedList) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -7708,6 +7734,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult DynamicBatchMatchFirstWeight(List<MeterWorkRailwayReceived> receivedList) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();
@@ -8002,6 +8029,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
     }
 
     @Override
+    @Transactional(rollbackFor = Exception.class)
     public RESTfulResult DynamicBatchMatchReceivedWeight(List<MeterWorkRailwayReceived> receivedList) {
         RESTfulResult rm = new RESTfulResult();
         rm.setFailed();

+ 34 - 34
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.xml

@@ -4492,42 +4492,42 @@
 
   <select id="batchMatchActualView" parameterType="java.util.HashMap" resultType="HashMap">
       select A.lc_no,
-      A.actual_no actual_no,
-      A.railway_no railway_no,
-      A.prediction_no prediction_no,
-      A.matter_name matter_name,
-      A.forwarding_unit_name forwarding_unit_name,
-      A.receiving_uint_name receiving_uint_name,
-      A.actual_first1_no grossNo,
-      to_char(round(A.gross_weight / 1000,3),'FM9999999999999999.000') grossWeight,
-      A.gross_time grossTime,
-      A.base_spot1_name grossSpot,
-      A.actual_first2_no tareNo,
-      to_char(round(A.tare_weight / 1000, 3),'FM9999999999999999.000') tareWeight,
-      A.tare_time tareTime,
-      A.base_spot2_name tareSpot,
-      to_char(round(A.net_weight / 1000, 3),'FM9999999999999999.000') netWeight,
-      A.net_time netTime,
-      A.net_spot3_name netSpot,
-      A.note note,
-      E.Lc_No tare_lc_no,
-      E.Actual_First_No tare_no,
-      E.create_time tare_time,
-      E.PREDICTION_NO tare_scale_no,
-      to_char(round(E.Meter_weight / 1000, 3),'FM9999999999999999.000') tare_weight,
-      E.Weight_Type tare_weight_type,
-      A.conveyance_type conveyance_type,
-      to_char(round(B.CARRIAGE_WEIGHT / 1000, 3) ,'FM9999999999999999.000') crriage_weight,
-      A.is_pre_sacale is_pre_sacale,
-      A.value_flag value_Flag
+            A.actual_no actual_no,
+            A.railway_no railway_no,
+            A.prediction_no prediction_no,
+            A.matter_name matter_name,
+            A.forwarding_unit_name forwarding_unit_name,
+            A.receiving_uint_name receiving_uint_name,
+            A.actual_first1_no grossNo,
+            to_char(round(A.gross_weight / 1000,3),'FM9999999999999999.000') grossWeight,
+            A.gross_time grossTime,
+            A.base_spot1_name grossSpot,
+            A.actual_first2_no tareNo,
+            to_char(round(A.tare_weight / 1000, 3),'FM9999999999999999.000') tareWeight,
+            A.tare_time tareTime,
+            A.base_spot2_name tareSpot,
+            to_char(round(A.net_weight / 1000, 3),'FM9999999999999999.000') netWeight,
+            A.net_time netTime,
+            A.net_spot3_name netSpot,
+            A.note note,
+            E.Lc_No tare_lc_no,
+            E.Actual_First_No tare_no,
+            E.create_time tare_time,
+            E.PREDICTION_NO tare_scale_no,
+            to_char(round(E.Meter_weight / 1000, 3),'FM9999999999999999.000') tare_weight,
+            E.Weight_Type tare_weight_type,
+            A.conveyance_type conveyance_type,
+            to_char(round(B.CARRIAGE_WEIGHT / 1000, 3) ,'FM9999999999999999.000') crriage_weight,
+            A.is_pre_sacale is_pre_sacale,
+            A.value_flag value_Flag
       from meter_work_railway_actual A
-      left join meter_base_railway_carriage_weight B
-      on A.conveyance_type = B.Carriage_Code
-      and B.value_flag = '1'
+        left join meter_base_railway_carriage_weight B
+            on A.conveyance_type = B.Carriage_Code
+                and B.value_flag = '1'
       left join meter_work_railway_act_first E
-      on A.railway_no = E.railway_no
-      and E.value_flag = '1'
-      and E.meter_weight &lt; 35000
+            on A.railway_no = E.railway_no
+            and E.value_flag = '1'
+            and E.meter_weight &lt; 35000
       where A.value_flag != '0'
       <!--        and ( A.lc_no in-->
       <!--        <foreach collection="lcNoStr" item="item" open="(" separator="," close=")">-->

+ 6 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

@@ -491,11 +491,17 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
             if (mwcaf1 == null) {
                 throw new MarkerMetException(500, "未查询到相应的毛重数据!!");
             }
+            if (mwcaf1.getValueFlag().equals("2")) {
+                throw new MarkerMetException(500, "毛重数据已结净,请重试!!");
+            }
 
             MeterWorkRailwayActFirst mwcaf2 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(dataNo);
             if (mwcaf2 == null) {
                 throw new MarkerMetException(500, "未查询到相应的皮重数据!!");
             }
+            if (mwcaf2.getValueFlag().equals("2")) {
+                throw new MarkerMetException(500, "皮重数据已结净,请重试!!");
+            }
             if (mwcaf2.getMeterWeight().compareTo(mwcaf1.getMeterWeight()) == 1) {
                 throw new MarkerMetException(500, "皮重重量大于毛重重量!!");
             }

+ 0 - 6
src/main/java/com/steerinfo/meterwork/meterworkscheduledhelp/mapper/MeterWorkScheduledHelpMapper.xml

@@ -525,12 +525,6 @@
       <if test="helpContent != null and helpContent != ''">
         and HELP_CONTENT LIKE '%${helpContent}%'
       </if>
-      <if test="createTime != null">
-        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
-      </if>
-      <if test="endTime != null">
-        and TO_CHAR(END_TIME,'yyyy-MM-dd') = #{endTime}
-      </if>
       <if test="createNo != null and createNo != ''">
         and CREATE_NO LIKE '%${createNo}%'
       </if>