dengyj vor 4 Jahren
Ursprung
Commit
93b37f2d96
25 geänderte Dateien mit 3341 neuen und 30 gelöschten Zeilen
  1. 6 4
      src/main/java/com/steerinfo/baseinfo/appphonehelp/service/impl/AppPhoneHelpServiceImpl.java
  2. 15 4
      src/main/java/com/steerinfo/baseinfo/meterbasecar/controller/MeterBaseCarController.java
  3. 27 3
      src/main/java/com/steerinfo/baseinfo/meterbaseversions/controller/MeterBaseVersionsController.java
  4. 1 0
      src/main/java/com/steerinfo/baseinfo/meterbaseversions/mapper/MeterBaseVersionsMapper.java
  5. 6 0
      src/main/java/com/steerinfo/baseinfo/meterbaseversions/mapper/MeterBaseVersionsMapper.xml
  6. 4 1
      src/main/java/com/steerinfo/baseinfo/meterbaseversions/service/IMeterBaseVersionsService.java
  7. 48 9
      src/main/java/com/steerinfo/baseinfo/meterbaseversions/service/impl/MeterBaseVersionsServiceImpl.java
  8. 14 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/controller/MeterWorkCarActualFirstController.java
  9. 2 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/IMeterWorkCarActualFirstService.java
  10. 64 0
      src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/impl/MeterWorkCarActualFirstServiceImpl.java
  11. 28 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java
  12. 2 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java
  13. 67 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/impl/MeterWorkRailwayActualServiceImpl.java
  14. 4 4
      src/main/java/com/steerinfo/meterwork/meterworkrailwaymotorialreceived/controller/MeterWorkRailwayMotorialReceivedController.java
  15. 125 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/controller/MeterWorkRailwayReceivedController.java
  16. 16 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/mapper/MeterWorkRailwayReceivedMapper.java
  17. 1771 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/mapper/MeterWorkRailwayReceivedMapper.xml
  18. 1008 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/model/MeterWorkRailwayReceived.java
  19. 26 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/service/IMeterWorkRailwayReceivedService.java
  20. 58 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/service/impl/MeterWorkRailwayReceivedServiceImpl.java
  21. 17 3
      src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/controller/MeterWorkRailwayRecMainController.java
  22. 2 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/mapper/MeterWorkRailwayRecMainMapper.java
  23. 4 1
      src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/mapper/MeterWorkRailwayRecMainMapper.xml
  24. 3 1
      src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/service/IMeterWorkRailwayRecMainService.java
  25. 23 0
      src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/service/impl/MeterWorkRailwayRecMainServiceImpl.java

+ 6 - 4
src/main/java/com/steerinfo/baseinfo/appphonehelp/service/impl/AppPhoneHelpServiceImpl.java

@@ -60,9 +60,10 @@ public class AppPhoneHelpServiceImpl extends BaseServiceImpl<AppPhoneHelp, Strin
             helpModel.setHelpId(sdf.format(new Date()));
             int i = appPhoneHelpMapper.insertSelective(helpModel);
             if( i > 0){
-                rm.setMessage("操作成功");
-                rm.setCode("200");
                 rm.setSucceed();
+                rm.setMessage("数据正在处理,请等待!!");
+                rm.setCode("200");
+                rm.setData(helpModel);
             }else{
                 rm.setMessage("操作失败");
                 rm.setCode("500");
@@ -73,9 +74,10 @@ public class AppPhoneHelpServiceImpl extends BaseServiceImpl<AppPhoneHelp, Strin
             model.setValueFlag("0");
             int i = appPhoneHelpMapper.updateByPrimaryKeySelective(model);
             if( i > 0){
-                rm.setMessage("操作成功");
-                rm.setCode("200");
                 rm.setSucceed();
+                rm.setMessage("数据正在处理,请等待!!");
+                rm.setCode("200");
+                rm.setData(model);
             }else{
                 rm.setMessage("操作失败");
                 rm.setCode("500");

+ 15 - 4
src/main/java/com/steerinfo/baseinfo/meterbasecar/controller/MeterBaseCarController.java

@@ -311,14 +311,25 @@ public class MeterBaseCarController extends BaseRESTfulController {
                         List<MeterBaseCar> carInfo = meterBaseCarMapper.selectByParameters(carInfoMap);
                         if(carInfo.size() >= 1){
                             info.put("carInfo", carInfo);
-                            rm = success();
-                            rm.setData(info);
-                            rm.setMessage("操作成功");
-                            return rm;
+                            HashMap<String, Object> dirverInfoMap = new HashMap();
+                            dirverInfoMap.put("carId", params.get("carNo"));
+                            dirverInfoMap.put("telNum", params.get("telNum"));
+                            List<MeterBaseDriver> driverInfo = meterBaseDriverMapper.selectByParameters(dirverInfoMap);
+                            if(driverInfo.size() >= 1){
+                                info.put("driverInfo", driverInfo);
+                                rm = success();
+                                rm.setData(info);
+                                rm.setMessage("操作成功");
+                                return rm;
+                            }else{
+                                rm.setMessage("司机配置信息表没有此车号和电话号码");
+                                return rm;
+                            }
                         }else{
                             rm.setMessage("车辆配置信息表没有此车号");
                             return rm;
                         }
+
                     } else {
                         rm.setMessage(map.get("msg").toString());
                     }

+ 27 - 3
src/main/java/com/steerinfo/baseinfo/meterbaseversions/controller/MeterBaseVersionsController.java

@@ -70,9 +70,9 @@ public class MeterBaseVersionsController extends BaseRESTfulController {
     @PostMapping(value = "/")
     public RESTfulResult add(@RequestBody MeterBaseVersions model){
         try{
-            String msg = meterBaseVersionsService.checkandadd(model);
-            if (msg != "" && !msg.equals("")) {
-                return  failed(null,msg);
+            RESTfulResult rm = meterBaseVersionsService.checkAdd(model);
+            if (com.steerinfo.util.StringUtils.isEmpty(rm.getMessage())) {
+                return  failed(null,rm.getMessage());
             }
         }catch (Exception e){
             e.printStackTrace();
@@ -115,4 +115,28 @@ public class MeterBaseVersionsController extends BaseRESTfulController {
     	}
       return success();
     }
+
+    @ApiOperation(value="根据版本编号返回最新的APP版本对象", notes="根据url的id来指定删除对象")
+    @ApiImplicitParams({
+            @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "meterBaseVersions", value = "详细实体meterBaseVersions", required = true, dataType = "MeterBaseVersions")
+    })
+    @PostMapping(value = "checkAdd")//String
+    public RESTfulResult checkAdd(@RequestBody MeterBaseVersions model){
+        RESTfulResult rm = failed();
+        rm = meterBaseVersionsService.checkAdd(model);
+        return success();
+    }
+
+    @ApiOperation(value="根据版本编号返回最新的APP版本对象", notes="根据url的id来指定删除对象")
+    @PostMapping(value = "selectByVersionNo")//String
+    public RESTfulResult selectByVersionNo(@RequestParam String versionNo){
+        RESTfulResult rm = failed();
+        if(com.steerinfo.util.StringUtils.isEmpty(versionNo)){
+            rm.setMessage("版本编号不能为空!!");
+            return rm;
+        }
+        rm = meterBaseVersionsService.selectByVersionNo(versionNo);
+        return success();
+    }
 }

+ 1 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseversions/mapper/MeterBaseVersionsMapper.java

@@ -8,4 +8,5 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface MeterBaseVersionsMapper extends IBaseMapper<MeterBaseVersions, String> {
     String GetNewID();
+    MeterBaseVersions selectNewVersion();
 }

+ 6 - 0
src/main/java/com/steerinfo/baseinfo/meterbaseversions/mapper/MeterBaseVersionsMapper.xml

@@ -472,4 +472,10 @@
     SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(VERSIONS_NO, LENGTH(VERSIONS_NO) - 4))),0) + 1,5,'0') VERSIONS_NO
     FROM METER_BASE_VERSIONS
   </select>
+
+  <select id="selectNewVersion" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where validFlag = '1'
+    order by create_time DESC
+  </select>
 </mapper>

+ 4 - 1
src/main/java/com/steerinfo/baseinfo/meterbaseversions/service/IMeterBaseVersionsService.java

@@ -1,6 +1,7 @@
 package com.steerinfo.baseinfo.meterbaseversions.service;
 
 import com.steerinfo.baseinfo.meterbaseunitdirect.model.MeterBaseUnitDirect;
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
 import com.steerinfo.baseinfo.meterbaseversions.model.MeterBaseVersions;
 import java.util.Date;
@@ -20,5 +21,7 @@ import java.math.BigDecimal;
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
 public interface IMeterBaseVersionsService extends IBaseService<MeterBaseVersions, String>{
-    String checkandadd(MeterBaseVersions model);
+    RESTfulResult checkAdd(MeterBaseVersions model);
+
+    RESTfulResult selectByVersionNo(String versionNo);
 }

+ 48 - 9
src/main/java/com/steerinfo/baseinfo/meterbaseversions/service/impl/MeterBaseVersionsServiceImpl.java

@@ -1,10 +1,12 @@
 package com.steerinfo.baseinfo.meterbaseversions.service.impl;
 
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
 import com.steerinfo.baseinfo.meterbaseversions.model.MeterBaseVersions;
 import com.steerinfo.baseinfo.meterbaseversions.mapper.MeterBaseVersionsMapper;
 import com.steerinfo.baseinfo.meterbaseversions.service.IMeterBaseVersionsService;
+import com.steerinfo.framework.user.UserPayload;
 import com.steerinfo.util.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -12,6 +14,7 @@ import org.springframework.stereotype.Service;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.HashMap;
 
 /**
  * MeterBaseVersions服务实现:
@@ -38,21 +41,57 @@ public class MeterBaseVersionsServiceImpl extends BaseServiceImpl<MeterBaseVersi
     }
 
     @Override
-    public String checkandadd(MeterBaseVersions model) {
+    public RESTfulResult checkAdd(MeterBaseVersions model) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setFailed();
         if (StringUtils.isEmpty(model.getVersionsInfo())) {
-            return "版本信息不能为空";
+            rm.setMessage("版本信息不能为空");
         }
         if (StringUtils.isEmpty(model.getDownloadUrl())) {
-            return "下载地址不能为空";
-        }
-        if (StringUtils.isEmpty(model.getVersionsNumber())){
-            return "版本号不能为空";
+            rm.setMessage("下载地址不能为空");
         }
+        //获取最新的版本对象
+        MeterBaseVersions versionModel = meterBaseVersionsMapper.selectNewVersion();
         String no = meterBaseVersionsMapper.GetNewID();
         model.setVersionsNo(no);
+        //首次新增版本信息,版本号默认为1、后续新增版本信息,版本号加1
+        if(versionModel == null){
+            model.setVersionsNo("1");
+        }else{
+            Long num = Long.parseLong(versionModel.getVersionsNo()) + 1;
+            model.setVersionsNo(String.valueOf(num));
+        }
+        model.setValidFlag("1");
+        UserPayload payload = UserPayload.getCurrUser();
+        String userId = payload.getId();
+        String userName = payload.getUserName();
+        model.setCreateManNo(userId);
+        model.setCreateManName(userName);
         model.setCreateTime(new Date());
-        model.setValidFlag("1");//有效
-        meterBaseVersionsMapper.insert(model);
-        return "";
+        int i = meterBaseVersionsMapper.insert(model);
+        if( i >= 1){
+            rm.setSucceed();
+            rm.setData(model);
+            rm.setMessage("操作成功!!");
+        }else{
+            rm.setMessage("操作失败!!");
+        }
+        return rm;
+    }
+
+    @Override
+    public RESTfulResult selectByVersionNo(String versionNo) {
+        RESTfulResult rm = new RESTfulResult();
+        rm.setSucceed();
+
+        MeterBaseVersions versionModel = meterBaseVersionsMapper.selectNewVersion();
+        Long num = Long.parseLong(versionNo);
+        if(num >= Long.parseLong(versionModel.getVersionsNo())){
+            rm.setMessage("当前版本已是最新版本,无需更新!!");
+        }else{
+            rm.setMessage("当前版本不是最新版本,请更新!!");
+            rm.setData(versionModel);
+        }
+        return rm;
     }
 }

+ 14 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/controller/MeterWorkCarActualFirstController.java

@@ -971,4 +971,18 @@ public class MeterWorkCarActualFirstController extends BaseRESTfulController {
             return failed(null, "操作异常,请确认!");
         }
     }
+
+    @ApiOperation(value = "多毛一皮结净")
+    @Transactional
+    @PostMapping(value = "/doNetAddMuch", produces = "application/json;charset=UTF-8")
+    public RESTfulResult doNetAddMuch(@RequestBody CommonCombination<MeterWorkCarActualFirst, MeterWorkCarActual,MeterWorkPreLink, MeterMonitorNote> com) {
+        try {
+            RESTfulResult rm = meterWorkCarActualFirstService.doNetAddMuch(com.getOne());
+            return rm;
+        } catch (Exception e) {
+            e.printStackTrace();
+            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+            return failed(null, "操作异常,请确认!");
+        }
+    }
 }

+ 2 - 0
src/main/java/com/steerinfo/meterwork/meterworkcaractualfirst/service/IMeterWorkCarActualFirstService.java

@@ -79,6 +79,8 @@ public interface IMeterWorkCarActualFirstService extends IBaseService<MeterWorkC
 
     RESTfulResult doAddInnerWf(MeterWorkCarActualFirst oci, String saveTare, MeterMonitorNote note) throws Exception;
 
+    RESTfulResult doNetAddMuch(MeterWorkCarActualFirst actualFirst) throws Exception;
+
     RESTfulResult doAddNetInnerWf(MeterWorkCarActualFirst secondDb, MeterWorkCarActual netDb, String saveTare,MeterMonitorNote note) throws Exception;
 
     RESTfulResult doAddWf(MeterWorkCarActualFirst oci, MeterWorkPreLink link, String isLock, String saveTare, MeterMonitorNote note) throws Exception;

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

@@ -3369,5 +3369,69 @@ public class MeterWorkCarActualFirstServiceImpl extends BaseServiceImpl<MeterWor
             return rm;
         }
     }
+
+    @Override
+    public RESTfulResult doNetAddMuch(MeterWorkCarActualFirst actualFirst) throws Exception {
+        try {
+            RESTfulResult rm = new RESTfulResult();
+            rm.setCode("200");
+
+            HashMap map = new HashMap();
+            map.put("valueFlag","1");
+            map.put("carNo",actualFirst.getCarNo());
+            List<MeterWorkCarActualFirst> list = meterWorkCarActualFirstMapper.selectByParameters(map);
+            int num = 0;
+            for (MeterWorkCarActualFirst model:list){
+                //存储当前皮重的数据
+                SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
+                String afl = formatter.format(new Date());
+                String no = meterWorkCarActualFirstMapper.getNewID(afl);
+                actualFirst.setActualFirstNo(formatter.format(new Date()) + no);
+                actualFirst.setValueFlag("2");//洁净
+                meterWorkCarActualFirstMapper.insertSelective(actualFirst);
+
+                //修改毛重数据状态为结净
+                model.setValueFlag("2");
+                meterWorkCarActualFirstMapper.updateByPrimaryKeySelective(model);
+
+                MeterWorkCarActual meterWorkCarActual = new MeterWorkCarActual();
+
+                MeterWorkCarActual mwca1 = meterWorkCarActualMapper.manualAddPre(model.getActualFirstNo(), actualFirst.getActualFirstNo(), model.getPredictionNo());
+                BeanUtils.copyProperties(mwca1, meterWorkCarActual);
+
+                String noActual = meterWorkCarActualFirstMapper.getNewID(afl);
+                meterWorkCarActual.setActualNo(formatter.format(new Date()) + noActual);
+                meterWorkCarActual.setNetTime(new Date());
+                meterWorkCarActual.setNetMode(DbConstants.TYPE);
+                meterWorkCarActual.setNote("计量数据结净");
+                meterWorkCarActual.setUploadFlag("1");
+                meterWorkCarActual.setIsPreScale("1");
+                meterWorkCarActual.setNetWeight(model.getMeterWeight().subtract(actualFirst.getMeterWeight()));
+                meterWorkCarActualMapper.insertSelective(meterWorkCarActual);
+
+                PreTrackScale preTrackScale = new PreTrackScale();
+                preTrackScale.setPredictionNo(meterWorkCarActual.getPredictionNo());
+                preTrackScale.setValueFlag("2");
+                preTrackScale.setUploadFlag("1");
+                preTrackScaleMapper.updateByPrimaryKeySelective(preTrackScale);
+                num++;
+            }
+
+            //当存储一次数据或者结净时,将本车辆的预处理重量改为已使用
+            updatePreWeight(actualFirst.getCarNo());
+
+            rm.setData(num);
+            rm.setMessage("成功");
+            return rm;
+        }
+        catch (Exception e){
+            RESTfulResult rm = new RESTfulResult();
+            rm.setCode("500");
+            rm.setData(null);
+            rm.setMessage(e.getMessage());
+            e.printStackTrace();
+            return rm;
+        }
+    }
 }
 

+ 28 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/controller/MeterWorkRailwayActualController.java

@@ -402,6 +402,34 @@ public class MeterWorkRailwayActualController extends BaseRESTfulController {
         return rm;
     }
 
+    @ApiOperation(value = "根据两个一次计量编号和原因文本进行手动匹配洁净", notes = "根据传入参数进行洁净")
+    @PostMapping(value = "/cleanByfirstNoAndNotes")
+    public RESTfulResult cleanByfirstNoAndNotes(@RequestParam String actFirstNo01, String actFirstNo02, String predictionNo, String Notes) {
+        RESTfulResult rm = failed();
+        try {
+            if(com.steerinfo.util.StringUtils.isEmpty(actFirstNo01) ||
+                    com.steerinfo.util.StringUtils.isEmpty(actFirstNo02)){
+                rm.setMessage("一次数据编号不能为空!!");
+                return rm;
+            }
+            if(com.steerinfo.util.StringUtils.isEmpty(Notes)){
+                rm.setMessage("异地计量原因不能为空!!");
+                return rm;
+            }
+            rm = meterWorkRailwayActualService.cleanByfirstNoAndNotes(actFirstNo01, actFirstNo02, predictionNo, Notes);
+            return success(rm);
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
     @ApiOperation(value = "解除", notes = "将洁净后的数据进行还原")
     @PostMapping(value = "/remove")
     public RESTfulResult remove(@RequestBody List<MeterWorkRailwayActual> models) {

+ 2 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayactual/service/IMeterWorkRailwayActualService.java

@@ -37,6 +37,8 @@ public interface IMeterWorkRailwayActualService extends IBaseService<MeterWorkRa
 
     MeterWorkRailwayActual clean(String actualFirstNo, String dataNo, String predictionNo);
 
+    RESTfulResult cleanByfirstNoAndNotes(String actFirstNo01, String actFirstNo02, String PredictionNo, String Notes);
+
     MeterWorkRailwayActual matchPrediction(String actualNo, String predictionNo, String note);
 
     MeterWorkRailwayActual cleanPrediction(MeterWorkRailwayActual model);

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

@@ -311,6 +311,72 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
         }
     }
 
+    @Override
+    public RESTfulResult cleanByfirstNoAndNotes(String actFirstNo01, String actFirstNo02, String predictionNo, String Notes) {
+        RESTfulResult rm = new RESTfulResult();
+
+        MeterWorkRailwayActFirst actFirst01 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(actFirstNo01);
+        MeterWorkRailwayActFirst actFirst02 = meterWorkRailwayActFirstMapper.selectByPrimaryKey(actFirstNo02);
+
+        if(actFirst01 == null || actFirst02 == null){
+            rm.setFailed();
+            rm.setMessage("一次计量数据编号不存在于轨道衡一次计量表");
+            return rm;
+        }else{
+            if(!actFirst01.getRailwayNo().equals(actFirst02.getRailwayNo())){
+                rm.setFailed();
+                rm.setMessage("请选择同一车号的一次计量数据进行结净");
+                return rm;
+            }else if(!actFirst01.getValueFlag().equals("1") || !actFirst02.getValueFlag().equals("1")){
+                rm.setFailed();
+                rm.setMessage("请选择有效的一次计量数据进行结净");
+                return rm;
+            }else{
+
+                if(actFirst01.getMeterWeight().compareTo(actFirst02.getMeterWeight()) == -1){    //A小于B, 置换,始终保证A>B
+                    MeterWorkRailwayActFirst tempModel = new MeterWorkRailwayActFirst();
+                    BeanUtils.copyProperties(actFirst01, tempModel);
+                    BeanUtils.copyProperties(actFirst02, actFirst01);
+                    BeanUtils.copyProperties(tempModel, actFirst02);
+                }
+                //洁净操作
+                MeterWorkRailwayActual actualRow = new MeterWorkRailwayActual();
+                MeterWorkRailwayActual mwca2 = meterWorkRailwayActualMapper.manualAdd(actFirstNo01, actFirstNo02);
+                BeanUtils.copyProperties(mwca2, actualRow);
+                //标志位为洁净
+                actFirst01.setValueFlag(DbConstants.NET);
+                actFirst01.setNote(Notes);
+                meterWorkRailwayActFirstMapper.updateByPrimaryKey(actFirst01);
+                actFirst02.setNote(Notes);
+                actFirst02.setValueFlag(DbConstants.NET);
+                meterWorkRailwayActFirstMapper.updateByPrimaryKey(actFirst02);
+
+                cleanCheck(actualRow);
+
+                if (actualRow.getGrossTime().compareTo(actualRow.getTareTime()) == 1) {
+                    actualRow.setNetSpot3No(actualRow.getBaseSpot1No());
+                    actualRow.setNetSpot3Name(actualRow.getBaseSpot1Name());
+                } else {
+                    actualRow.setNetSpot3No(actualRow.getBaseSpot2No());
+                    actualRow.setNetSpot3Name(actualRow.getBaseSpot2Name());
+                }
+                actualRow.setNetMode(DbConstants.TYPE);
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+                String no = meterWorkRailwayActualMapper.getNewID(sdf.format(new Date()));
+                actualRow.setActualNo(sdf.format(new Date()) + no);
+                actualRow.setNetWeight(actFirst01.getMeterWeight().subtract(actFirst02.getMeterWeight()));
+                actualRow.setUploadFlag("1");
+                actualRow.setNote(Notes);
+
+                meterWorkRailwayActualMapper.insertSelective(actualRow);
+                rm.setSucceed();
+                rm.setData(actualRow);
+                return rm;
+            }
+        }
+    }
+
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public MeterWorkRailwayActual matchPrediction (String actualNo, String predictionNo, String note) throws MarkerMetException {
@@ -873,6 +939,7 @@ public class MeterWorkRailwayActualServiceImpl extends BaseServiceImpl<MeterWork
         String userName = payload.getUserName();
         if (model.getActualNo() == null) {
             model.setNetTime(new Date());
+            model.setCreateTime(new Date());
             model.setNetManNo(userId);
             model.setNetManName(userName);
 //            model.setNote();

+ 4 - 4
src/main/java/com/steerinfo/meterwork/meterworkrailwaymotorialreceived/controller/MeterWorkRailwayMotorialReceivedController.java

@@ -32,7 +32,7 @@ import java.util.List;
  * @see null
  */
 @RestController
