Jelajahi Sumber

修改了后端代码

duyong 4 tahun lalu
induk
melakukan
aab4cd32e9
16 mengubah file dengan 482 tambahan dan 196 penghapusan
  1. 44 28
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java
  2. 1 2
      src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/impl/MeterWorkHookActFirstServiceImpl.java
  3. 1 0
      src/main/java/com/steerinfo/meterwork/meterworkprewgttype/controller/MeterWorkPreWgttypeController.java
  4. 7 3
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java
  5. 34 2
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java
  6. 2 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.java
  7. 170 137
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.xml
  8. 7 7
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/model/MeterWorkRailwayActual.java
  9. 4 1
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java
  10. 33 3
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java
  11. 3 3
      src/main/java/com/steerinfo/pretrack/prehookscale/controller/PreHookScaleController.java
  12. 2 1
      src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.java
  13. 165 3
      src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.xml
  14. 1 1
      src/main/java/com/steerinfo/pretrack/prehookscale/service/IPreHookScaleService.java
  15. 5 5
      src/main/java/com/steerinfo/pretrack/prehookscale/service/impl/PreHookScaleServiceImpl.java
  16. 3 0
      src/main/java/com/steerinfo/pretrack/pretrackscale/mapper/PreTrackScaleMapper.xml

+ 44 - 28
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java

@@ -1035,7 +1035,6 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             RESTfulResult rm = new RESTfulResult();
             rm.setCode("200");
 
-
             //1、存储当前计量的数据
             SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
             String afl = formatter.format(new Date());
@@ -1068,22 +1067,27 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             if (StringUtils.isNotEmpty(netDb.getPredictionNo())) {
                 MeterWorkCarActualFirst meca1 = meterWorkCarActualFirstMapper.selectAndMatch(firstUpdate.getActualFirstNo(), netDb.getPredictionNo());
                 meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(meca1);
+                PreTrackScale preTrackScale = new PreTrackScale();
+                preTrackScale.setPredictionNo(netDb.getPredictionNo());
+                preTrackScale.setValueFlag("2");
+                preTrackScale.setUploadFlag("1");
+                preTrackScaleMapper.updateByPrimaryKeySelective(preTrackScale);
             }
 
             // 判断当前数据是否存在委托
-            if (netDb.getPredictionNo() != null && "".equals(netDb.getPredictionNo())) {
-                MeterWorkCarActualFirst gross = meterWorkCarActualFirstMapper.selectByPrimaryKey(netDb.getActualFirst1No());
-                if ((gross.getPredictionNo() == null || "".equals(gross.getPredictionNo()))) {
-                    // 如果毛重数据还未匹配委托,则匹配委托操作
-                    MeterWorkCarActualFirst meca1 = meterWorkCarActualFirstMapper.selectAndMatch(gross.getActualFirstNo(), netDb.getPredictionNo());
-                    meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(meca1);
-                    PreTrackScale preTrackScale = new PreTrackScale();
-                    preTrackScale.setPredictionNo(netDb.getPredictionNo());
-                    preTrackScale.setValueFlag("2");
-                    preTrackScale.setUploadFlag("1");
-                    preTrackScaleMapper.updateByPrimaryKeySelective(preTrackScale);
-                }
-            }
+//            if (netDb.getPredictionNo() != null && "".equals(netDb.getPredictionNo())) {
+//                MeterWorkCarActualFirst gross = meterWorkCarActualFirstMapper.selectByPrimaryKey(netDb.getActualFirst1No());
+//                if ((gross.getPredictionNo() == null || "".equals(gross.getPredictionNo()))) {
+//                    // 如果毛重数据还未匹配委托,则匹配委托操作
+//                    MeterWorkCarActualFirst meca1 = meterWorkCarActualFirstMapper.selectAndMatch(gross.getActualFirstNo(), netDb.getPredictionNo());
+//                    meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(meca1);
+//                    PreTrackScale preTrackScale = new PreTrackScale();
+//                    preTrackScale.setPredictionNo(netDb.getPredictionNo());
+//                    preTrackScale.setValueFlag("2");
+//                    preTrackScale.setUploadFlag("1");
+//                    preTrackScaleMapper.updateByPrimaryKeySelective(preTrackScale);
+//                }
+//            }
 
             String no1 = meterWorkCarActualMapper.getNewID(afl);
             netDb.setActualNo(afl + no1);
@@ -1175,7 +1179,7 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             }
 
 
-            rm.setData(secondDb.getActualFirstNo());
+            rm.setData(afl + no1);
             rm.setMessage(flag);
             return rm;
         }
@@ -2708,21 +2712,21 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             preTrackScaleMapper.updateByPrimaryKeySelective(scale1);
 
             //更新一次数据
-            //更新第一次皮重数据
+            //更新第一次皮重数据
             mwcaf1.setValueFlag(DbConstants.NET);
             mwcaf1.setUpdateManName("system");
             mwcaf1.setUpdateManName("二次计量洁净更新");
             mwcaf1.setUpdateTime(new Date());
             mwcaf1.setIsPreScale("1");
             meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf1);
-            //更新第一次毛重数据
+            //更新第一次毛重数据
             mwcaf2.setValueFlag(DbConstants.NET);
             mwcaf2.setUpdateManName("system");
             mwcaf2.setUpdateManName("二次计量洁净更新");
             mwcaf2.setUpdateTime(new Date());
             mwcaf2.setIsPreScale("1");
             meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf2);
-            //添加第一次皮重数据库
+            //添加第二次皮重数据
             SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
             String afl = sdf.format(new Date());
             String actualFirstNo = sdf.format(new Date()) + meterWorkCarActualFirstMapper.getNewID(afl);
@@ -2733,7 +2737,7 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             mwcaf3.setUpdateTime(new Date());
             mwcaf3.setIsPreScale("1");
             meterWorkCarActualFirstMapper.insertSelective(mwcaf3);
-            //更新第二次毛重数据
+            //更新第二次毛重数据
             mwcaf4.setValueFlag(DbConstants.NET);
             mwcaf4.setUpdateManName("system");
             mwcaf4.setUpdateManName("二次计量洁净更新");
@@ -2749,6 +2753,9 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             actualRow1.setNote("混装结净");
             actualRow1.setUploadFlag("1");
             actualRow1.setIsPreScale("1");
+            actualRow1.setValueFlag("2");
+            actualRow1.setCreateTime(new Date());
+            actualRow1.setCreateManName("洁净");
             actualRow1.setNetWeight(mwcaf2.getMeterWeight().subtract(mwcaf1.getMeterWeight()));
             meterWorkCarActualMapper.insertSelective(actualRow1);
 
@@ -2759,6 +2766,9 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             actualRow2.setNote("混装结净");
             actualRow2.setUploadFlag("1");
             actualRow2.setIsPreScale("1");
