dengyj %!s(int64=3) %!d(string=hai) anos
pai
achega
b6fd3dd8db

+ 2 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseoperationlog/mapper/MeterBaseOperationLogMapper.java

@@ -23,4 +23,6 @@ public interface MeterBaseOperationLogMapper extends IBaseMapper<MeterBaseOperat
     List<HashMap> countAllActualState(Map<String, Object> params);
     List<HashMap> allFirstStateView(Map<String, Object> params);
     List<HashMap> allActualStateView(Map<String, Object> params);
+    //车号分析Web端车号修改
+    List<HashMap> countWebResetCar(Map<String, Object> params);
 }

+ 12 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseoperationlog/mapper/MeterBaseOperationLogMapper.xml

@@ -850,4 +850,16 @@
     </if>
     order by create_time desc
   </select>
+
+  <select id="countWebResetCar" parameterType="java.util.HashMap" resultType="hashmap">
+    select B.base_spot_no baseSpotNo, B.base_spot_name baseSpotName
+      from meter_base_operation_log A
+      left join meter_work_car_actual_first B on A.operation_id = B.actual_first_no
+     where A.operation_page = 'web端-汽车衡一次数据维护'
+       and A.operation_function = '车号修改'
+    <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>
 </mapper>

+ 14 - 1
src/main/java/com/steerinfo/meterwork/meterworkcarnoidentify/service/impl/MeterWorkCarnoIdentifyServiceImpl.java

@@ -1,5 +1,7 @@
 package com.steerinfo.meterwork.meterworkcarnoidentify.service.impl;
 
+import com.steerinfo.baseinfo.meterbaseoperationlog.mapper.MeterBaseOperationLogMapper;
+import com.steerinfo.baseinfo.meterbaseoperationlog.model.MeterBaseOperationLog;
 import com.steerinfo.baseinfo.meterbasespotinfo.mapper.MeterBaseSpotInfoMapper;
 import com.steerinfo.baseinfo.meterbasespotinfo.model.MeterBaseSpotInfo;
 import com.steerinfo.framework.mapper.IBaseMapper;
@@ -47,6 +49,9 @@ public class MeterWorkCarnoIdentifyServiceImpl extends BaseServiceImpl<MeterWork
     @Resource
     private MeterBaseSpotInfoMapper meterBaseSpotInfoMapper;
 