-@RequestMapping("/${api.version}/meterworkrailwayreceiveds")
+@RequestMapping("/${api.version}/meterworkrailwayMotorialreceiveds")
 public class MeterWorkRailwayMotorialReceivedController extends BaseRESTfulController {
 
     @Autowired
@@ -73,10 +73,10 @@ throw new MarkerMetException(500, "操作异常!!");
     }
 
     @ApiOperation(value = "创建", notes = "根据MeterWorkRailwayMotorialReceived对象创建")
-    @ApiImplicitParam(name = "meterWorkRailwayMotorialReceived", value = "详细实体meterWorkRailwayMotorialReceived", required = true, dataType = "MeterWorkRailwayMotorialReceived")
+    @ApiImplicitParam(name = "meterworkrailwayreceiveds", value = "详细实体meterWorkRailwayMotorialReceived", required = true, dataType = "MeterWorkRailwayMotorialReceived")
     //@RequiresPermissions("meterworkrailwaymotorialreceived:create")
     @PostMapping(value = "/")
-    public RESTfulResult add(@ModelAttribute MeterWorkRailwayMotorialReceived model) {
+    public RESTfulResult add(@RequestBody MeterWorkRailwayMotorialReceived model) {
         try {
             MeterWorkRailwayMotorialReceived meterWorkRailwayMotorialReceived = meterWorkRailwayMotorialReceivedService.add(model);
             return success(meterWorkRailwayMotorialReceived);
@@ -103,7 +103,7 @@ throw new MarkerMetException(500, "操作异常!!");
     @ApiOperation(value = "更新详细信息", notes = "根据url的id来指定更新对象,并根据传过来的meterWorkRailwayMotorialReceived信息来更新详细信息")
     @ApiImplicitParams({
             @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
-            @ApiImplicitParam(name = "meterWorkRailwayMotorialReceived", value = "详细实体meterWorkRailwayMotorialReceived", required = true, dataType = "MeterWorkRailwayMotorialReceived")
+            @ApiImplicitParam(name = "meterworkrailwayreceiveds", value = "详细实体meterWorkRailwayMotorialReceived", required = true, dataType = "MeterWorkRailwayMotorialReceived")
     })
     //@RequiresPermissions("meterworkrailwaymotorialreceived:update")
     @PutMapping(value = "/{id}", produces = "application/json;charset=UTF-8")

+ 125 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/controller/MeterWorkRailwayReceivedController.java

@@ -0,0 +1,125 @@
+package com.steerinfo.meterwork.meterworkrailwayreceived.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.metermonitor.metermonitornote.model.MeterMonitorNote;
+import com.steerinfo.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
+import com.steerinfo.meterwork.meterworkrailwayreceived.service.IMeterWorkRailwayReceivedService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * MeterWorkRailwayReceived RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-22 09:00
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-22
+ * 作者:generator
+ * 参考:
+ * 描述:MeterWorkRailwayReceived RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/meterworkrailwayreceiveds")
+public class MeterWorkRailwayReceivedController extends BaseRESTfulController {
+
+    @Autowired
+    IMeterWorkRailwayReceivedService meterWorkRailwayReceivedService;
+
+    @ApiOperation(value="获取列表", notes="分页查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkrailwayreceived:view")
+    @GetMapping(value = "/")
+    public RESTfulResult list(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterWorkRailwayReceived> list = meterWorkRailwayReceivedService.queryForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+
+    @ApiOperation(value="获取列表", notes="分页模糊查询")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "pageNum", value = "查询页数", required = false, dataType = "Integer"),
+        @ApiImplicitParam(name = "pageSize", value = "每页记录数", required = false, dataType = "Integer")
+    })
+    //@RequiresPermissions("meterworkrailwayreceived:view")
+    @GetMapping(value = "/like/")
+    public RESTfulResult listLike(@RequestParam HashMap parmas,Integer pageNum, Integer pageSize){
+        PageList<MeterWorkRailwayReceived> list = meterWorkRailwayReceivedService.queryLikeForPage(parmas, pageNum, pageSize);
+        return success(list);
+    }
+    
+    @ApiOperation(value="创建", notes="根据MeterWorkRailwayReceived对象创建")
+    @ApiImplicitParam(name = "meterWorkRailwayReceived", value = "详细实体meterWorkRailwayReceived", required = true, dataType = "MeterWorkRailwayReceived")
+    //@RequiresPermissions("meterworkrailwayreceived:create")
+    @PostMapping(value = "/")
+    public RESTfulResult add(@RequestBody MeterWorkRailwayReceived model){
+        RESTfulResult rm = failed();
+        try {
+            RESTfulResult res = meterWorkRailwayReceivedService.checkandadd(model);
+            return res;
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
+    }
+
+    @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterworkrailwayreceived:view")
+    @GetMapping(value = "/{id}")
+    public RESTfulResult get(@PathVariable String id){
+        MeterWorkRailwayReceived meterWorkRailwayReceived = meterWorkRailwayReceivedService.getById(id);
+        return success(meterWorkRailwayReceived);
+    }
+
+    @ApiOperation(value="更新详细信息", notes="根据url的id来指定更新对象,并根据传过来的meterWorkRailwayReceived信息来更新详细信息")
+    @ApiImplicitParams({
+        @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String"),
+        @ApiImplicitParam(name = "meterWorkRailwayReceived", value = "详细实体meterWorkRailwayReceived", required = true, dataType = "MeterWorkRailwayReceived")
+    })
+    //@RequiresPermissions("meterworkrailwayreceived:update")
+    @PutMapping(value = "/{id}", produces  = "application/json;charset=UTF-8")
+    public RESTfulResult update(@PathVariable String id, @RequestBody MeterWorkRailwayReceived model){
+        model.setId(id);
+        MeterWorkRailwayReceived meterWorkRailwayReceived = meterWorkRailwayReceivedService.modify(model);
+        return success(meterWorkRailwayReceived);
+    }
+
+    @ApiOperation(value="删除", notes="根据url的id来指定删除对象")
+    @ApiImplicitParam(paramType = "path", name = "id", value = "ID", required = true, dataType = "String")
+    //@RequiresPermissions("meterworkrailwayreceived:delete")
+    @DeleteMapping(value = "/{id}")//String
+    public RESTfulResult delete(@PathVariable String id){
+    	List<String> list = Arrays.asList(id.split(","));
+    	if(ListUtils.isNotEmpty(list)) {
+	    	List<String> ids = ListUtils.convertList(list);
+			  meterWorkRailwayReceivedService.delete(ids);
+    	}
+      return success();
+    }
+}

+ 16 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/mapper/MeterWorkRailwayReceivedMapper.java

@@ -0,0 +1,16 @@
+package com.steerinfo.meterwork.meterworkrailwayreceived.mapper;
+
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.meterwork.meterworkrailwaymotorialreceived.model.MeterWorkRailwayMotorialReceived;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
+import java.math.*;
+import java.util.HashMap;
+import java.util.List;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+@Mapper
+public interface MeterWorkRailwayReceivedMapper extends IBaseMapper<MeterWorkRailwayReceived, String> {
+    String getNewID(@Param(value="afl")String afl);
+}

+ 1771 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/mapper/MeterWorkRailwayReceivedMapper.xml

@@ -0,0 +1,1771 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.steerinfo.meterwork.meterworkrailwayreceived.mapper.MeterWorkRailwayReceivedMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived">
+    <id column="ACTUAL_FIRST_NO" jdbcType="VARCHAR" property="actualFirstNo" />
+    <result column="PREDICTION_NO" jdbcType="VARCHAR" property="predictionNo" />
+    <result column="NOTICE_NO" jdbcType="VARCHAR" property="noticeNo" />
+    <result column="RAILWAY_NO" jdbcType="VARCHAR" property="railwayNo" />
+    <result column="RAILWAY_CARRIAGE_NO" jdbcType="VARCHAR" property="railwayCarriageNo" />
+    <result column="RAILWAY_WORK_NO" jdbcType="VARCHAR" property="railwayWorkNo" />
+    <result column="RAILWAY_SPEED" jdbcType="DECIMAL" property="railwaySpeed" />
+    <result column="RAILWAY_MODEL" jdbcType="VARCHAR" property="railwayModel" />
+    <result column="MATTER_NO" jdbcType="VARCHAR" property="matterNo" />
+    <result column="MATTER_NAME" jdbcType="VARCHAR" property="matterName" />
+    <result column="CONTRACT_NO" jdbcType="VARCHAR" property="contractNo" />
+    <result column="BATCH_NO" jdbcType="VARCHAR" property="batchNo" />
+    <result column="CUSTOMER_SUPPLIER_NO" jdbcType="VARCHAR" property="customerSupplierNo" />
+    <result column="CUSTOMER_SUPPLIER_NAME" jdbcType="VARCHAR" property="customerSupplierName" />
+    <result column="FORWARDING_UNIT_NO" jdbcType="VARCHAR" property="forwardingUnitNo" />
+    <result column="FORWARDING_UNIT_NAME" jdbcType="VARCHAR" property="forwardingUnitName" />
+    <result column="RECEIVING_UINT_NO" jdbcType="VARCHAR" property="receivingUintNo" />
+    <result column="RECEIVING_UINT_NAME" jdbcType="VARCHAR" property="receivingUintName" />
+    <result column="MATERIAL_NO" jdbcType="VARCHAR" property="materialNo" />
+    <result column="MATERIAL_NAME" jdbcType="VARCHAR" property="materialName" />
+    <result column="SPEC_NO" jdbcType="VARCHAR" property="specNo" />
+    <result column="SPEC_NAME" jdbcType="VARCHAR" property="specName" />
+    <result column="SHIPMENT_GROSS_WEIGHT" jdbcType="DECIMAL" property="shipmentGrossWeight" />
+    <result column="SHIPMENT_NET_WEIGHT" jdbcType="DECIMAL" property="shipmentNetWeight" />
+    <result column="SHIPMENT_NUM" jdbcType="DECIMAL" property="shipmentNum" />
+    <result column="BIND_CARD_NO" jdbcType="VARCHAR" property="bindCardNo" />
+    <result column="LOAD_POINT_NO" jdbcType="VARCHAR" property="loadPointNo" />
+    <result column="LOAD_POINT_NAME" jdbcType="VARCHAR" property="loadPointName" />
+    <result column="SAMPLE_NO" jdbcType="VARCHAR" property="sampleNo" />
+    <result column="SAMPLE_VOUCHER" jdbcType="VARCHAR" property="sampleVoucher" />
+    <result column="CARRIER_UNIT_NO" jdbcType="VARCHAR" property="carrierUnitNo" />
+    <result column="CARRIER_UNIT_NAME" jdbcType="VARCHAR" property="carrierUnitName" />
+    <result column="PREDICTION_TYPE" jdbcType="VARCHAR" property="predictionType" />
+    <result column="PREDICTION_COMBINATION" jdbcType="VARCHAR" property="predictionCombination" />
+    <result column="METER_TYPE_NO" jdbcType="VARCHAR" property="meterTypeNo" />
+    <result column="METER_TYPE_NAME" jdbcType="VARCHAR" property="meterTypeName" />
+    <result column="METER_PROCESS_NO" jdbcType="VARCHAR" property="meterProcessNo" />
+    <result column="METER_PROCESS_EDITION_NO" jdbcType="VARCHAR" property="meterProcessEditionNo" />
+    <result column="METER_WEIGHT" jdbcType="DECIMAL" property="meterWeight" />
+    <result column="WEIGHT_TYPE" jdbcType="VARCHAR" property="weightType" />
+    <result column="METER_SORT_WEIGHT" jdbcType="DECIMAL" property="meterSortWeight" />
+    <result column="METER_BALANCE_WEIGHT" jdbcType="DECIMAL" property="meterBalanceWeight" />
+    <result column="CREATE_MAN_NO" jdbcType="VARCHAR" property="createManNo" />
+    <result column="CREATE_MAN_NAME" jdbcType="VARCHAR" property="createManName" />
+    <result column="CREATE_TIME" jdbcType="TIMESTAMP" property="createTime" />
+    <result column="BASE_SPOT_NO" jdbcType="VARCHAR" property="baseSpotNo" />
+    <result column="BASE_SPOT_NAME" jdbcType="VARCHAR" property="baseSpotName" />
+    <result column="METER_CLASS" jdbcType="VARCHAR" property="meterClass" />
+    <result column="METER_GROUP" jdbcType="VARCHAR" property="meterGroup" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <result column="VALUE_FLAG" jdbcType="VARCHAR" property="valueFlag" />
+    <result column="UPDATE_MAN_NO" jdbcType="VARCHAR" property="updateManNo" />
+    <result column="UPDATE_MAN_NAME" jdbcType="VARCHAR" property="updateManName" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="CHECK_FLAG" jdbcType="VARCHAR" property="checkFlag" />
+    <result column="CHECK_MAN_NO" jdbcType="VARCHAR" property="checkManNo" />
+    <result column="CHECK_MAN_NAME" jdbcType="VARCHAR" property="checkManName" />
+    <result column="CHECK_TIME" jdbcType="TIMESTAMP" property="checkTime" />
+    <result column="METER_MODE" jdbcType="VARCHAR" property="meterMode" />
+    <result column="RAILWAY_TYPE_NO" jdbcType="VARCHAR" property="railwayTypeNo" />
+    <result column="RAILWAY_TYPE_NAME" jdbcType="VARCHAR" property="railwayTypeName" />
+    <result column="IS_CHEMICAL" jdbcType="VARCHAR" property="isChemical" />
+    <result column="LIMIT_WEIGHT" jdbcType="DECIMAL" property="limitWeight" />
+    <result column="RAILWAY_MODEL_NO" jdbcType="VARCHAR" property="railwayModelNo" />
+    <result column="RAILWAY_MODEL_NAME" jdbcType="VARCHAR" property="railwayModelName" />
+  </resultMap>
+  <sql id="columns">
+    ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
+    RAILWAY_SPEED, RAILWAY_MODEL, MATTER_NO, MATTER_NAME, CONTRACT_NO, BATCH_NO, CUSTOMER_SUPPLIER_NO, 
+    CUSTOMER_SUPPLIER_NAME, FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, 
+    RECEIVING_UINT_NAME, MATERIAL_NO, MATERIAL_NAME, SPEC_NO, SPEC_NAME, SHIPMENT_GROSS_WEIGHT, 
+    SHIPMENT_NET_WEIGHT, SHIPMENT_NUM, BIND_CARD_NO, LOAD_POINT_NO, LOAD_POINT_NAME, 
+    SAMPLE_NO, SAMPLE_VOUCHER, CARRIER_UNIT_NO, CARRIER_UNIT_NAME, PREDICTION_TYPE, PREDICTION_COMBINATION, 
+    METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO, METER_PROCESS_EDITION_NO, METER_WEIGHT, 
+    WEIGHT_TYPE, METER_SORT_WEIGHT, METER_BALANCE_WEIGHT, CREATE_MAN_NO, CREATE_MAN_NAME, 
+    CREATE_TIME, BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, METER_GROUP, MEMO, VALUE_FLAG, 
+    UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, 
+    CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, IS_CHEMICAL, LIMIT_WEIGHT, 
+    RAILWAY_MODEL_NO, RAILWAY_MODEL_NAME
+  </sql>
+  <sql id="columns_alias">
+    t.ACTUAL_FIRST_NO, t.PREDICTION_NO, t.NOTICE_NO, t.RAILWAY_NO, t.RAILWAY_CARRIAGE_NO, 
+    t.RAILWAY_WORK_NO, t.RAILWAY_SPEED, t.RAILWAY_MODEL, t.MATTER_NO, t.MATTER_NAME, 
+    t.CONTRACT_NO, t.BATCH_NO, t.CUSTOMER_SUPPLIER_NO, t.CUSTOMER_SUPPLIER_NAME, t.FORWARDING_UNIT_NO, 
+    t.FORWARDING_UNIT_NAME, t.RECEIVING_UINT_NO, t.RECEIVING_UINT_NAME, t.MATERIAL_NO, 
+    t.MATERIAL_NAME, t.SPEC_NO, t.SPEC_NAME, t.SHIPMENT_GROSS_WEIGHT, t.SHIPMENT_NET_WEIGHT, 
+    t.SHIPMENT_NUM, t.BIND_CARD_NO, t.LOAD_POINT_NO, t.LOAD_POINT_NAME, t.SAMPLE_NO, 
+    t.SAMPLE_VOUCHER, t.CARRIER_UNIT_NO, t.CARRIER_UNIT_NAME, t.PREDICTION_TYPE, t.PREDICTION_COMBINATION, 
+    t.METER_TYPE_NO, t.METER_TYPE_NAME, t.METER_PROCESS_NO, t.METER_PROCESS_EDITION_NO, 
+    t.METER_WEIGHT, t.WEIGHT_TYPE, t.METER_SORT_WEIGHT, t.METER_BALANCE_WEIGHT, t.CREATE_MAN_NO, 
+    t.CREATE_MAN_NAME, t.CREATE_TIME, t.BASE_SPOT_NO, t.BASE_SPOT_NAME, t.METER_CLASS, 
+    t.METER_GROUP, t.MEMO, t.VALUE_FLAG, t.UPDATE_MAN_NO, t.UPDATE_MAN_NAME, t.UPDATE_TIME, 
+    t.CHECK_FLAG, t.CHECK_MAN_NO, t.CHECK_MAN_NAME, t.CHECK_TIME, t.METER_MODE, t.RAILWAY_TYPE_NO, 
+    t.RAILWAY_TYPE_NAME, t.IS_CHEMICAL, t.LIMIT_WEIGHT, t.RAILWAY_MODEL_NO, t.RAILWAY_MODEL_NAME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM METER_WORK_RAILWAY_RECEIVED
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM METER_WORK_RAILWAY_RECEIVED t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        and ACTUAL_FIRST_NO = #{actualFirstNo}
+      </if>
+      <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 = #{railwayNo}
+      </if>
+      <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
+        and RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
+      </if>
+      <if test="railwayWorkNo != null and railwayWorkNo != ''">
+        and RAILWAY_WORK_NO = #{railwayWorkNo}
+      </if>
+      <if test="railwaySpeed != null">
+        and RAILWAY_SPEED = #{railwaySpeed}
+      </if>
+      <if test="railwayModel != null and railwayModel != ''">
+        and RAILWAY_MODEL = #{railwayModel}
+      </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="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="bindCardNo != null and bindCardNo != ''">
+        and BIND_CARD_NO = #{bindCardNo}
+      </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="meterProcessNo != null and meterProcessNo != ''">
+        and METER_PROCESS_NO = #{meterProcessNo}
+      </if>
+      <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
+        and METER_PROCESS_EDITION_NO = #{meterProcessEditionNo}
+      </if>
+      <if test="meterWeight != null">
+        and METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="weightType != null and weightType != ''">
+        and WEIGHT_TYPE = #{weightType}
+      </if>
+      <if test="meterSortWeight != null">
+        and METER_SORT_WEIGHT = #{meterSortWeight}
+      </if>
+      <if test="meterBalanceWeight != null">
+        and METER_BALANCE_WEIGHT = #{meterBalanceWeight}
+      </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="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="meterClass != null and meterClass != ''">
+        and METER_CLASS = #{meterClass}
+      </if>
+      <if test="meterGroup != null and meterGroup != ''">
+        and METER_GROUP = #{meterGroup}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG = #{valueFlag}
+      </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="checkFlag != null and checkFlag != ''">
+        and CHECK_FLAG = #{checkFlag}
+      </if>
+      <if test="checkManNo != null and checkManNo != ''">
+        and CHECK_MAN_NO = #{checkManNo}
+      </if>
+      <if test="checkManName != null and checkManName != ''">
+        and CHECK_MAN_NAME = #{checkManName}
+      </if>
+      <if test="checkTime != null">
+        and TO_CHAR(CHECK_TIME,'yyyy-MM-dd') = #{checkTime}
+      </if>
+      <if test="meterMode != null and meterMode != ''">
+        and METER_MODE = #{meterMode}
+      </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="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>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="actualFirstNo != null and actualFirstNo != ''">
+        and ACTUAL_FIRST_NO LIKE '%${actualFirstNo}%'
+      </if>
+      <if test="predictionNo != null and predictionNo != ''">
+        and PREDICTION_NO LIKE '%${predictionNo}%'
+      </if>
+      <if test="noticeNo != null and noticeNo != ''">
+        and NOTICE_NO LIKE '%${noticeNo}%'
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        and RAILWAY_NO LIKE '%${railwayNo}%'
+      </if>
+      <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
+        and RAILWAY_CARRIAGE_NO LIKE '%${railwayCarriageNo}%'
+      </if>
+      <if test="railwayWorkNo != null and railwayWorkNo != ''">
+        and RAILWAY_WORK_NO LIKE '%${railwayWorkNo}%'
+      </if>
+      <if test="railwaySpeed != null">
+        and RAILWAY_SPEED = #{railwaySpeed}
+      </if>
+      <if test="railwayModel != null and railwayModel != ''">
+        and RAILWAY_MODEL LIKE '%${railwayModel}%'
+      </if>
+      <if test="matterNo != null and matterNo != ''">
+        and MATTER_NO LIKE '%${matterNo}%'
+      </if>
+      <if test="matterName != null and matterName != ''">
+        and MATTER_NAME LIKE '%${matterName}%'
+      </if>
+      <if test="contractNo != null and contractNo != ''">
+        and CONTRACT_NO LIKE '%${contractNo}%'
+      </if>
+      <if test="batchNo != null and batchNo != ''">
+        and BATCH_NO LIKE '%${batchNo}%'
+      </if>
+      <if test="customerSupplierNo != null and customerSupplierNo != ''">
+        and CUSTOMER_SUPPLIER_NO LIKE '%${customerSupplierNo}%'
+      </if>
+      <if test="customerSupplierName != null and customerSupplierName != ''">
+        and CUSTOMER_SUPPLIER_NAME LIKE '%${customerSupplierName}%'
+      </if>
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        and FORWARDING_UNIT_NO LIKE '%${forwardingUnitNo}%'
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        and FORWARDING_UNIT_NAME LIKE '%${forwardingUnitName}%'
+      </if>
+      <if test="receivingUintNo != null and receivingUintNo != ''">
+        and RECEIVING_UINT_NO LIKE '%${receivingUintNo}%'
+      </if>
+      <if test="receivingUintName != null and receivingUintName != ''">
+        and RECEIVING_UINT_NAME LIKE '%${receivingUintName}%'
+      </if>
+      <if test="materialNo != null and materialNo != ''">
+        and MATERIAL_NO LIKE '%${materialNo}%'
+      </if>
+      <if test="materialName != null and materialName != ''">
+        and MATERIAL_NAME LIKE '%${materialName}%'
+      </if>
+      <if test="specNo != null and specNo != ''">
+        and SPEC_NO LIKE '%${specNo}%'
+      </if>
+      <if test="specName != null and specName != ''">
+        and SPEC_NAME LIKE '%${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="bindCardNo != null and bindCardNo != ''">
+        and BIND_CARD_NO LIKE '%${bindCardNo}%'
+      </if>
+      <if test="loadPointNo != null and loadPointNo != ''">
+        and LOAD_POINT_NO LIKE '%${loadPointNo}%'
+      </if>
+      <if test="loadPointName != null and loadPointName != ''">
+        and LOAD_POINT_NAME LIKE '%${loadPointName}%'
+      </if>
+      <if test="sampleNo != null and sampleNo != ''">
+        and SAMPLE_NO LIKE '%${sampleNo}%'
+      </if>
+      <if test="sampleVoucher != null and sampleVoucher != ''">
+        and SAMPLE_VOUCHER LIKE '%${sampleVoucher}%'
+      </if>
+      <if test="carrierUnitNo != null and carrierUnitNo != ''">
+        and CARRIER_UNIT_NO LIKE '%${carrierUnitNo}%'
+      </if>
+      <if test="carrierUnitName != null and carrierUnitName != ''">
+        and CARRIER_UNIT_NAME LIKE '%${carrierUnitName}%'
+      </if>
+      <if test="predictionType != null and predictionType != ''">
+        and PREDICTION_TYPE LIKE '%${predictionType}%'
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        and PREDICTION_COMBINATION LIKE '%${predictionCombination}%'
+      </if>
+      <if test="meterTypeNo != null and meterTypeNo != ''">
+        and METER_TYPE_NO LIKE '%${meterTypeNo}%'
+      </if>
+      <if test="meterTypeName != null and meterTypeName != ''">
+        and METER_TYPE_NAME LIKE '%${meterTypeName}%'
+      </if>
+      <if test="meterProcessNo != null and meterProcessNo != ''">
+        and METER_PROCESS_NO LIKE '%${meterProcessNo}%'
+      </if>
+      <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
+        and METER_PROCESS_EDITION_NO LIKE '%${meterProcessEditionNo}%'
+      </if>
+      <if test="meterWeight != null">
+        and METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="weightType != null and weightType != ''">
+        and WEIGHT_TYPE LIKE '%${weightType}%'
+      </if>
+      <if test="meterSortWeight != null">
+        and METER_SORT_WEIGHT = #{meterSortWeight}
+      </if>
+      <if test="meterBalanceWeight != null">
+        and METER_BALANCE_WEIGHT = #{meterBalanceWeight}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        and CREATE_MAN_NO LIKE '%${createManNo}%'
+      </if>
+      <if test="createManName != null and createManName != ''">
+        and CREATE_MAN_NAME LIKE '%${createManName}%'
+      </if>
+      <if test="createTime != null">
+        and TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = #{createTime}
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        and BASE_SPOT_NO LIKE '%${baseSpotNo}%'
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        and BASE_SPOT_NAME LIKE '%${baseSpotName}%'
+      </if>
+      <if test="meterClass != null and meterClass != ''">
+        and METER_CLASS LIKE '%${meterClass}%'
+      </if>
+      <if test="meterGroup != null and meterGroup != ''">
+        and METER_GROUP LIKE '%${meterGroup}%'
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        and VALUE_FLAG LIKE '%${valueFlag}%'
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        and UPDATE_MAN_NO LIKE '%${updateManNo}%'
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        and UPDATE_MAN_NAME LIKE '%${updateManName}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="checkFlag != null and checkFlag != ''">
+        and CHECK_FLAG LIKE '%${checkFlag}%'
+      </if>
+      <if test="checkManNo != null and checkManNo != ''">
+        and CHECK_MAN_NO LIKE '%${checkManNo}%'
+      </if>
+      <if test="checkManName != null and checkManName != ''">
+        and CHECK_MAN_NAME LIKE '%${checkManName}%'
+      </if>
+      <if test="checkTime != null">
+        and TO_CHAR(CHECK_TIME,'yyyy-MM-dd') = #{checkTime}
+      </if>
+      <if test="meterMode != null and meterMode != ''">
+        and METER_MODE LIKE '%${meterMode}%'
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        and RAILWAY_TYPE_NO LIKE '%${railwayTypeNo}%'
+      </if>
+      <if test="railwayTypeName != null and railwayTypeName != ''">
+        and RAILWAY_TYPE_NAME LIKE '%${railwayTypeName}%'
+      </if>
+      <if test="isChemical != null and isChemical != ''">
+        and IS_CHEMICAL LIKE '%${isChemical}%'
+      </if>
+      <if test="limitWeight != null">
+        and LIMIT_WEIGHT = #{limitWeight}
+      </if>
+      <if test="railwayModelNo != null and railwayModelNo != ''">
+        and RAILWAY_MODEL_NO LIKE '%${railwayModelNo}%'
+      </if>
+      <if test="railwayModelName != null and railwayModelName != ''">
+        and RAILWAY_MODEL_NAME LIKE '%${railwayModelName}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    delete from METER_WORK_RAILWAY_RECEIVED
+    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from METER_WORK_RAILWAY_RECEIVED
+    where 1!=1 
+      <if test="predictionNo != null and predictionNo != ''">
+        or PREDICTION_NO = #{predictionNo}
+      </if>
+      <if test="noticeNo != null and noticeNo != ''">
+        or NOTICE_NO = #{noticeNo}
+      </if>
+      <if test="railwayNo != null and railwayNo != ''">
+        or RAILWAY_NO = #{railwayNo}
+      </if>
+      <if test="railwayCarriageNo != null and railwayCarriageNo != ''">
+        or RAILWAY_CARRIAGE_NO = #{railwayCarriageNo}
+      </if>
+      <if test="railwayWorkNo != null and railwayWorkNo != ''">
+        or RAILWAY_WORK_NO = #{railwayWorkNo}
+      </if>
+      <if test="railwaySpeed != null">
+        or RAILWAY_SPEED = #{railwaySpeed}
+      </if>
+      <if test="railwayModel != null and railwayModel != ''">
+        or RAILWAY_MODEL = #{railwayModel}
+      </if>
+      <if test="matterNo != null and matterNo != ''">
+        or MATTER_NO = #{matterNo}
+      </if>
+      <if test="matterName != null and matterName != ''">
+        or MATTER_NAME = #{matterName}
+      </if>
+      <if test="contractNo != null and contractNo != ''">
+        or CONTRACT_NO = #{contractNo}
+      </if>
+      <if test="batchNo != null and batchNo != ''">
+        or BATCH_NO = #{batchNo}
+      </if>
+      <if test="customerSupplierNo != null and customerSupplierNo != ''">
+        or CUSTOMER_SUPPLIER_NO = #{customerSupplierNo}
+      </if>
+      <if test="customerSupplierName != null and customerSupplierName != ''">
+        or CUSTOMER_SUPPLIER_NAME = #{customerSupplierName}
+      </if>
+      <if test="forwardingUnitNo != null and forwardingUnitNo != ''">
+        or FORWARDING_UNIT_NO = #{forwardingUnitNo}
+      </if>
+      <if test="forwardingUnitName != null and forwardingUnitName != ''">
+        or FORWARDING_UNIT_NAME = #{forwardingUnitName}
+      </if>
+      <if test="receivingUintNo != null and receivingUintNo != ''">
+        or RECEIVING_UINT_NO = #{receivingUintNo}
+      </if>
+      <if test="receivingUintName != null and receivingUintName != ''">
+        or RECEIVING_UINT_NAME = #{receivingUintName}
+      </if>
+      <if test="materialNo != null and materialNo != ''">
+        or MATERIAL_NO = #{materialNo}
+      </if>
+      <if test="materialName != null and materialName != ''">
+        or MATERIAL_NAME = #{materialName}
+      </if>
+      <if test="specNo != null and specNo != ''">
+        or SPEC_NO = #{specNo}
+      </if>
+      <if test="specName != null and specName != ''">
+        or SPEC_NAME = #{specName}
+      </if>
+      <if test="shipmentGrossWeight != null">
+        or SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight}
+      </if>
+      <if test="shipmentNetWeight != null">
+        or SHIPMENT_NET_WEIGHT = #{shipmentNetWeight}
+      </if>
+      <if test="shipmentNum != null">
+        or SHIPMENT_NUM = #{shipmentNum}
+      </if>
+      <if test="bindCardNo != null and bindCardNo != ''">
+        or BIND_CARD_NO = #{bindCardNo}
+      </if>
+      <if test="loadPointNo != null and loadPointNo != ''">
+        or LOAD_POINT_NO = #{loadPointNo}
+      </if>
+      <if test="loadPointName != null and loadPointName != ''">
+        or LOAD_POINT_NAME = #{loadPointName}
+      </if>
+      <if test="sampleNo != null and sampleNo != ''">
+        or SAMPLE_NO = #{sampleNo}
+      </if>
+      <if test="sampleVoucher != null and sampleVoucher != ''">
+        or SAMPLE_VOUCHER = #{sampleVoucher}
+      </if>
+      <if test="carrierUnitNo != null and carrierUnitNo != ''">
+        or CARRIER_UNIT_NO = #{carrierUnitNo}
+      </if>
+      <if test="carrierUnitName != null and carrierUnitName != ''">
+        or CARRIER_UNIT_NAME = #{carrierUnitName}
+      </if>
+      <if test="predictionType != null and predictionType != ''">
+        or PREDICTION_TYPE = #{predictionType}
+      </if>
+      <if test="predictionCombination != null and predictionCombination != ''">
+        or PREDICTION_COMBINATION = #{predictionCombination}
+      </if>
+      <if test="meterTypeNo != null and meterTypeNo != ''">
+        or METER_TYPE_NO = #{meterTypeNo}
+      </if>
+      <if test="meterTypeName != null and meterTypeName != ''">
+        or METER_TYPE_NAME = #{meterTypeName}
+      </if>
+      <if test="meterProcessNo != null and meterProcessNo != ''">
+        or METER_PROCESS_NO = #{meterProcessNo}
+      </if>
+      <if test="meterProcessEditionNo != null and meterProcessEditionNo != ''">
+        or METER_PROCESS_EDITION_NO = #{meterProcessEditionNo}
+      </if>
+      <if test="meterWeight != null">
+        or METER_WEIGHT = #{meterWeight}
+      </if>
+      <if test="weightType != null and weightType != ''">
+        or WEIGHT_TYPE = #{weightType}
+      </if>
+      <if test="meterSortWeight != null">
+        or METER_SORT_WEIGHT = #{meterSortWeight}
+      </if>
+      <if test="meterBalanceWeight != null">
+        or METER_BALANCE_WEIGHT = #{meterBalanceWeight}
+      </if>
+      <if test="createManNo != null and createManNo != ''">
+        or CREATE_MAN_NO = #{createManNo}
+      </if>
+      <if test="createManName != null and createManName != ''">
+        or CREATE_MAN_NAME = #{createManName}
+      </if>
+      <if test="createTime != null">
+        or TO_CHAR(CREATE_TIME,'yyyy-MM-dd') = '#{createTime}'
+      </if>
+      <if test="baseSpotNo != null and baseSpotNo != ''">
+        or BASE_SPOT_NO = #{baseSpotNo}
+      </if>
+      <if test="baseSpotName != null and baseSpotName != ''">
+        or BASE_SPOT_NAME = #{baseSpotName}
+      </if>
+      <if test="meterClass != null and meterClass != ''">
+        or METER_CLASS = #{meterClass}
+      </if>
+      <if test="meterGroup != null and meterGroup != ''">
+        or METER_GROUP = #{meterGroup}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </if>
+      <if test="valueFlag != null and valueFlag != ''">
+        or VALUE_FLAG = #{valueFlag}
+      </if>
+      <if test="updateManNo != null and updateManNo != ''">
+        or UPDATE_MAN_NO = #{updateManNo}
+      </if>
+      <if test="updateManName != null and updateManName != ''">
+        or UPDATE_MAN_NAME = #{updateManName}
+      </if>
+      <if test="updateTime != null">
+        or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+      </if>
+      <if test="checkFlag != null and checkFlag != ''">
+        or CHECK_FLAG = #{checkFlag}
+      </if>
+      <if test="checkManNo != null and checkManNo != ''">
+        or CHECK_MAN_NO = #{checkManNo}
+      </if>
+      <if test="checkManName != null and checkManName != ''">
+        or CHECK_MAN_NAME = #{checkManName}
+      </if>
+      <if test="checkTime != null">
+        or TO_CHAR(CHECK_TIME,'yyyy-MM-dd') = '#{checkTime}'
+      </if>
+      <if test="meterMode != null and meterMode != ''">
+        or METER_MODE = #{meterMode}
+      </if>
+      <if test="railwayTypeNo != null and railwayTypeNo != ''">
+        or RAILWAY_TYPE_NO = #{railwayTypeNo}
+      </if>
+      <if test="railwayTypeName != null and railwayTypeName != ''">
+        or RAILWAY_TYPE_NAME = #{railwayTypeName}
+      </if>
+      <if test="isChemical != null and isChemical != ''">
+        or IS_CHEMICAL = #{isChemical}
+      </if>
+      <if test="limitWeight != null">
+        or LIMIT_WEIGHT = #{limitWeight}
+      </if>
+      <if test="railwayModelNo != null and railwayModelNo != ''">
+        or RAILWAY_MODEL_NO = #{railwayModelNo}
+      </if>
+      <if test="railwayModelName != null and railwayModelName != ''">
+        or RAILWAY_MODEL_NAME = #{railwayModelName}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived">
+    insert into METER_WORK_RAILWAY_RECEIVED (ACTUAL_FIRST_NO, PREDICTION_NO, NOTICE_NO, 
+      RAILWAY_NO, RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
+      RAILWAY_SPEED, RAILWAY_MODEL, MATTER_NO, 
+      MATTER_NAME, CONTRACT_NO, BATCH_NO, 
+      CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME, 
+      FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, RECEIVING_UINT_NO, 
+      RECEIVING_UINT_NAME, MATERIAL_NO, MATERIAL_NAME, 
+      SPEC_NO, SPEC_NAME, SHIPMENT_GROSS_WEIGHT, 
+      SHIPMENT_NET_WEIGHT, SHIPMENT_NUM, BIND_CARD_NO, 
+      LOAD_POINT_NO, LOAD_POINT_NAME, SAMPLE_NO, 
+      SAMPLE_VOUCHER, CARRIER_UNIT_NO, CARRIER_UNIT_NAME, 
+      PREDICTION_TYPE, PREDICTION_COMBINATION, 
+      METER_TYPE_NO, METER_TYPE_NAME, METER_PROCESS_NO, 
+      METER_PROCESS_EDITION_NO, METER_WEIGHT, WEIGHT_TYPE, 
+      METER_SORT_WEIGHT, METER_BALANCE_WEIGHT, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, BASE_SPOT_NO, 
+      BASE_SPOT_NAME, METER_CLASS, METER_GROUP, 
+      MEMO, VALUE_FLAG, UPDATE_MAN_NO, 
+      UPDATE_MAN_NAME, UPDATE_TIME, CHECK_FLAG, 
+      CHECK_MAN_NO, CHECK_MAN_NAME, CHECK_TIME, 
+      METER_MODE, RAILWAY_TYPE_NO, RAILWAY_TYPE_NAME, 
+      IS_CHEMICAL, LIMIT_WEIGHT, RAILWAY_MODEL_NO, 
+      RAILWAY_MODEL_NAME)
+    values (#{actualFirstNo,jdbcType=VARCHAR}, #{predictionNo,jdbcType=VARCHAR}, #{noticeNo,jdbcType=VARCHAR}, 
+      #{railwayNo,jdbcType=VARCHAR}, #{railwayCarriageNo,jdbcType=VARCHAR}, #{railwayWorkNo,jdbcType=VARCHAR}, 
+      #{railwaySpeed,jdbcType=DECIMAL}, #{railwayModel,jdbcType=VARCHAR}, #{matterNo,jdbcType=VARCHAR}, 
+      #{matterName,jdbcType=VARCHAR}, #{contractNo,jdbcType=VARCHAR}, #{batchNo,jdbcType=VARCHAR}, 
+      #{customerSupplierNo,jdbcType=VARCHAR}, #{customerSupplierName,jdbcType=VARCHAR}, 
+      #{forwardingUnitNo,jdbcType=VARCHAR}, #{forwardingUnitName,jdbcType=VARCHAR}, #{receivingUintNo,jdbcType=VARCHAR}, 
+      #{receivingUintName,jdbcType=VARCHAR}, #{materialNo,jdbcType=VARCHAR}, #{materialName,jdbcType=VARCHAR}, 
+      #{specNo,jdbcType=VARCHAR}, #{specName,jdbcType=VARCHAR}, #{shipmentGrossWeight,jdbcType=DECIMAL}, 
+      #{shipmentNetWeight,jdbcType=DECIMAL}, #{shipmentNum,jdbcType=DECIMAL}, #{bindCardNo,jdbcType=VARCHAR}, 
+      #{loadPointNo,jdbcType=VARCHAR}, #{loadPointName,jdbcType=VARCHAR}, #{sampleNo,jdbcType=VARCHAR}, 
+      #{sampleVoucher,jdbcType=VARCHAR}, #{carrierUnitNo,jdbcType=VARCHAR}, #{carrierUnitName,jdbcType=VARCHAR}, 
+      #{predictionType,jdbcType=VARCHAR}, #{predictionCombination,jdbcType=VARCHAR}, 
+      #{meterTypeNo,jdbcType=VARCHAR}, #{meterTypeName,jdbcType=VARCHAR}, #{meterProcessNo,jdbcType=VARCHAR}, 
+      #{meterProcessEditionNo,jdbcType=VARCHAR}, #{meterWeight,jdbcType=DECIMAL}, #{weightType,jdbcType=VARCHAR}, 
+      #{meterSortWeight,jdbcType=DECIMAL}, #{meterBalanceWeight,jdbcType=DECIMAL}, #{createManNo,jdbcType=VARCHAR}, 
+      #{createManName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{baseSpotNo,jdbcType=VARCHAR}, 
+      #{baseSpotName,jdbcType=VARCHAR}, #{meterClass,jdbcType=VARCHAR}, #{meterGroup,jdbcType=VARCHAR}, 
+      #{memo,jdbcType=VARCHAR}, #{valueFlag,jdbcType=VARCHAR}, #{updateManNo,jdbcType=VARCHAR}, 
+      #{updateManName,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{checkFlag,jdbcType=VARCHAR}, 
+      #{checkManNo,jdbcType=VARCHAR}, #{checkManName,jdbcType=VARCHAR}, #{checkTime,jdbcType=TIMESTAMP}, 
+      #{meterMode,jdbcType=VARCHAR}, #{railwayTypeNo,jdbcType=VARCHAR}, #{railwayTypeName,jdbcType=VARCHAR}, 
+      #{isChemical,jdbcType=VARCHAR}, #{limitWeight,jdbcType=DECIMAL}, #{railwayModelNo,jdbcType=VARCHAR}, 
+      #{railwayModelName,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived">
+    insert into METER_WORK_RAILWAY_RECEIVED
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="actualFirstNo != null">
+        ACTUAL_FIRST_NO,
+      </if>
+      <if test="predictionNo != null">
+        PREDICTION_NO,
+      </if>
+      <if test="noticeNo != null">
+        NOTICE_NO,
+      </if>
+      <if test="railwayNo != null">
+        RAILWAY_NO,
+      </if>
+      <if test="railwayCarriageNo != null">
+        RAILWAY_CARRIAGE_NO,
+      </if>
+      <if test="railwayWorkNo != null">
+        RAILWAY_WORK_NO,
+      </if>
+      <if test="railwaySpeed != null">
+        RAILWAY_SPEED,
+      </if>
+      <if test="railwayModel != null">
+        RAILWAY_MODEL,
+      </if>
+      <if test="matterNo != null">
+        MATTER_NO,
+      </if>
+      <if test="matterName != null">
+        MATTER_NAME,
+      </if>
+      <if test="contractNo != null">
+        CONTRACT_NO,
+      </if>
+      <if test="batchNo != null">
+        BATCH_NO,
+      </if>
+      <if test="customerSupplierNo != null">
+        CUSTOMER_SUPPLIER_NO,
+      </if>
+      <if test="customerSupplierName != null">
+        CUSTOMER_SUPPLIER_NAME,
+      </if>
+      <if test="forwardingUnitNo != null">
+        FORWARDING_UNIT_NO,
+      </if>
+      <if test="forwardingUnitName != null">
+        FORWARDING_UNIT_NAME,
+      </if>
+      <if test="receivingUintNo != null">
+        RECEIVING_UINT_NO,
+      </if>
+      <if test="receivingUintName != null">
+        RECEIVING_UINT_NAME,
+      </if>
+      <if test="materialNo != null">
+        MATERIAL_NO,
+      </if>
+      <if test="materialName != null">
+        MATERIAL_NAME,
+      </if>
+      <if test="specNo != null">
+        SPEC_NO,
+      </if>
+      <if test="specName != null">
+        SPEC_NAME,
+      </if>
+      <if test="shipmentGrossWeight != null">
+        SHIPMENT_GROSS_WEIGHT,
+      </if>
+      <if test="shipmentNetWeight != null">
+        SHIPMENT_NET_WEIGHT,
+      </if>
+      <if test="shipmentNum != null">
+        SHIPMENT_NUM,
+      </if>
+      <if test="bindCardNo != null">
+        BIND_CARD_NO,
+      </if>
+      <if test="loadPointNo != null">
+        LOAD_POINT_NO,
+      </if>
+      <if test="loadPointName != null">
+        LOAD_POINT_NAME,
+      </if>
+      <if test="sampleNo != null">
+        SAMPLE_NO,
+      </if>
+      <if test="sampleVoucher != null">
+        SAMPLE_VOUCHER,
+      </if>
+      <if test="carrierUnitNo != null">
+        CARRIER_UNIT_NO,
+      </if>
+      <if test="carrierUnitName != null">
+        CARRIER_UNIT_NAME,
+      </if>
+      <if test="predictionType != null">
+        PREDICTION_TYPE,
+      </if>
+      <if test="predictionCombination != null">
+        PREDICTION_COMBINATION,
+      </if>
+      <if test="meterTypeNo != null">
+        METER_TYPE_NO,
+      </if>
+      <if test="meterTypeName != null">
+        METER_TYPE_NAME,
+      </if>
+      <if test="meterProcessNo != null">
+        METER_PROCESS_NO,
+      </if>
+      <if test="meterProcessEditionNo != null">
+        METER_PROCESS_EDITION_NO,
+      </if>
+      <if test="meterWeight != null">
+        METER_WEIGHT,
+      </if>
+      <if test="weightType != null">
+        WEIGHT_TYPE,
+      </if>
+      <if test="meterSortWeight != null">
+        METER_SORT_WEIGHT,
+      </if>
+      <if test="meterBalanceWeight != null">
+        METER_BALANCE_WEIGHT,
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO,
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME,
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME,
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO,
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME,
+      </if>
+      <if test="meterClass != null">
+        METER_CLASS,
+      </if>
+      <if test="meterGroup != null">
+        METER_GROUP,
+      </if>
+      <if test="memo != null">
+        MEMO,
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG,
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO,
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="checkFlag != null">
+        CHECK_FLAG,
+      </if>
+      <if test="checkManNo != null">
+        CHECK_MAN_NO,
+      </if>
+      <if test="checkManName != null">
+        CHECK_MAN_NAME,
+      </if>
+      <if test="checkTime != null">
+        CHECK_TIME,
+      </if>
+      <if test="meterMode != null">
+        METER_MODE,
+      </if>
+      <if test="railwayTypeNo != null">
+        RAILWAY_TYPE_NO,
+      </if>
+      <if test="railwayTypeName != null">
+        RAILWAY_TYPE_NAME,
+      </if>
+      <if test="isChemical != null">
+        IS_CHEMICAL,
+      </if>
+      <if test="limitWeight != null">
+        LIMIT_WEIGHT,
+      </if>
+      <if test="railwayModelNo != null">
+        RAILWAY_MODEL_NO,
+      </if>
+      <if test="railwayModelName != null">
+        RAILWAY_MODEL_NAME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="actualFirstNo != null">
+        #{actualFirstNo,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionNo != null">
+        #{predictionNo,jdbcType=VARCHAR},
+      </if>
+      <if test="noticeNo != null">
+        #{noticeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayNo != null">
+        #{railwayNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayCarriageNo != null">
+        #{railwayCarriageNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayWorkNo != null">
+        #{railwayWorkNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwaySpeed != null">
+        #{railwaySpeed,jdbcType=DECIMAL},
+      </if>
+      <if test="railwayModel != null">
+        #{railwayModel,jdbcType=VARCHAR},
+      </if>
+      <if test="matterNo != null">
+        #{matterNo,jdbcType=VARCHAR},
+      </if>
+      <if test="matterName != null">
+        #{matterName,jdbcType=VARCHAR},
+      </if>
+      <if test="contractNo != null">
+        #{contractNo,jdbcType=VARCHAR},
+      </if>
+      <if test="batchNo != null">
+        #{batchNo,jdbcType=VARCHAR},
+      </if>
+      <if test="customerSupplierNo != null">
+        #{customerSupplierNo,jdbcType=VARCHAR},
+      </if>
+      <if test="customerSupplierName != null">
+        #{customerSupplierName,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitNo != null">
+        #{forwardingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitName != null">
+        #{forwardingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintNo != null">
+        #{receivingUintNo,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintName != null">
+        #{receivingUintName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialNo != null">
+        #{materialNo,jdbcType=VARCHAR},
+      </if>
+      <if test="materialName != null">
+        #{materialName,jdbcType=VARCHAR},
+      </if>
+      <if test="specNo != null">
+        #{specNo,jdbcType=VARCHAR},
+      </if>
+      <if test="specName != null">
+        #{specName,jdbcType=VARCHAR},
+      </if>
+      <if test="shipmentGrossWeight != null">
+        #{shipmentGrossWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="shipmentNetWeight != null">
+        #{shipmentNetWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="shipmentNum != null">
+        #{shipmentNum,jdbcType=DECIMAL},
+      </if>
+      <if test="bindCardNo != null">
+        #{bindCardNo,jdbcType=VARCHAR},
+      </if>
+      <if test="loadPointNo != null">
+        #{loadPointNo,jdbcType=VARCHAR},
+      </if>
+      <if test="loadPointName != null">
+        #{loadPointName,jdbcType=VARCHAR},
+      </if>
+      <if test="sampleNo != null">
+        #{sampleNo,jdbcType=VARCHAR},
+      </if>
+      <if test="sampleVoucher != null">
+        #{sampleVoucher,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierUnitNo != null">
+        #{carrierUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierUnitName != null">
+        #{carrierUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionType != null">
+        #{predictionType,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionCombination != null">
+        #{predictionCombination,jdbcType=VARCHAR},
+      </if>
+      <if test="meterTypeNo != null">
+        #{meterTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterTypeName != null">
+        #{meterTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="meterProcessNo != null">
+        #{meterProcessNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterProcessEditionNo != null">
+        #{meterProcessEditionNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterWeight != null">
+        #{meterWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="weightType != null">
+        #{weightType,jdbcType=VARCHAR},
+      </if>
+      <if test="meterSortWeight != null">
+        #{meterSortWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="meterBalanceWeight != null">
+        #{meterBalanceWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="createManNo != null">
+        #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="baseSpotNo != null">
+        #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="meterClass != null">
+        #{meterClass,jdbcType=VARCHAR},
+      </if>
+      <if test="meterGroup != null">
+        #{meterGroup,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManNo != null">
+        #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="checkFlag != null">
+        #{checkFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="checkManNo != null">
+        #{checkManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="checkManName != null">
+        #{checkManName,jdbcType=VARCHAR},
+      </if>
+      <if test="checkTime != null">
+        #{checkTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="meterMode != null">
+        #{meterMode,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeNo != null">
+        #{railwayTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeName != null">
+        #{railwayTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="isChemical != null">
+        #{isChemical,jdbcType=VARCHAR},
+      </if>
+      <if test="limitWeight != null">
+        #{limitWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="railwayModelNo != null">
+        #{railwayModelNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayModelName != null">
+        #{railwayModelName,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived">
+    update METER_WORK_RAILWAY_RECEIVED
+    set PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR},
+      NOTICE_NO = #{noticeNo,jdbcType=VARCHAR},
+      RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
+      RAILWAY_CARRIAGE_NO = #{railwayCarriageNo,jdbcType=VARCHAR},
+      RAILWAY_WORK_NO = #{railwayWorkNo,jdbcType=VARCHAR},
+      RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL},
+      RAILWAY_MODEL = #{railwayModel,jdbcType=VARCHAR},
+      MATTER_NO = #{matterNo,jdbcType=VARCHAR},
+      MATTER_NAME = #{matterName,jdbcType=VARCHAR},
+      CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
+      BATCH_NO = #{batchNo,jdbcType=VARCHAR},
+      CUSTOMER_SUPPLIER_NO = #{customerSupplierNo,jdbcType=VARCHAR},
+      CUSTOMER_SUPPLIER_NAME = #{customerSupplierName,jdbcType=VARCHAR},
+      FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
+      FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
+      RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
+      RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR},
+      MATERIAL_NO = #{materialNo,jdbcType=VARCHAR},
+      MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
+      SPEC_NO = #{specNo,jdbcType=VARCHAR},
+      SPEC_NAME = #{specName,jdbcType=VARCHAR},
+      SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight,jdbcType=DECIMAL},
+      SHIPMENT_NET_WEIGHT = #{shipmentNetWeight,jdbcType=DECIMAL},
+      SHIPMENT_NUM = #{shipmentNum,jdbcType=DECIMAL},
+      BIND_CARD_NO = #{bindCardNo,jdbcType=VARCHAR},
+      LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
+      LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
+      SAMPLE_NO = #{sampleNo,jdbcType=VARCHAR},
+      SAMPLE_VOUCHER = #{sampleVoucher,jdbcType=VARCHAR},
+      CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
+      CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
+      PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
+      PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
+      METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
+      METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
+      METER_PROCESS_NO = #{meterProcessNo,jdbcType=VARCHAR},
+      METER_PROCESS_EDITION_NO = #{meterProcessEditionNo,jdbcType=VARCHAR},
+      METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
+      WEIGHT_TYPE = #{weightType,jdbcType=VARCHAR},
+      METER_SORT_WEIGHT = #{meterSortWeight,jdbcType=DECIMAL},
+      METER_BALANCE_WEIGHT = #{meterBalanceWeight,jdbcType=DECIMAL},
+      CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      METER_CLASS = #{meterClass,jdbcType=VARCHAR},
+      METER_GROUP = #{meterGroup,jdbcType=VARCHAR},
+      MEMO = #{memo,jdbcType=VARCHAR},
+      VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      CHECK_FLAG = #{checkFlag,jdbcType=VARCHAR},
+      CHECK_MAN_NO = #{checkManNo,jdbcType=VARCHAR},
+      CHECK_MAN_NAME = #{checkManName,jdbcType=VARCHAR},
+      CHECK_TIME = #{checkTime,jdbcType=TIMESTAMP},
+      METER_MODE = #{meterMode,jdbcType=VARCHAR},
+      RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
+      RAILWAY_TYPE_NAME = #{railwayTypeName,jdbcType=VARCHAR},
+      IS_CHEMICAL = #{isChemical,jdbcType=VARCHAR},
+      LIMIT_WEIGHT = #{limitWeight,jdbcType=DECIMAL},
+      RAILWAY_MODEL_NO = #{railwayModelNo,jdbcType=VARCHAR},
+      RAILWAY_MODEL_NAME = #{railwayModelName,jdbcType=VARCHAR}
+    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived">
+    update METER_WORK_RAILWAY_RECEIVED
+    <set>
+      <if test="predictionNo != null">
+        PREDICTION_NO = #{predictionNo,jdbcType=VARCHAR},
+      </if>
+      <if test="noticeNo != null">
+        NOTICE_NO = #{noticeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayNo != null">
+        RAILWAY_NO = #{railwayNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayCarriageNo != null">
+        RAILWAY_CARRIAGE_NO = #{railwayCarriageNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayWorkNo != null">
+        RAILWAY_WORK_NO = #{railwayWorkNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwaySpeed != null">
+        RAILWAY_SPEED = #{railwaySpeed,jdbcType=DECIMAL},
+      </if>
+      <if test="railwayModel != null">
+        RAILWAY_MODEL = #{railwayModel,jdbcType=VARCHAR},
+      </if>
+      <if test="matterNo != null">
+        MATTER_NO = #{matterNo,jdbcType=VARCHAR},
+      </if>
+      <if test="matterName != null">
+        MATTER_NAME = #{matterName,jdbcType=VARCHAR},
+      </if>
+      <if test="contractNo != null">
+        CONTRACT_NO = #{contractNo,jdbcType=VARCHAR},
+      </if>
+      <if test="batchNo != null">
+        BATCH_NO = #{batchNo,jdbcType=VARCHAR},
+      </if>
+      <if test="customerSupplierNo != null">
+        CUSTOMER_SUPPLIER_NO = #{customerSupplierNo,jdbcType=VARCHAR},
+      </if>
+      <if test="customerSupplierName != null">
+        CUSTOMER_SUPPLIER_NAME = #{customerSupplierName,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitNo != null">
+        FORWARDING_UNIT_NO = #{forwardingUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="forwardingUnitName != null">
+        FORWARDING_UNIT_NAME = #{forwardingUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintNo != null">
+        RECEIVING_UINT_NO = #{receivingUintNo,jdbcType=VARCHAR},
+      </if>
+      <if test="receivingUintName != null">
+        RECEIVING_UINT_NAME = #{receivingUintName,jdbcType=VARCHAR},
+      </if>
+      <if test="materialNo != null">
+        MATERIAL_NO = #{materialNo,jdbcType=VARCHAR},
+      </if>
+      <if test="materialName != null">
+        MATERIAL_NAME = #{materialName,jdbcType=VARCHAR},
+      </if>
+      <if test="specNo != null">
+        SPEC_NO = #{specNo,jdbcType=VARCHAR},
+      </if>
+      <if test="specName != null">
+        SPEC_NAME = #{specName,jdbcType=VARCHAR},
+      </if>
+      <if test="shipmentGrossWeight != null">
+        SHIPMENT_GROSS_WEIGHT = #{shipmentGrossWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="shipmentNetWeight != null">
+        SHIPMENT_NET_WEIGHT = #{shipmentNetWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="shipmentNum != null">
+        SHIPMENT_NUM = #{shipmentNum,jdbcType=DECIMAL},
+      </if>
+      <if test="bindCardNo != null">
+        BIND_CARD_NO = #{bindCardNo,jdbcType=VARCHAR},
+      </if>
+      <if test="loadPointNo != null">
+        LOAD_POINT_NO = #{loadPointNo,jdbcType=VARCHAR},
+      </if>
+      <if test="loadPointName != null">
+        LOAD_POINT_NAME = #{loadPointName,jdbcType=VARCHAR},
+      </if>
+      <if test="sampleNo != null">
+        SAMPLE_NO = #{sampleNo,jdbcType=VARCHAR},
+      </if>
+      <if test="sampleVoucher != null">
+        SAMPLE_VOUCHER = #{sampleVoucher,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierUnitNo != null">
+        CARRIER_UNIT_NO = #{carrierUnitNo,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierUnitName != null">
+        CARRIER_UNIT_NAME = #{carrierUnitName,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionType != null">
+        PREDICTION_TYPE = #{predictionType,jdbcType=VARCHAR},
+      </if>
+      <if test="predictionCombination != null">
+        PREDICTION_COMBINATION = #{predictionCombination,jdbcType=VARCHAR},
+      </if>
+      <if test="meterTypeNo != null">
+        METER_TYPE_NO = #{meterTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterTypeName != null">
+        METER_TYPE_NAME = #{meterTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="meterProcessNo != null">
+        METER_PROCESS_NO = #{meterProcessNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterProcessEditionNo != null">
+        METER_PROCESS_EDITION_NO = #{meterProcessEditionNo,jdbcType=VARCHAR},
+      </if>
+      <if test="meterWeight != null">
+        METER_WEIGHT = #{meterWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="weightType != null">
+        WEIGHT_TYPE = #{weightType,jdbcType=VARCHAR},
+      </if>
+      <if test="meterSortWeight != null">
+        METER_SORT_WEIGHT = #{meterSortWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="meterBalanceWeight != null">
+        METER_BALANCE_WEIGHT = #{meterBalanceWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="createManNo != null">
+        CREATE_MAN_NO = #{createManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="createManName != null">
+        CREATE_MAN_NAME = #{createManName,jdbcType=VARCHAR},
+      </if>
+      <if test="createTime != null">
+        CREATE_TIME = #{createTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="baseSpotNo != null">
+        BASE_SPOT_NO = #{baseSpotNo,jdbcType=VARCHAR},
+      </if>
+      <if test="baseSpotName != null">
+        BASE_SPOT_NAME = #{baseSpotName,jdbcType=VARCHAR},
+      </if>
+      <if test="meterClass != null">
+        METER_CLASS = #{meterClass,jdbcType=VARCHAR},
+      </if>
+      <if test="meterGroup != null">
+        METER_GROUP = #{meterGroup,jdbcType=VARCHAR},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,jdbcType=VARCHAR},
+      </if>
+      <if test="valueFlag != null">
+        VALUE_FLAG = #{valueFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManNo != null">
+        UPDATE_MAN_NO = #{updateManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="updateManName != null">
+        UPDATE_MAN_NAME = #{updateManName,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="checkFlag != null">
+        CHECK_FLAG = #{checkFlag,jdbcType=VARCHAR},
+      </if>
+      <if test="checkManNo != null">
+        CHECK_MAN_NO = #{checkManNo,jdbcType=VARCHAR},
+      </if>
+      <if test="checkManName != null">
+        CHECK_MAN_NAME = #{checkManName,jdbcType=VARCHAR},
+      </if>
+      <if test="checkTime != null">
+        CHECK_TIME = #{checkTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="meterMode != null">
+        METER_MODE = #{meterMode,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeNo != null">
+        RAILWAY_TYPE_NO = #{railwayTypeNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayTypeName != null">
+        RAILWAY_TYPE_NAME = #{railwayTypeName,jdbcType=VARCHAR},
+      </if>
+      <if test="isChemical != null">
+        IS_CHEMICAL = #{isChemical,jdbcType=VARCHAR},
+      </if>
+      <if test="limitWeight != null">
+        LIMIT_WEIGHT = #{limitWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="railwayModelNo != null">
+        RAILWAY_MODEL_NO = #{railwayModelNo,jdbcType=VARCHAR},
+      </if>
+      <if test="railwayModelName != null">
+        RAILWAY_MODEL_NAME = #{railwayModelName,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <include refid="select" />
+    where ACTUAL_FIRST_NO = #{actualFirstNo,jdbcType=VARCHAR}
+  </select>
+  <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="where" />
+  </select>
+  <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
+    <include refid="select" />
+    <include refid="whereLike" />
+  </select>
+  <insert id="batchInsert" parameterType="java.util.List">
+    insert into METER_WORK_RAILWAY_RECEIVED 
+      (ACTUAL_FIRST_NO, 
+      PREDICTION_NO, NOTICE_NO, RAILWAY_NO, 
+      RAILWAY_CARRIAGE_NO, RAILWAY_WORK_NO, 
+      RAILWAY_SPEED, RAILWAY_MODEL, MATTER_NO, 
+      MATTER_NAME, CONTRACT_NO, BATCH_NO, 
+      CUSTOMER_SUPPLIER_NO, CUSTOMER_SUPPLIER_NAME, 
+      FORWARDING_UNIT_NO, FORWARDING_UNIT_NAME, 
+      RECEIVING_UINT_NO, RECEIVING_UINT_NAME, 
+      MATERIAL_NO, MATERIAL_NAME, SPEC_NO, 
+      SPEC_NAME, SHIPMENT_GROSS_WEIGHT, 
+      SHIPMENT_NET_WEIGHT, SHIPMENT_NUM, 
+      BIND_CARD_NO, LOAD_POINT_NO, LOAD_POINT_NAME, 
+      SAMPLE_NO, SAMPLE_VOUCHER, CARRIER_UNIT_NO, 
+      CARRIER_UNIT_NAME, PREDICTION_TYPE, 
+      PREDICTION_COMBINATION, METER_TYPE_NO, 
+      METER_TYPE_NAME, METER_PROCESS_NO, 
+      METER_PROCESS_EDITION_NO, METER_WEIGHT, 
+      WEIGHT_TYPE, METER_SORT_WEIGHT, 
+      METER_BALANCE_WEIGHT, CREATE_MAN_NO, 
+      CREATE_MAN_NAME, CREATE_TIME, 
+      BASE_SPOT_NO, BASE_SPOT_NAME, METER_CLASS, 
+      METER_GROUP, MEMO, VALUE_FLAG, 
+      UPDATE_MAN_NO, UPDATE_MAN_NAME, UPDATE_TIME, 
+      CHECK_FLAG, CHECK_MAN_NO, CHECK_MAN_NAME, 
+      CHECK_TIME, METER_MODE, RAILWAY_TYPE_NO, 
+      RAILWAY_TYPE_NAME, IS_CHEMICAL, 
+      LIMIT_WEIGHT, RAILWAY_MODEL_NO, 
+      RAILWAY_MODEL_NAME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.actualFirstNo,jdbcType=VARCHAR}, 
+      #{item.predictionNo,jdbcType=VARCHAR}, #{item.noticeNo,jdbcType=VARCHAR}, #{item.railwayNo,jdbcType=VARCHAR}, 
+      #{item.railwayCarriageNo,jdbcType=VARCHAR}, #{item.railwayWorkNo,jdbcType=VARCHAR}, 
+      #{item.railwaySpeed,jdbcType=DECIMAL}, #{item.railwayModel,jdbcType=VARCHAR}, #{item.matterNo,jdbcType=VARCHAR}, 
+      #{item.matterName,jdbcType=VARCHAR}, #{item.contractNo,jdbcType=VARCHAR}, #{item.batchNo,jdbcType=VARCHAR}, 
+      #{item.customerSupplierNo,jdbcType=VARCHAR}, #{item.customerSupplierName,jdbcType=VARCHAR}, 
+      #{item.forwardingUnitNo,jdbcType=VARCHAR}, #{item.forwardingUnitName,jdbcType=VARCHAR}, 
+      #{item.receivingUintNo,jdbcType=VARCHAR}, #{item.receivingUintName,jdbcType=VARCHAR}, 
+      #{item.materialNo,jdbcType=VARCHAR}, #{item.materialName,jdbcType=VARCHAR}, #{item.specNo,jdbcType=VARCHAR}, 
+      #{item.specName,jdbcType=VARCHAR}, #{item.shipmentGrossWeight,jdbcType=DECIMAL}, 
+      #{item.shipmentNetWeight,jdbcType=DECIMAL}, #{item.shipmentNum,jdbcType=DECIMAL}, 
+      #{item.bindCardNo,jdbcType=VARCHAR}, #{item.loadPointNo,jdbcType=VARCHAR}, #{item.loadPointName,jdbcType=VARCHAR}, 
+      #{item.sampleNo,jdbcType=VARCHAR}, #{item.sampleVoucher,jdbcType=VARCHAR}, #{item.carrierUnitNo,jdbcType=VARCHAR}, 
+      #{item.carrierUnitName,jdbcType=VARCHAR}, #{item.predictionType,jdbcType=VARCHAR}, 
+      #{item.predictionCombination,jdbcType=VARCHAR}, #{item.meterTypeNo,jdbcType=VARCHAR}, 
+      #{item.meterTypeName,jdbcType=VARCHAR}, #{item.meterProcessNo,jdbcType=VARCHAR}, 
+      #{item.meterProcessEditionNo,jdbcType=VARCHAR}, #{item.meterWeight,jdbcType=DECIMAL}, 
+      #{item.weightType,jdbcType=VARCHAR}, #{item.meterSortWeight,jdbcType=DECIMAL}, 
+      #{item.meterBalanceWeight,jdbcType=DECIMAL}, #{item.createManNo,jdbcType=VARCHAR}, 
+      #{item.createManName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, 
+      #{item.baseSpotNo,jdbcType=VARCHAR}, #{item.baseSpotName,jdbcType=VARCHAR}, #{item.meterClass,jdbcType=VARCHAR}, 
+      #{item.meterGroup,jdbcType=VARCHAR}, #{item.memo,jdbcType=VARCHAR}, #{item.valueFlag,jdbcType=VARCHAR}, 
+      #{item.updateManNo,jdbcType=VARCHAR}, #{item.updateManName,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.checkFlag,jdbcType=VARCHAR}, #{item.checkManNo,jdbcType=VARCHAR}, #{item.checkManName,jdbcType=VARCHAR}, 
+      #{item.checkTime,jdbcType=TIMESTAMP}, #{item.meterMode,jdbcType=VARCHAR}, #{item.railwayTypeNo,jdbcType=VARCHAR}, 
+      #{item.railwayTypeName,jdbcType=VARCHAR}, #{item.isChemical,jdbcType=VARCHAR}, 
+      #{item.limitWeight,jdbcType=DECIMAL}, #{item.railwayModelNo,jdbcType=VARCHAR}, 
+      #{item.railwayModelName,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update METER_WORK_RAILWAY_RECEIVED
+     set
+       ACTUAL_FIRST_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.actualFirstNo,jdbcType=VARCHAR}
+       </foreach>
+       ,PREDICTION_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.predictionNo,jdbcType=VARCHAR}
+       </foreach>
+       ,NOTICE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.noticeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_CARRIAGE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayCarriageNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_WORK_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayWorkNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_SPEED=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwaySpeed,jdbcType=DECIMAL}
+       </foreach>
+       ,RAILWAY_MODEL=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayModel,jdbcType=VARCHAR}
+       </foreach>
+       ,MATTER_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.matterNo,jdbcType=VARCHAR}
+       </foreach>
+       ,MATTER_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.matterName,jdbcType=VARCHAR}
+       </foreach>
+       ,CONTRACT_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.contractNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BATCH_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.batchNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CUSTOMER_SUPPLIER_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.customerSupplierNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CUSTOMER_SUPPLIER_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.customerSupplierName,jdbcType=VARCHAR}
+       </foreach>
+       ,FORWARDING_UNIT_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.forwardingUnitNo,jdbcType=VARCHAR}
+       </foreach>
+       ,FORWARDING_UNIT_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.forwardingUnitName,jdbcType=VARCHAR}
+       </foreach>
+       ,RECEIVING_UINT_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.receivingUintNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RECEIVING_UINT_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.receivingUintName,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIAL_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.materialNo,jdbcType=VARCHAR}
+       </foreach>
+       ,MATERIAL_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.materialName,jdbcType=VARCHAR}
+       </foreach>
+       ,SPEC_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.specNo,jdbcType=VARCHAR}
+       </foreach>
+       ,SPEC_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.specName,jdbcType=VARCHAR}
+       </foreach>
+       ,SHIPMENT_GROSS_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.shipmentGrossWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,SHIPMENT_NET_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.shipmentNetWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,SHIPMENT_NUM=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.shipmentNum,jdbcType=DECIMAL}
+       </foreach>
+       ,BIND_CARD_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.bindCardNo,jdbcType=VARCHAR}
+       </foreach>
+       ,LOAD_POINT_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.loadPointNo,jdbcType=VARCHAR}
+       </foreach>
+       ,LOAD_POINT_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.loadPointName,jdbcType=VARCHAR}
+       </foreach>
+       ,SAMPLE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.sampleNo,jdbcType=VARCHAR}
+       </foreach>
+       ,SAMPLE_VOUCHER=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.sampleVoucher,jdbcType=VARCHAR}
+       </foreach>
+       ,CARRIER_UNIT_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.carrierUnitNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CARRIER_UNIT_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.carrierUnitName,jdbcType=VARCHAR}
+       </foreach>
+       ,PREDICTION_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.predictionType,jdbcType=VARCHAR}
+       </foreach>
+       ,PREDICTION_COMBINATION=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.predictionCombination,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_TYPE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterTypeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_TYPE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterTypeName,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_PROCESS_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterProcessNo,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_PROCESS_EDITION_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterProcessEditionNo,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,WEIGHT_TYPE=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.weightType,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_SORT_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterSortWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,METER_BALANCE_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterBalanceWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,CREATE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CREATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.createTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,BASE_SPOT_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.baseSpotNo,jdbcType=VARCHAR}
+       </foreach>
+       ,BASE_SPOT_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.baseSpotName,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_CLASS=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterClass,jdbcType=VARCHAR}
+       </foreach>
+       ,METER_GROUP=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterGroup,jdbcType=VARCHAR}
+       </foreach>
+       ,MEMO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,VALUE_FLAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.valueFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateManName,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,CHECK_FLAG=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkFlag,jdbcType=VARCHAR}
+       </foreach>
+       ,CHECK_MAN_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkManNo,jdbcType=VARCHAR}
+       </foreach>
+       ,CHECK_MAN_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkManName,jdbcType=VARCHAR}
+       </foreach>
+       ,CHECK_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.checkTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,METER_MODE=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.meterMode,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_TYPE_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_TYPE_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayTypeName,jdbcType=VARCHAR}
+       </foreach>
+       ,IS_CHEMICAL=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.isChemical,jdbcType=VARCHAR}
+       </foreach>
+       ,LIMIT_WEIGHT=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.limitWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,RAILWAY_MODEL_NO=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayModelNo,jdbcType=VARCHAR}
+       </foreach>
+       ,RAILWAY_MODEL_NAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case ACTUAL_FIRST_NO" separator=" ">
+          when #{item.actualFirstNo,jdbcType=VARCHAR} then #{item.railwayModelName,jdbcType=VARCHAR}
+       </foreach>
+     where ACTUAL_FIRST_NO in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.actualFirstNo,jdbcType=VARCHAR}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from METER_WORK_RAILWAY_RECEIVED
+    where ACTUAL_FIRST_NO in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(ACTUAL_FIRST_NO, LENGTH(ACTUAL_FIRST_NO) - 3))),0) + 1,4,'0') ACTUAL_FIRST_NO
+    FROM METER_WORK_RAILWAY_RECEIVED where instr(ACTUAL_FIRST_NO,#{afl,jdbcType=VARCHAR})>0
+  </select>
+</mapper>

+ 1008 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/model/MeterWorkRailwayReceived.java

@@ -0,0 +1,1008 @@
+package com.steerinfo.meterwork.meterworkrailwayreceived.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@ApiModel(value="计量动态轨道衡接收实绩表")
+public class MeterWorkRailwayReceived implements IBasePO<String> {
+    /**
+     * 计量作业编号(ACTUAL_FIRST_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量作业编号",required=true)
+    private String actualFirstNo;
+
+    /**
+     * 预报编号(PREDICTION_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="预报编号",required=false)
+    private String predictionNo;
+
+    /**
+     * 通知单号(NOTICE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="通知单号",required=false)
+    private String noticeNo;
+
+    /**
+     * 火车车号(RAILWAY_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="火车车号",required=false)
+    private String railwayNo;
+
+    /**
+     * 车厢序号(RAILWAY_CARRIAGE_NO,VARCHAR,2)
+     */
+    @ApiModelProperty(value="车厢序号",required=false)
+    private String railwayCarriageNo;
+
+    /**
+     * 列车作业编号(RAILWAY_WORK_NO,VARCHAR,40)
+     */
+    @ApiModelProperty(value="列车作业编号",required=false)
+    private String railwayWorkNo;
+
+    /**
+     * 车速(RAILWAY_SPEED,DECIMAL,10)
+     */
+    @ApiModelProperty(value="车速",required=false)
+    private BigDecimal railwaySpeed;
+
+    /**
+     * 车型(RAILWAY_MODEL,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车型",required=false)
+    private String railwayModel;
+
+    /**
+     * 物料编号(MATTER_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="物料编号",required=false)
+    private String matterNo;
+
+    /**
+     * 物料名称(MATTER_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="物料名称",required=false)
+    private String matterName;
+
+    /**
+     * 合同号(CONTRACT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="合同号",required=false)
+    private String contractNo;
+
+    /**
+     * 批次号(BATCH_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="批次号",required=false)
+    private String batchNo;
+
+    /**
+     * 供应商编号(CUSTOMER_SUPPLIER_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="供应商编号",required=false)
+    private String customerSupplierNo;
+
+    /**
+     * 供应商名称(CUSTOMER_SUPPLIER_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="供应商名称",required=false)
+    private String customerSupplierName;
+
+    /**
+     * 发货单位编号(FORWARDING_UNIT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="发货单位编号",required=false)
+    private String forwardingUnitNo;
+
+    /**
+     * 发货单位名称(FORWARDING_UNIT_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="发货单位名称",required=false)
+    private String forwardingUnitName;
+
+    /**
+     * 收货单位编号(RECEIVING_UINT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="收货单位编号",required=false)
+    private String receivingUintNo;
+
+    /**
+     * 收货单位名称(RECEIVING_UINT_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="收货单位名称",required=false)
+    private String receivingUintName;
+
+    /**
+     * 材质编号(MATERIAL_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="材质编号",required=false)
+    private String materialNo;
+
+    /**
+     * 材质名称(MATERIAL_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="材质名称",required=false)
+    private String materialName;
+
+    /**
+     * 规格编号(SPEC_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="规格编号",required=false)
+    private String specNo;
+
+    /**
+     * 规格名称(SPEC_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="规格名称",required=false)
+    private String specName;
+
+    /**
+     * 发运毛重(SHIPMENT_GROSS_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="发运毛重",required=false)
+    private BigDecimal shipmentGrossWeight;
+
+    /**
+     * 发运净重(SHIPMENT_NET_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="发运净重",required=false)
+    private BigDecimal shipmentNetWeight;
+
+    /**
+     * 发运数量(SHIPMENT_NUM,DECIMAL,5)
+     */
+    @ApiModelProperty(value="发运数量",required=false)
+    private Integer shipmentNum;
+
+    /**
+     * 绑定卡号(BIND_CARD_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="绑定卡号",required=false)
+    private String bindCardNo;
+
+    /**
+     * 卸货地点编号(LOAD_POINT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="卸货地点编号",required=false)
+    private String loadPointNo;
+
+    /**
+     * 卸货地点名称(LOAD_POINT_NAME,VARCHAR,60)
+     */
+    @ApiModelProperty(value="卸货地点名称",required=false)
+    private String loadPointName;
+
+    /**
+     * 取样编号(SAMPLE_NO,VARCHAR,40)
+     */
+    @ApiModelProperty(value="取样编号",required=false)
+    private String sampleNo;
+
+    /**
+     * 取样凭证(SAMPLE_VOUCHER,VARCHAR,40)
+     */
+    @ApiModelProperty(value="取样凭证",required=false)
+    private String sampleVoucher;
+
+    /**
+     * 承运单位编号(CARRIER_UNIT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="承运单位编号",required=false)
+    private String carrierUnitNo;
+
+    /**
+     * 承运单位名称(CARRIER_UNIT_NAME,VARCHAR,100)
+     */
+    @ApiModelProperty(value="承运单位名称",required=false)
+    private String carrierUnitName;
+
+    /**
+     * 预报类型(PREDICTION_TYPE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="预报类型",required=false)
+    private String predictionType;
+
+    /**
+     * 预报组合(PREDICTION_COMBINATION,VARCHAR,100)
+     */
+    @ApiModelProperty(value="预报组合",required=false)
+    private String predictionCombination;
+
+    /**
+     * 计量类型编号(METER_TYPE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量类型编号",required=false)
+    private String meterTypeNo;
+
+    /**
+     * 计量类型名称(METER_TYPE_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="计量类型名称",required=false)
+    private String meterTypeName;
+
+    /**
+     * 计量流程编号(METER_PROCESS_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量流程编号",required=false)
+    private String meterProcessNo;
+
+    /**
+     * 计量流程版本号(METER_PROCESS_EDITION_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量流程版本号",required=false)
+    private String meterProcessEditionNo;
+
+    /**
+     * 计量重量(METER_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="计量重量",required=false)
+    private BigDecimal meterWeight;
+
+    /**
+     * 重量类型(WEIGHT_TYPE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="重量类型",required=false)
+    private String weightType;
+
+    /**
+     * 分检重量(METER_SORT_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="分检重量",required=false)
+    private BigDecimal meterSortWeight;
+
+    /**
+     * 结算重量(METER_BALANCE_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="结算重量",required=false)
+    private BigDecimal meterBalanceWeight;
+
+    /**
+     * 计量员编号(CREATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量员编号",required=false)
+    private String createManNo;
+
+    /**
+     * 计量员姓名(CREATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="计量员姓名",required=false)
+    private String createManName;
+
+    /**
+     * 计量时间(CREATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="计量时间",required=false)
+    private Date createTime;
+
+    /**
+     * 计量点编号(BASE_SPOT_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="计量点编号",required=false)
+    private String baseSpotNo;
+
+    /**
+     * 计量点名称(BASE_SPOT_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="计量点名称",required=false)
+    private String baseSpotName;
+
+    /**
+     * 班次(METER_CLASS,VARCHAR,20)
+     */
+    @ApiModelProperty(value="班次",required=false)
+    private String meterClass;
+
+    /**
+     * 班组(METER_GROUP,VARCHAR,20)
+     */
+    @ApiModelProperty(value="班组",required=false)
+    private String meterGroup;
+
+    /**
+     * 备注(MEMO,VARCHAR,200)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 状态 0作废,1未使用,2已使用(VALUE_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="状态 0作废,1未使用,2已使用",required=false)
+    private String valueFlag;
+
+    /**
+     * 修改人编号(UPDATE_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="修改人编号",required=false)
+    private String updateManNo;
+
+    /**
+     * 修改人姓名(UPDATE_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="修改人姓名",required=false)
+    private String updateManName;
+
+    /**
+     * 修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 审核状态(CHECK_FLAG,VARCHAR,1)
+     */
+    @ApiModelProperty(value="审核状态",required=false)
+    private String checkFlag;
+
+    /**
+     * 审核人编号(CHECK_MAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="审核人编号",required=false)
+    private String checkManNo;
+
+    /**
+     * 审核人姓名(CHECK_MAN_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="审核人姓名",required=false)
+    private String checkManName;
+
+    /**
+     * 审核时间(CHECK_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="审核时间",required=false)
+    private Date checkTime;
+
+    /**
+     * 计量方式(METER_MODE,VARCHAR,1)
+     */
+    @ApiModelProperty(value="计量方式",required=false)
+    private String meterMode;
+
+    /**
+     * 轨道衡类型编号(RAILWAY_TYPE_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="轨道衡类型编号",required=false)
+    private String railwayTypeNo;
+
+    /**
+     * 轨道衡类型名称(RAILWAY_TYPE_NAME,VARCHAR,30)
+     */
+    @ApiModelProperty(value="轨道衡类型名称",required=false)
+    private String railwayTypeName;
+
+    /**
+     * 是否危化品(IS_CHEMICAL,VARCHAR,1)
+     */
+    @ApiModelProperty(value="是否危化品",required=false)
+    private String isChemical;
+
+    /**
+     * 限载重量(LIMIT_WEIGHT,DECIMAL,10)
+     */
+    @ApiModelProperty(value="限载重量",required=false)
+    private BigDecimal limitWeight;
+
+    /**
+     * 车型编号(RAILWAY_MODEL_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车型编号",required=false)
+    private String railwayModelNo;
+
+    /**
+     * 车型名称(RAILWAY_MODEL_NAME,VARCHAR,40)
+     */
+    @ApiModelProperty(value="车型名称",required=false)
+    private String railwayModelName;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public String getId() {
+        return this.actualFirstNo;
+    }
+
+    @Override
+    public void setId(String actualFirstNo) {
+        this.actualFirstNo = actualFirstNo == null ? null : actualFirstNo.trim();
+    }
+
+    public String getActualFirstNo() {
+        return actualFirstNo;
+    }
+
+    public void setActualFirstNo(String actualFirstNo) {
+        this.actualFirstNo = actualFirstNo == null ? null : actualFirstNo.trim();
+    }
+
+    public String getPredictionNo() {
+        return predictionNo;
+    }
+
+    public void setPredictionNo(String predictionNo) {
+        this.predictionNo = predictionNo == null ? null : predictionNo.trim();
+    }
+
+    public String getNoticeNo() {
+        return noticeNo;
+    }
+
+    public void setNoticeNo(String noticeNo) {
+        this.noticeNo = noticeNo == null ? null : noticeNo.trim();
+    }
+
+    public String getRailwayNo() {
+        return railwayNo;
+    }
+
+    public void setRailwayNo(String railwayNo) {
+        this.railwayNo = railwayNo == null ? null : railwayNo.trim();
+    }
+
+    public String getRailwayCarriageNo() {
+        return railwayCarriageNo;
+    }
+
+    public void setRailwayCarriageNo(String railwayCarriageNo) {
+        this.railwayCarriageNo = railwayCarriageNo == null ? null : railwayCarriageNo.trim();
+    }
+
+    public String getRailwayWorkNo() {
+        return railwayWorkNo;
+    }
+
+    public void setRailwayWorkNo(String railwayWorkNo) {
+        this.railwayWorkNo = railwayWorkNo == null ? null : railwayWorkNo.trim();
+    }
+
+    public BigDecimal getRailwaySpeed() {
+        return railwaySpeed;
+    }
+
+    public void setRailwaySpeed(BigDecimal railwaySpeed) {
+        this.railwaySpeed = railwaySpeed;
+    }
+
+    public String getRailwayModel() {
+        return railwayModel;
+    }
+
+    public void setRailwayModel(String railwayModel) {
+        this.railwayModel = railwayModel == null ? null : railwayModel.trim();
+    }
+
+    public String getMatterNo() {
+        return matterNo;
+    }
+
+    public void setMatterNo(String matterNo) {
+        this.matterNo = matterNo == null ? null : matterNo.trim();
+    }
+
+    public String getMatterName() {
+        return matterName;
+    }
+
+    public void setMatterName(String matterName) {
+        this.matterName = matterName == null ? null : matterName.trim();
+    }
+
+    public String getContractNo() {
+        return contractNo;
+    }
+
+    public void setContractNo(String contractNo) {
+        this.contractNo = contractNo == null ? null : contractNo.trim();
+    }
+
+    public String getBatchNo() {
+        return batchNo;
+    }
+
+    public void setBatchNo(String batchNo) {
+        this.batchNo = batchNo == null ? null : batchNo.trim();
+    }
+
+    public String getCustomerSupplierNo() {
+        return customerSupplierNo;
+    }
+
+    public void setCustomerSupplierNo(String customerSupplierNo) {
+        this.customerSupplierNo = customerSupplierNo == null ? null : customerSupplierNo.trim();
+    }
+
+    public String getCustomerSupplierName() {
+        return customerSupplierName;
+    }
+
+    public void setCustomerSupplierName(String customerSupplierName) {
+        this.customerSupplierName = customerSupplierName == null ? null : customerSupplierName.trim();
+    }
+
+    public String getForwardingUnitNo() {
+        return forwardingUnitNo;
+    }
+
+    public void setForwardingUnitNo(String forwardingUnitNo) {
+        this.forwardingUnitNo = forwardingUnitNo == null ? null : forwardingUnitNo.trim();
+    }
+
+    public String getForwardingUnitName() {
+        return forwardingUnitName;
+    }
+
+    public void setForwardingUnitName(String forwardingUnitName) {
+        this.forwardingUnitName = forwardingUnitName == null ? null : forwardingUnitName.trim();
+    }
+
+    public String getReceivingUintNo() {
+        return receivingUintNo;
+    }
+
+    public void setReceivingUintNo(String receivingUintNo) {
+        this.receivingUintNo = receivingUintNo == null ? null : receivingUintNo.trim();
+    }
+
+    public String getReceivingUintName() {
+        return receivingUintName;
+    }
+
+    public void setReceivingUintName(String receivingUintName) {
+        this.receivingUintName = receivingUintName == null ? null : receivingUintName.trim();
+    }
+
+    public String getMaterialNo() {
+        return materialNo;
+    }
+
+    public void setMaterialNo(String materialNo) {
+        this.materialNo = materialNo == null ? null : materialNo.trim();
+    }
+
+    public String getMaterialName() {
+        return materialName;
+    }
+
+    public void setMaterialName(String materialName) {
+        this.materialName = materialName == null ? null : materialName.trim();
+    }
+
+    public String getSpecNo() {
+        return specNo;
+    }
+
+    public void setSpecNo(String specNo) {
+        this.specNo = specNo == null ? null : specNo.trim();
+    }
+
+    public String getSpecName() {
+        return specName;
+    }
+
+    public void setSpecName(String specName) {
+        this.specName = specName == null ? null : specName.trim();
+    }
+
+    public BigDecimal getShipmentGrossWeight() {
+        return shipmentGrossWeight;
+    }
+
+    public void setShipmentGrossWeight(BigDecimal shipmentGrossWeight) {
+        this.shipmentGrossWeight = shipmentGrossWeight;
+    }
+
+    public BigDecimal getShipmentNetWeight() {
+        return shipmentNetWeight;
+    }
+
+    public void setShipmentNetWeight(BigDecimal shipmentNetWeight) {
+        this.shipmentNetWeight = shipmentNetWeight;
+    }
+
+    public Integer getShipmentNum() {
+        return shipmentNum;
+    }
+
+    public void setShipmentNum(Integer shipmentNum) {
+        this.shipmentNum = shipmentNum;
+    }
+
+    public String getBindCardNo() {
+        return bindCardNo;
+    }
+
+    public void setBindCardNo(String bindCardNo) {
+        this.bindCardNo = bindCardNo == null ? null : bindCardNo.trim();
+    }
+
+    public String getLoadPointNo() {
+        return loadPointNo;
+    }
+
+    public void setLoadPointNo(String loadPointNo) {
+        this.loadPointNo = loadPointNo == null ? null : loadPointNo.trim();
+    }
+
+    public String getLoadPointName() {
+        return loadPointName;
+    }
+
+    public void setLoadPointName(String loadPointName) {
+        this.loadPointName = loadPointName == null ? null : loadPointName.trim();
+    }
+
+    public String getSampleNo() {
+        return sampleNo;
+    }
+
+    public void setSampleNo(String sampleNo) {
+        this.sampleNo = sampleNo == null ? null : sampleNo.trim();
+    }
+
+    public String getSampleVoucher() {
+        return sampleVoucher;
+    }
+
+    public void setSampleVoucher(String sampleVoucher) {
+        this.sampleVoucher = sampleVoucher == null ? null : sampleVoucher.trim();
+    }
+
+    public String getCarrierUnitNo() {
+        return carrierUnitNo;
+    }
+
+    public void setCarrierUnitNo(String carrierUnitNo) {
+        this.carrierUnitNo = carrierUnitNo == null ? null : carrierUnitNo.trim();
+    }
+
+    public String getCarrierUnitName() {
+        return carrierUnitName;
+    }
+
+    public void setCarrierUnitName(String carrierUnitName) {
+        this.carrierUnitName = carrierUnitName == null ? null : carrierUnitName.trim();
+    }
+
+    public String getPredictionType() {
+        return predictionType;
+    }
+
+    public void setPredictionType(String predictionType) {
+        this.predictionType = predictionType == null ? null : predictionType.trim();
+    }
+
+    public String getPredictionCombination() {
+        return predictionCombination;
+    }
+
+    public void setPredictionCombination(String predictionCombination) {
+        this.predictionCombination = predictionCombination == null ? null : predictionCombination.trim();
+    }
+
+    public String getMeterTypeNo() {
+        return meterTypeNo;
+    }
+
+    public void setMeterTypeNo(String meterTypeNo) {
+        this.meterTypeNo = meterTypeNo == null ? null : meterTypeNo.trim();
+    }
+
+    public String getMeterTypeName() {
+        return meterTypeName;
+    }
+
+    public void setMeterTypeName(String meterTypeName) {
+        this.meterTypeName = meterTypeName == null ? null : meterTypeName.trim();
+    }
+
+    public String getMeterProcessNo() {
+        return meterProcessNo;
+    }
+
+    public void setMeterProcessNo(String meterProcessNo) {
+        this.meterProcessNo = meterProcessNo == null ? null : meterProcessNo.trim();
+    }
+
+    public String getMeterProcessEditionNo() {
+        return meterProcessEditionNo;
+    }
+
+    public void setMeterProcessEditionNo(String meterProcessEditionNo) {
+        this.meterProcessEditionNo = meterProcessEditionNo == null ? null : meterProcessEditionNo.trim();
+    }
+
+    public BigDecimal getMeterWeight() {
+        return meterWeight;
+    }
+
+    public void setMeterWeight(BigDecimal meterWeight) {
+        this.meterWeight = meterWeight;
+    }
+
+    public String getWeightType() {
+        return weightType;
+    }
+
+    public void setWeightType(String weightType) {
+        this.weightType = weightType == null ? null : weightType.trim();
+    }
+
+    public BigDecimal getMeterSortWeight() {
+        return meterSortWeight;
+    }
+
+    public void setMeterSortWeight(BigDecimal meterSortWeight) {
+        this.meterSortWeight = meterSortWeight;
+    }
+
+    public BigDecimal getMeterBalanceWeight() {
+        return meterBalanceWeight;
+    }
+
+    public void setMeterBalanceWeight(BigDecimal meterBalanceWeight) {
+        this.meterBalanceWeight = meterBalanceWeight;
+    }
+
+    public String getCreateManNo() {
+        return createManNo;
+    }
+
+    public void setCreateManNo(String createManNo) {
+        this.createManNo = createManNo == null ? null : createManNo.trim();
+    }
+
+    public String getCreateManName() {
+        return createManName;
+    }
+
+    public void setCreateManName(String createManName) {
+        this.createManName = createManName == null ? null : createManName.trim();
+    }
+
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public String getBaseSpotNo() {
+        return baseSpotNo;
+    }
+
+    public void setBaseSpotNo(String baseSpotNo) {
+        this.baseSpotNo = baseSpotNo == null ? null : baseSpotNo.trim();
+    }
+
+    public String getBaseSpotName() {
+        return baseSpotName;
+    }
+
+    public void setBaseSpotName(String baseSpotName) {
+        this.baseSpotName = baseSpotName == null ? null : baseSpotName.trim();
+    }
+
+    public String getMeterClass() {
+        return meterClass;
+    }
+
+    public void setMeterClass(String meterClass) {
+        this.meterClass = meterClass == null ? null : meterClass.trim();
+    }
+
+    public String getMeterGroup() {
+        return meterGroup;
+    }
+
+    public void setMeterGroup(String meterGroup) {
+        this.meterGroup = meterGroup == null ? null : meterGroup.trim();
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.trim();
+    }
+
+    public String getValueFlag() {
+        return valueFlag;
+    }
+
+    public void setValueFlag(String valueFlag) {
+        this.valueFlag = valueFlag == null ? null : valueFlag.trim();
+    }
+
+    public String getUpdateManNo() {
+        return updateManNo;
+    }
+
+    public void setUpdateManNo(String updateManNo) {
+        this.updateManNo = updateManNo == null ? null : updateManNo.trim();
+    }
+
+    public String getUpdateManName() {
+        return updateManName;
+    }
+
+    public void setUpdateManName(String updateManName) {
+        this.updateManName = updateManName == null ? null : updateManName.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getCheckFlag() {
+        return checkFlag;
+    }
+
+    public void setCheckFlag(String checkFlag) {
+        this.checkFlag = checkFlag == null ? null : checkFlag.trim();
+    }
+
+    public String getCheckManNo() {
+        return checkManNo;
+    }
+
+    public void setCheckManNo(String checkManNo) {
+        this.checkManNo = checkManNo == null ? null : checkManNo.trim();
+    }
+
+    public String getCheckManName() {
+        return checkManName;
+    }
+
+    public void setCheckManName(String checkManName) {
+        this.checkManName = checkManName == null ? null : checkManName.trim();
+    }
+
+    public Date getCheckTime() {
+        return checkTime;
+    }
+
+    public void setCheckTime(Date checkTime) {
+        this.checkTime = checkTime;
+    }
+
+    public String getMeterMode() {
+        return meterMode;
+    }
+
+    public void setMeterMode(String meterMode) {
+        this.meterMode = meterMode == null ? null : meterMode.trim();
+    }
+
+    public String getRailwayTypeNo() {
+        return railwayTypeNo;
+    }
+
+    public void setRailwayTypeNo(String railwayTypeNo) {
+        this.railwayTypeNo = railwayTypeNo == null ? null : railwayTypeNo.trim();
+    }
+
+    public String getRailwayTypeName() {
+        return railwayTypeName;
+    }
+
+    public void setRailwayTypeName(String railwayTypeName) {
+        this.railwayTypeName = railwayTypeName == null ? null : railwayTypeName.trim();
+    }
+
+    public String getIsChemical() {
+        return isChemical;
+    }
+
+    public void setIsChemical(String isChemical) {
+        this.isChemical = isChemical == null ? null : isChemical.trim();
+    }
+
+    public BigDecimal getLimitWeight() {
+        return limitWeight;
+    }
+
+    public void setLimitWeight(BigDecimal limitWeight) {
+        this.limitWeight = limitWeight;
+    }
+
+    public String getRailwayModelNo() {
+        return railwayModelNo;
+    }
+
+    public void setRailwayModelNo(String railwayModelNo) {
+        this.railwayModelNo = railwayModelNo == null ? null : railwayModelNo.trim();
+    }
+
+    public String getRailwayModelName() {
+        return railwayModelName;
+    }
+
+    public void setRailwayModelName(String railwayModelName) {
+        this.railwayModelName = railwayModelName == null ? null : railwayModelName.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", actualFirstNo=").append(actualFirstNo);
+        sb.append(", predictionNo=").append(predictionNo);
+        sb.append(", noticeNo=").append(noticeNo);
+        sb.append(", railwayNo=").append(railwayNo);
+        sb.append(", railwayCarriageNo=").append(railwayCarriageNo);
+        sb.append(", railwayWorkNo=").append(railwayWorkNo);
+        sb.append(", railwaySpeed=").append(railwaySpeed);
+        sb.append(", railwayModel=").append(railwayModel);
+        sb.append(", matterNo=").append(matterNo);
+        sb.append(", matterName=").append(matterName);
+        sb.append(", contractNo=").append(contractNo);
+        sb.append(", batchNo=").append(batchNo);
+        sb.append(", customerSupplierNo=").append(customerSupplierNo);
+        sb.append(", customerSupplierName=").append(customerSupplierName);
+        sb.append(", forwardingUnitNo=").append(forwardingUnitNo);
+        sb.append(", forwardingUnitName=").append(forwardingUnitName);
+        sb.append(", receivingUintNo=").append(receivingUintNo);
+        sb.append(", receivingUintName=").append(receivingUintName);
+        sb.append(", materialNo=").append(materialNo);
+        sb.append(", materialName=").append(materialName);
+        sb.append(", specNo=").append(specNo);
+        sb.append(", specName=").append(specName);
+        sb.append(", shipmentGrossWeight=").append(shipmentGrossWeight);
+        sb.append(", shipmentNetWeight=").append(shipmentNetWeight);
+        sb.append(", shipmentNum=").append(shipmentNum);
+        sb.append(", bindCardNo=").append(bindCardNo);
+        sb.append(", loadPointNo=").append(loadPointNo);
+        sb.append(", loadPointName=").append(loadPointName);
+        sb.append(", sampleNo=").append(sampleNo);
+        sb.append(", sampleVoucher=").append(sampleVoucher);
+        sb.append(", carrierUnitNo=").append(carrierUnitNo);
+        sb.append(", carrierUnitName=").append(carrierUnitName);
+        sb.append(", predictionType=").append(predictionType);
+        sb.append(", predictionCombination=").append(predictionCombination);
+        sb.append(", meterTypeNo=").append(meterTypeNo);
+        sb.append(", meterTypeName=").append(meterTypeName);
+        sb.append(", meterProcessNo=").append(meterProcessNo);
+        sb.append(", meterProcessEditionNo=").append(meterProcessEditionNo);
+        sb.append(", meterWeight=").append(meterWeight);
+        sb.append(", weightType=").append(weightType);
+        sb.append(", meterSortWeight=").append(meterSortWeight);
+        sb.append(", meterBalanceWeight=").append(meterBalanceWeight);
+        sb.append(", createManNo=").append(createManNo);
+        sb.append(", createManName=").append(createManName);
+        sb.append(", createTime=").append(createTime);
+        sb.append(", baseSpotNo=").append(baseSpotNo);
+        sb.append(", baseSpotName=").append(baseSpotName);
+        sb.append(", meterClass=").append(meterClass);
+        sb.append(", meterGroup=").append(meterGroup);
+        sb.append(", memo=").append(memo);
+        sb.append(", valueFlag=").append(valueFlag);
+        sb.append(", updateManNo=").append(updateManNo);
+        sb.append(", updateManName=").append(updateManName);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", checkFlag=").append(checkFlag);
+        sb.append(", checkManNo=").append(checkManNo);
+        sb.append(", checkManName=").append(checkManName);
+        sb.append(", checkTime=").append(checkTime);
+        sb.append(", meterMode=").append(meterMode);
+        sb.append(", railwayTypeNo=").append(railwayTypeNo);
+        sb.append(", railwayTypeName=").append(railwayTypeName);
+        sb.append(", isChemical=").append(isChemical);
+        sb.append(", limitWeight=").append(limitWeight);
+        sb.append(", railwayModelNo=").append(railwayModelNo);
+        sb.append(", railwayModelName=").append(railwayModelName);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 26 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayreceived/service/IMeterWorkRailwayReceivedService.java

@@ -0,0 +1,26 @@
+package com.steerinfo.meterwork.meterworkrailwayreceived.service;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.metermonitor.metermonitornote.model.MeterMonitorNote;
+import com.steerinfo.meterwork.meterworkcaractualfirst.model.MeterWorkCarActualFirst;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * MeterWorkRailwayReceived服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-22 09:00
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-22
+ * 作者:generator
+ * 参考:
+ * 描述:MeterWorkRailwayReceived服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IMeterWorkRailwayReceivedService extends IBaseService<MeterWorkRailwayReceived, String>{
+    RESTfulResult checkandadd(MeterWorkRailwayReceived model)  throws Exception;
+}

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

@@ -0,0 +1,58 @@
+package com.steerinfo.meterwork.meterworkrailwayreceived.service.impl;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
+import com.steerinfo.meterwork.meterworkrailwayreceived.mapper.MeterWorkRailwayReceivedMapper;
+import com.steerinfo.meterwork.meterworkrailwayreceived.service.IMeterWorkRailwayReceivedService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * MeterWorkRailwayReceived服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2022-03-22 09:00
+ * 类描述
+ * 修订历史:
+ * 日期:2022-03-22
+ * 作者:generator
+ * 参考:
+ * 描述:MeterWorkRailwayReceived服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "meterWorkRailwayReceivedService")
+public class MeterWorkRailwayReceivedServiceImpl extends BaseServiceImpl<MeterWorkRailwayReceived, String> implements IMeterWorkRailwayReceivedService {
+
+    @Autowired
+    private MeterWorkRailwayReceivedMapper meterWorkRailwayReceivedMapper;
+
+    @Override
+    protected IBaseMapper<MeterWorkRailwayReceived, String> getMapper() {
+        return meterWorkRailwayReceivedMapper;
+    }
+
+    @Override
+    public RESTfulResult checkandadd(MeterWorkRailwayReceived model) throws Exception {
+        try{
+            RESTfulResult rm = new RESTfulResult();
+            rm.setCode("200");
+            rm.setData(model.getActualFirstNo());
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String afl = sdf.format(new Date());
+            String no = meterWorkRailwayReceivedMapper.getNewID(afl);
+            model.setActualFirstNo(sdf.format(new Date()) + no);
+            meterWorkRailwayReceivedMapper.insertSelective(model);
+            rm.setMessage("成功");
+            return rm;
+        }
+        catch (Exception e){
+            throw e;
+        }
+    }
+}

+ 17 - 3
src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/controller/MeterWorkRailwayRecMainController.java

@@ -4,6 +4,8 @@ import com.steerinfo.framework.controller.BaseRESTfulController;
 import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.pagehelper.PageList;
 import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.meterwork.except.MarkerMetException;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.service.IMeterWorkRailwayRecMainService;
 import io.swagger.annotations.Api;
@@ -82,9 +84,21 @@ public class MeterWorkRailwayRecMainController extends BaseRESTfulController {
     @ApiImplicitParam(name = "meterWorkRailwayRecMain", value = "详细实体meterWorkRailwayRecMain", required = true, dataType = "MeterWorkRailwayRecMain")
     //@RequiresPermissions("meterworkrailwayrecmain:create")
     @PostMapping(value = "/")
-    public RESTfulResult add(@ModelAttribute MeterWorkRailwayRecMain model){
-        MeterWorkRailwayRecMain meterWorkRailwayRecMain = meterWorkRailwayRecMainService.add(model);
-        return success(meterWorkRailwayRecMain);
+    public RESTfulResult add(@RequestBody MeterWorkRailwayRecMain model){
+        RESTfulResult rm = failed();
+        try {
+            RESTfulResult res = meterWorkRailwayRecMainService.checkandadd(model);
+            return res;
+        } catch (MarkerMetException e) {
+            e.printStackTrace();
+            rm.setMessage(e.getMessage());
+        } catch (Exception e) {
+            e.printStackTrace();
+            rm.setMessage("操作异常,请确认!");
+        } finally {
+
+        }
+        return rm;
     }
 
     @ApiOperation(value="获取详细信息", notes="根据url的id来获取详细信息")

+ 2 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/mapper/MeterWorkRailwayRecMainMapper.java

@@ -4,7 +4,9 @@ import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain;
 import java.math.*;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
 
 @Mapper
 public interface MeterWorkRailwayRecMainMapper extends IBaseMapper<MeterWorkRailwayRecMain, String> {
+    String getNewID(@Param(value="afl")String afl);
 }

+ 4 - 1
src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/mapper/MeterWorkRailwayRecMainMapper.xml

@@ -286,5 +286,8 @@
   </delete>
   <!-- 友情提示!!!-->
   <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
-  
+  <select id="getNewID" parameterType="java.lang.String" resultType="java.lang.String">
+    SELECT LPAD(NVL(MAX(TO_NUMBER(SUBSTR(ACTUAL_NO, LENGTH(ACTUAL_NO) - 3))),0) + 1,4,'0') ACTUAL_NO
+    FROM METER_WORK_RAILWAY_REC_MAIN where instr(ACTUAL_NO,#{afl,jdbcType=VARCHAR})>0
+  </select>
 </mapper>

+ 3 - 1
src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/service/IMeterWorkRailwayRecMainService.java

@@ -1,6 +1,8 @@
 package com.steerinfo.meterwork.meterworkrailwayrecmain.service;
 
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain;
 import java.util.Date;
 import java.math.BigDecimal;
@@ -19,5 +21,5 @@ import java.math.BigDecimal;
  * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
  */
 public interface IMeterWorkRailwayRecMainService extends IBaseService<MeterWorkRailwayRecMain, String>{
-
+    RESTfulResult checkandadd(MeterWorkRailwayRecMain model)  throws Exception;
 }

+ 23 - 0
src/main/java/com/steerinfo/meterwork/meterworkrailwayrecmain/service/impl/MeterWorkRailwayRecMainServiceImpl.java

@@ -1,12 +1,16 @@
 package com.steerinfo.meterwork.meterworkrailwayrecmain.service.impl;
 
+import com.steerinfo.framework.controller.RESTfulResult;
 import com.steerinfo.framework.mapper.IBaseMapper;
 import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.meterwork.meterworkrailwayreceived.model.MeterWorkRailwayReceived;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.model.MeterWorkRailwayRecMain;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.mapper.MeterWorkRailwayRecMainMapper;
 import com.steerinfo.meterwork.meterworkrailwayrecmain.service.IMeterWorkRailwayRecMainService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+
+import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.math.BigDecimal;
 
@@ -33,4 +37,23 @@ public class MeterWorkRailwayRecMainServiceImpl extends BaseServiceImpl<MeterWor
     protected IBaseMapper<MeterWorkRailwayRecMain, String> getMapper() {
         return meterWorkRailwayRecMainMapper;
     }
+
+    @Override
+    public RESTfulResult checkandadd(MeterWorkRailwayRecMain model) throws Exception {
+        try{
+            RESTfulResult rm = new RESTfulResult();
+            rm.setCode("200");
+            rm.setData(model.getActualNo());
+            SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+            String afl = sdf.format(new Date());
+            String no = meterWorkRailwayRecMainMapper.getNewID(afl);
+            model.setActualNo(sdf.format(new Date()) + no);
+            meterWorkRailwayRecMainMapper.insertSelective(model);
+            rm.setMessage("成功");
+            return rm;
+        }
+        catch (Exception e){
+            throw e;
+        }
+    }
 }