+            actualRow2.setValueFlag("2");
+            actualRow2.setCreateTime(new Date());
+            actualRow2.setCreateManName("洁净");
             actualRow2.setNetWeight(mwcaf4.getMeterWeight().subtract(mwcaf3.getMeterWeight()));
             meterWorkCarActualMapper.insertSelective(actualRow2);
         }
@@ -2847,34 +2857,34 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             preTrackScaleMapper.updateByPrimaryKeySelective(scale1);
 
             //更新一次数据
-            //更新第一次毛重数据
+            //更新第一次毛重数据
             mwcaf1.setValueFlag(DbConstants.NET);
-            mwcaf1.setUpdateManName("system");
+            mwcaf1.setUpdateManNo("system");
             mwcaf1.setUpdateManName("二次计量洁净更新");
             mwcaf1.setUpdateTime(new Date());
             mwcaf1.setIsPreScale("1");
             meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf1);
-            //更新第一次皮重数据
+            //更新第一次皮重数据
             mwcaf2.setValueFlag(DbConstants.NET);
-            mwcaf2.setUpdateManName("system");
+            mwcaf2.setUpdateManNo("system");
             mwcaf2.setUpdateManName("二次计量洁净更新");
             mwcaf2.setUpdateTime(new Date());
             mwcaf2.setIsPreScale("1");
             meterWorkCarActualFirstMapper.updateByPrimaryKey(mwcaf2);
-            //添加第一次毛重数据库
+            //添加第二次毛重数据
             SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
             String afl = sdf.format(new Date());
             String actualFirstNo = sdf.format(new Date()) + meterWorkCarActualFirstMapper.getNewID(afl);
             mwcaf3.setActualFirstNo(actualFirstNo);
             mwcaf3.setValueFlag(DbConstants.NET);
-            mwcaf3.setUpdateManName("system");
+            mwcaf3.setUpdateManNo("system");
             mwcaf3.setUpdateManName("二次计量洁净更新");
             mwcaf3.setUpdateTime(new Date());
             mwcaf3.setIsPreScale("1");
             meterWorkCarActualFirstMapper.insertSelective(mwcaf3);
-            //更新第二次皮重数据
+            //更新第二次皮重数据
             mwcaf4.setValueFlag(DbConstants.NET);
-            mwcaf4.setUpdateManName("system");
+            mwcaf4.setUpdateManNo("system");
             mwcaf4.setUpdateManName("二次计量洁净更新");
             mwcaf4.setUpdateTime(new Date());
             mwcaf4.setIsPreScale("1");
@@ -2888,6 +2898,9 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             actualRow1.setNote("混装结净");
             actualRow1.setUploadFlag("1");
             actualRow1.setIsPreScale("1");
+            actualRow1.setValueFlag("2");
+            actualRow1.setCreateManName("洁净");
+            actualRow1.setCreateTime(new Date());
             actualRow1.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
             meterWorkCarActualMapper.insertSelective(actualRow1);
 
@@ -2895,9 +2908,12 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             actualRow2.setActualNo(sdf.format(new Date()) + no1);
             actualRow2.setNetTime(new Date());
             actualRow2.setNetMode(DbConstants.TYPE);
-            actualRow2.setNote(" 结净");
+            actualRow2.setNote("混装结净");
             actualRow2.setUploadFlag("1");
             actualRow2.setIsPreScale("1");
+            actualRow2.setValueFlag("2");
+            actualRow2.setCreateManName("洁净");
+            actualRow2.setCreateTime(new Date());
             actualRow2.setNetWeight(mwcaf3.getMeterWeight().subtract(mwcaf4.getMeterWeight()));
             meterWorkCarActualMapper.insertSelective(actualRow2);
         }

+ 1 - 2
src/main/java/com/steerinfo/meterwork/meterworkhookactfirst/service/impl/MeterWorkHookActFirstServiceImpl.java

@@ -776,8 +776,7 @@ public class MeterWorkHookActFirstServiceImpl extends BaseServiceImpl<MeterWorkH
         }
         netHook.setNetWeight(one.getMeterBalanceWeight().subtract(two.getMeterBalanceWeight()));
         netHook.setNetMode("1");
-        netHook.setValueFlag("0");
-        netHook.setUploadFlag("0");
+        netHook.setValueFlag("1");
         netHook.setUploadFlag("1");
         if ("001019002".equals(one.getRailwayTypeNo())) {
             netHook.setNetTime(new Date()); //动轨的特殊处理

+ 1 - 0
src/main/java/com/steerinfo/meterwork/meterworkprewgttype/controller/MeterWorkPreWgttypeController.java

@@ -157,4 +157,5 @@ public class MeterWorkPreWgttypeController extends BaseRESTfulController {
     	}
       return success();
     }
+
 }

+ 7 - 3
src/main/java/com/steerinfo/meterwork/meterworkrailwayactfirst/service/impl/MeterWorkRailwayActFirstServiceImpl.java

@@ -1096,7 +1096,12 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
         }
         //===========二次计量处理结束==============
         //4、保存图片(一、二次计量共用)
-        SaveImg(meterWorkRailwayActFirstMapper.selectByPrimaryKey(id));
+        try{
+            SaveImg(meterWorkRailwayActFirstMapper.selectByPrimaryKey(id));
+        }catch(Exception e){
+            e.printStackTrace();
+            throw new MarkerMetException(500, "保存图片失败");
+        }
         return id;
     }
 
@@ -1275,8 +1280,7 @@ public class MeterWorkRailwayActFirstServiceImpl extends BaseServiceImpl<MeterWo
         }
         netRail.setNetWeight(one.getMeterBalanceWeight().subtract(two.getMeterBalanceWeight()));
         netRail.setNetMode("1");