+    @Resource
+    private MeterBaseOperationLogMapper meterBaseOperationLogMapper;
+
     @Override
     protected IBaseMapper<MeterWorkCarnoIdentify, String> getMapper() {
         return meterWorkCarnoIdentifyMapper;
@@ -65,6 +70,7 @@ public class MeterWorkCarnoIdentifyServiceImpl extends BaseServiceImpl<MeterWork
         params.put("spotTypeNo", "001002001");
         //车号根据实绩ID左连接一次数据表
         List<CarNoIndentifyAndCarFirst> models = meterWorkCarnoIdentifyMapper.selectGroupByCarNoNum(params);
+        List<HashMap> logModels = meterBaseOperationLogMapper.countWebResetCar(params);
 
         List<MeterBaseSpotInfo> spotModels = meterBaseSpotInfoMapper.spotInfoByList(params);
         if(spotModels.size() >= 1) {
@@ -91,8 +97,10 @@ public class MeterWorkCarnoIdentifyServiceImpl extends BaseServiceImpl<MeterWork
                 long countBallDifferGun = 0L;
                 //Rfid车号未识别数
                 long countRfidIdentify = 0L;
-                //修正车号数
+                //大厅修正车号数
                 long countResetCar = 0L;
+                //Web修正车号数
+                long countWebResetCar = 0L;
                 //枪机修改车号数
                 long countGunResetCar = 0L;
                 //球机修改车号数
@@ -174,6 +182,10 @@ public class MeterWorkCarnoIdentifyServiceImpl extends BaseServiceImpl<MeterWork
                     countResetCar = models.stream().filter(model -> model.getBaseSpotNo().equals(spot.getBaseSpotNo())
                             && model.getBaseSpotName().equals(spot.getBaseSpotName())
                             && model.getCarNoType().equals("4")).count();
+                    if(logModels.size() >= 1) {
+                        countWebResetCar = logModels.stream().filter(model -> spot.getBaseSpotNo().equals(model.get("BASESPOTNO"))
+                            && spot.getBaseSpotName().equals(model.get("BASESPOTNAME"))).count();
+                    }
                     //枪机修改车号数
                     countGunResetCar = models.stream().filter(model -> model.getBaseSpotNo().equals(spot.getBaseSpotNo())
                             && model.getBaseSpotName().equals(spot.getBaseSpotName())
@@ -218,6 +230,7 @@ public class MeterWorkCarnoIdentifyServiceImpl extends BaseServiceImpl<MeterWork
                     obj.put("countBallDifferGun", countBallDifferGun);
                     obj.put("countRfidIdentify", countRfidIdentify);
                     obj.put("countResetCar", countResetCar);
+                    obj.put("countWebResetCar", countWebResetCar);
                     obj.put("countGunResetCar", countGunResetCar);
                     obj.put("countBallResetCar", countBallResetCar);
                     obj.put("countGunIndentifyRate", countGunIndentifyRate);

+ 1 - 1
src/main/java/com/steerinfo/meterwork/meterworkdatacount/controller/MeterWorkDataCountController.java

@@ -341,7 +341,7 @@ public class MeterWorkDataCountController extends BaseRESTfulController {
         }
     }
 
-    @ApiOperation(value = "汽车衡同车号历史皮重比对核查", notes = "根据计量时间、车号查询")
+    @ApiOperation(value = "计量准确性分析", notes = "根据计量时间、车号查询")
     @PostMapping(value = "/measurementAccuracyAnalysis")
     public RESTfulResult measurementAccuracyAnalysis(@RequestBody(required = false) HashMap params) {
         try {

+ 170 - 26
src/main/java/com/steerinfo/meterwork/meterworkdatacount/mapper/MeterWorkDataCountMapper.xml

@@ -478,31 +478,175 @@
 
     <select id="measurementAccuracyAnalysis" parameterType="java.util.HashMap"
             resultType="com.steerinfo.meterwork.meterworkdatacount.model.MeasurementAccuracyAnalysis">
-    select A.operation_carn_no carNo,
-           A.operation_id actualFirstNo,
-           A.operation_prediction_no predictionNo,
-           A.operation_function operationFunction,
-           A.operation_page operationPage,
-           case when B.value_flag != '0' then '继续'
-                else '停止' end valueFlag,
-           A.Create_Man_No createManNo,
-           A.create_man_name createManName,
-           A.create_time createTime,
-           case when B.meter_mode = '1' then '远程计量'
-                when B.meter_mode = '2' then '智能计量'
-                when B.meter_mode = '3' then '手工计量'
-                else null end meterMode,
-           A.operation_before_fix beforeFix,
-           A.operation_after_fix afterFix,
-           B.note note
-      from meter_base_operation_log A
-      left join meter_work_car_actual_first B
-           on A.operation_id = B.actual_first_no
-      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>
-     order by A.create_time desc
+    select carNo,
+        actualFirstNo,
+        predictionNo,
+        operationFunction,
+        operationPage,
+        valueFlag,
+        createManNo,
+        createManName,
+        createTime,
+        meterMode,
+        beforeFix,
+        afterFix,
+        note
+    from (
+        (
+            select A.operation_carn_no carNo,
+            A.operation_id actualFirstNo,
+            A.operation_prediction_no predictionNo,
+            A.operation_function operationFunction,
+            A.operation_page operationPage,
+            case when B.value_flag != '0' then '继续'
+            else '停止' end valueFlag,
+            A.Create_Man_No createManNo,
+            A.create_man_name createManName,
+            A.create_time createTime,
+            case when B.meter_mode = '1' then '远程计量'
+            when B.meter_mode = '2' then '智能计量'
+            when B.meter_mode = '3' then '手工计量'
+            else null end meterMode,
+            A.operation_before_fix beforeFix,
+            A.operation_after_fix afterFix,
+            B.note note
+            from meter_base_operation_log A
+            left join meter_work_car_actual_first B
+            on A.operation_id = B.actual_first_no
+            where 1 = 1
+            and A.operation_page like '%汽车衡一次数据维护%'
+        )
+        union
+        (
+            select A.operation_carn_no carNo,
+            A.operation_id actualFirstNo,
+            A.operation_prediction_no predictionNo,
+            A.operation_function operationFunction,
+            A.operation_page operationPage,
+            case when B.value_flag != '0' then '继续'
+            else '取消' end valueFlag,
+            A.Create_Man_No createManNo,
+            A.create_man_name createManName,
+            A.create_time createTime,
+            case when B.net_mode = '1' then '远程计量'
+            when B.net_mode = '2' then '智能计量'
+            when B.net_mode = '3' then '手工计量'
+            else null end meterMode,
+            A.operation_before_fix beforeFix,
+            A.operation_after_fix afterFix,
+            B.note note
+            from meter_base_operation_log A
+            left join meter_work_car_actual B
+            on A.operation_id = B.actual_no
+            where A.operation_page like '%汽车衡净重数据维护%'
+        )
+        union
+        (
+        select A.operation_carn_no carNo,
+        A.operation_id actualFirstNo,
+        A.operation_prediction_no predictionNo,
+        A.operation_function operationFunction,
+        A.operation_page operationPage,
+        case when B.value_flag != '0' then '继续'
+        else '停止' end valueFlag,
+        A.Create_Man_No createManNo,
+        A.create_man_name createManName,
+        A.create_time createTime,
+        case when B.meter_mode = '1' then '远程计量'
+        when B.meter_mode = '2' then '智能计量'
+        when B.meter_mode = '3' then '手工计量'
+        else null end meterMode,
+        A.operation_before_fix beforeFix,
+        A.operation_after_fix afterFix,
+        B.note note
+        from meter_base_operation_log A
+        left join meter_work_railway_act_first B
+        on A.operation_id = B.actual_first_no
+        where 1 = 1
+        and A.operation_page like '%轨道衡一次数据维护%'
+        )
+        union
+        (
+        select A.operation_carn_no carNo,
+        A.operation_id actualFirstNo,
+        A.operation_prediction_no predictionNo,
+        A.operation_function operationFunction,
+        A.operation_page operationPage,
+        case when B.value_flag != '0' then '继续'
+        else '取消' end valueFlag,
+        A.Create_Man_No createManNo,
+        A.create_man_name createManName,
+        A.create_time createTime,
+        case when B.net_mode = '1' then '远程计量'
+        when B.net_mode = '2' then '智能计量'
+        when B.net_mode = '3' then '手工计量'
+        else null end meterMode,
+        A.operation_before_fix beforeFix,
+        A.operation_after_fix afterFix,
+        B.note note
+        from meter_base_operation_log A
+        left join meter_work_railway_actual B
+        on A.operation_id = B.actual_no
+        where A.operation_page like '%轨道衡净重数据维护%'
+        )
+        union
+        (
+            select A.operation_carn_no carNo,
+            A.operation_id actualFirstNo,
+            A.operation_prediction_no predictionNo,
+            A.operation_function operationFunction,
+            A.operation_page operationPage,
+            case when B.value_flag != '0' then '继续'
+            else '取消' end valueFlag,
+            A.Create_Man_No createManNo,
+            A.create_man_name createManName,
+            A.create_time createTime,
+            case when B.net_mode = '1' then '远程计量'
+            when B.net_mode = '2' then '智能计量'
+            when B.net_mode = '3' then '手工计量'
+            else null end meterMode,
+            A.operation_before_fix beforeFix,
+            A.operation_after_fix afterFix,
+            B.note note
+            from meter_base_operation_log A
+            left join meter_work_railway_actual B
+            on A.operation_id = B.actual_no
+            where A.operation_page like '%动轨净重数据维护%'
+        )
+        union
+        (
+            select A.operation_carn_no carNo,
+            A.operation_id actualFirstNo,
+            A.operation_prediction_no predictionNo,
+            A.operation_function operationFunction,
+            A.operation_page operationPage,
+            case when B.value_flag != '0' then '继续'
+            else '取消' end valueFlag,
+            A.Create_Man_No createManNo,
+            A.create_man_name createManName,
+            A.create_time createTime,
+            case when B.meter_mode = '1' then '远程计量'
+            when B.meter_mode = '2' then '智能计量'
+            when B.meter_mode = '3' then '手工计量'
+            else null end meterMode,
+            A.operation_before_fix beforeFix,
+            A.operation_after_fix afterFix,
+            B.memo note
+            from meter_base_operation_log A
+            left join Meter_Work_Railway_Received B
+            on A.operation_id = B.actual_first_no
+            where A.operation_page like '%轨道衡从表数据维护%'
+        )
+        )
+        where 1 = 1
+            <if test="startTime != null and endTime != null and startTime != '' and endTime != ''">
+                and  createTime  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss')
+                and createTime  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+            </if>
+            <if test="carNo != null and carNo != ''">
+                and carNo like '%${carNo}%'
+            </if>
+        order by createTime desc
     </select>
+
 </mapper>

+ 196 - 1
src/main/java/com/steerinfo/meterwork/meterworkdatacount/service/impl/MeterWorkDataCountServiceImpl.java

@@ -21,6 +21,7 @@ import com.steerinfo.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.math.BigDecimal;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
@@ -708,13 +709,207 @@ public class MeterWorkDataCountServiceImpl implements IMeterWorkDataCountService
             for (MeasurementAccuracyAnalysis model : models) {
                 if (StringUtils.isNotEmpty(model.getBeforeFix())) {
                     String str = model.getBeforeFix();
+                    if(str.indexOf("MeterWorkCarActualFirst") >= 0){
+                        model.setBeforeFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkCarActual") >= 0) {
+                        model.setBeforeFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkRailwayActFirst") >= 0) {
+                        model.setBeforeFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkRailwayActual") >= 0) {
+                        model.setBeforeFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkRailwayReceived") >= 0) {
+                        model.setBeforeFix(translationModel(str));
+                    }
                 }
                 if (StringUtils.isNotEmpty(model.getAfterFix())) {
-
+                    String str = model.getAfterFix();
+                    if(str.indexOf("MeterWorkCarActualFirst") >= 0){
+                        model.setAfterFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkCarActual") >= 0) {
+                        model.setAfterFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkRailwayActFirst") >= 0) {
+                        model.setAfterFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkRailwayActual") >= 0) {
+                        model.setAfterFix(translationModel(str));
+                    }else if(str.indexOf("MeterWorkRailwayReceived") >= 0) {
+                        model.setAfterFix(translationModel(str));
+                    }
                 }
             }
         }
         PageList<MeasurementAccuracyAnalysis> rows = new PageList<>(models);
         return rows;
     }
+
+    public String translationModel(String str) {
+        String strAll = "";
+        if(str.indexOf("MeterWorkCarActualFirst") >= 0){
+            if(str.indexOf("predictionNo=") >= 1) {
+                str = str.substring(str.indexOf("predictionNo="));
+                strAll += "委托号:" + str.substring("predictionNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("carNo=") >= 1) {
+                str = str.substring(str.indexOf("carNo="));
+                strAll += ", 车号:" + str.substring("carNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("meterWeight=") >= 1) {
+                str = str.substring(str.indexOf("meterWeight="));
+                String meterWeightStr = str.substring("meterWeight=".length(), str.indexOf(","));
+                String meterWeight = "0.00";
+                if(!meterWeightStr.equals("null")) {
+                    meterWeight = String.format("%.2f", Double.parseDouble(meterWeightStr)/1000);
+                }
+                strAll += ", 重量:" + meterWeight + "t";
+            }
+            if(str.indexOf("baseSpotName=") >= 1) {
+                str = str.substring(str.indexOf("baseSpotName="));
+                strAll += ", 计量点:" + str.substring("baseSpotName=".length(), str.indexOf(","));
+            }
+        }
+        if(str.indexOf("MeterWorkCarActual") >= 0){
+            if(str.indexOf("predictionNo=") >= 1) {
+                str = str.substring(str.indexOf("predictionNo="));
+                strAll += "委托号:" + str.substring("predictionNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("carNo=") >= 1) {
+                str = str.substring(str.indexOf("carNo="));
+                strAll += ", 车号:" + str.substring("carNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("grossWeight=") >= 1) {
+                str = str.substring(str.indexOf("grossWeight="));
+                String grossStr = str.substring("grossWeight=".length(), str.indexOf(","));
+                String grossWeight = "0.00";
+                if(!grossStr.equals("null")) {
+                    grossWeight = String.format("%.2f", Double.parseDouble(grossStr)/1000);
+                }
+                strAll += ", 毛重:" + grossWeight + "t";
+            }
+            if(str.indexOf("baseSpot1Name=") >= 1) {
+                str = str.substring(str.indexOf("baseSpot1Name="));
+                strAll += ", 毛重计量点:" + str.substring("baseSpot1Name=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("tareWeight=") >= 1) {
+                str = str.substring(str.indexOf("tareWeight="));
+                String tareStr = str.substring("tareWeight=".length(), str.indexOf(","));
+                String tareWeight = "0.00";
+                if(!tareStr.equals("null")) {
+                    tareWeight = String.format("%.2f", Double.parseDouble(tareStr)/1000);
+                }
+                strAll += ", 皮重:" + tareWeight + "t";
+            }
+            if(str.indexOf("baseSpot2Name=") >= 1) {
+                str = str.substring(str.indexOf("baseSpot2Name="));
+                strAll += ", 皮重计量点:" + str.substring("baseSpot2Name=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("netWeight=") >= 1) {
+                str = str.substring(str.indexOf("netWeight="));
+                String netStr = str.substring("netWeight=".length(), str.indexOf(","));
+                String netWeight = "0.00";
+                if(!netStr.equals("null")) {
+                    netWeight = String.format("%.2f", Double.parseDouble(netStr)/1000);
+                }
+                strAll += ", 净重:" + netWeight + "t";
+            }
+            if(str.indexOf("netSpot3Name=") >= 1) {
+                str = str.substring(str.indexOf("netSpot3Name="));
+                strAll += ", 净重计量点:" + str.substring("netSpot3Name=".length(), str.indexOf(","));
+            }
+        }
+        if(str.indexOf("MeterWorkRailwayActFirst") >= 0){
+            if(str.indexOf("predictionNo=") >= 1) {
+                str = str.substring(str.indexOf("predictionNo="));
+                strAll += "委托号:" + str.substring("predictionNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("railwayNo=") >= 1) {
+                str = str.substring(str.indexOf("railwayNo="));
+                strAll += ", 车号:" + str.substring("railwayNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("meterWeight=") >= 1) {
+                str = str.substring(str.indexOf("meterWeight="));
+                String meterWeightStr = str.substring("meterWeight=".length(), str.indexOf(","));
+                String meterWeight = "0.00";
+                if(!meterWeightStr.equals("null")) {
+                    meterWeight = String.format("%.2f", Double.parseDouble(meterWeightStr)/1000);
+                }
+                strAll += ", 重量:" + meterWeight + "t";
+            }
+            if(str.indexOf("baseSpotName=") >= 1) {
+                str = str.substring(str.indexOf("baseSpotName="));
+                strAll += ", 计量点:" + str.substring("baseSpotName=".length(), str.indexOf(","));
+            }
+        }
+        if(str.indexOf("MeterWorkRailwayActual") >= 0){
+            if(str.indexOf("predictionNo=") >= 1) {
+                str = str.substring(str.indexOf("predictionNo="));
+                strAll += "委托号:" + str.substring("predictionNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("railwayNo=") >= 1) {
+                str = str.substring(str.indexOf("railwayNo="));
+                strAll += ", 车号:" + str.substring("railwayNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("grossWeight=") >= 1) {
+                str = str.substring(str.indexOf("grossWeight="));
+                String grossStr = str.substring("grossWeight=".length(), str.indexOf(","));
+                String grossWeight = "0.00";
+                if(!grossStr.equals("null")) {
+                    grossWeight = String.format("%.2f", Double.parseDouble(grossStr)/1000);
+                }
+                strAll += ", 毛重:" + grossWeight + "t";
+            }
+            if(str.indexOf("baseSpot1Name=") >= 1) {
+                str = str.substring(str.indexOf("baseSpot1Name="));
+                strAll += ", 毛重计量点:" + str.substring("baseSpot1Name=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("tareWeight=") >= 1) {
+                str = str.substring(str.indexOf("tareWeight="));
+                String tareStr = str.substring("tareWeight=".length(), str.indexOf(","));
+                String tareWeight = "0.00";
+                if(!tareStr.equals("null")) {
+                    tareWeight = String.format("%.2f", Double.parseDouble(tareStr)/1000);
+                }
+                strAll += ", 皮重:" + tareWeight + "t";
+            }
+            if(str.indexOf("baseSpot2Name=") >= 1) {
+                str = str.substring(str.indexOf("baseSpot2Name="));
+                strAll += ", 皮重计量点:" + str.substring("baseSpot2Name=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("netWeight=") >= 1) {
+                str = str.substring(str.indexOf("netWeight="));
+                String netStr = str.substring("netWeight=".length(), str.indexOf(","));
+                String netWeight = "0.00";
+                if(!netStr.equals("null")) {
+                    netWeight = String.format("%.2f", Double.parseDouble(netStr)/1000);
+                }
+                strAll += ", 净重:" + netWeight + "t";
+            }
+            if(str.indexOf("netSpot3Name=") >= 1) {
+                str = str.substring(str.indexOf("netSpot3Name="));
+                strAll += ", 净重计量点:" + str.substring("netSpot3Name=".length(), str.indexOf(","));
+            }
+        }
+        if(str.indexOf("MeterWorkRailwayReceived") >= 0){
+            if(str.indexOf("predictionNo=") >= 1) {
+                str = str.substring(str.indexOf("predictionNo="));
+                strAll += "委托号:" + str.substring("predictionNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("railwayNo=") >= 1) {
+                str = str.substring(str.indexOf("railwayNo="));
+                strAll += ", 车号:" + str.substring("railwayNo=".length(), str.indexOf(","));
+            }
+            if(str.indexOf("meterWeight=") >= 1) {
+                str = str.substring(str.indexOf("meterWeight="));
+                String meterWeightStr = str.substring("meterWeight=".length(), str.indexOf(","));
+                String meterWeight = "0.00";
+                if(!meterWeightStr.equals("null")) {
+                    meterWeight = String.format("%.2f", Double.parseDouble(meterWeightStr)/1000);
+                }
+                strAll += ", 重量:" + meterWeight + "t";
+            }
+            if(str.indexOf("baseSpotName=") >= 1) {
+                str = str.substring(str.indexOf("baseSpotName="));
+                strAll += ", 计量点:" + str.substring("baseSpotName=".length(), str.indexOf(","));
+            }
+        }
+        return strAll;
+    }
 }

+ 4 - 2
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

@@ -370,7 +370,7 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
             throw new MarkerMetException(500, "只有已匹配委托且未发布的数据才能进行数据发布操作");
         }
 
-        UserPayload userPayload = new UserPayload();
+        UserPayload userPayload = UserPayload.getCurrUser();
         String userName = userPayload.getUserName();
         String userId = userPayload.getUserCode();
         model.setValueFlag("2");
@@ -410,7 +410,7 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                     throw new MarkerMetException(500, "只有已匹配委托且未发布的数据才能进行数据发布操作");
                 }
             }
-            UserPayload userPayload = new UserPayload();
+            UserPayload userPayload = UserPayload.getCurrUser();
             String userName = userPayload.getUserName();
             String userId = userPayload.getUserCode();
             int count = 0;
@@ -434,6 +434,8 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                 logModel.setOperationId(modelTemp.getActualNo());
                 logModel.setOperationPredictionNo(modelTemp.getPredictionNo());
                 logModel.setOperationCarnNo(modelTemp.getRailwayNo());
+                logModel.setOperationBeforeFix(model.toString());
+                logModel.setOperationAfterFix(modelTemp.toString());
                 meterBaseOperationLogMapper.insertSelective(logModel);
                 count ++;
             }