-        netRail.setValueFlag("0");
-        netRail.setUploadFlag("0");
+        netRail.setValueFlag("1");
         netRail.setUploadFlag("1");
         if ("001019002".equals(one.getRailwayTypeNo())) {
             netRail.setNetTime(new Date()); //动轨的特殊处理

+ 34 - 2
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java

@@ -141,10 +141,17 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
 
     @ApiOperation(value = "火车号汇总统计汇总", notes = "根据传入时间和火车号,查询给定时间段去重车号")
     @GetMapping(value = "/distinctCarNo")
-    public RESTfulResult distinctCarNo(String carNo, String startTime, String endTime, String dataSource) {
+    public RESTfulResult distinctCarNo(@RequestParam HashMap param) {
         RESTfulResult rm = failed();
         try {
-            List<String> rows = meterWorkRailwayActualService.distinctCarNo(carNo, startTime, endTime, dataSource);
+            String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
+            String lcNo = param.get("lcNo") == null ? "" : param.get("lcNo").toString();
+            String railwayNo = param.get("railwayNo") == null ? "":param.get("railwayNo").toString();
+            String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
+            String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
+            String dataSource = param.get("dataSource") == null ? "":param.get("dataSource").toString();
+            String valueFlag = param.get("valueFlag") == null ? "":param.get("valueFlag").toString();
+            List<String> rows = meterWorkRailwayActualService.distinctCarNo(railwayTypeNo, lcNo, railwayNo, startTime, endTime, dataSource,valueFlag);
             return success(rows);
         } catch (MarkerMetException e) {
             e.printStackTrace();
@@ -158,6 +165,31 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
         return rm;
     }
 
+    @ApiOperation(value = "一次数据维护-网页", notes = "根据传入时间查询去重列次编号")
+    @PostMapping(value = "/distinctRailwayNo")
+    public RESTfulResult distinctRailwayNo(@RequestBody HashMap param) {
+        RESTfulResult rm = failed();
+        try {
+            String railwayTypeNo = param.get("railwayTypeNo") == null ? "":param.get("railwayTypeNo").toString();
+            String railwayNo = param.get("railwayNo") == null ? "": param.get("railwayNo").toString();
+            String startTime = param.get("startTime") == null ? "":param.get("startTime").toString();
+            String endTime = param.get("endTime") == null ? "":param.get("endTime").toString();
+            String dataSource = param.get("dataSource") == null ? "":param.get("dataSource").toString();
+            List<String> rows = meterWorkRailwayActualService.distinctRailwayNo(railwayTypeNo, railwayNo, startTime, endTime, dataSource);
+            return success(rows);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            //rm.setCode("200");
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
     @ApiOperation(value = "更新详细信息", notes = "根据url的id来指定更新对象,并根据传过来的meterWorkRailwayActual信息来更新详细信息")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),

+ 2 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/mapper/MeterWorkRailwayActualMapper.java

@@ -46,6 +46,8 @@ public interface MeterWorkRailwayActualMapper extends IBaseMapper<MeterWorkRailw
      */
     List<MeterWorkRailwayActual> distinctCarNo(HashMap<String, Object> obj);
 
+    List<MeterWorkRailwayActual> distinctRailwayNo(HashMap<String, Object> obj);
+
     double getGrossAvg(HashMap actual);
 
     MeterWorkRailwayActual selectActual(String actualFirstNo);

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

@@ -104,7 +104,7 @@
     <result column="DATA_SOURCE" jdbcType="VARCHAR" property="dataSource" />
     <result column="NOTE" jdbcType="VARCHAR" property="note" />
     <result column="IS_PRE_SACALE" jdbcType="VARCHAR" property="isPreSacale" />
-    <result column="IC_NO" jdbcType="VARCHAR" property="icNo" />
+    <result column="LC_NO" jdbcType="VARCHAR" property="lcNo" />
   </resultMap>
   <sql id="columns">
     ACTUAL_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, MATTER_NO, 
@@ -124,7 +124,7 @@
     GROUP_PACKAGE_AMOUNT, GROUP_PACKAGE_UNIT, PACKAGE_AMOUNT, PACKAGE_UNIT, THEORY_AMOUNT, 
     MEASURE_BATCH, MEASURE_BATCH_COUNT, SENDER_TYPE, SENDER_REMARK, RECEIVER_TYPE, RECEIVER_REMARK, 
     AMOUNT_UNIT, MEASURE_OBJECT_TYPE, MEASURE_TASK_NUM, BILL_TYPE, CREATE_MAN_NAME, CREATE_TIME, 
-    DATA_SOURCE, NOTE, IS_PRE_SACALE, IC_NO
+    DATA_SOURCE, NOTE, IS_PRE_SACALE, LC_NO
   </sql>
   <sql id="columns_alias">
     t.ACTUAL_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO, t.MATTER_NO, 
@@ -146,13 +146,13 @@
     t.PACKAGE_UNIT, t.THEORY_AMOUNT, t.MEASURE_BATCH, t.MEASURE_BATCH_COUNT, t.SENDER_TYPE, 
     t.SENDER_REMARK, t.RECEIVER_TYPE, t.RECEIVER_REMARK, t.AMOUNT_UNIT, t.MEASURE_OBJECT_TYPE, 
     t.MEASURE_TASK_NUM, t.BILL_TYPE, t.CREATE_MAN_NAME, t.CREATE_TIME, t.DATA_SOURCE, 
-    t.NOTE, t.IS_PRE_SACALE, t.IC_NO
+    t.NOTE, t.IS_PRE_SACALE, t.LC_NO
   </sql>
   <sql id="select">
-    SELECT <include refid="columns"/> FROM METER_WORK_RAILWAY_ACTUAL
+    SELECT <include refid="columns" /> FROM METER_WORK_RAILWAY_ACTUAL
   </sql>
   <sql id="select_alias">
-    SELECT <include refid="columns_alias"/> FROM METER_WORK_RAILWAY_ACTUAL t
+    SELECT <include refid="columns_alias" /> FROM METER_WORK_RAILWAY_ACTUAL t
   </sql>
   <sql id="where">
     <where> 
@@ -462,8 +462,8 @@
       <if test="isPreSacale != null and isPreSacale != ''">
         and IS_PRE_SACALE = #{isPreSacale}
       </if>
-      <if test="icNo != null and icNo != ''">
-        and IC_NO = #{icNo}
+      <if test="lcNo != null and lcNo != ''">
+        and LC_NO = #{lcNo}
       </if>
     </where>
   </sql>
@@ -775,8 +775,8 @@
       <if test="isPreSacale != null and isPreSacale != ''">
         and IS_PRE_SACALE LIKE '%${isPreSacale}%'
       </if>
-      <if test="icNo != null and icNo != ''">
-        and IC_NO LIKE '%${icNo}%'
+      <if test="lcNo != null and lcNo != ''">
+        and LC_NO LIKE '%${lcNo}%'
       </if>
     </where>
   </sql>
@@ -1090,8 +1090,8 @@
       <if test="isPreSacale != null and isPreSacale != ''">
         or IS_PRE_SACALE = #{isPreSacale}
       </if>
-      <if test="icNo != null and icNo != ''">
-        or IC_NO = #{icNo}
+      <if test="lcNo != null and lcNo != ''">
+        or LC_NO = #{lcNo}
       </if>
   </delete>
   <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
@@ -1129,7 +1129,7 @@
       RECEIVER_TYPE, RECEIVER_REMARK, AMOUNT_UNIT, 
       MEASURE_OBJECT_TYPE, MEASURE_TASK_NUM, BILL_TYPE, 
       CREATE_MAN_NAME, CREATE_TIME, DATA_SOURCE, 
-      NOTE, IS_PRE_SACALE, IC_NO
+      NOTE, IS_PRE_SACALE, LC_NO
       )
     values (#{actualNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, 
       #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR}, 
@@ -1165,7 +1165,7 @@
       #{receiverType,jdbcType=VARCHAR}, #{receiverRemark,jdbcType=VARCHAR}, #{amountUnit,jdbcType=VARCHAR}, 
       #{measureObjectType,jdbcType=VARCHAR}, #{measureTaskNum,jdbcType=VARCHAR}, #{billType,jdbcType=VARCHAR}, 
       #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{dataSource,jdbcType=VARCHAR}, 
-      #{note,jdbcType=VARCHAR}, #{isPreSacale,jdbcType=VARCHAR}, #{icNo,jdbcType=VARCHAR}
+      #{note,jdbcType=VARCHAR}, #{isPreSacale,jdbcType=VARCHAR}, #{lcNo,jdbcType=VARCHAR}
       )
   </insert>
   <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
@@ -1477,8 +1477,8 @@
       <if test="isPreSacale != null">
         IS_PRE_SACALE,
       </if>
-      <if test="icNo != null">
-        IC_NO,
+      <if test="lcNo != null">
+        LC_NO,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -1788,8 +1788,8 @@
       <if test="isPreSacale != null">
         #{isPreSacale,jdbcType=VARCHAR},
       </if>
-      <if test="icNo != null">
-        #{icNo,jdbcType=VARCHAR},
+      <if test="lcNo != null">
+        #{lcNo,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -1896,7 +1896,7 @@
       DATA_SOURCE = #{dataSource,jdbcType=VARCHAR},
       NOTE = #{note,jdbcType=VARCHAR},
       IS_PRE_SACALE = #{isPreSacale,jdbcType=VARCHAR},
-      IC_NO = #{icNo,jdbcType=VARCHAR}
+      LC_NO = #{lcNo,jdbcType=VARCHAR}
     where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
   </update>
   <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkrailwayactual.model.MeterWorkRailwayActual">
@@ -2205,23 +2205,23 @@
       <if test="isPreSacale != null">
         IS_PRE_SACALE = #{isPreSacale,jdbcType=VARCHAR},
       </if>
-      <if test="icNo != null">
-        IC_NO = #{icNo,jdbcType=VARCHAR},
+      <if test="lcNo != null">
+        LC_NO = #{lcNo,jdbcType=VARCHAR},
       </if>
     </set>
     where ACTUAL_NO = #{actualNo,jdbcType=VARCHAR}
   </update>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
-    <include refid="select"/>
+    <include refid="select" />
     where ACTUAL_NO = #{actualNo,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_RAILWAY_ACTUAL 
@@ -2263,7 +2263,7 @@
       RECEIVER_REMARK, AMOUNT_UNIT, MEASURE_OBJECT_TYPE, 
       MEASURE_TASK_NUM, BILL_TYPE, CREATE_MAN_NAME, 
       CREATE_TIME, DATA_SOURCE, NOTE, 
-      IS_PRE_SACALE, IC_NO)
+      IS_PRE_SACALE, LC_NO)
     ( <foreach collection="list" item="item" separator="union all"> 
    select  
       #{item.actualNo,jdbcType=VARCHAR}, 
@@ -2304,433 +2304,433 @@
       #{item.receiverRemark,jdbcType=VARCHAR}, #{item.amountUnit,jdbcType=VARCHAR}, #{item.measureObjectType,jdbcType=VARCHAR}, 
       #{item.measureTaskNum,jdbcType=VARCHAR}, #{item.billType,jdbcType=VARCHAR}, #{item.createManName,jdbcType=VARCHAR}, 
       #{item.createTime,jdbcType=TIMESTAMP}, #{item.dataSource,jdbcType=VARCHAR}, #{item.note,jdbcType=VARCHAR}, 
-      #{item.isPreSacale,jdbcType=VARCHAR}, #{item.icNo,jdbcType=VARCHAR} from dual  
+      #{item.isPreSacale,jdbcType=VARCHAR}, #{item.lcNo,jdbcType=VARCHAR} from dual  
    </foreach> )
   </insert>
   <update id="batchUpdate" parameterType="java.util.List">
      update METER_WORK_RAILWAY_ACTUAL
      set
        ACTUAL_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.actualNo,jdbcType=VARCHAR}
        </foreach>
        ,PREDICTION_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.predictionNo,jdbcType=VARCHAR}
        </foreach>
        ,NOTICE_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.noticeNo,jdbcType=VARCHAR}
        </foreach>
        ,RAILWAY_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
        </foreach>
        ,RAILWAY_CARRIAGE_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.railwayCarriageNo,jdbcType=VARCHAR}
        </foreach>
        ,MATTER_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
        </foreach>
        ,MATTER_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
        </foreach>
        ,CONTRACT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.contractNo,jdbcType=VARCHAR}
        </foreach>
        ,BATCH_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.batchNo,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
        </foreach>
        ,CUSTOMER_SUPPLIER_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
        </foreach>
        ,FORWARDING_UNIT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
        </foreach>
        ,FORWARDING_UNIT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVING_UINT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVING_UINT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.materialNo,jdbcType=VARCHAR}
        </foreach>
        ,MATERIAL_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
        </foreach>
        ,SPEC_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.specNo,jdbcType=VARCHAR}
        </foreach>
        ,SPEC_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.specName,jdbcType=VARCHAR}
        </foreach>
        ,LOAD_POINT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.loadPointNo,jdbcType=VARCHAR}
        </foreach>
        ,LOAD_POINT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.loadPointName,jdbcType=VARCHAR}
        </foreach>
        ,SAMPLE_VOUCHER=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.sampleVoucher,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_UNIT_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.carrierUnitNo,jdbcType=VARCHAR}
        </foreach>
        ,CARRIER_UNIT_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.carrierUnitName,jdbcType=VARCHAR}
        </foreach>
        ,METER_TYPE_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.meterTypeNo,jdbcType=VARCHAR}
        </foreach>
        ,METER_TYPE_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.meterTypeName,jdbcType=VARCHAR}
        </foreach>
        ,METER_PROCESS_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.meterProcessNo,jdbcType=VARCHAR}
        </foreach>
        ,METER_PROCESS_EDITION_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.meterProcessEditionNo,jdbcType=VARCHAR}
        </foreach>
        ,ACTUAL_FIRST1_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.actualFirst1No,jdbcType=VARCHAR}
        </foreach>
        ,GROSS_WEIGHT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.grossWeight,jdbcType=DECIMAL}
        </foreach>
        ,GROSS_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.grossManNo,jdbcType=VARCHAR}
        </foreach>
        ,GROSS_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.grossManName,jdbcType=VARCHAR}
        </foreach>
        ,GROSS_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.grossTime,jdbcType=TIMESTAMP}
        </foreach>
        ,BASE_SPOT1_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.baseSpot1No,jdbcType=VARCHAR}
        </foreach>
        ,BASE_SPOT1_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.baseSpot1Name,jdbcType=VARCHAR}
        </foreach>
        ,GROSS_CLASS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.grossClass,jdbcType=VARCHAR}
        </foreach>
        ,GROSS_GROUP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.grossGroup,jdbcType=VARCHAR}
        </foreach>
        ,GROSS_MODE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.grossMode,jdbcType=VARCHAR}
        </foreach>
        ,ACTUAL_FIRST2_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.actualFirst2No,jdbcType=VARCHAR}
        </foreach>
        ,TARE_WEIGHT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tareWeight,jdbcType=DECIMAL}
        </foreach>
        ,TARE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tareManNo,jdbcType=VARCHAR}
        </foreach>
        ,TARE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tareManName,jdbcType=VARCHAR}
        </foreach>
        ,TARE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tareTime,jdbcType=TIMESTAMP}
        </foreach>
        ,BASE_SPOT2_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.baseSpot2No,jdbcType=VARCHAR}
        </foreach>
        ,BASE_SPOT2_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.baseSpot2Name,jdbcType=VARCHAR}
        </foreach>
        ,TARE_CLASS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tareClass,jdbcType=VARCHAR}
        </foreach>
        ,TARE_GROUP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tareGroup,jdbcType=VARCHAR}
        </foreach>
        ,TARE_MODE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tareMode,jdbcType=VARCHAR}
        </foreach>
        ,NET_WEIGHT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netWeight,jdbcType=DECIMAL}
        </foreach>
        ,NET_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netManNo,jdbcType=VARCHAR}
        </foreach>
        ,NET_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netManName,jdbcType=VARCHAR}
        </foreach>
        ,NET_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netTime,jdbcType=TIMESTAMP}
        </foreach>
        ,NET_SPOT3_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netSpot3No,jdbcType=VARCHAR}
        </foreach>
        ,NET_SPOT3_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netSpot3Name,jdbcType=VARCHAR}
        </foreach>
        ,NET_CLASS=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netClass,jdbcType=VARCHAR}
        </foreach>
        ,NET_GROUP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netGroup,jdbcType=VARCHAR}
        </foreach>
        ,NET_MODE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.netMode,jdbcType=VARCHAR}
        </foreach>
        ,VALUE_FLAG=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
        </foreach>
        ,UPLOAD_FLAG=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.uploadFlag,jdbcType=VARCHAR}
        </foreach>
        ,CHECK_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.checkManNo,jdbcType=VARCHAR}
        </foreach>
        ,CHECK_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.checkManName,jdbcType=VARCHAR}
        </foreach>
        ,CHECK_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.checkTime,jdbcType=TIMESTAMP}
        </foreach>
        ,UPLOAD_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.uploadManNo,jdbcType=VARCHAR}
        </foreach>
        ,UPLOAD_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.uploadManName,jdbcType=VARCHAR}
        </foreach>
        ,UPLOAD_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.uploadTime,jdbcType=TIMESTAMP}
        </foreach>
        ,SAMPLE_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.sampleNo,jdbcType=VARCHAR}
        </foreach>
        ,RAILWAY_TYPE_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.railwayTypeNo,jdbcType=VARCHAR}
        </foreach>
        ,RAILWAY_TYPE_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.railwayTypeName,jdbcType=VARCHAR}
        </foreach>
        ,MEMO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
        </foreach>
        ,WATER_NUM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.waterNum,jdbcType=DECIMAL}
        </foreach>
        ,ARRIVAL=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.arrival,jdbcType=VARCHAR}
        </foreach>
        ,STATION=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.station,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_MAN_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
        </foreach>
        ,UPDATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
        </foreach>
        ,SOURCE_AREA=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.sourceArea,jdbcType=VARCHAR}
        </foreach>
        ,VOUCHER_IDENTITY=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.voucherIdentity,jdbcType=VARCHAR}
        </foreach>
        ,VOUCHER_ITEM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.voucherItem,jdbcType=VARCHAR}
        </foreach>
        ,BUSINESS_GROUP=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.businessGroup,jdbcType=VARCHAR}
        </foreach>
        ,TEMP_CONVEYANCE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.tempConveyance,jdbcType=VARCHAR}
        </foreach>
        ,CONVEYANCE_TYPE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.conveyanceType,jdbcType=VARCHAR}
        </foreach>
        ,RESOURCE_SYSTEM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.resourceSystem,jdbcType=VARCHAR}
        </foreach>
        ,GROUP_PACKAGE_AMOUNT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.groupPackageAmount,jdbcType=DECIMAL}
        </foreach>
        ,GROUP_PACKAGE_UNIT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.groupPackageUnit,jdbcType=VARCHAR}
        </foreach>
        ,PACKAGE_AMOUNT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.packageAmount,jdbcType=DECIMAL}
        </foreach>
        ,PACKAGE_UNIT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.packageUnit,jdbcType=VARCHAR}
        </foreach>
        ,THEORY_AMOUNT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.theoryAmount,jdbcType=DECIMAL}
        </foreach>
        ,MEASURE_BATCH=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.measureBatch,jdbcType=VARCHAR}
        </foreach>
        ,MEASURE_BATCH_COUNT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.measureBatchCount,jdbcType=DECIMAL}
        </foreach>
        ,SENDER_TYPE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.senderType,jdbcType=VARCHAR}
        </foreach>
        ,SENDER_REMARK=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.senderRemark,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVER_TYPE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.receiverType,jdbcType=VARCHAR}
        </foreach>
        ,RECEIVER_REMARK=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.receiverRemark,jdbcType=VARCHAR}
        </foreach>
        ,AMOUNT_UNIT=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.amountUnit,jdbcType=VARCHAR}
        </foreach>
        ,MEASURE_OBJECT_TYPE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.measureObjectType,jdbcType=VARCHAR}
        </foreach>
        ,MEASURE_TASK_NUM=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.measureTaskNum,jdbcType=VARCHAR}
        </foreach>
        ,BILL_TYPE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.billType,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_MAN_NAME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
        </foreach>
        ,CREATE_TIME=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
        </foreach>
        ,DATA_SOURCE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.dataSource,jdbcType=VARCHAR}
        </foreach>
        ,NOTE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.note,jdbcType=VARCHAR}
        </foreach>
        ,IS_PRE_SACALE=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
           when #{item.actualNo,jdbcType=VARCHAR} then #{item.isPreSacale,jdbcType=VARCHAR}
        </foreach>
-       ,IC_NO=
-       <foreach collection="list" item="item" index="index" separator=" " open="case ACTUAL_NO" close="end">
-          when #{item.actualNo,jdbcType=VARCHAR} then #{item.icNo,jdbcType=VARCHAR}
+       ,LC_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_NO" separator=" ">
+          when #{item.actualNo,jdbcType=VARCHAR} then #{item.lcNo,jdbcType=VARCHAR}
        </foreach>
      where ACTUAL_NO in 
-     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
     #{item.actualNo,jdbcType=VARCHAR}
      </foreach> 
   </update>
   <delete id="batchDelete" parameterType="java.util.List">
     delete from METER_WORK_RAILWAY_ACTUAL
     where ACTUAL_NO in 
-    <foreach collection="list" item="id" open="(" close=")" separator=",">
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
       #{id}
     </foreach>
   </delete>
@@ -3573,13 +3573,46 @@
   <select id="distinctCarNo" parameterType="java.lang.String" resultMap="BaseResultMap">
     SELECT distinct RAILWAY_NO
     from METER_WORK_RAILWAY_ACTUAL
-    where VALUE_FLAG != '0' and RAILWAY_NO like '%${railwayNo}%'
+    where 1=1
+    <if test="valueFlag != null and valueFlag != ''">
+      and  VALUE_FLAG = #{valueFlag}
+    </if>
+    <!--and RAILWAY_NO like '%${railwayNo}%'-->
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and  RAILWAY_TYPE_NO = #{railwayTypeNo}
+    </if>
+    <if test="lcNo != null and lcNo != ''">
+      and lc_No like '%${lcNo}%'
+    </if>
     <if test="startTime != null and startTime != '' and endTime != null 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')
+      and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
+    </if>
+    <if test="dataSource != null and dataSource != ''">
+      and  data_source = '${dataSource}'
+    </if>
+    <if test="railwayNo != null and railwayNo != ''">
+      and  RAILWAY_NO like '%${railwayNo}%'
+    </if>
+  </select>
+
+  <select id="distinctRailwayNo" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    SELECT distinct LC_NO
+    from METER_WORK_RAILWAY_ACTUAL
+    where 1=1
+    <!--and RAILWAY_NO like '%${railwayNo}%'-->
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and  RAILWAY_TYPE_NO = #{railwayTypeNo}
+    </if>
+    <if test="railwayNo != null and railwayNo != ''">
+      and  RAILWAY_NO like '%${railwayNo}%'
+    </if>
+    <if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
+      and  CREATE_TIME  >= TO_DATE(#{startTime}, 'yyyy-MM-dd HH24:mi:ss') and CREATE_TIME  &lt;=  TO_DATE(#{endTime}, 'yyyy-MM-dd HH24:mi:ss')
     </if>
-    <if test="dataSource != null and dataSource != null">
+    <if test="dataSource != null and dataSource != ''">
       and  data_source = '${dataSource}'
     </if>
+    and lc_no is not null
   </select>
 
   <select id="selectActual" parameterType="java.lang.String" resultMap="BaseResultMap">

+ 7 - 7
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/model/MeterWorkRailwayActual.java

@@ -621,10 +621,10 @@ public class MeterWorkRailwayActual implements IBasePO<String> {
     private String isPreSacale;
 
     /**
-     * 列次编号(IC_NO,VARCHAR,20)
+     * 列次编号(LC_NO,VARCHAR,20)
      */
     @ApiModelProperty(value="列次编号",required=false)
-    private String icNo;
+    private String lcNo;
 
     private static final long serialVersionUID = 1L;
 
@@ -1454,12 +1454,12 @@ public class MeterWorkRailwayActual implements IBasePO<String> {
         this.isPreSacale = isPreSacale == null ? null : isPreSacale.trim();
     }
 
-    public String getIcNo() {
-        return icNo;
+    public String getLcNo() {
+        return lcNo;
     }
 
-    public void setIcNo(String icNo) {
-        this.icNo = icNo == null ? null : icNo.trim();
+    public void setLcNo(String lcNo) {
+        this.lcNo = lcNo == null ? null : lcNo.trim();
     }
 
     @Override
@@ -1570,7 +1570,7 @@ public class MeterWorkRailwayActual implements IBasePO<String> {
         sb.append(", dataSource=").append(dataSource);
         sb.append(", note=").append(note);
         sb.append(", isPreSacale=").append(isPreSacale);
-        sb.append(", icNo=").append(icNo);
+        sb.append(", lcNo=").append(lcNo);
         sb.append(", serialVersionUID=").append(serialVersionUID);
         sb.append("]");
         return sb.toString();

+ 4 - 1
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java

@@ -47,7 +47,10 @@ public interface IMeterWorkRailwayActualService extends IBaseService<MeterWorkRa
 
     int addData(MeterWorkRailwayActual model);
 
-    List<String> distinctCarNo(String carNo, String startTime, String endTime, String dataSource);
+    List<String> distinctCarNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime, String dataSource, String valueFlag);
+
+    List<String> distinctRailwayNo(String railwayTypeNo, String railwayNo, String startTime, String endTime, String dataSource);
+
 
     PageList<MeterWorkRailwayActual> selectView(HashMap parmas, Integer pageNum, Integer pageSize);
 

+ 33 - 3
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java

@@ -286,6 +286,12 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
             actualRow.setActualNo(sdf.format(new Date()) + no);
             actualRow.setNetWeight(mwcaf1.getMeterWeight().subtract(mwcaf2.getMeterWeight()));
             actualRow.setUploadFlag("1");
+            if(mwcaf1.getLcNo().equals(mwcaf2.getLcNo())){
+                actualRow.setLcNo(mwcaf1.getLcNo());
+                actualRow.setCreateTime(new Date());
+            }else{
+                throw new MarkerMetException(500, "选中两条一次计量数据中列车车次不一致!!!");
+            }
             meterWorkRailwayActualMapper.insertSelective(actualRow);
 
             //预报的处理
@@ -520,6 +526,8 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                 grossrow.setUpdateManNo("system");
                 grossrow.setUpdateManName("静态衡解除操作");
                 grossrow.setUpdateTime(new Date());
+                grossrow.setLcNo(model.getLcNo());
+                grossrow.setValueFlag("1");
                 meterWorkRailwayActFirstMapper.updateByPrimaryKey(grossrow);
                 //皮重
                 MeterWorkRailwayActFirst mwcaf2 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(model.getActualFirst2No());
@@ -535,6 +543,8 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                     tarerow.setUpdateManNo("system");
                     tarerow.setUpdateManName("静态衡解除操作");
                     tarerow.setUpdateTime(new Date());
+                    tarerow.setLcNo(model.getLcNo());
+                    tarerow.setValueFlag("1");
                     meterWorkRailwayActFirstMapper.updateByPrimaryKey(tarerow);
                 }
                 if (StringUtils.isNotEmpty(model.getPredictionNo())) {
@@ -547,8 +557,8 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
                     scale.setUpdateTime(new Date());
                     preRailwayScaleMapper.updateByPrimaryKeySelective(scale);
                 }
-                //meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
-                meterWorkRailwayActualMapper.updateByPrimaryKeySelective(model);
+                meterWorkRailwayActualMapper.deleteByPrimaryKey(model.getActualNo());
+                //meterWorkRailwayActualMapper.updateByPrimaryKeySelective(model);
                 num++;
             }
 
@@ -560,16 +570,36 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public List<String> distinctCarNo(String railwayNo, String startTime, String endTime, String dataSource) {
+    public List<String> distinctCarNo(String railwayTypeNo, String lcNo, String railwayNo, String startTime, String endTime, String dataSource, String valueFlag) {
         HashMap<String, Object> obj = new HashMap<>();
+        obj.put("railwayTypeNo", railwayTypeNo);
         obj.put("railwayNo", railwayNo);
+        obj.put("lcNo", lcNo);
         obj.put("startTime", startTime);
         obj.put("endTime", endTime);
         obj.put("dataSource", dataSource);
+        obj.put("valueFlag", valueFlag);
         List<String> list = meterWorkRailwayActualMapper.distinctCarNo(obj).stream().map(MeterWorkRailwayActual::getRailwayNo).collect(Collectors.toList());
         return list;
     }
 
+    @Override
+    public List<String> distinctRailwayNo(String railwayTypeNo, String railwayNo, String startTime, String endTime, String dataSource) {
+        HashMap<String, Object> obj = new HashMap<>();
+        obj.put("railwayTypeNo", railwayTypeNo);
+        obj.put("railwayNo", railwayNo);
+        obj.put("startTime", startTime);
+        obj.put("endTime", endTime);
+        obj.put("dataSource", dataSource);
+        List<MeterWorkRailwayActual> templist = meterWorkRailwayActualMapper.distinctRailwayNo(obj);
+        List<String> list = null;
+        if(templist.size() != 0)
+        {
+            list = templist.stream().map(MeterWorkRailwayActual::getLcNo).collect(Collectors.toList());
+        }
+        return list;
+    }
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public int removeDt(List<MeterWorkRailwayActual> models) throws MarkerMetException {

+ 3 - 3
src/main/java/com/steerinfo/pretrack/prehookscale/controller/PreHookScaleController.java

@@ -148,11 +148,11 @@ public class PreHookScaleController extends BaseRESTfulController {
             @ApiImplicitParam(name = "pageNum", value = "查询页数", dataType = "Integer"),
             @ApiImplicitParam(name = "pageSize", value = "每页记录数", dataType = "Integer")
     })
-    @GetMapping(value = "/selectPre")
-    public RESTfulResult selectPre(@RequestParam String railwayNo, Integer pageNum, Integer pageSize) {
+    @PostMapping(value = "/selectPre")
+    public RESTfulResult selectPre(@RequestBody HashMap map) {
         RESTfulResult rm = failed();
         try {
-            PageList<PreHookScale> pageInfo = preHookScaleService.selectPre(railwayNo, pageNum, pageSize);
+            PageList<PreHookScale> pageInfo = preHookScaleService.selectPre(map);
             return success(pageInfo);
         } catch (MarkerMetException e) {
             e.printStackTrace();

+ 2 - 1
src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.java

@@ -3,6 +3,7 @@ package com.steerinfo.pretrack.prehookscale.mapper;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
 import java.math.*;
+import java.util.HashMap;
 import java.util.List;
 
 import org.apache.ibatis.annotations.Mapper;
@@ -17,5 +18,5 @@ public interface PreHookScaleMapper extends IBaseMapper<PreHookScale, String> {
 
     int batchUpdateByIdsForUsed(List<String> ids);
 
-    List<PreHookScale> selectPre(String railwayNo);
+    List<PreHookScale> selectPre(HashMap map);
 }

+ 165 - 3
src/main/java/com/steerinfo/pretrack/prehookscale/mapper/PreHookScaleMapper.xml

@@ -1545,11 +1545,173 @@
     order by CREATE_TIME desc
   </select>
 
-  <select id="selectPre" parameterType="java.lang.String" resultMap="BaseResultMap">
+  <select id="selectPre" parameterType="java.util.HashMap" resultMap="BaseResultMap">
     <include refid="select"/>
-    where VALUE_FLAG = '1' or VALUE_FLAG = '4'
+    where (VALUE_FLAG = '1' or VALUE_FLAG = '4')
+    <if test="predictionNo != null and predictionNo != ''">
+      and PREDICTION_NO = #{predictionNo}
+    </if>
+    <if test="noticeNo != null and noticeNo != ''">
+      and NOTICE_NO = #{noticeNo}
+    </if>
     <if test="railwayNo != null and railwayNo != ''">
-      and RAILWAY_NO LIKE '%${railwayNo}'
+      and RAILWAY_NO = #{railwayNo}
+    </if>
+    <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
+      and RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
+    </if>
+    <if test="matterNo != null and matterNo != ''">
+      and MATTER_NO = #{matterNo}
+    </if>
+    <if test="matterName != null and matterName != ''">
+      and MATTER_NAME = #{matterName}
+    </if>
+    <if test="contractNo != null and contractNo != ''">
+      and CONTRACT_NO = #{contractNo}
+    </if>
+    <if test="batchNo != null and batchNo != ''">
+      and BATCH_NO = #{batchNo}
+    </if>
+    <if test="customerSupplierNo != null and customerSupplierNo != ''">
+      and CUSTOMER_SUPPLIER_NO = #{customerSupplierNo}
+    </if>
+    <if test="customerSupplierName != null and customerSupplierName != ''">
+      and CUSTOMER_SUPPLIER_NAME = #{customerSupplierName}
+    </if>
+    <if test="sourceArea != null and sourceArea != ''">
+      and SOURCE_AREA = #{sourceArea}
+    </if>
+    <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+      and FORWARDING_UNIT_NO = #{forwardingUnitNo}
+    </if>
+    <if test="forwardingUnitName != null and forwardingUnitName != ''">
+      and FORWARDING_UNIT_NAME = #{forwardingUnitName}
+    </if>
+    <if test="receivingUintNo != null and receivingUintNo != ''">
+      and RECEIVING_UINT_NO = #{receivingUintNo}
+    </if>
+    <if test="receivingUintName != null and receivingUintName != ''">
+      and RECEIVING_UINT_NAME = #{receivingUintName}
+    </if>
+    <if test="materialNo != null and materialNo != ''">
+      and MATERIAL_NO = #{materialNo}
+    </if>
+    <if test="materialName != null and materialName != ''">
+      and MATERIAL_NAME = #{materialName}
+    </if>
+    <if test="specNo != null and specNo != ''">
+      and SPEC_NO = #{specNo}
+    </if>
+    <if test="specName != null and specName != ''">
+      and SPEC_NAME = #{specName}
+    </if>
+    <if test="shipmentGrossWeight != null">
+      and SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight}
+    </if>
+    <if test="shipmentNetWeight != null">
+      and SHIPMENT_NET_WEIGHT = #{shipmentNetWeight}
+    </if>
+    <if test="shipmentNum != null">
+      and SHIPMENT_NUM = #{shipmentNum}
+    </if>
+    <if test="loadPointNo != null and loadPointNo != ''">
+      and LOAD_POINT_NO = #{loadPointNo}
+    </if>
+    <if test="loadPointName != null and loadPointName != ''">
+      and LOAD_POINT_NAME = #{loadPointName}
+    </if>
+    <if test="sampleNo != null and sampleNo != ''">
+      and SAMPLE_NO = #{sampleNo}
+    </if>
+    <if test="sampleVoucher != null and sampleVoucher != ''">
+      and SAMPLE_VOUCHER = #{sampleVoucher}
+    </if>
+    <if test="carrierUnitNo != null and carrierUnitNo != ''">
+      and CARRIER_UNIT_NO = #{carrierUnitNo}
+    </if>
+    <if test="carrierUnitName != null and carrierUnitName != ''">
+      and CARRIER_UNIT_NAME = #{carrierUnitName}
+    </if>
+    <if test="predictionType != null and predictionType != ''">
+      and PREDICTION_TYPE = #{predictionType}
+    </if>
+    <if test="predictionCombination != null and predictionCombination != ''">
+      and PREDICTION_COMBINATION = #{predictionCombination}
+    </if>
+    <if test="meterTypeNo != null and meterTypeNo != ''">
+      and METER_TYPE_NO = #{meterTypeNo}
+    </if>
+    <if test="meterTypeName != null and meterTypeName != ''">
+      and METER_TYPE_NAME = #{meterTypeName}
+    </if>
+    <if test="effectiveStartTime != null">
+      and TO_CHAR(EFFECTIVE_START_TIME,'yyyy-MM-dd') = #{effectiveStartTime}
+    </if>
+    <if test="effectiveEndTime != null">
+      and TO_CHAR(EFFECTIVE_END_TIME,'yyyy-MM-dd') = #{effectiveEndTime}
+    </if>
+    <if test="railwayTypeNo != null and railwayTypeNo != ''">
+      and RAILWAY_TYPE_NO = #{railwayTypeNo}
+    </if>
+    <if test="railwayTypeName != null and railwayTypeName != ''">
+      and RAILWAY_TYPE_NAME = #{railwayTypeName}
+    </if>
+    <if test="memo != null and memo != ''">
+      and MEMO = #{memo}
+    </if>
+    <if test="valueFlag != null and valueFlag != ''">
+      and VALUE_FLAG = #{valueFlag}
+    </if>
+    <if test="usedTime != null">
+      and TO_CHAR(USED_TIME,'yyyy-MM-dd') = #{usedTime}
+    </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>
+    <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="deleteManNo != null and deleteManNo != ''">
+      and DELETE_MAN_NO = #{deleteManNo}
+    </if>
+    <if test="deleteManName != null and deleteManName != ''">
+      and DELETE_MAN_NAME = #{deleteManName}
+    </if>
+    <if test="deleteTime != null">
+      and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+    </if>
+    <if test="pValueFlag != null and pValueFlag != ''">
+      and P_VALUE_FLAG = #{pValueFlag}
+    </if>
+    <if test="isChemical != null and isChemical != ''">
+      and IS_CHEMICAL = #{isChemical}
+    </if>
+    <if test="limitWeight != null">
+      and LIMIT_WEIGHT = #{limitWeight}
+    </if>
+    <if test="railwayModelNo != null and railwayModelNo != ''">
+      and RAILWAY_MODEL_NO = #{railwayModelNo}
+    </if>
+    <if test="railwayModelName != null and railwayModelName != ''">
+      and RAILWAY_MODEL_NAME = #{railwayModelName}
+    </if>
+    <if test="arrival != null and arrival != ''">
+      and ARRIVAL = #{arrival}
+    </if>
+    <if test="station != null and station != ''">
+      and STATION = #{station}
     </if>
     order by CREATE_TIME desc
   </select>

+ 1 - 1
src/main/java/com/steerinfo/pretrack/prehookscale/service/IPreHookScaleService.java

@@ -28,7 +28,7 @@ public interface IPreHookScaleService extends IBaseService<PreHookScale, String>
 
     PageList<PreHookScale> selectlist(String railwayNo, Integer pageNum, Integer pageSize);
 
-    PageList<PreHookScale> selectPre(String railwayNo, Integer pageNum, Integer pageSize);
+    PageList<PreHookScale> selectPre(HashMap map);
 
     PageList<PreHookScale> queryLikeForRailwayNo(Map<String, Object> var1, Integer var2, Integer var3);
 }

+ 5 - 5
src/main/java/com/steerinfo/pretrack/prehookscale/service/impl/PreHookScaleServiceImpl.java

@@ -9,6 +9,7 @@ import com.steerinfo.pretrack.prehookscale.model.PreHookScale;
 import com.steerinfo.pretrack.prehookscale.mapper.PreHookScaleMapper;
 import com.steerinfo.pretrack.prehookscale.service.IPreHookScaleService;
 import com.steerinfo.pretrack.prerailwayscale.model.PreRailwayScale;
+import io.swagger.models.auth.In;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -57,12 +58,11 @@ public class PreHookScaleServiceImpl extends BaseServiceImpl<PreHookScale, Strin
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public PageList<PreHookScale> selectPre(String railwayNo, Integer pageNum, Integer pageSize) {
-        if (railwayNo == null && "".equals(railwayNo)) {
-            throw new MarkerMetException(500, "车号为空!!");
-        }
+    public PageList<PreHookScale> selectPre(HashMap map) {
+        int pageNum = map.get("pageNum") == null ? 1 : Integer.parseInt(map.get("pageNum").toString());
+        int pageSize = map.get("pageSize") == null ? 20 : Integer.parseInt(map.get("pageSize").toString());
         PageHelper.startPage(pageNum, pageSize);
-        List<PreHookScale> list = preHookScaleMapper.selectPre(railwayNo);
+        List<PreHookScale> list = preHookScaleMapper.selectPre(map);
         PageList pageInfo = new PageList(list);
         return pageInfo;
     }

+ 3 - 0
src/main/java/com/steerinfo/pretrack/pretrackscale/mapper/PreTrackScaleMapper.xml

@@ -3219,6 +3219,9 @@
             <if test="pValueFlag != null and pValueFlag != ''">
                 and P_VALUE_FLAG = #{pValueFlag}
             </if>
+            <if test="lineDesc != null and lineDesc != ''">
+              and LINE_DESC = #{lineDesc}
+            </if>
         </where>
         order by CREATE_TIME desc
     </select>