txf 3 years ago
commit
5e8d373e89
45 changed files with 6511 additions and 0 deletions
  1. 8 0
      .gitignore
  2. 156 0
      pom.xml
  3. 26 0
      src/main/java/com/steerinfo/DilApplicationMain.java
  4. 22 0
      src/main/java/com/steerinfo/dil/config/CorsConfig1.java
  5. 43 0
      src/main/java/com/steerinfo/dil/config/WebSocketConfig.java
  6. 101 0
      src/main/java/com/steerinfo/dil/controller/AmsPurchaseOrderController.java
  7. 174 0
      src/main/java/com/steerinfo/dil/controller/TmstrainLoadingResultController.java
  8. 214 0
      src/main/java/com/steerinfo/dil/controller/TmstrainPleaseApproveResultController.java
  9. 174 0
      src/main/java/com/steerinfo/dil/controller/TmstrainWagonUnloadResultController.java
  10. 22 0
      src/main/java/com/steerinfo/dil/feign/ColumnDataFeign.java
  11. 20 0
      src/main/java/com/steerinfo/dil/feign/QueueResult.java
  12. 26 0
      src/main/java/com/steerinfo/dil/feign/WmsBoundFeign.java
  13. 26 0
      src/main/java/com/steerinfo/dil/interceptors/MyLocaleChangeInterceptor.java
  14. 13 0
      src/main/java/com/steerinfo/dil/mapper/AmsPurchaseOrderMapper.java
  15. 35 0
      src/main/java/com/steerinfo/dil/mapper/TmstrainLoadingResultMapper.java
  16. 43 0
      src/main/java/com/steerinfo/dil/mapper/TmstrainPleaseApproveResultMapper.java
  17. 28 0
      src/main/java/com/steerinfo/dil/mapper/TmstrainWagonUnloadResultMapper.java
  18. 273 0
      src/main/java/com/steerinfo/dil/model/AmsPurchaseOrder.java
  19. 348 0
      src/main/java/com/steerinfo/dil/model/TmstrainLoadingResult.java
  20. 304 0
      src/main/java/com/steerinfo/dil/model/TmstrainPleaseApproveResult.java
  21. 273 0
      src/main/java/com/steerinfo/dil/model/TmstrainWagonLoadResult.java
  22. 258 0
      src/main/java/com/steerinfo/dil/model/TmstrainWagonUnloadResult.java
  23. 30 0
      src/main/java/com/steerinfo/dil/service/IAmsPurchaseOrderService.java
  24. 45 0
      src/main/java/com/steerinfo/dil/service/ITmstrainLoadingResultService.java
  25. 48 0
      src/main/java/com/steerinfo/dil/service/ITmstrainPleaseApproveResultService.java
  26. 40 0
      src/main/java/com/steerinfo/dil/service/ITmstrainWagonUnloadResultService.java
  27. 120 0
      src/main/java/com/steerinfo/dil/service/impl/AmsPurchaseOrderServiceImpl.java
  28. 120 0
      src/main/java/com/steerinfo/dil/service/impl/TmstrainLoadingResultServiceImpl.java
  29. 144 0
      src/main/java/com/steerinfo/dil/service/impl/TmstrainPleaseApproveResultServiceImpl.java
  30. 93 0
      src/main/java/com/steerinfo/dil/service/impl/TmstrainWagonUnloadResultServiceImpl.java
  31. 70 0
      src/main/java/com/steerinfo/dil/util/BaseRESTfulController.java
  32. 38 0
      src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java
  33. 92 0
      src/main/java/com/steerinfo/dil/util/DataChange.java
  34. 33 0
      src/main/java/com/steerinfo/dil/util/PageListAdd.java
  35. 11 0
      src/main/java/com/steerinfo/dil/util/util.java
  36. 9 0
      src/main/resources/application-dev.yml
  37. 8 0
      src/main/resources/application-prod.yml
  38. 0 0
      src/main/resources/application.yml
  39. 50 0
      src/main/resources/bootstrap.yml
  40. 514 0
      src/main/resources/com/steerinfo/dil/mapper/AmsPurchaseOrderMapper.xml
  41. 824 0
      src/main/resources/com/steerinfo/dil/mapper/TmstrainLoadingResultMapper.xml
  42. 802 0
      src/main/resources/com/steerinfo/dil/mapper/TmstrainPleaseApproveResultMapper.xml
  43. 749 0
      src/main/resources/com/steerinfo/dil/mapper/TmstrainWagonUnloadResultMapper.xml
  44. 80 0
      src/main/resources/log4j.properties
  45. 4 0
      src/main/resources/message.properties

+ 8 - 0
.gitignore

@@ -0,0 +1,8 @@
+target/
+*.iml
+.idea/
+rebel.xml
+.rebel.xml.bak
+out/artifacts/
+dil-api.iml
+src/test

+ 156 - 0
pom.xml

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.example</groupId>
+    <artifactId>dil-tms</artifactId>
+    <version>1.0-SNAPSHOT</version>
+
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.0.7.RELEASE</version>
+    </parent>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.springframework.cloud</groupId>
+                <artifactId>spring-cloud-dependencies</artifactId>
+                <!--Spring Cloud的版本-->
+                <version>Finchley.SR2</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <repositories>
+        <repository>
+            <id>maven-public</id>
+            <name>steerinfo maven-public</name>
+            <url>https://nexus.steerinfo.com/repository/maven-public/</url>
+        </repository>
+    </repositories>
+
+    <distributionManagement>
+        <repository>
+            <id>maven-releases</id>
+            <name>steerinfo nexus-releases</name>
+            <url>http://nexus.steerinfo.com/repository/maven-releases/</url>
+        </repository>
+        <snapshotRepository>
+            <id>maven-snapshots</id>
+            <url>http://nexus.steerinfo.com/repository/maven-snapshots/</url>
+        </snapshotRepository>
+    </distributionManagement>
+
+    <dependencies>
+        <!--websocket-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-websocket</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+
+        <!--mybatisPlus-->
+        <dependency>
+            <groupId>com.baomidou</groupId>
+            <artifactId>mybatis-plus-boot-starter</artifactId>
+            <version>3.4.2</version>
+        </dependency>
+
+        <!--swagger-->
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>2.9.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi</artifactId>
+            <version>3.17</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+            <version>3.17</version>
+        </dependency>
+        <!--steerinfo-->
+        <dependency>
+            <groupId>com.steerinfo</groupId>
+            <artifactId>framework</artifactId>
+            <version>1.0</version>
+        </dependency>
+
+
+    </dependencies>
+    <build>
+        <plugins>
+            <!--             自动生成代码文件 -->
+            <plugin>
+                <groupId>com.steerinfo</groupId>
+                <artifactId>generator-maven-plugin</artifactId>
+                <version>3.0</version>
+                <configuration>
+                    <connUrl>jdbc:oracle:thin:@192.168.1.51:1521:steerinfo</connUrl>
+                    <user>dilusr</user>
+                    <password>stinf#0420</password>
+                    <!--包名-->
+                    <targetPackage>com.steerinfo.dil</targetPackage>
+                    <tables>
+                                                <table>AMS_PURCHASE_ORDER</table><!--采购订单-->
+                        <!--                        <table>AMSTRAIN_WAGON_PLEASE</table>&lt;!&ndash;请车作业&ndash;&gt;-->
+<!--                                                <table>TMSTRAIN_WAGON_LOAD_RESULT</table>&lt;!&ndash;车皮装车作业&ndash;&gt;-->
+                                                <table>TMSTRAIN_LOADING_RESULT</table><!--车皮装车作业-->
+<!--                                                <table>TMSTRAIN_WAGON_UNLOAD_RESULT</table>&lt;!&ndash;车皮卸车作业&ndash;&gt;-->
+                    </tables>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>steerinfo</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                </includes>
+            </resource>
+
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+    </build>
+</project>

+ 26 - 0
src/main/java/com/steerinfo/DilApplicationMain.java

@@ -0,0 +1,26 @@
+package com.steerinfo;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/4/21 14:32
+ * @Version 1.0
+ */
+@SpringBootApplication
+@ServletComponentScan
+@EnableScheduling
+@MapperScan({"com.steerinfo.dil.mapper"})
+@EnableDiscoveryClient
+@EnableFeignClients(basePackages="com.steerinfo.dil.feign")
+public class DilApplicationMain {
+    public static void main(String[] args) {
+        SpringApplication.run(DilApplicationMain.class,args);
+    }
+}

+ 22 - 0
src/main/java/com/steerinfo/dil/config/CorsConfig1.java

@@ -0,0 +1,22 @@
+package com.steerinfo.dil.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+/**
+ *
+ */
+@Configuration
+public class CorsConfig1 implements WebMvcConfigurer {
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**")
+                .allowedOrigins("*")
+                .allowedMethods("GET","HEAD","POST","PUT","DELETE","OPTIONS")
+                .allowCredentials(true)
+                .maxAge(3600)
+                .allowedHeaders("*");
+    }
+}

+ 43 - 0
src/main/java/com/steerinfo/dil/config/WebSocketConfig.java

@@ -0,0 +1,43 @@
+package com.steerinfo.dil.config;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.messaging.simp.config.ChannelRegistration;
+import org.springframework.messaging.simp.config.MessageBrokerRegistry;
+import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
+import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
+import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
+
+@Configuration
+@EnableWebSocketMessageBroker
+public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
+
+    @Override
+    public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
+        stompEndpointRegistry
+                .addEndpoint("/webSocket")
+                .setAllowedOrigins("*")
+                .withSockJS(); //使用sockJS
+
+    }
+
+    @Override
+    public void configureMessageBroker(MessageBrokerRegistry registry) {
+        //这里使用的是内存模式,生产环境可以使用rabbitmq或者其他mq。
+        //这里注册两个,主要是目的是将广播和队列分开。
+        //registry.enableStompBrokerRelay().setRelayHost().setRelayPort() 其他方式
+        registry.enableSimpleBroker("/topic");
+        //设置客户端前缀 即@MessageMapping
+        registry.setApplicationDestinationPrefixes("/app");
+        //点对点发送前缀
+        registry.setUserDestinationPrefix("/user");
+    }
+
+    /**
+     * 输入通道参数配置
+     *
+     * @param registration
+     */
+    @Override
+    public void configureClientInboundChannel(ChannelRegistration registration) {
+    }
+}

+ 101 - 0
src/main/java/com/steerinfo/dil/controller/AmsPurchaseOrderController.java

@@ -0,0 +1,101 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.model.AmsPurchaseOrder;
+import com.steerinfo.dil.service.IAmsPurchaseOrderService;
+import com.steerinfo.dil.service.impl.AmsPurchaseOrderServiceImpl;
+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 io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * AmsPurchaseOrder RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-19 09:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-19
+ * 作者:generator
+ * 参考:
+ * 描述:AmsPurchaseOrder RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/amspurchaseorders")
+public class AmsPurchaseOrderController extends BaseRESTfulController {
+
+    @Autowired
+    AmsPurchaseOrderServiceImpl amsPurchaseOrderService;
+
+    /**
+     * 采购订单生成
+     * @param amsPurchaseOrder
+     * @return
+     */
+    @ApiOperation(value="添加采购订单")
+    @ApiImplicitParams({
+        @ApiImplicitParam(name = "amsPurchaseOrder", value = "采购订单", required = false, dataType = "AmsPurchaseOrder")
+    })
+    @PostMapping(value = "/insertAmsPurchaseOrder")
+    public RESTfulResult insertAmsPurchaseOrder(@RequestBody AmsPurchaseOrder amsPurchaseOrder){
+        System.out.println(amsPurchaseOrder);
+        int i = amsPurchaseOrderService.insertAmsPurchaseOrder(amsPurchaseOrder);
+        return success(i);
+    }
+
+    /**
+     * 通过主键删除采购订单
+     * @param purchaseOrderId
+     * @return
+     */
+    @ApiOperation(value="通过主键删除采购订单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "purchaseOrderId", value = "采购订单号", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping(value = "/deleteAmsPurchaseOrderByPurchaseOrderId")
+    public RESTfulResult deleteAmsPurchaseOrderByPurchaseOrderId(@RequestParam BigDecimal purchaseOrderId){
+        int i = amsPurchaseOrderService.deleteAmsPurchaseOrderByPurchaseOrderId(purchaseOrderId);
+        return success(i);
+    }
+
+    /**
+     * 通过主键修改采购订单
+     * @param amsPurchaseOrder
+     * @return
+     */
+    @ApiOperation(value="通过主键修改采购订单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "amsPurchaseOrder", value = "采购订单", required = false, dataType = "AmsPurchaseOrder")
+    })
+    @PostMapping(value = "/updateAmsPurchaseOrderByPurchaseOrderId")
+    public RESTfulResult updateAmsPurchaseOrderByPurchaseOrderId(@RequestBody AmsPurchaseOrder amsPurchaseOrder){
+        int i = amsPurchaseOrderService.updateAmsPurchaseOrderByPurchaseOrderId(amsPurchaseOrder);
+        return success(i);
+    }
+
+    /**
+     * 通过主键查询采购订单
+     * @param purchaseOrderId
+     * @return
+     */
+    @ApiOperation(value="通过主键查询采购订单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "purchaseOrderId", value = "采购订单号", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping(value = "/getAmsPurchaseOrderByPurchaseOrderId")
+    public RESTfulResult getAmsPurchaseOrderByPurchaseOrderId(@RequestParam BigDecimal purchaseOrderId){
+        AmsPurchaseOrder amsPurchaseOrder = amsPurchaseOrderService.getAmsPurchaseOrderByPurchaseOrderId(purchaseOrderId);
+        return success(amsPurchaseOrder);
+    }
+}

+ 174 - 0
src/main/java/com/steerinfo/dil/controller/TmstrainLoadingResultController.java

@@ -0,0 +1,174 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.feign.ColumnDataFeign;
+import com.steerinfo.dil.model.TmstrainLoadingResult;
+import com.steerinfo.dil.service.ITmstrainLoadingResultService;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainLoadingResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-30 02:23
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-30
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainLoadingResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstrainloadingresults")
+public class TmstrainLoadingResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstrainLoadingResultService tmstrainLoadingResultService;
+
+    @Autowired
+    ColumnDataFeign columnDataFeign;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询装车作业信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "apiId(58)", value = "表头", required = false, dataType = "Interger")
+    })
+    @PostMapping("/getTmstrainWagonLoad")
+    public RESTfulResult getTmstrainWagonLoad(@RequestBody(required=false) Map<String,Object> mapValue,
+                                              Integer apiId,
+                                              Integer pageNum,
+                                              Integer pageSize){
+
+        List<Map<String, Object>> tmstrainWagonLoad = tmstrainLoadingResultService.getTmstrainWagonLoad(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        List<Map<String, Object>> tmstrainWagonLoad1 = tmstrainLoadingResultService.getTmstrainWagonLoad(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, tmstrainWagonLoad,tmstrainWagonLoad1);
+        return success(pageList);
+    }
+
+    /**
+     * 新增车皮装车作业实绩
+     * @param tmstrainLoadingResult
+     * @return
+     */
+    @ApiOperation(value="新增车皮装车作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainLoadingResult", value = "车皮装车对象", required = false, dataType = "TmstrainLoadingResult")
+    })
+    @PostMapping(value = "/insertTmstrainLoadingResult")
+    public RESTfulResult insertTmstrainLoadingResult(@RequestBody(required = false) TmstrainLoadingResult tmstrainLoadingResult){
+
+        int i = tmstrainLoadingResultService.addTmstrainLoadingResult(tmstrainLoadingResult);
+        return success(i);
+    }
+
+    /**
+     * 通过主键查询车皮装车作业信息
+     * @param resultId
+     * @return
+     */
+    @ApiOperation(value="通过主键查询车皮装车作业信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "车皮装车主键", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping(value = "/getTmstrainLoadingResultByResultId/{resultId}")
+    public RESTfulResult getTmstrainLoadingResultByResultId(@PathVariable("resultId") BigDecimal resultId){
+        List<Map<String, Object>> loadingResultByResultId = tmstrainLoadingResultService.getTmstrainLoadingResultByResultId(resultId);
+        System.out.println(loadingResultByResultId);
+        return success(loadingResultByResultId);
+    }
+
+    /**
+     * 通过主键修改车皮装车作业实绩
+     * @param tmstrainLoadingResult
+     * @return
+     */
+    @ApiOperation(value="通过主键修改车皮装车作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainLoadingResult", value = "修改车皮装车map", required = false, dataType = "TmstrainWagonLoadResult")
+    })
+    @PostMapping(value = "/upadteTmstrainLoadingResultByResultId")
+    public RESTfulResult upadteTmstrainLoadingResultByResultId(@RequestBody(required = false) TmstrainLoadingResult tmstrainLoadingResult){
+        int i = tmstrainLoadingResultService.updateTmstrainLoadingResult(tmstrainLoadingResult);
+        return success(i);
+    }
+
+    /**
+     * 通过主键删除车皮装车作业实绩
+     * @param resultId
+     * @return
+     */
+    @ApiOperation(value="通过主键删除车皮装车作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "主键ID", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping(value = "/deleteTmstrainLoadingResultByResultId")
+    public RESTfulResult deleteTmstrainLoadingResultByResultId(@RequestParam BigDecimal resultId){
+        int i = tmstrainLoadingResultService.deleteTmstrainLoadingResultByResultId(resultId);
+        return success(i);
+    }
+
+    /**
+     * 获取发站地点名称
+     * @param
+     * @return
+     */
+    @ApiOperation(value="获取发站地点名称")
+    @ApiImplicitParams({
+    })
+    @GetMapping(value = "/getSendStationName")
+    public RESTfulResult getSendStationName(){
+
+        return success(tmstrainLoadingResultService.getSendStationName());
+    }
+
+    /**
+     * 获取到站地点名称
+     * @param
+     * @return
+     */
+    @ApiOperation(value="获取到站地点名称")
+    @GetMapping(value = "/getArrivalStationName")
+    public RESTfulResult getArrivalStationName(){
+        return success(tmstrainLoadingResultService.getArrivalStationName());
+    }
+
+    /**
+     * 获取批次ID
+     * @param
+     * @return
+     */
+    @ApiOperation(value="获取批次ID")
+    @GetMapping(value = "/getBatchId")
+    public RESTfulResult getBatchId(){
+        return success(tmstrainLoadingResultService.getBatchId());
+    }
+
+    /**
+     * 获取装车车皮号
+     * @param
+     * @return
+     */
+    @ApiOperation(value="获取装车车皮号")
+    @GetMapping(value = "/getWagonNo")
+    public RESTfulResult getWagonNo(){
+        return success(tmstrainLoadingResultService.getWagonNo());
+    }
+}

+ 214 - 0
src/main/java/com/steerinfo/dil/controller/TmstrainPleaseApproveResultController.java

@@ -0,0 +1,214 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.model.TmstrainPleaseApproveResult;
+import com.steerinfo.dil.service.ITmstrainPleaseApproveResultService;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.dil.util.PageListAdd;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainPleaseApproveResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-30 02:27
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-30
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainPleaseApproveResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstrainpleaseapproveresults")
+public class TmstrainPleaseApproveResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstrainPleaseApproveResultService tmstrainPleaseApproveResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询请车作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(57)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getAllWagonPlease")
+    public RESTfulResult getAllWagonPlease(@RequestBody(required=false) Map<String,Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize,
+                                           Integer status){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        mapValue.put("status", status);
+        //不分页筛选数据
+        List<Map<String, Object>> wagonPleaseTotal = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> wagonPlease = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
+        DataChange.changeDateToDayDate(wagonPlease, "resultPleaseDate", "resultPlanDate");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseTotal,wagonPlease);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="通过Id查询请车作业")
+    @PostMapping ("/getWagonPleaseById/{resultId}")
+    public RESTfulResult getWagonPleaseById(@PathVariable("resultId")Integer resultId){
+        List<Map<String, Object>> wagonPleaseById = tmstrainPleaseApproveResultService.getWagonPleaseById(resultId);
+        return success(wagonPleaseById);
+    }
+
+
+    @ApiOperation(value="新增请车作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "amstrainWagonPlease", value = "请车作业对象", required = false, dataType = "AmstrainWagonPlease"),
+    })
+    @PostMapping("/addWagonPlease")
+    public RESTfulResult addWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
+        int i = tmstrainPleaseApproveResultService.insertSelective(tmstrainPleaseApproveResult);
+        return success(i);
+    }
+
+    @ApiOperation(value="修改请车作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
+    })
+    @PostMapping("/updateWagonPlease")
+    public RESTfulResult updateWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
+        tmstrainPleaseApproveResult.setUpdateTime(new Date());
+        int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
+        return success(i);
+    }
+
+    @ApiOperation(value="逻辑删除请车作业 设置状态码为 3")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
+    })
+    @PostMapping("/deleteWagonPlease/{resultId}")
+    public RESTfulResult deleteWagonPlease(@PathVariable("resultId") Integer resultId){
+        TmstrainPleaseApproveResult tmstrainPleaseApproveResult = new TmstrainPleaseApproveResult();
+        tmstrainPleaseApproveResult.setResultId(new BigDecimal(resultId));
+        tmstrainPleaseApproveResult.setStatus(new BigDecimal(3));
+        int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
+        return success(i);
+    }
+
+    @ApiOperation(value="下发请车作业 设置状态码为 1")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "请车作业实绩对象", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/sendWagonPlease/{resultId}")
+    public RESTfulResult sendWagonPlease(@PathVariable("resultId") Integer resultId){
+        TmstrainPleaseApproveResult tmstrainPleaseApproveResult = new TmstrainPleaseApproveResult();
+        tmstrainPleaseApproveResult.setResultId(new BigDecimal(resultId));
+        tmstrainPleaseApproveResult.setStatus(new BigDecimal(1));
+        int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
+        return success(i);
+    }
+
+    //********************************下拉框******************************************
+
+    @ApiOperation(value="查询所有发货单位")
+    @GetMapping("/getShipper")
+    public RESTfulResult getShipper(){
+        List<Map<String, Object>> shipper = tmstrainPleaseApproveResultService.getShipper();
+        return success(shipper);
+    }
+
+    @ApiOperation(value="查询所有发运计划")
+    @GetMapping("/getRailPlan")
+    public RESTfulResult getRailPlan(){
+        List<Map<String, Object>> shipper = tmstrainPleaseApproveResultService.getRailPlan();
+        return success(shipper);
+    }
+
+    //******************************批车作业**************************************
+
+    @ApiOperation(value="查询批车作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(70)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "status", value = "状态码", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getApproveAllWagonPlease")
+    public RESTfulResult getApproveAllWagonPlease(@RequestBody(required=false) Map<String,Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize){
+        //不分页筛选数据
+        List<Map<String, Object>> wagonPleaseTotal = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> wagonPlease = tmstrainPleaseApproveResultService.getAllApproveWagonPlease(mapValue);
+        DataChange.changeDateToDayDate(wagonPlease, "resultApproveDate");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseTotal,wagonPlease);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="通过Id查询批车作业")
+    @PostMapping ("/getApproveWagonPleaseById/{resultId}")
+    public RESTfulResult getApproveWagonPleaseById(@PathVariable("resultId")Integer resultId){
+        List<Map<String, Object>> approveWagonPleaseById = tmstrainPleaseApproveResultService.getApproveWagonPleaseById(resultId);
+        return success(approveWagonPleaseById);
+    }
+
+    @ApiOperation(value="新增批车作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
+    })
+    @PostMapping("/addApproveWagonPlease")
+    public RESTfulResult addApproveWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
+        tmstrainPleaseApproveResult.setStatus(new BigDecimal(2));
+        int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
+        return success(i);
+    }
+
+    @ApiOperation(value="修改批车作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainPleaseApproveResult", value = "请车作业实绩对象", required = false, dataType = "TmstrainPleaseApproveResult"),
+    })
+    @PostMapping("/updateApproveWagonPlease")
+    public RESTfulResult updateApproveWagonPlease(@RequestBody TmstrainPleaseApproveResult tmstrainPleaseApproveResult){
+        tmstrainPleaseApproveResult.setUpdateTime(new Date()); //设置更新时间
+        int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
+        return success(i);
+    }
+
+
+
+    @ApiOperation(value="逻辑删除批车作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "请车作业实绩对象", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/deleteApproveWagonPlease/{resultId}")
+    public RESTfulResult deleteApproveWagonPlease(@PathVariable("resultId") Integer resultId){
+        TmstrainPleaseApproveResult tmstrainPleaseApproveResult = new TmstrainPleaseApproveResult();
+        tmstrainPleaseApproveResult.setStatus(new BigDecimal(3));
+        tmstrainPleaseApproveResult.setResultId(new BigDecimal(resultId));
+        int i = tmstrainPleaseApproveResultService.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
+        return success(i);
+    }
+}

+ 174 - 0
src/main/java/com/steerinfo/dil/controller/TmstrainWagonUnloadResultController.java

@@ -0,0 +1,174 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.feign.ColumnDataFeign;
+import com.steerinfo.dil.model.TmstrainWagonUnloadResult;
+import com.steerinfo.dil.service.ITmstrainWagonUnloadResultService;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageHelper;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainWagonUnloadResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-19 09:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-19
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainWagonUnloadResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstrainwagonunloadresults")
+public class TmstrainWagonUnloadResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstrainWagonUnloadResultService tmstrainWagonUnloadResultService;
+
+    @Autowired
+    ColumnDataFeign columnDataFeign;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询卸车作业信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "apiId(60)", value = "表头", required = false, dataType = "Interger")
+    })
+    @PostMapping("/getTmstrainWagonUnLoad")
+    public RESTfulResult getTmstrainWagonUnLoad(@RequestBody(required=false) Map<String,Object> mapValue,
+                                              Integer apiId,
+                                              Integer pageNum,
+                                              Integer pageSize){
+
+        List<Map<String, Object>> tmstrainWagonUnLoad = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoad(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        List<Map<String, Object>> tmstrainWagonUnLoad1 = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoad(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, tmstrainWagonUnLoad,tmstrainWagonUnLoad1);
+        return success(pageList);
+    }
+
+    /**
+     * 通过主键删除车皮卸车作业实绩
+     * @param unloadingId
+     * @return
+     */
+    @ApiOperation(value="通过主键删除车皮卸车作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "unloadingId", value = "主键ID", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping(value = "/deleteTmstrainWagonUnLoadResultByUnLoadingId")
+    public RESTfulResult deleteTmstrainWagonUnLoadResultByUnLoadingId(@RequestParam BigDecimal unloadingId){
+        int i = tmstrainWagonUnloadResultService.deleteTmstrainWagonUnLoadResultByUnLoadingId(unloadingId);
+        return success(i);
+    }
+
+    /**
+     * 新增车皮卸车作业实绩
+     * @param tmstrainWagonUnloadResult
+     * @return
+     */
+    @ApiOperation(value="新增车皮卸车作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainWagonUnloadResult", value = "车皮卸车对象", required = false, dataType = "TmstrainWagonUnloadResult")
+    })
+    @PostMapping(value = "/insertTmstrainWagonUnLoadResult")
+    public RESTfulResult insertTmstrainWagonUnLoadResult(@RequestBody(required = false) TmstrainWagonUnloadResult tmstrainWagonUnloadResult){
+        int i = tmstrainWagonUnloadResultService.addTmstrainWagonLoadResult(tmstrainWagonUnloadResult);
+        return success(i);
+    }
+
+    /**
+     * 通过主键修改车皮卸车作业实绩
+     * @param tmstrainWagonUnloadResult
+     * @return
+     */
+    @ApiOperation(value="通过主键修改车皮卸车作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstrainWagonUnloadResult", value = "车皮卸车对象", required = false, dataType = "TmstrainWagonUnloadResult")
+    })
+    @PostMapping(value = "/upadteTmstrainWagonUnLoadResultByUnLoadingId")
+    public RESTfulResult upadteTmstrainWagonUnLoadResultByUnLoadingId(@RequestBody(required = false) TmstrainWagonUnloadResult tmstrainWagonUnloadResult){
+        System.out.println(tmstrainWagonUnloadResult);
+        int i = tmstrainWagonUnloadResultService.updateTmstrainWagonUnLoadResult(tmstrainWagonUnloadResult);
+        return success(i);
+    }
+
+    @ApiOperation(value="查看火运实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "apiId(65)", value = "表头", required = false, dataType = "Interger")
+    })
+    @PostMapping("/getTmstrainresult")
+    public RESTfulResult getTmstrainresult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                                Integer apiId,
+                                                Integer pageNum,
+                                                Integer pageSize){
+
+        List<Map<String, Object>> tmstrainResult = tmstrainWagonUnloadResultService.getTmstrainResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        List<Map<String, Object>> tmstrainResult1 = tmstrainWagonUnloadResultService.getTmstrainResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, tmstrainResult,tmstrainResult1);
+        return success(pageList);
+    }
+
+    /**
+     * 获取卸车地点名称
+     * @param
+     * @return
+     */
+    @ApiOperation(value="获取卸车地点名称")
+    @ApiImplicitParams({
+    })
+    @GetMapping(value = "/getUnloadingPointName")
+    public RESTfulResult getUnloadingPointName(){
+
+        return success(tmstrainWagonUnloadResultService.getUnloadingPointName());
+    }
+
+    /**
+     * 获取卸车路径名称
+     * @param
+     * @return
+     */
+    @ApiOperation(value="获取卸车路径名称")
+    @ApiImplicitParams({
+    })
+    @GetMapping(value = "/getUnloadingRouteName")
+    public RESTfulResult getUnloadingRouteName(){
+
+        return success(tmstrainWagonUnloadResultService.getUnloadingRouteName());
+    }
+
+    /**
+     * 通过主键查询车皮卸车作业信息
+     * @param unloadingId
+     * @return
+     */
+    @ApiOperation(value="通过主键查询车皮卸车作业信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "unloadingId", value = "车皮卸车主键", required = false, dataType = "BigDecimal")
+    })
+    @PostMapping(value = "/getTmstrainWagonUnLoadResultByUnLoadingId/{unloadingId}")
+    public RESTfulResult getTmstrainWagonUnLoadResultByUnLoadingId(@PathVariable("unloadingId") BigDecimal unloadingId){
+        List<Map<String, Object>> tmstrainWagonUnLoadResultByUnLoadingId = tmstrainWagonUnloadResultService.getTmstrainWagonUnLoadResultByUnLoadingId(unloadingId);
+        return success(tmstrainWagonUnLoadResultByUnLoadingId);
+    }
+
+}

+ 22 - 0
src/main/java/com/steerinfo/dil/feign/ColumnDataFeign.java

@@ -0,0 +1,22 @@
+package com.steerinfo.dil.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/6/23 9:58
+ * @Version 1.0
+ */
+//@FeignClient(value = "DIL-COLUMN-DATA-DEV",url = "192.168.10.178:8083")
+@Service
+@FeignClient(value = "DIL-COLUMN-DATA-DEV",url = "localhost:8083")
+public interface ColumnDataFeign {
+    @RequestMapping("getColumnData")
+    List<Map<String,Object>> getColumnData(@RequestParam("apiId") Integer apiId);
+}

+ 20 - 0
src/main/java/com/steerinfo/dil/feign/QueueResult.java

@@ -0,0 +1,20 @@
+package com.steerinfo.dil.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Service;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+import java.util.Map;
+
+@Service
+
+@FeignClient(value = "DIL-TRICK-QUEUE-DEV",url = "192.168.10.167:8083")
+
+//@FeignClient(value = "DIL-TRICK-QUEUE-DEV",url = "10.244.97.87:80")
+public interface QueueResult {
+    @RequestMapping(value = "/api/v1/tq/queue/getResultById/{resultId}",method = RequestMethod.GET)
+    List<Map<String, Object>> getResultById(@PathVariable("resultId") Integer resultId);
+}

+ 26 - 0
src/main/java/com/steerinfo/dil/feign/WmsBoundFeign.java

@@ -0,0 +1,26 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/6/23 9:58
+ * @Version 1.0
+ */
+@FeignClient(value = "dil-wsm-api",url = "192.168.0.104:8091")
+public interface WmsBoundFeign {
+
+    @PostMapping("api/v1/wms/wmshinboundresults/addWarehousingResult")
+    RESTfulResult addWarehousingResult(@RequestBody(required = false) Map<String,Object> wmshInboundResult);
+
+    @PostMapping("api/v1/wms/wmshoutboundresults/addResult")
+    RESTfulResult addResult(@RequestBody(required = false) Map<String,Object> map);
+}

+ 26 - 0
src/main/java/com/steerinfo/dil/interceptors/MyLocaleChangeInterceptor.java

@@ -0,0 +1,26 @@
+package com.steerinfo.dil.interceptors;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.support.ReloadableResourceBundleMessageSource;
+import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
+import org.springframework.web.servlet.i18n.SessionLocaleResolver;
+
+import java.util.Locale;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/4/23 8:19
+ * @Version 1.0
+ */
+
+@Configuration
+public class MyLocaleChangeInterceptor {
+
+    //国际化配置
+    @Bean
+    public LocaleChangeInterceptor localeChangeInterceptor(){
+        return new LocaleChangeInterceptor();
+    }
+
+}

+ 13 - 0
src/main/java/com/steerinfo/dil/mapper/AmsPurchaseOrderMapper.java

@@ -0,0 +1,13 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.AmsPurchaseOrder;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+
+@Mapper
+public interface AmsPurchaseOrderMapper extends IBaseMapper<AmsPurchaseOrder, BigDecimal> {
+    //查询主键最大值
+    BigDecimal selectMaxId();
+}

+ 35 - 0
src/main/java/com/steerinfo/dil/mapper/TmstrainLoadingResultMapper.java

@@ -0,0 +1,35 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstrainLoadingResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface TmstrainLoadingResultMapper extends IBaseMapper<TmstrainLoadingResult, BigDecimal> {
+    //查询所有装车作业信息
+    List<Map<String, Object>> getTmsWagonLoadInfo(Map<String,Object> map);
+    //查询主键最大值
+    BigDecimal selectMaxId();
+    //获取外轮船名
+    String getResultForeignShipName(BigDecimal batchId);
+    //获取物资ID
+    BigDecimal getMaterialID(BigDecimal batchId);
+    //获得采购订单id
+    BigDecimal getPurchaseOrderId(BigDecimal batchId);
+    //获得发站地点名称
+    List<Map<String, Object>> getSendStationName();
+    //获得到站地点名称
+    List<Map<String, Object>> getArrivalStationName();
+    //获得批次ID
+    List<Map<String, Object>> getBatchId();
+    //获得装车车皮号
+    List<Map<String, Object>> getWagonNo();
+    //获得要渲染的数据
+    List<Map<String, Object>> selectByResultId(BigDecimal ResultId);
+    //通过发站ID查询所属港口ID
+    BigDecimal getPortIdBySendStationId(BigDecimal sendStationId);
+}

+ 43 - 0
src/main/java/com/steerinfo/dil/mapper/TmstrainPleaseApproveResultMapper.java

@@ -0,0 +1,43 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstrainPleaseApproveResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.poi.ss.formula.functions.T;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface TmstrainPleaseApproveResultMapper extends IBaseMapper<TmstrainPleaseApproveResult, BigDecimal> {
+    //查询所有已下发的请车作业 状态码为 0
+    List<Map<String, Object>> getAllWagonPlease(Map<String, Object> mapValue);
+
+    //通过Id查询请车作业
+    List<Map<String, Object>> getWagonPleaseById(Integer resultId);
+
+    //新增请车作业
+    int insertSelective(TmstrainPleaseApproveResult tmstrainPleaseApproveResult);
+
+    //修改 、删除、下发请车作业、修改批车作业
+    int updateByPrimaryKeySelective(TmstrainPleaseApproveResult tmstrainPleaseApproveResult);
+
+    //查询所有批车计划 状态码为 2
+    List<Map<String, Object>> getAllApproveWagonPlease(Map<String, Object> mapValue);
+
+    //通过Id查询批车作业
+    List<Map<String, Object>> getApproveWagonPleaseById(Integer resultId);
+
+    //获取最大ID主键值
+    BigDecimal selectMaxId();
+
+    //获取收货单位
+    List<Map<String, Object>> getShipper();
+
+    //获取发运计划
+    List<Map<String, Object>> getRailPlan();
+
+
+
+}

+ 28 - 0
src/main/java/com/steerinfo/dil/mapper/TmstrainWagonUnloadResultMapper.java

@@ -0,0 +1,28 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstrainWagonUnloadResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface TmstrainWagonUnloadResultMapper extends IBaseMapper<TmstrainWagonUnloadResult, BigDecimal> {
+    //查询所有卸车作业信息
+    List<Map<String, Object>> getTmsWagonUnLoadInfo(Map<String,Object>map);
+    //查询主键最大值
+    BigDecimal selectMaxId();
+    //获得采购订单id
+    BigDecimal getPurchaseOrderId(String resultWagonNo);
+    //查询火运实绩
+    List<Map<String, Object>> getTmstrainResult(Map<String,Object>map);
+    //获得卸车地点名称
+    List<Map<String, Object>> getUnloadingPointName();
+    //获得卸车路线名称
+    List<Map<String, Object>> getUnloadingRouteName();
+    //获得要渲染的数据
+    List<Map<String, Object>> selectByUnLoadingId(BigDecimal unloadingId);
+
+}

+ 273 - 0
src/main/java/com/steerinfo/dil/model/AmsPurchaseOrder.java

@@ -0,0 +1,273 @@
+package com.steerinfo.dil.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 AmsPurchaseOrder implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(PURCHASE_ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal purchaseOrderId;
+
+    /**
+     * 采购订单号(PURCHASE_ORDER_NO,VARCHAR,30)
+     */
+    @ApiModelProperty(value="采购订单号",required=false)
+    private String purchaseOrderNo;
+
+    /**
+     * 外轮船名(PURCHASE_FOREIGN_SHIP_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="外轮船名",required=false)
+    private String purchaseForeignShipName;
+
+    /**
+     * 订单日期(PURCHASE_ORDER_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="订单日期",required=false)
+    private Date purchaseOrderDate;
+
+    /**
+     * 供应商ID(SUPPLIER_UNIT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="供应商ID",required=false)
+    private BigDecimal supplierUnitId;
+
+    /**
+     * 采购组织ID(PURCHASING_ORGANIZATION_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="采购组织ID",required=false)
+    private BigDecimal purchasingOrganizationId;
+
+    /**
+     * 采购员(PURCHASE_ORDER_BUYER,VARCHAR,20)
+     */
+    @ApiModelProperty(value="采购员",required=false)
+    private String purchaseOrderBuyer;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 订货数量(PUCHASE_ORDER_MATERIAL_NUMBER,DECIMAL,0)
+     */
+    @ApiModelProperty(value="订货数量",required=false)
+    private Short puchaseOrderMaterialNumber;
+
+    /**
+     * 收货单位(RECEIVE_UNIT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="收货单位",required=false)
+    private BigDecimal receiveUnitId;
+
+    /**
+     * 交货日期(PUCHASE_ORDER_DELIVERY_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="交货日期",required=false)
+    private Date puchaseOrderDeliveryDate;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.purchaseOrderId;
+    }
+
+    @Override
+    public void setId(BigDecimal purchaseOrderId) {
+        this.purchaseOrderId = purchaseOrderId;
+    }
+
+    public BigDecimal getPurchaseOrderId() {
+        return purchaseOrderId;
+    }
+
+    public void setPurchaseOrderId(BigDecimal purchaseOrderId) {
+        this.purchaseOrderId = purchaseOrderId;
+    }
+
+    public String getPurchaseOrderNo() {
+        return purchaseOrderNo;
+    }
+
+    public void setPurchaseOrderNo(String purchaseOrderNo) {
+        this.purchaseOrderNo = purchaseOrderNo == null ? null : purchaseOrderNo.trim();
+    }
+
+    public String getPurchaseForeignShipName() {
+        return purchaseForeignShipName;
+    }
+
+    public void setPurchaseForeignShipName(String purchaseForeignShipName) {
+        this.purchaseForeignShipName = purchaseForeignShipName == null ? null : purchaseForeignShipName.trim();
+    }
+
+    public Date getPurchaseOrderDate() {
+        return purchaseOrderDate;
+    }
+
+    public void setPurchaseOrderDate(Date purchaseOrderDate) {
+        this.purchaseOrderDate = purchaseOrderDate;
+    }
+
+    public BigDecimal getSupplierUnitId() {
+        return supplierUnitId;
+    }
+
+    public void setSupplierUnitId(BigDecimal supplierUnitId) {
+        this.supplierUnitId = supplierUnitId;
+    }
+
+    public BigDecimal getPurchasingOrganizationId() {
+        return purchasingOrganizationId;
+    }
+
+    public void setPurchasingOrganizationId(BigDecimal purchasingOrganizationId) {
+        this.purchasingOrganizationId = purchasingOrganizationId;
+    }
+
+    public String getPurchaseOrderBuyer() {
+        return purchaseOrderBuyer;
+    }
+
+    public void setPurchaseOrderBuyer(String purchaseOrderBuyer) {
+        this.purchaseOrderBuyer = purchaseOrderBuyer == null ? null : purchaseOrderBuyer.trim();
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public Short getPuchaseOrderMaterialNumber() {
+        return puchaseOrderMaterialNumber;
+    }
+
+    public void setPuchaseOrderMaterialNumber(Short puchaseOrderMaterialNumber) {
+        this.puchaseOrderMaterialNumber = puchaseOrderMaterialNumber;
+    }
+
+    public BigDecimal getReceiveUnitId() {
+        return receiveUnitId;
+    }
+
+    public void setReceiveUnitId(BigDecimal receiveUnitId) {
+        this.receiveUnitId = receiveUnitId;
+    }
+
+    public Date getPuchaseOrderDeliveryDate() {
+        return puchaseOrderDeliveryDate;
+    }
+
+    public void setPuchaseOrderDeliveryDate(Date puchaseOrderDeliveryDate) {
+        this.puchaseOrderDeliveryDate = puchaseOrderDeliveryDate;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", purchaseOrderId=").append(purchaseOrderId);
+        sb.append(", purchaseOrderNo=").append(purchaseOrderNo);
+        sb.append(", purchaseForeignShipName=").append(purchaseForeignShipName);
+        sb.append(", purchaseOrderDate=").append(purchaseOrderDate);
+        sb.append(", supplierUnitId=").append(supplierUnitId);
+        sb.append(", purchasingOrganizationId=").append(purchasingOrganizationId);
+        sb.append(", purchaseOrderBuyer=").append(purchaseOrderBuyer);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", puchaseOrderMaterialNumber=").append(puchaseOrderMaterialNumber);
+        sb.append(", receiveUnitId=").append(receiveUnitId);
+        sb.append(", puchaseOrderDeliveryDate=").append(puchaseOrderDeliveryDate);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 348 - 0
src/main/java/com/steerinfo/dil/model/TmstrainLoadingResult.java

@@ -0,0 +1,348 @@
+package com.steerinfo.dil.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 TmstrainLoadingResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 采购订单ID/发运计划ID(PURCHASE_ORDER_RAIL_PLAN_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="采购订单ID/发运计划ID",required=false)
+    private BigDecimal purchaseOrderRailPlanId;
+
+    /**
+     * 车皮号(RESULT_WAGON_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车皮号",required=false)
+    private String resultWagonNo;
+
+    /**
+     * 车皮标重(RESULT_BILLABLE_TONNAGE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="车皮标重",required=false)
+    private BigDecimal resultBillableTonnage;
+
+    /**
+     * 是否清场(0:未清场;1:清场)(RESULT_ISCLEAR,VARCHAR,20)
+     */
+    @ApiModelProperty(value="是否清场(0:未清场;1:清场)",required=false)
+    private String resultIsclear;
+
+    /**
+     * 运力ID(汽车车牌号)(CAPACITY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运力ID(汽车车牌号)",required=false)
+    private BigDecimal capacityId;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 钢材件数(RESULT_MATERIAL_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="钢材件数",required=false)
+    private BigDecimal resultMaterialNumber;
+
+    /**
+     * 钢材理重(RESULT_MATERIAL_THEORYWEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="钢材理重",required=false)
+    private BigDecimal resultMaterialTheoryweight;
+
+    /**
+     * 批次ID(BATCH_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="批次ID",required=false)
+    private BigDecimal batchId;
+
+    /**
+     * 班别(0:白班,1:夜班)(RESULT_CLASS,VARCHAR,20)
+     */
+    @ApiModelProperty(value="班别(0:白班,1:夜班)",required=false)
+    private String resultClass;
+
+    /**
+     * 装车日期(RESULT_LOADING_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="装车日期",required=false)
+    private Date resultLoadingDate;
+
+    /**
+     * 备注(RESULT_REMARKS,VARCHAR,100)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String resultRemarks;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 是否删除(0:否, 1:是)(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否删除(0:否, 1:是)",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 发站ID(SEND_STATION_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="发站ID",required=false)
+    private BigDecimal sendStationId;
+
+    /**
+     * 到站ID(ARRIVAL_STATION_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="到站ID",required=false)
+    private BigDecimal arrivalStationId;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getPurchaseOrderRailPlanId() {
+        return purchaseOrderRailPlanId;
+    }
+
+    public void setPurchaseOrderRailPlanId(BigDecimal purchaseOrderRailPlanId) {
+        this.purchaseOrderRailPlanId = purchaseOrderRailPlanId;
+    }
+
+    public String getResultWagonNo() {
+        return resultWagonNo;
+    }
+
+    public void setResultWagonNo(String resultWagonNo) {
+        this.resultWagonNo = resultWagonNo == null ? null : resultWagonNo.trim();
+    }
+
+    public BigDecimal getResultBillableTonnage() {
+        return resultBillableTonnage;
+    }
+
+    public void setResultBillableTonnage(BigDecimal resultBillableTonnage) {
+        this.resultBillableTonnage = resultBillableTonnage;
+    }
+
+    public String getResultIsclear() {
+        return resultIsclear;
+    }
+
+    public void setResultIsclear(String resultIsclear) {
+        this.resultIsclear = resultIsclear == null ? null : resultIsclear.trim();
+    }
+
+    public BigDecimal getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(BigDecimal capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getResultMaterialNumber() {
+        return resultMaterialNumber;
+    }
+
+    public void setResultMaterialNumber(BigDecimal resultMaterialNumber) {
+        this.resultMaterialNumber = resultMaterialNumber;
+    }
+
+    public BigDecimal getResultMaterialTheoryweight() {
+        return resultMaterialTheoryweight;
+    }
+
+    public void setResultMaterialTheoryweight(BigDecimal resultMaterialTheoryweight) {
+        this.resultMaterialTheoryweight = resultMaterialTheoryweight;
+    }
+
+    public BigDecimal getBatchId() {
+        return batchId;
+    }
+
+    public void setBatchId(BigDecimal batchId) {
+        this.batchId = batchId;
+    }
+
+    public String getResultClass() {
+        return resultClass;
+    }
+
+    public void setResultClass(String resultClass) {
+        this.resultClass = resultClass == null ? null : resultClass.trim();
+    }
+
+    public Date getResultLoadingDate() {
+        return resultLoadingDate;
+    }
+
+    public void setResultLoadingDate(Date resultLoadingDate) {
+        this.resultLoadingDate = resultLoadingDate;
+    }
+
+    public String getResultRemarks() {
+        return resultRemarks;
+    }
+
+    public void setResultRemarks(String resultRemarks) {
+        this.resultRemarks = resultRemarks == null ? null : resultRemarks.trim();
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    public BigDecimal getSendStationId() {
+        return sendStationId;
+    }
+
+    public void setSendStationId(BigDecimal sendStationId) {
+        this.sendStationId = sendStationId;
+    }
+
+    public BigDecimal getArrivalStationId() {
+        return arrivalStationId;
+    }
+
+    public void setArrivalStationId(BigDecimal arrivalStationId) {
+        this.arrivalStationId = arrivalStationId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultId=").append(resultId);
+        sb.append(", purchaseOrderRailPlanId=").append(purchaseOrderRailPlanId);
+        sb.append(", resultWagonNo=").append(resultWagonNo);
+        sb.append(", resultBillableTonnage=").append(resultBillableTonnage);
+        sb.append(", resultIsclear=").append(resultIsclear);
+        sb.append(", capacityId=").append(capacityId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", resultMaterialNumber=").append(resultMaterialNumber);
+        sb.append(", resultMaterialTheoryweight=").append(resultMaterialTheoryweight);
+        sb.append(", batchId=").append(batchId);
+        sb.append(", resultClass=").append(resultClass);
+        sb.append(", resultLoadingDate=").append(resultLoadingDate);
+        sb.append(", resultRemarks=").append(resultRemarks);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", sendStationId=").append(sendStationId);
+        sb.append(", arrivalStationId=").append(arrivalStationId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 304 - 0
src/main/java/com/steerinfo/dil/model/TmstrainPleaseApproveResult.java

@@ -0,0 +1,304 @@
+package com.steerinfo.dil.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 TmstrainPleaseApproveResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 发运计划ID(RAIL_PLAN_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="发运计划ID",required=false)
+    private BigDecimal railPlanId;
+
+    /**
+     * 请车计划号(RESULT_PLEASE_PLAN_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="请车计划号",required=false)
+    private String resultPleasePlanNo;
+
+    /**
+     * 计划日期(RESULT_PLAN_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="计划日期",required=false)
+    private Date resultPlanDate;
+
+    /**
+     * 品类(默认铁矿石)(RESULT_CATEGORY,VARCHAR,20)
+     */
+    @ApiModelProperty(value="品类(默认铁矿石)",required=false)
+    private String resultCategory;
+
+    /**
+     * 发货单位ID(资源管理托运人)(SHIPPER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="发货单位ID(资源管理托运人)",required=false)
+    private BigDecimal shipperId;
+
+    /**
+     * 发站ID(SEND_STATION_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="发站ID",required=false)
+    private BigDecimal sendStationId;
+
+    /**
+     * 到站ID(TO_THE_STATION_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="到站ID",required=false)
+    private BigDecimal toTheStationId;
+
+    /**
+     * 请车数(RESULT_PLEASE_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="请车数",required=false)
+    private BigDecimal resultPleaseNumber;
+
+    /**
+     * 请车日期(RESULT_PLEASE_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="请车日期",required=false)
+    private Date resultPleaseDate;
+
+    /**
+     * 批车数(RESULT_APPROVE_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="批车数",required=false)
+    private BigDecimal resultApproveNumber;
+
+    /**
+     * 批车日期(RESULT_APPROVE_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="批车日期",required=false)
+    private Date resultApproveDate;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 状态:0未下发 1已下发 2已批车 3逻辑删除(STATUS,DECIMAL,38)
+     */
+    @ApiModelProperty(value="状态:0未下发 1已下发 2已批车 3逻辑删除",required=false)
+    private BigDecimal status;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.resultId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getResultId() {
+        return resultId;
+    }
+
+    public void setResultId(BigDecimal resultId) {
+        this.resultId = resultId;
+    }
+
+    public BigDecimal getRailPlanId() {
+        return railPlanId;
+    }
+
+    public void setRailPlanId(BigDecimal railPlanId) {
+        this.railPlanId = railPlanId;
+    }
+
+    public String getResultPleasePlanNo() {
+        return resultPleasePlanNo;
+    }
+
+    public void setResultPleasePlanNo(String resultPleasePlanNo) {
+        this.resultPleasePlanNo = resultPleasePlanNo == null ? null : resultPleasePlanNo.trim();
+    }
+
+    public Date getResultPlanDate() {
+        return resultPlanDate;
+    }
+
+    public void setResultPlanDate(Date resultPlanDate) {
+        this.resultPlanDate = resultPlanDate;
+    }
+
+    public String getResultCategory() {
+        return resultCategory;
+    }
+
+    public void setResultCategory(String resultCategory) {
+        this.resultCategory = resultCategory == null ? null : resultCategory.trim();
+    }
+
+    public BigDecimal getShipperId() {
+        return shipperId;
+    }
+
+    public void setShipperId(BigDecimal shipperId) {
+        this.shipperId = shipperId;
+    }
+
+    public BigDecimal getSendStationId() {
+        return sendStationId;
+    }
+
+    public void setSendStationId(BigDecimal sendStationId) {
+        this.sendStationId = sendStationId;
+    }
+
+    public BigDecimal getToTheStationId() {
+        return toTheStationId;
+    }
+
+    public void setToTheStationId(BigDecimal toTheStationId) {
+        this.toTheStationId = toTheStationId;
+    }
+
+    public BigDecimal getResultPleaseNumber() {
+        return resultPleaseNumber;
+    }
+
+    public void setResultPleaseNumber(BigDecimal resultPleaseNumber) {
+        this.resultPleaseNumber = resultPleaseNumber;
+    }
+
+    public Date getResultPleaseDate() {
+        return resultPleaseDate;
+    }
+
+    public void setResultPleaseDate(Date resultPleaseDate) {
+        this.resultPleaseDate = resultPleaseDate;
+    }
+
+    public BigDecimal getResultApproveNumber() {
+        return resultApproveNumber;
+    }
+
+    public void setResultApproveNumber(BigDecimal resultApproveNumber) {
+        this.resultApproveNumber = resultApproveNumber;
+    }
+
+    public Date getResultApproveDate() {
+        return resultApproveDate;
+    }
+
+    public void setResultApproveDate(Date resultApproveDate) {
+        this.resultApproveDate = resultApproveDate;
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getStatus() {
+        return status;
+    }
+
+    public void setStatus(BigDecimal status) {
+        this.status = status;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", resultId=").append(resultId);
+        sb.append(", railPlanId=").append(railPlanId);
+        sb.append(", resultPleasePlanNo=").append(resultPleasePlanNo);
+        sb.append(", resultPlanDate=").append(resultPlanDate);
+        sb.append(", resultCategory=").append(resultCategory);
+        sb.append(", shipperId=").append(shipperId);
+        sb.append(", sendStationId=").append(sendStationId);
+        sb.append(", toTheStationId=").append(toTheStationId);
+        sb.append(", resultPleaseNumber=").append(resultPleaseNumber);
+        sb.append(", resultPleaseDate=").append(resultPleaseDate);
+        sb.append(", resultApproveNumber=").append(resultApproveNumber);
+        sb.append(", resultApproveDate=").append(resultApproveDate);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", status=").append(status);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 273 - 0
src/main/java/com/steerinfo/dil/model/TmstrainWagonLoadResult.java

@@ -0,0 +1,273 @@
+package com.steerinfo.dil.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 TmstrainWagonLoadResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(LOADING_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal loadingId;
+
+    /**
+     * 采购订单ID(PURCHASE_ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="采购订单ID",required=false)
+    private BigDecimal purchaseOrderId;
+
+    /**
+     * 车皮号(WAGON_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车皮号",required=false)
+    private String wagonNo;
+
+    /**
+     * 计费吨位(LOADING_BILLABLE_TONNAGE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="计费吨位",required=false)
+    private Short loadingBillableTonnage;
+
+    /**
+     * 班别(0:白班,1:夜班)(RESULT_CLASS,VARCHAR,20)
+     */
+    @ApiModelProperty(value="班别(0:白班,1:夜班)",required=false)
+    private String resultClass;
+
+    /**
+     * 装车时间(LOADING_WAGON_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="装车时间",required=false)
+    private Date loadingWagonTime;
+
+    /**
+     * 备注(LOADING_REMARK,VARCHAR,20)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String loadingRemark;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 品名(PRODUCT_NAME,VARCHAR,36)
+     */
+    @ApiModelProperty(value="品名",required=false)
+    private String productName;
+
+    /**
+     * 发站ID(SEND_STATION_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="发站ID",required=false)
+    private Short sendStationId;
+
+    /**
+     * 到站ID(ARRIVAL_STATION_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="到站ID",required=false)
+    private Short arrivalStationId;
+
+    /**
+     * 是否删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否删除",required=false)
+    private Short deleted;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.loadingId;
+    }
+
+    @Override
+    public void setId(BigDecimal loadingId) {
+        this.loadingId = loadingId;
+    }
+
+    public BigDecimal getLoadingId() {
+        return loadingId;
+    }
+
+    public void setLoadingId(BigDecimal loadingId) {
+        this.loadingId = loadingId;
+    }
+
+    public BigDecimal getPurchaseOrderId() {
+        return purchaseOrderId;
+    }
+
+    public void setPurchaseOrderId(BigDecimal purchaseOrderId) {
+        this.purchaseOrderId = purchaseOrderId;
+    }
+
+    public String getWagonNo() {
+        return wagonNo;
+    }
+
+    public void setWagonNo(String wagonNo) {
+        this.wagonNo = wagonNo == null ? null : wagonNo.trim();
+    }
+
+    public Short getLoadingBillableTonnage() {
+        return loadingBillableTonnage;
+    }
+
+    public void setLoadingBillableTonnage(Short loadingBillableTonnage) {
+        this.loadingBillableTonnage = loadingBillableTonnage;
+    }
+
+    public String getResultClass() {
+        return resultClass;
+    }
+
+    public void setResultClass(String resultClass) {
+        this.resultClass = resultClass == null ? null : resultClass.trim();
+    }
+
+    public Date getLoadingWagonTime() {
+        return loadingWagonTime;
+    }
+
+    public void setLoadingWagonTime(Date loadingWagonTime) {
+        this.loadingWagonTime = loadingWagonTime;
+    }
+
+    public String getLoadingRemark() {
+        return loadingRemark;
+    }
+
+    public void setLoadingRemark(String loadingRemark) {
+        this.loadingRemark = loadingRemark == null ? null : loadingRemark.trim();
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName == null ? null : productName.trim();
+    }
+
+    public Short getSendStationId() {
+        return sendStationId;
+    }
+
+    public void setSendStationId(Short sendStationId) {
+        this.sendStationId = sendStationId;
+    }
+
+    public Short getArrivalStationId() {
+        return arrivalStationId;
+    }
+
+    public void setArrivalStationId(Short arrivalStationId) {
+        this.arrivalStationId = arrivalStationId;
+    }
+
+    public Short getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(Short deleted) {
+        this.deleted = deleted;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", loadingId=").append(loadingId);
+        sb.append(", purchaseOrderId=").append(purchaseOrderId);
+        sb.append(", wagonNo=").append(wagonNo);
+        sb.append(", loadingBillableTonnage=").append(loadingBillableTonnage);
+        sb.append(", resultClass=").append(resultClass);
+        sb.append(", loadingWagonTime=").append(loadingWagonTime);
+        sb.append(", loadingRemark=").append(loadingRemark);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", productName=").append(productName);
+        sb.append(", sendStationId=").append(sendStationId);
+        sb.append(", arrivalStationId=").append(arrivalStationId);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 258 - 0
src/main/java/com/steerinfo/dil/model/TmstrainWagonUnloadResult.java

@@ -0,0 +1,258 @@
+package com.steerinfo.dil.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 TmstrainWagonUnloadResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(UNLOADING_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal unloadingId;
+
+    /**
+     * 采购订单ID/发运计划ID(PURCHASE_ORDER_RAIL_PLAN_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="采购订单ID/发运计划ID",required=false)
+    private BigDecimal purchaseOrderRailPlanId;
+
+    /**
+     * 车皮号(RESULT_WAGON_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车皮号",required=false)
+    private String resultWagonNo;
+
+    /**
+     * 到达日期(RESULT_ARRIVAL_DATE,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="到达日期",required=false)
+    private Date resultArrivalDate;
+
+    /**
+     * 卸车日期(RESULT_UNLOAD_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="卸车日期",required=false)
+    private Date resultUnloadTime;
+
+    /**
+     * 卸车地点(UNLOADING_POINT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="卸车地点",required=false)
+    private BigDecimal unloadingPointId;
+
+    /**
+     * 大票重量(RESULT_BIG_TICKET_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="大票重量",required=false)
+    private BigDecimal resultBigTicketWeight;
+
+    /**
+     * 轨道衡重量(RESULT_RAIL_HORIZONTAL_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="轨道衡重量",required=false)
+    private BigDecimal resultRailHorizontalWeight;
+
+    /**
+     * 备注(RESULT_REMARK,VARCHAR,20)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String resultRemark;
+
+    /**
+     * 记录创建人(INSERT_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录创建人",required=false)
+    private String insertUsername;
+
+    /**
+     * 记录创建时间(INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录创建时间",required=false)
+    private Date insertTime;
+
+    /**
+     * 记录修改人(UPDATE_USERNAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="记录修改人",required=false)
+    private String updateUsername;
+
+    /**
+     * 记录修改时间(UPDATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="记录修改时间",required=false)
+    private Date updateTime;
+
+    /**
+     * 记录创建或修改备注(INSERT_UPDATE_REMARK,VARCHAR,100)
+     */
+    @ApiModelProperty(value="记录创建或修改备注",required=false)
+    private String insertUpdateRemark;
+
+    /**
+     * 是否删除(0:否, 1:是)(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否删除(0:否, 1:是)",required=false)
+    private BigDecimal deleted;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.unloadingId;
+    }
+
+    @Override
+    public void setId(BigDecimal unloadingId) {
+        this.unloadingId = unloadingId;
+    }
+
+    public BigDecimal getUnloadingId() {
+        return unloadingId;
+    }
+
+    public void setUnloadingId(BigDecimal unloadingId) {
+        this.unloadingId = unloadingId;
+    }
+
+    public BigDecimal getPurchaseOrderRailPlanId() {
+        return purchaseOrderRailPlanId;
+    }
+
+    public void setPurchaseOrderRailPlanId(BigDecimal purchaseOrderRailPlanId) {
+        this.purchaseOrderRailPlanId = purchaseOrderRailPlanId;
+    }
+
+    public String getResultWagonNo() {
+        return resultWagonNo;
+    }
+
+    public void setResultWagonNo(String resultWagonNo) {
+        this.resultWagonNo = resultWagonNo == null ? null : resultWagonNo.trim();
+    }
+
+    public Date getResultArrivalDate() {
+        return resultArrivalDate;
+    }
+
+    public void setResultArrivalDate(Date resultArrivalDate) {
+        this.resultArrivalDate = resultArrivalDate;
+    }
+
+    public Date getResultUnloadTime() {
+        return resultUnloadTime;
+    }
+
+    public void setResultUnloadTime(Date resultUnloadTime) {
+        this.resultUnloadTime = resultUnloadTime;
+    }
+
+    public BigDecimal getUnloadingPointId() {
+        return unloadingPointId;
+    }
+
+    public void setUnloadingPointId(BigDecimal unloadingPointId) {
+        this.unloadingPointId = unloadingPointId;
+    }
+
+    public BigDecimal getResultBigTicketWeight() {
+        return resultBigTicketWeight;
+    }
+
+    public void setResultBigTicketWeight(BigDecimal resultBigTicketWeight) {
+        this.resultBigTicketWeight = resultBigTicketWeight;
+    }
+
+    public BigDecimal getResultRailHorizontalWeight() {
+        return resultRailHorizontalWeight;
+    }
+
+    public void setResultRailHorizontalWeight(BigDecimal resultRailHorizontalWeight) {
+        this.resultRailHorizontalWeight = resultRailHorizontalWeight;
+    }
+
+    public String getResultRemark() {
+        return resultRemark;
+    }
+
+    public void setResultRemark(String resultRemark) {
+        this.resultRemark = resultRemark == null ? null : resultRemark.trim();
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", unloadingId=").append(unloadingId);
+        sb.append(", purchaseOrderRailPlanId=").append(purchaseOrderRailPlanId);
+        sb.append(", resultWagonNo=").append(resultWagonNo);
+        sb.append(", resultArrivalDate=").append(resultArrivalDate);
+        sb.append(", resultUnloadTime=").append(resultUnloadTime);
+        sb.append(", unloadingPointId=").append(unloadingPointId);
+        sb.append(", resultBigTicketWeight=").append(resultBigTicketWeight);
+        sb.append(", resultRailHorizontalWeight=").append(resultRailHorizontalWeight);
+        sb.append(", resultRemark=").append(resultRemark);
+        sb.append(", insertUsername=").append(insertUsername);
+        sb.append(", insertTime=").append(insertTime);
+        sb.append(", updateUsername=").append(updateUsername);
+        sb.append(", updateTime=").append(updateTime);
+        sb.append(", insertUpdateRemark=").append(insertUpdateRemark);
+        sb.append(", deleted=").append(deleted);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 30 - 0
src/main/java/com/steerinfo/dil/service/IAmsPurchaseOrderService.java

@@ -0,0 +1,30 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.AmsPurchaseOrder;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+
+/**
+ * AmsPurchaseOrder服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-19 09:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-19
+ * 作者:generator
+ * 参考:
+ * 描述:AmsPurchaseOrder服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IAmsPurchaseOrderService{
+    //添加采购订单
+    int insertAmsPurchaseOrder(AmsPurchaseOrder amsPurchaseOrder);
+    //通过主键删除采购订单
+    int deleteAmsPurchaseOrderByPurchaseOrderId(BigDecimal purchaseOrderId);
+    //通过主键修改采购订单
+    int updateAmsPurchaseOrderByPurchaseOrderId(AmsPurchaseOrder amsPurchaseOrder);
+    //通过主键查询采购订单
+    AmsPurchaseOrder getAmsPurchaseOrderByPurchaseOrderId(BigDecimal purchaseOrderId);
+}

+ 45 - 0
src/main/java/com/steerinfo/dil/service/ITmstrainLoadingResultService.java

@@ -0,0 +1,45 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.TmstrainLoadingResult;
+import com.steerinfo.dil.model.TmstrainWagonLoadResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainLoadingResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-30 02:23
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-30
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainLoadingResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstrainLoadingResultService{
+    //查询所有装车作业信息
+    List<Map<String, Object>> getTmstrainWagonLoad(Map<String,Object> map);
+    //新增车皮装车作业实绩
+    int addTmstrainLoadingResult(TmstrainLoadingResult tmstrainLoadingResult);
+    //获得发站地点名称
+    List<Map<String, Object>> getSendStationName();
+    //获得到站地点名称
+    List<Map<String, Object>> getArrivalStationName();
+    //获得批次ID
+    List<Map<String, Object>> getBatchId();
+    //获得装车车皮号
+    List<Map<String, Object>> getWagonNo();
+    //通过主键获得车皮装车信息
+    List<Map<String, Object>> getTmstrainLoadingResultByResultId(BigDecimal resultId);
+    //修改车皮装车作业实绩
+    int updateTmstrainLoadingResult(TmstrainLoadingResult tmstrainLoadingResult);
+    //通过主键删除车皮装车作业实绩
+    int deleteTmstrainLoadingResultByResultId(BigDecimal resultId);
+
+
+}

+ 48 - 0
src/main/java/com/steerinfo/dil/service/ITmstrainPleaseApproveResultService.java

@@ -0,0 +1,48 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.TmstrainPleaseApproveResult;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainPleaseApproveResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-30 02:09
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-30
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainPleaseApproveResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstrainPleaseApproveResultService{
+    //查询所有已下发的请车作业
+    List<Map<String, Object>> getAllWagonPlease(Map<String, Object> mapValue);
+
+    //获取最大ID主键值
+    BigDecimal selectMaxId();
+
+    //新增每日请车作业
+    int insertSelective(TmstrainPleaseApproveResult tmstrainPleaseApproveResult);
+
+    //修改 、删除、下发请车作业、    修改、新增批车作业
+    int updateByPrimaryKeySelective(TmstrainPleaseApproveResult tmstrainPleaseApproveResult);
+
+    //查询所有批车计划 状态码为 2
+    List<Map<String, Object>> getAllApproveWagonPlease(Map<String, Object> mapValue);
+
+    //通过Id查询批车作业
+    List<Map<String, Object>> getApproveWagonPleaseById(Integer resultId);
+
+    //获取收货单位
+    List<Map<String, Object>> getShipper();
+
+    //获取发运计划
+    List<Map<String, Object>> getRailPlan();
+
+    //通过Id查询请车作业
+    List<Map<String, Object>> getWagonPleaseById(Integer resultId);
+}

+ 40 - 0
src/main/java/com/steerinfo/dil/service/ITmstrainWagonUnloadResultService.java

@@ -0,0 +1,40 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.TmstrainWagonUnloadResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainWagonUnloadResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-19 09:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-19
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainWagonUnloadResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstrainWagonUnloadResultService{
+    //查询所有卸车作业信息
+    List<Map<String, Object>> getTmstrainWagonUnLoad(Map<String,Object> map);
+    //通过主键删除车皮卸车作业实绩
+    int deleteTmstrainWagonUnLoadResultByUnLoadingId(BigDecimal unloadingId);
+    //新增车皮卸车作业实绩
+    int addTmstrainWagonLoadResult(TmstrainWagonUnloadResult tmstrainWagonUnloadResult);
+    //修改车皮装车作业实绩
+    int updateTmstrainWagonUnLoadResult(TmstrainWagonUnloadResult tmstrainWagonUnloadResult);
+    //查询火运实绩
+    List<Map<String, Object>> getTmstrainResult(Map<String,Object>map);
+    //获得卸车地点名称
+    List<Map<String, Object>> getUnloadingPointName();
+    //获得卸车路线名称
+    List<Map<String, Object>> getUnloadingRouteName();
+    //通过主键获取车皮卸车信息
+    List<Map<String, Object>> getTmstrainWagonUnLoadResultByUnLoadingId(BigDecimal unloadingId);
+}

+ 120 - 0
src/main/java/com/steerinfo/dil/service/impl/AmsPurchaseOrderServiceImpl.java

@@ -0,0 +1,120 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.AmsPurchaseOrderMapper;
+import com.steerinfo.dil.model.AmsPurchaseOrder;
+import com.steerinfo.dil.service.IAmsPurchaseOrderService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * AmsPurchaseOrder服务实现:
+ * @author zouzhd
+ * @version 1.0-SNAPSHORT 2021-08-19 09:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-19
+ * 作者:generator
+ * 参考:
+ * 描述:AmsPurchaseOrder服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service
+public class AmsPurchaseOrderServiceImpl implements IAmsPurchaseOrderService{
+
+    @Autowired
+    private AmsPurchaseOrderMapper amsPurchaseOrderMapper;
+
+    /**
+     * 采购订单生成
+     * @param amsPurchaseOrder
+     * @return
+     */
+    @Override
+    public int insertAmsPurchaseOrder(AmsPurchaseOrder amsPurchaseOrder) {
+        long id;
+        if(amsPurchaseOrderMapper.selectMaxId()==null){
+            id = 1;
+        }else {
+            id = amsPurchaseOrderMapper.selectMaxId().longValue()+1;
+        }
+        amsPurchaseOrder.setPurchaseOrderId(new BigDecimal(id));
+        //WCGDD-年月日-8位数的顺序号
+        Calendar now = Calendar.getInstance();
+        String number = "WCGDD-" +  now.get(Calendar.YEAR);
+        if (now.get(Calendar.MONTH)+1 < 10) {
+            number = number + "0" + (now.get(Calendar.MONTH)+1);
+        }
+        else {
+            number = number + now.get(Calendar.MONTH)+1;
+        }
+        number = number + now.get(now.DAY_OF_MONTH)+"-";
+        switch ((new BigDecimal(id).toString()).length()) {
+            case 1:
+                number = number + "0000000" + id;
+                break;
+            case 2:
+                number = number + "000000" + id;
+                break;
+            case 3:
+                number = number + "00000" + id;
+                break;
+            case 4:
+                number = number + "0000" + id;
+                break;
+            case 5:
+                number = number + "000" + id;
+                break;
+            case 6:
+                number = number + "00" + id;
+                break;
+            case 7:
+                number = number + "0" + id;
+                break;
+            default:number = number + id;
+        }
+        amsPurchaseOrder.setPurchaseOrderNo(number);
+        amsPurchaseOrder.setPurchaseOrderDate(new Date());
+        amsPurchaseOrder.setInsertUsername("admin");
+        amsPurchaseOrder.setInsertTime(new Date());
+        amsPurchaseOrder.setUpdateUsername("admin");
+        amsPurchaseOrder.setUpdateTime(new Date());
+        amsPurchaseOrder.setInsertUpdateRemark("无");
+        System.out.println(amsPurchaseOrder);
+        return amsPurchaseOrderMapper.insert(amsPurchaseOrder);
+    }
+
+    /**
+     * 通过主键删除采购订单
+     * @param purchaseOrderId
+     * @return
+     */
+    @Override
+    public int deleteAmsPurchaseOrderByPurchaseOrderId(BigDecimal purchaseOrderId) {
+        return amsPurchaseOrderMapper.deleteByPrimaryKey(purchaseOrderId);
+    }
+
+    /**
+     * 通过主键修改采购订单
+     * @param amsPurchaseOrder
+     * @return
+     */
+    @Override
+    public int updateAmsPurchaseOrderByPurchaseOrderId(AmsPurchaseOrder amsPurchaseOrder) {
+        return amsPurchaseOrderMapper.updateByPrimaryKeySelective(amsPurchaseOrder);
+    }
+
+    /**
+     * 通过主键查询采购订单
+     * @param purchaseOrderId
+     * @return
+     */
+    @Override
+    public AmsPurchaseOrder getAmsPurchaseOrderByPurchaseOrderId(BigDecimal purchaseOrderId) {
+        return amsPurchaseOrderMapper.selectByPrimaryKey(purchaseOrderId);
+    }
+}

+ 120 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstrainLoadingResultServiceImpl.java

@@ -0,0 +1,120 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.feign.WmsBoundFeign;
+import com.steerinfo.dil.mapper.TmstrainLoadingResultMapper;
+import com.steerinfo.dil.model.TmstrainLoadingResult;
+import com.steerinfo.dil.service.ITmstrainLoadingResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainLoadingResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-30 02:23
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-30
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainLoadingResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstrainLoadingResultService")
+public class TmstrainLoadingResultServiceImpl implements ITmstrainLoadingResultService {
+
+    @Autowired
+    private TmstrainLoadingResultMapper tmstrainLoadingResultMapper;
+
+    @Autowired
+    private WmsBoundFeign wmsBoundFeign;
+
+
+    @Override
+    public List<Map<String, Object>> getTmstrainWagonLoad(Map<String, Object> map) {
+        return tmstrainLoadingResultMapper.getTmsWagonLoadInfo(map);
+    }
+
+    @Override
+    @Transactional
+    public int addTmstrainLoadingResult(TmstrainLoadingResult tmstrainLoadingResult) {
+        long id;
+        if(tmstrainLoadingResultMapper.selectMaxId()==null){
+            id = 1;
+        }else {
+            id = tmstrainLoadingResultMapper.selectMaxId().longValue()+1;
+        }
+        //生成主键id
+        tmstrainLoadingResult.setResultId(new BigDecimal(id));
+        //通过批次ID获得采购订单号和物资ID
+        BigDecimal batchId = tmstrainLoadingResult.getBatchId();
+        BigDecimal materialId = tmstrainLoadingResultMapper.getMaterialID(batchId);
+        //查询并插入采购订单号
+        BigDecimal purchaseOrderId = tmstrainLoadingResultMapper.getPurchaseOrderId(batchId);
+        tmstrainLoadingResult.setPurchaseOrderRailPlanId(purchaseOrderId);
+        tmstrainLoadingResult.setMaterialId(materialId);
+        //常规字段插入
+        tmstrainLoadingResult.setInsertUsername("admin");
+        tmstrainLoadingResult.setInsertTime(new Date());
+        tmstrainLoadingResult.setUpdateUsername("admin");
+        tmstrainLoadingResult.setUpdateTime(new Date());
+        tmstrainLoadingResult.setInsertUpdateRemark("无");
+        tmstrainLoadingResult.setDeleted(new BigDecimal(0));
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("isClean",tmstrainLoadingResult.getResultIsclear());
+        map.put("resultTonnage", tmstrainLoadingResult.getResultBillableTonnage());
+        map.put("batchId", batchId);
+        //通过发站查询发站的所属港口
+        BigDecimal portId = tmstrainLoadingResultMapper.getPortIdBySendStationId(tmstrainLoadingResult.getSendStationId());
+        map.put("portId", portId);
+        wmsBoundFeign.addResult(map);
+
+        return tmstrainLoadingResultMapper.insertSelective(tmstrainLoadingResult);
+    }
+
+    @Override
+    public List<Map<String, Object>> getTmstrainLoadingResultByResultId(BigDecimal resultId) {
+        return tmstrainLoadingResultMapper.selectByResultId(resultId);
+    }
+
+    @Override
+    public int updateTmstrainLoadingResult(TmstrainLoadingResult tmstrainLoadingResult) {
+        tmstrainLoadingResult.setUpdateTime(new Date());
+        return tmstrainLoadingResultMapper.updateByPrimaryKeySelective(tmstrainLoadingResult);
+    }
+
+    @Override
+    public int deleteTmstrainLoadingResultByResultId(BigDecimal resultId) {
+        TmstrainLoadingResult tmstrainLoadingResult = tmstrainLoadingResultMapper.selectByPrimaryKey(resultId);
+        tmstrainLoadingResult.setDeleted(new BigDecimal(1));
+        return tmstrainLoadingResultMapper.updateByPrimaryKeySelective(tmstrainLoadingResult);
+    }
+
+    @Override
+    public List<Map<String, Object>> getSendStationName() {
+        return tmstrainLoadingResultMapper.getSendStationName();
+    }
+
+    @Override
+    public List<Map<String, Object>> getArrivalStationName() {
+        return tmstrainLoadingResultMapper.getArrivalStationName();
+    }
+
+    @Override
+    public List<Map<String, Object>> getBatchId() {
+        return tmstrainLoadingResultMapper.getBatchId();
+    }
+
+    @Override
+    public List<Map<String, Object>> getWagonNo() {
+        return tmstrainLoadingResultMapper.getWagonNo();
+    }
+}

+ 144 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstrainPleaseApproveResultServiceImpl.java

@@ -0,0 +1,144 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.TmstrainPleaseApproveResultMapper;
+import com.steerinfo.dil.model.TmstrainPleaseApproveResult;
+import com.steerinfo.dil.service.ITmstrainPleaseApproveResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainPleaseApproveResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-30 02:09
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-30
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainPleaseApproveResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstrainPleaseApproveResultService")
+public class TmstrainPleaseApproveResultServiceImpl implements ITmstrainPleaseApproveResultService {
+
+    @Autowired
+    private TmstrainPleaseApproveResultMapper tmstrainPleaseApproveResultMapper;
+
+
+    /**
+     * 查询所有未下发请车计划
+     * @param mapValue
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllWagonPlease(Map<String, Object> mapValue) {
+        return tmstrainPleaseApproveResultMapper.getAllWagonPlease(mapValue);
+    }
+
+    /**
+     * 获取最大主键ID
+     * @return
+     */
+    @Override
+    public BigDecimal selectMaxId() {
+        return tmstrainPleaseApproveResultMapper.selectMaxId();
+    }
+
+    /**
+     * 新增请车作业
+     * @param tmstrainPleaseApproveResult 请车批车实绩
+     * @return
+     */
+    @Override
+    public int insertSelective(TmstrainPleaseApproveResult tmstrainPleaseApproveResult) {
+        //生成主键ID
+        long id;
+        BigDecimal selectId = selectMaxId();
+        if(selectId == null){
+            id = 1;
+        }else {
+            id = selectId.longValue() + 1;
+        }
+        tmstrainPleaseApproveResult.setResultId(new BigDecimal(id));
+        //设置状态 新增的为未下发状态
+        tmstrainPleaseApproveResult.setStatus(new BigDecimal(0));
+        //生成请车计划号
+        String resultPleasePlanNo;
+        if(id >= 100){
+            resultPleasePlanNo = "WQCJH-" + id;
+        }else if(id >= 10) {
+            resultPleasePlanNo = "WQCJH-0" + id;
+        }else {
+            resultPleasePlanNo = "WQCJH-00" + id;
+        }
+        tmstrainPleaseApproveResult.setResultPleasePlanNo(resultPleasePlanNo);
+        //生成请车日期
+        tmstrainPleaseApproveResult.setResultPleaseDate(new Date());
+        return tmstrainPleaseApproveResultMapper.insertSelective(tmstrainPleaseApproveResult);
+    }
+
+    /**
+     * 修改、下发、删除请车作业  修改、删除批车作业
+     * @param tmstrainPleaseApproveResult
+     * @return
+     */
+    @Override
+    public int updateByPrimaryKeySelective(TmstrainPleaseApproveResult tmstrainPleaseApproveResult) {
+        return tmstrainPleaseApproveResultMapper.updateByPrimaryKeySelective(tmstrainPleaseApproveResult);
+    }
+
+    /**
+     * 查询所有批车作业
+     * @param mapValue
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllApproveWagonPlease(Map<String, Object> mapValue) {
+        return tmstrainPleaseApproveResultMapper.getAllApproveWagonPlease(mapValue);
+    }
+
+    /**
+     * 通过ID查询批车作业
+     * @param resultId
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getApproveWagonPleaseById(Integer resultId) {
+        return tmstrainPleaseApproveResultMapper.getApproveWagonPleaseById(resultId);
+    }
+
+    /**
+     * 通过Id查询请车作业 用于修改
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getWagonPleaseById(Integer resultId) {
+        return tmstrainPleaseApproveResultMapper.getWagonPleaseById(resultId);
+    }
+    /**
+     * 获取收货单位
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getShipper() {
+        return tmstrainPleaseApproveResultMapper.getShipper();
+    }
+
+    /**
+     * 获取发运计划
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getRailPlan() {
+        return tmstrainPleaseApproveResultMapper.getRailPlan();
+    }
+
+
+
+}

+ 93 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstrainWagonUnloadResultServiceImpl.java

@@ -0,0 +1,93 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.TmstrainWagonUnloadResultMapper;
+import com.steerinfo.dil.model.TmstrainWagonUnloadResult;
+import com.steerinfo.dil.service.ITmstrainWagonUnloadResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstrainWagonUnloadResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-08-19 09:22
+ * 类描述
+ * 修订历史:
+ * 日期:2021-08-19
+ * 作者:generator
+ * 参考:
+ * 描述:TmstrainWagonUnloadResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstrainWagonUnloadResultService")
+public class TmstrainWagonUnloadResultServiceImpl implements ITmstrainWagonUnloadResultService {
+
+    @Autowired
+    private TmstrainWagonUnloadResultMapper tmstrainWagonUnloadResultMapper;
+
+    @Override
+    public List<Map<String, Object>> getTmstrainWagonUnLoad(Map<String, Object> map) {
+        return tmstrainWagonUnloadResultMapper.getTmsWagonUnLoadInfo(map);
+    }
+
+    @Override
+    public int deleteTmstrainWagonUnLoadResultByUnLoadingId(BigDecimal unloadingId) {
+        TmstrainWagonUnloadResult tmstrainWagonUnloadResult = tmstrainWagonUnloadResultMapper.selectByPrimaryKey(unloadingId);
+        tmstrainWagonUnloadResult.setDeleted(new BigDecimal(1));
+        return tmstrainWagonUnloadResultMapper.updateByPrimaryKeySelective(tmstrainWagonUnloadResult);
+    }
+
+    @Override
+    public int addTmstrainWagonLoadResult(TmstrainWagonUnloadResult tmstrainWagonUnloadResult) {
+        long id;
+        if(tmstrainWagonUnloadResultMapper.selectMaxId()==null){
+            id = 1;
+        }else {
+            id = tmstrainWagonUnloadResultMapper.selectMaxId().longValue()+1;
+        }
+        //生成主键id
+        tmstrainWagonUnloadResult.setUnloadingId(new BigDecimal(id));
+        //通过装车车皮号得到并插入采购订单id
+        BigDecimal purchaseOrderId = tmstrainWagonUnloadResultMapper.getPurchaseOrderId(tmstrainWagonUnloadResult.getResultWagonNo());
+        tmstrainWagonUnloadResult.setPurchaseOrderRailPlanId(purchaseOrderId);
+        //常规字段插入
+        tmstrainWagonUnloadResult.setInsertUsername("admin");
+        tmstrainWagonUnloadResult.setInsertTime(new Date());
+        tmstrainWagonUnloadResult.setUpdateUsername("admin");
+        tmstrainWagonUnloadResult.setUpdateTime(new Date());
+        tmstrainWagonUnloadResult.setInsertUpdateRemark("无");
+        tmstrainWagonUnloadResult.setDeleted(new BigDecimal(0));
+        return tmstrainWagonUnloadResultMapper.insert(tmstrainWagonUnloadResult);
+    }
+
+    @Override
+    public int updateTmstrainWagonUnLoadResult(TmstrainWagonUnloadResult tmstrainWagonUnloadResult) {
+        tmstrainWagonUnloadResult.setUpdateTime(new Date());
+        return tmstrainWagonUnloadResultMapper.updateByPrimaryKeySelective(tmstrainWagonUnloadResult);
+    }
+
+    @Override
+    public List<Map<String, Object>> getTmstrainResult(Map<String, Object> map) {
+        return tmstrainWagonUnloadResultMapper.getTmstrainResult(map);
+    }
+
+    @Override
+    public List<Map<String, Object>> getUnloadingPointName() {
+        return tmstrainWagonUnloadResultMapper.getUnloadingPointName();
+    }
+
+    @Override
+    public List<Map<String, Object>> getUnloadingRouteName() {
+        return tmstrainWagonUnloadResultMapper.getUnloadingRouteName();
+    }
+
+    @Override
+    public List<Map<String, Object>> getTmstrainWagonUnLoadResultByUnLoadingId(BigDecimal unloadingId) {
+        return tmstrainWagonUnloadResultMapper.selectByUnLoadingId(unloadingId);
+    }
+}

+ 70 - 0
src/main/java/com/steerinfo/dil/util/BaseRESTfulController.java

@@ -0,0 +1,70 @@
+package com.steerinfo.dil.util;
+
+import com.steerinfo.framework.controller.BaseController;
+import com.steerinfo.framework.controller.RESTfulResult;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/7/8 11:33
+ * @Version 1.0
+ */
+public class BaseRESTfulController extends BaseController {
+    public BaseRESTfulController() {
+    }
+
+    protected RESTfulResult success() {
+        RESTfulResult result = new RESTfulResult();
+        result.setSucceed();
+        result.setMessage(result.getResultMessage());
+        result.setData(true);
+        result.setCode("200");
+        return result;
+    }
+
+    protected RESTfulResult success(Object obj) {
+        RESTfulResult result = new RESTfulResult();
+        result.setSucceed();
+        result.setMessage(result.getResultMessage());
+        result.setData(obj);
+        result.setCode("200");
+        return result;
+    }
+
+    protected RESTfulResult success(Object obj, String msg) {
+        RESTfulResult result = this.success(obj);
+        result.setMessage(msg);
+        result.setCode("200");
+        return result;
+    }
+
+    protected RESTfulResult success(Object obj, String code, String msg) {
+        RESTfulResult result = this.success(obj, msg);
+        result.setCode(code);
+        result.setCode("200");
+        return result;
+    }
+
+    protected RESTfulResult failed() {
+        return this.failed((Object)null);
+    }
+
+    protected RESTfulResult failed(Object obj) {
+        RESTfulResult result = new RESTfulResult("201", (String)null);
+        result.setMessage(result.getResultMessage());
+        result.setData(obj);
+        return result;
+    }
+
+    protected RESTfulResult failed(Object obj, String msg) {
+        RESTfulResult result = new RESTfulResult("201", msg);
+        result.setData(obj);
+        return result;
+    }
+
+    protected RESTfulResult failed(Object obj, String code, String msg) {
+        RESTfulResult result = this.failed(obj, msg);
+        result = new RESTfulResult("201", msg);
+        result.setCode(code);
+        return result;
+    }
+}

+ 38 - 0
src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java

@@ -0,0 +1,38 @@
+package com.steerinfo.dil.util;
+
+import com.steerinfo.dil.feign.ColumnDataFeign;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.*;
+
+@Component
+public class ColumnDataUtil {
+    @Autowired
+    ColumnDataFeign columnDataFeign;
+
+    private Set<Map<String, Object>> setListMap(List<Map<String, Object>> list, String name) {
+        Set<Map<String, Object>> setString = new HashSet<>();
+        for (Map<String, Object> map : list) {//遍历每条数据
+            Map<String, Object> map1 = new HashMap<>();
+            //map.get(name)获取每条数据中对应表头字段的数据
+            map1.put("text", map.get(name));
+            if (map.get(name) != null) {
+                map1.put("value", map.get(name));
+                setString.add(map1);
+            }
+        }
+        return setString;
+    }
+
+    public PageListAdd tableColumnData(Integer apiId, List<Map<String, Object>> list,List<Map<String,Object>> data) {
+        List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
+        for (Map<String, Object> columnData : columnDataList) {
+            //每个表头字段的过滤条件
+            columnData.put("filters", setListMap(list, columnData.get("prop").toString()));
+        }
+        PageListAdd pageList = new PageListAdd(data);
+        pageList.setColumnData(columnDataList);
+        return pageList;
+    }
+}

+ 92 - 0
src/main/java/com/steerinfo/dil/util/DataChange.java

@@ -0,0 +1,92 @@
+package com.steerinfo.dil.util;
+
+import java.math.BigDecimal;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ author    :TXF
+ * @ time      :2021/8/25 11:25
+ */
+
+public class DataChange {
+
+    /**
+     * 解析前端传来的日期字符串
+     * @param vueDate
+     * @return
+     */
+    public static Date dataToDate(Object vueDate){
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date parseDate = null;
+        if (vueDate != null){
+            try {
+                String date = (String) vueDate;
+                parseDate = sdf.parse(date);
+            } catch (ParseException e) {
+                e.printStackTrace();
+            }
+        }
+        return parseDate;
+    }
+
+    /**
+     * 数据转换成BigDecimal
+     * @param data
+     * @return
+     */
+    public static BigDecimal dataToBigDecimal(Object data){
+        if (data != null){
+            if(data instanceof String){
+                String data1 = (String) data;
+                int i = Integer.parseInt(data1);
+                return new BigDecimal(i);
+            }
+            if(data instanceof Integer){
+                Integer data2 = (Integer) data;
+                return new BigDecimal(data2);
+            }
+        }
+        return new BigDecimal(0);
+    }
+
+    /**
+     * 将时间截取到天  为字符串类型 用于前端只显示到天
+     * @param date 传入时间
+     * @return
+     */
+    public static String dateToDayDate(Object date){
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Date changeDate = null;
+        try{
+             changeDate = (Date) date;
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+        return sdf.format(changeDate);
+    }
+
+    /**
+     * 遍历从数据库中传进来的数据
+     * @param list 从数据库查询出来的list数据列表
+     * @param key map中多个需要转换的date参数
+     */
+    public static void changeDateToDayDate(List<Map<String, Object>> list, String ...key){
+        //遍历List
+        for (Map<String, Object> map : list) {
+            for (String s : key) {
+                //从map中取 date的值 并转换成字符串类型的日期
+                String stringDate = dateToDayDate(map.get(s));
+                if(stringDate.length() == 0){
+                    break;
+                }else {
+                    //修改map中的值
+                    map.put(s, stringDate);
+                }
+            }
+        }
+    }
+}

+ 33 - 0
src/main/java/com/steerinfo/dil/util/PageListAdd.java

@@ -0,0 +1,33 @@
+package com.steerinfo.dil.util;
+
+import com.steerinfo.framework.service.pagehelper.PageList;
+
+import java.util.List;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/6/7 14:31
+ * @Version 1.0
+ */
+public class PageListAdd<T> extends PageList<T> {
+    public PageListAdd() {
+    }
+
+    public PageListAdd(List<T> list) {
+        super(list, 20);
+    }
+
+    public PageListAdd(List<T> list, int navigatePages) {
+        super(list, navigatePages);
+    }
+
+    private Object columnData;
+
+    public Object getColumnData() {
+        return columnData;
+    }
+
+    public void setColumnData(Object columnData) {
+        this.columnData = columnData;
+    }
+}

+ 11 - 0
src/main/java/com/steerinfo/dil/util/util.java

@@ -0,0 +1,11 @@
+package com.steerinfo.dil.util;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/5/26 8:59
+ * @Version 1.0
+ * 工具类
+ */
+public class util {
+
+}

+ 9 - 0
src/main/resources/application-dev.yml

@@ -0,0 +1,9 @@
+spring:
+  datasource:
+    url: jdbc:oracle:thin:@192.168.1.51:1521:steerinfo
+    password: st#0901
+    username: DIL0901
+    driver-class-name: oracle.jdbc.OracleDriver
+  application:
+    name: [name]
+

+ 8 - 0
src/main/resources/application-prod.yml

@@ -0,0 +1,8 @@
+spring:
+  datasource:
+    url: jdbc:oracle:thin:@192.168.1.51:1521:steerinfo
+    password: st#0901
+    username: DIL0901
+    driver-class-name: oracle.jdbc.OracleDriver
+  application:
+    name: [name]

+ 0 - 0
src/main/resources/application.yml


+ 50 - 0
src/main/resources/bootstrap.yml

@@ -0,0 +1,50 @@
+api.version: api/v1/trainTms
+spring:
+  profiles:
+    include: ${SPRING_PROFILES:dev}
+  jackson:
+        date-format: yyyy-MM-dd HH:mm:ss
+        time-zone: GMT+8
+#    serialization: {WRITE_DATES_AS_TIMESTAMPS: true}
+  messages:
+    basename: message
+    encoding: UTF-8
+  mvc:
+    static-path-pattern:
+
+#eureka设置
+eureka:
+  client:
+    service-url:
+      defaultZone: http://root:root@discovery.steerinfo.com/eureka/
+
+genxml:
+  pth: com/a
+cache:
+  level: 2
+redis:
+  host: 10.10.50.28
+  port: 6379
+  pwd: 123456
+  project:
+    prefix: sysmanage
+  pool:
+    maxTotal: 8
+    maxWaitMillis: 1000
+    maxIdle: 8
+  cache:
+    time: 864000000
+  database: 0
+
+
+
+mybatis:
+  type-aliases-package: com.steerinfo.dil.model
+  mapper-locations: classpath:com/steerinfo/dil/mapper/*.xml
+  configuration:
+    #    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    mapUnderscoreToCamelCase: true
+    call-setters-on-nulls: true
+
+server:
+  port: 8086

+ 514 - 0
src/main/resources/com/steerinfo/dil/mapper/AmsPurchaseOrderMapper.xml

@@ -0,0 +1,514 @@
+<?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.dil.mapper.AmsPurchaseOrderMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmsPurchaseOrder">
+    <id column="PURCHASE_ORDER_ID" jdbcType="DECIMAL" property="purchaseOrderId" />
+    <result column="PURCHASE_ORDER_NO" jdbcType="VARCHAR" property="purchaseOrderNo" />
+    <result column="PURCHASE_FOREIGN_SHIP_NAME" jdbcType="VARCHAR" property="purchaseForeignShipName" />
+    <result column="PURCHASE_ORDER_DATE" jdbcType="TIMESTAMP" property="purchaseOrderDate" />
+    <result column="SUPPLIER_UNIT_ID" jdbcType="DECIMAL" property="supplierUnitId" />
+    <result column="PURCHASING_ORGANIZATION_ID" jdbcType="DECIMAL" property="purchasingOrganizationId" />
+    <result column="PURCHASE_ORDER_BUYER" jdbcType="VARCHAR" property="purchaseOrderBuyer" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="PUCHASE_ORDER_MATERIAL_NUMBER" jdbcType="DECIMAL" property="puchaseOrderMaterialNumber" />
+    <result column="RECEIVE_UNIT_ID" jdbcType="DECIMAL" property="receiveUnitId" />
+    <result column="PUCHASE_ORDER_DELIVERY_DATE" jdbcType="TIMESTAMP" property="puchaseOrderDeliveryDate" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+  </resultMap>
+  <sql id="columns">
+    PURCHASE_ORDER_ID, PURCHASE_ORDER_NO, PURCHASE_FOREIGN_SHIP_NAME, PURCHASE_ORDER_DATE, 
+    SUPPLIER_UNIT_ID, PURCHASING_ORGANIZATION_ID, PURCHASE_ORDER_BUYER, MATERIAL_ID, 
+    PUCHASE_ORDER_MATERIAL_NUMBER, RECEIVE_UNIT_ID, PUCHASE_ORDER_DELIVERY_DATE, INSERT_USERNAME, 
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.PURCHASE_ORDER_ID, t.PURCHASE_ORDER_NO, t.PURCHASE_FOREIGN_SHIP_NAME, t.PURCHASE_ORDER_DATE, 
+    t.SUPPLIER_UNIT_ID, t.PURCHASING_ORGANIZATION_ID, t.PURCHASE_ORDER_BUYER, t.MATERIAL_ID, 
+    t.PUCHASE_ORDER_MATERIAL_NUMBER, t.RECEIVE_UNIT_ID, t.PUCHASE_ORDER_DELIVERY_DATE, 
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM AMS_PURCHASE_ORDER
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM AMS_PURCHASE_ORDER t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="purchaseOrderId != null">
+        and PURCHASE_ORDER_ID = #{purchaseOrderId}
+      </if>
+      <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
+        and PURCHASE_ORDER_NO = #{purchaseOrderNo}
+      </if>
+      <if test="purchaseForeignShipName != null and purchaseForeignShipName != ''">
+        and PURCHASE_FOREIGN_SHIP_NAME = #{purchaseForeignShipName}
+      </if>
+      <if test="purchaseOrderDate != null">
+        and TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = #{purchaseOrderDate}
+      </if>
+      <if test="supplierUnitId != null">
+        and SUPPLIER_UNIT_ID = #{supplierUnitId}
+      </if>
+      <if test="purchasingOrganizationId != null">
+        and PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
+      </if>
+      <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
+        and PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        and PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
+      </if>
+      <if test="receiveUnitId != null">
+        and RECEIVE_UNIT_ID = #{receiveUnitId}
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        and TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = #{puchaseOrderDeliveryDate}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="purchaseOrderId != null">
+        and PURCHASE_ORDER_ID = #{purchaseOrderId}
+      </if>
+      <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
+        and PURCHASE_ORDER_NO LIKE '%${purchaseOrderNo}%'
+      </if>
+      <if test="purchaseForeignShipName != null and purchaseForeignShipName != ''">
+        and PURCHASE_FOREIGN_SHIP_NAME LIKE '%${purchaseForeignShipName}%'
+      </if>
+      <if test="purchaseOrderDate != null">
+        and TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = #{purchaseOrderDate}
+      </if>
+      <if test="supplierUnitId != null">
+        and SUPPLIER_UNIT_ID = #{supplierUnitId}
+      </if>
+      <if test="purchasingOrganizationId != null">
+        and PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
+      </if>
+      <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
+        and PURCHASE_ORDER_BUYER LIKE '%${purchaseOrderBuyer}%'
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        and PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
+      </if>
+      <if test="receiveUnitId != null">
+        and RECEIVE_UNIT_ID = #{receiveUnitId}
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        and TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = #{puchaseOrderDeliveryDate}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from AMS_PURCHASE_ORDER
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from AMS_PURCHASE_ORDER
+    where 1!=1
+    <if test="purchaseOrderNo != null and purchaseOrderNo != ''">
+      or PURCHASE_ORDER_NO = #{purchaseOrderNo}
+    </if>
+    <if test="purchaseForeignShipName != null and purchaseForeignShipName != ''">
+      or PURCHASE_FOREIGN_SHIP_NAME = #{purchaseForeignShipName}
+    </if>
+    <if test="purchaseOrderDate != null">
+      or TO_CHAR(PURCHASE_ORDER_DATE,'yyyy-MM-dd') = '#{purchaseOrderDate}'
+    </if>
+    <if test="supplierUnitId != null">
+      or SUPPLIER_UNIT_ID = #{supplierUnitId}
+    </if>
+    <if test="purchasingOrganizationId != null">
+      or PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId}
+    </if>
+    <if test="purchaseOrderBuyer != null and purchaseOrderBuyer != ''">
+      or PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer}
+    </if>
+    <if test="materialId != null">
+      or MATERIAL_ID = #{materialId}
+    </if>
+    <if test="puchaseOrderMaterialNumber != null">
+      or PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber}
+    </if>
+    <if test="receiveUnitId != null">
+      or RECEIVE_UNIT_ID = #{receiveUnitId}
+    </if>
+    <if test="puchaseOrderDeliveryDate != null">
+      or TO_CHAR(PUCHASE_ORDER_DELIVERY_DATE,'yyyy-MM-dd') = '#{puchaseOrderDeliveryDate}'
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    insert into AMS_PURCHASE_ORDER (PURCHASE_ORDER_ID, PURCHASE_ORDER_NO,
+                                    PURCHASE_FOREIGN_SHIP_NAME, PURCHASE_ORDER_DATE,
+                                    SUPPLIER_UNIT_ID, PURCHASING_ORGANIZATION_ID,
+                                    PURCHASE_ORDER_BUYER, MATERIAL_ID, PUCHASE_ORDER_MATERIAL_NUMBER,
+                                    RECEIVE_UNIT_ID, PUCHASE_ORDER_DELIVERY_DATE,
+                                    INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                    UPDATE_TIME, INSERT_UPDATE_REMARK)
+    values (#{purchaseOrderId,jdbcType=DECIMAL}, #{purchaseOrderNo,jdbcType=VARCHAR},
+            #{purchaseForeignShipName,jdbcType=VARCHAR}, #{purchaseOrderDate,jdbcType=TIMESTAMP},
+            #{supplierUnitId,jdbcType=DECIMAL}, #{purchasingOrganizationId,jdbcType=DECIMAL},
+            #{purchaseOrderBuyer,jdbcType=VARCHAR}, #{materialId,jdbcType=DECIMAL}, #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+            #{receiveUnitId,jdbcType=DECIMAL}, #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    insert into AMS_PURCHASE_ORDER
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="purchaseOrderId != null">
+        PURCHASE_ORDER_ID,
+      </if>
+      <if test="purchaseOrderNo != null">
+        PURCHASE_ORDER_NO,
+      </if>
+      <if test="purchaseForeignShipName != null">
+        PURCHASE_FOREIGN_SHIP_NAME,
+      </if>
+      <if test="purchaseOrderDate != null">
+        PURCHASE_ORDER_DATE,
+      </if>
+      <if test="supplierUnitId != null">
+        SUPPLIER_UNIT_ID,
+      </if>
+      <if test="purchasingOrganizationId != null">
+        PURCHASING_ORGANIZATION_ID,
+      </if>
+      <if test="purchaseOrderBuyer != null">
+        PURCHASE_ORDER_BUYER,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        PUCHASE_ORDER_MATERIAL_NUMBER,
+      </if>
+      <if test="receiveUnitId != null">
+        RECEIVE_UNIT_ID,
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        PUCHASE_ORDER_DELIVERY_DATE,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="purchaseOrderId != null">
+        #{purchaseOrderId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderNo != null">
+        #{purchaseOrderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="purchaseForeignShipName != null">
+        #{purchaseForeignShipName,jdbcType=VARCHAR},
+      </if>
+      <if test="purchaseOrderDate != null">
+        #{purchaseOrderDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="supplierUnitId != null">
+        #{supplierUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchasingOrganizationId != null">
+        #{purchasingOrganizationId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderBuyer != null">
+        #{purchaseOrderBuyer,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="receiveUnitId != null">
+        #{receiveUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    update AMS_PURCHASE_ORDER
+    set PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
+        PURCHASE_FOREIGN_SHIP_NAME = #{purchaseForeignShipName,jdbcType=VARCHAR},
+        PURCHASE_ORDER_DATE = #{purchaseOrderDate,jdbcType=TIMESTAMP},
+        SUPPLIER_UNIT_ID = #{supplierUnitId,jdbcType=DECIMAL},
+        PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId,jdbcType=DECIMAL},
+        PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer,jdbcType=VARCHAR},
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+        PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+        RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
+        PUCHASE_ORDER_DELIVERY_DATE = #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR}
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmsPurchaseOrder">
+    update AMS_PURCHASE_ORDER
+    <set>
+      <if test="purchaseOrderNo != null">
+        PURCHASE_ORDER_NO = #{purchaseOrderNo,jdbcType=VARCHAR},
+      </if>
+      <if test="purchaseForeignShipName != null">
+        PURCHASE_FOREIGN_SHIP_NAME = #{purchaseForeignShipName,jdbcType=VARCHAR},
+      </if>
+      <if test="purchaseOrderDate != null">
+        PURCHASE_ORDER_DATE = #{purchaseOrderDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="supplierUnitId != null">
+        SUPPLIER_UNIT_ID = #{supplierUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchasingOrganizationId != null">
+        PURCHASING_ORGANIZATION_ID = #{purchasingOrganizationId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderBuyer != null">
+        PURCHASE_ORDER_BUYER = #{purchaseOrderBuyer,jdbcType=VARCHAR},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="puchaseOrderMaterialNumber != null">
+        PUCHASE_ORDER_MATERIAL_NUMBER = #{puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="receiveUnitId != null">
+        RECEIVE_UNIT_ID = #{receiveUnitId,jdbcType=DECIMAL},
+      </if>
+      <if test="puchaseOrderDeliveryDate != null">
+        PUCHASE_ORDER_DELIVERY_DATE = #{puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where PURCHASE_ORDER_ID = #{purchaseOrderId,jdbcType=DECIMAL}
+  </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 AMS_PURCHASE_ORDER
+    (PURCHASE_ORDER_ID,
+    PURCHASE_ORDER_NO, PURCHASE_FOREIGN_SHIP_NAME,
+    PURCHASE_ORDER_DATE, SUPPLIER_UNIT_ID,
+    PURCHASING_ORGANIZATION_ID, PURCHASE_ORDER_BUYER,
+    MATERIAL_ID, PUCHASE_ORDER_MATERIAL_NUMBER,
+    RECEIVE_UNIT_ID, PUCHASE_ORDER_DELIVERY_DATE,
+    INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.purchaseOrderId,jdbcType=DECIMAL},
+    #{item.purchaseOrderNo,jdbcType=VARCHAR}, #{item.purchaseForeignShipName,jdbcType=VARCHAR},
+    #{item.purchaseOrderDate,jdbcType=TIMESTAMP}, #{item.supplierUnitId,jdbcType=DECIMAL},
+    #{item.purchasingOrganizationId,jdbcType=DECIMAL}, #{item.purchaseOrderBuyer,jdbcType=VARCHAR},
+    #{item.materialId,jdbcType=DECIMAL}, #{item.puchaseOrderMaterialNumber,jdbcType=DECIMAL},
+    #{item.receiveUnitId,jdbcType=DECIMAL}, #{item.puchaseOrderDeliveryDate,jdbcType=TIMESTAMP},
+    #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+    #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+    #{item.insertUpdateRemark,jdbcType=VARCHAR} from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update AMS_PURCHASE_ORDER
+    set
+    PURCHASE_ORDER_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderId,jdbcType=DECIMAL}
+    </foreach>
+    ,PURCHASE_ORDER_NO=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderNo,jdbcType=VARCHAR}
+    </foreach>
+    ,PURCHASE_FOREIGN_SHIP_NAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseForeignShipName,jdbcType=VARCHAR}
+    </foreach>
+    ,PURCHASE_ORDER_DATE=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,SUPPLIER_UNIT_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.supplierUnitId,jdbcType=DECIMAL}
+    </foreach>
+    ,PURCHASING_ORGANIZATION_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchasingOrganizationId,jdbcType=DECIMAL}
+    </foreach>
+    ,PURCHASE_ORDER_BUYER=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.purchaseOrderBuyer,jdbcType=VARCHAR}
+    </foreach>
+    ,MATERIAL_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+    </foreach>
+    ,PUCHASE_ORDER_MATERIAL_NUMBER=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.puchaseOrderMaterialNumber,jdbcType=DECIMAL}
+    </foreach>
+    ,RECEIVE_UNIT_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.receiveUnitId,jdbcType=DECIMAL}
+    </foreach>
+    ,PUCHASE_ORDER_DELIVERY_DATE=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.puchaseOrderDeliveryDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach collection="list" item="item" index="index" separator=" " open="case PURCHASE_ORDER_ID" close="end">
+      when #{item.purchaseOrderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    where PURCHASE_ORDER_ID in
+    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+      #{item.purchaseOrderId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from AMS_PURCHASE_ORDER
+    where PURCHASE_ORDER_ID in
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <sql id="orderBy">
+    <if test="orderField != null and orderField != ''">
+      order by  "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+  </sql>
+  <select id="selectMaxId"  resultType="java.math.BigDecimal">
+    select max(PURCHASE_ORDER_ID) from AMS_PURCHASE_ORDER
+  </select>
+</mapper>

+ 824 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstrainLoadingResultMapper.xml

@@ -0,0 +1,824 @@
+<?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.dil.mapper.TmstrainLoadingResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainLoadingResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="PURCHASE_ORDER_RAIL_PLAN_ID" jdbcType="DECIMAL" property="purchaseOrderRailPlanId" />
+    <result column="RESULT_WAGON_NO" jdbcType="VARCHAR" property="resultWagonNo" />
+    <result column="RESULT_BILLABLE_TONNAGE" jdbcType="DECIMAL" property="resultBillableTonnage" />
+    <result column="RESULT_ISCLEAR" jdbcType="VARCHAR" property="resultIsclear" />
+    <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="RESULT_MATERIAL_NUMBER" jdbcType="DECIMAL" property="resultMaterialNumber" />
+    <result column="RESULT_MATERIAL_THEORYWEIGHT" jdbcType="DECIMAL" property="resultMaterialTheoryweight" />
+    <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+    <result column="RESULT_CLASS" jdbcType="VARCHAR" property="resultClass" />
+    <result column="RESULT_LOADING_DATE" jdbcType="TIMESTAMP" property="resultLoadingDate" />
+    <result column="RESULT_REMARKS" jdbcType="VARCHAR" property="resultRemarks" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+    <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId" />
+    <result column="ARRIVAL_STATION_ID" jdbcType="DECIMAL" property="arrivalStationId" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE, 
+    RESULT_ISCLEAR, CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER, RESULT_MATERIAL_THEORYWEIGHT, 
+    BATCH_ID, RESULT_CLASS, RESULT_LOADING_DATE, RESULT_REMARKS, INSERT_USERNAME, INSERT_TIME, 
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, SEND_STATION_ID, ARRIVAL_STATION_ID
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.PURCHASE_ORDER_RAIL_PLAN_ID, t.RESULT_WAGON_NO, t.RESULT_BILLABLE_TONNAGE, 
+    t.RESULT_ISCLEAR, t.CAPACITY_ID, t.MATERIAL_ID, t.RESULT_MATERIAL_NUMBER, t.RESULT_MATERIAL_THEORYWEIGHT, 
+    t.BATCH_ID, t.RESULT_CLASS, t.RESULT_LOADING_DATE, t.RESULT_REMARKS, t.INSERT_USERNAME, 
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, 
+    t.SEND_STATION_ID, t.ARRIVAL_STATION_ID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM TMSTRAIN_LOADING_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM TMSTRAIN_LOADING_RESULT t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
+      </if>
+      <if test="resultWagonNo != null and resultWagonNo != ''">
+        and RESULT_WAGON_NO = #{resultWagonNo}
+      </if>
+      <if test="resultBillableTonnage != null">
+        and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
+      </if>
+      <if test="resultIsclear != null and resultIsclear != ''">
+        and RESULT_ISCLEAR = #{resultIsclear}
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="resultMaterialNumber != null">
+        and RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
+      </if>
+      <if test="resultMaterialTheoryweight != null">
+        and RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
+      </if>
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="resultClass != null and resultClass != ''">
+        and RESULT_CLASS = #{resultClass}
+      </if>
+      <if test="resultLoadingDate != null">
+        and TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = #{resultLoadingDate}
+      </if>
+      <if test="resultRemarks != null and resultRemarks != ''">
+        and RESULT_REMARKS = #{resultRemarks}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="sendStationId != null">
+        and SEND_STATION_ID = #{sendStationId}
+      </if>
+      <if test="arrivalStationId != null">
+        and ARRIVAL_STATION_ID = #{arrivalStationId}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
+      </if>
+      <if test="resultWagonNo != null and resultWagonNo != ''">
+        and RESULT_WAGON_NO LIKE '%${resultWagonNo}%'
+      </if>
+      <if test="resultBillableTonnage != null">
+        and RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
+      </if>
+      <if test="resultIsclear != null and resultIsclear != ''">
+        and RESULT_ISCLEAR LIKE '%${resultIsclear}%'
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="resultMaterialNumber != null">
+        and RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
+      </if>
+      <if test="resultMaterialTheoryweight != null">
+        and RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
+      </if>
+      <if test="batchId != null">
+        and BATCH_ID = #{batchId}
+      </if>
+      <if test="resultClass != null and resultClass != ''">
+        and RESULT_CLASS LIKE '%${resultClass}%'
+      </if>
+      <if test="resultLoadingDate != null">
+        and TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = #{resultLoadingDate}
+      </if>
+      <if test="resultRemarks != null and resultRemarks != ''">
+        and RESULT_REMARKS LIKE '%${resultRemarks}%'
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+      <if test="sendStationId != null">
+        and SEND_STATION_ID = #{sendStationId}
+      </if>
+      <if test="arrivalStationId != null">
+        and ARRIVAL_STATION_ID = #{arrivalStationId}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from TMSTRAIN_LOADING_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRAIN_LOADING_RESULT
+    where 1!=1
+    <if test="purchaseOrderRailPlanId != null">
+      or PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
+    </if>
+    <if test="resultWagonNo != null and resultWagonNo != ''">
+      or RESULT_WAGON_NO = #{resultWagonNo}
+    </if>
+    <if test="resultBillableTonnage != null">
+      or RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage}
+    </if>
+    <if test="resultIsclear != null and resultIsclear != ''">
+      or RESULT_ISCLEAR = #{resultIsclear}
+    </if>
+    <if test="capacityId != null">
+      or CAPACITY_ID = #{capacityId}
+    </if>
+    <if test="materialId != null">
+      or MATERIAL_ID = #{materialId}
+    </if>
+    <if test="resultMaterialNumber != null">
+      or RESULT_MATERIAL_NUMBER = #{resultMaterialNumber}
+    </if>
+    <if test="resultMaterialTheoryweight != null">
+      or RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight}
+    </if>
+    <if test="batchId != null">
+      or BATCH_ID = #{batchId}
+    </if>
+    <if test="resultClass != null and resultClass != ''">
+      or RESULT_CLASS = #{resultClass}
+    </if>
+    <if test="resultLoadingDate != null">
+      or TO_CHAR(RESULT_LOADING_DATE,'yyyy-MM-dd') = '#{resultLoadingDate}'
+    </if>
+    <if test="resultRemarks != null and resultRemarks != ''">
+      or RESULT_REMARKS = #{resultRemarks}
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+    <if test="sendStationId != null">
+      or SEND_STATION_ID = #{sendStationId}
+    </if>
+    <if test="arrivalStationId != null">
+      or ARRIVAL_STATION_ID = #{arrivalStationId}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
+    insert into TMSTRAIN_LOADING_RESULT (RESULT_ID, PURCHASE_ORDER_RAIL_PLAN_ID,
+                                         RESULT_WAGON_NO, RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
+                                         CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
+                                         RESULT_MATERIAL_THEORYWEIGHT, BATCH_ID, RESULT_CLASS,
+                                         RESULT_LOADING_DATE, RESULT_REMARKS, INSERT_USERNAME,
+                                         INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                                         INSERT_UPDATE_REMARK, DELETED, SEND_STATION_ID,
+                                         ARRIVAL_STATION_ID)
+    values (#{resultId,jdbcType=DECIMAL}, #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+            #{resultWagonNo,jdbcType=VARCHAR}, #{resultBillableTonnage,jdbcType=DECIMAL}, #{resultIsclear,jdbcType=VARCHAR},
+            #{capacityId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, #{resultMaterialNumber,jdbcType=DECIMAL},
+            #{resultMaterialTheoryweight,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{resultClass,jdbcType=VARCHAR},
+            #{resultLoadingDate,jdbcType=TIMESTAMP}, #{resultRemarks,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR},
+            #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}, #{sendStationId,jdbcType=DECIMAL},
+            #{arrivalStationId,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
+    insert into TMSTRAIN_LOADING_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        PURCHASE_ORDER_RAIL_PLAN_ID,
+      </if>
+      <if test="resultWagonNo != null">
+        RESULT_WAGON_NO,
+      </if>
+      <if test="resultBillableTonnage != null">
+        RESULT_BILLABLE_TONNAGE,
+      </if>
+      <if test="resultIsclear != null">
+        RESULT_ISCLEAR,
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="resultMaterialNumber != null">
+        RESULT_MATERIAL_NUMBER,
+      </if>
+      <if test="resultMaterialTheoryweight != null">
+        RESULT_MATERIAL_THEORYWEIGHT,
+      </if>
+      <if test="batchId != null">
+        BATCH_ID,
+      </if>
+      <if test="resultClass != null">
+        RESULT_CLASS,
+      </if>
+      <if test="resultLoadingDate != null">
+        RESULT_LOADING_DATE,
+      </if>
+      <if test="resultRemarks != null">
+        RESULT_REMARKS,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+      <if test="sendStationId != null">
+        SEND_STATION_ID,
+      </if>
+      <if test="arrivalStationId != null">
+        ARRIVAL_STATION_ID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultWagonNo != null">
+        #{resultWagonNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultBillableTonnage != null">
+        #{resultBillableTonnage,jdbcType=DECIMAL},
+      </if>
+      <if test="resultIsclear != null">
+        #{resultIsclear,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityId != null">
+        #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultMaterialNumber != null">
+        #{resultMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="resultMaterialTheoryweight != null">
+        #{resultMaterialTheoryweight,jdbcType=DECIMAL},
+      </if>
+      <if test="batchId != null">
+        #{batchId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultClass != null">
+        #{resultClass,jdbcType=VARCHAR},
+      </if>
+      <if test="resultLoadingDate != null">
+        #{resultLoadingDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultRemarks != null">
+        #{resultRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="sendStationId != null">
+        #{sendStationId,jdbcType=DECIMAL},
+      </if>
+      <if test="arrivalStationId != null">
+        #{arrivalStationId,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
+    update TMSTRAIN_LOADING_RESULT
+    set PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+        RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
+        RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
+        RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
+        CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+        RESULT_MATERIAL_NUMBER = #{resultMaterialNumber,jdbcType=DECIMAL},
+        RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight,jdbcType=DECIMAL},
+        BATCH_ID = #{batchId,jdbcType=DECIMAL},
+        RESULT_CLASS = #{resultClass,jdbcType=VARCHAR},
+        RESULT_LOADING_DATE = #{resultLoadingDate,jdbcType=TIMESTAMP},
+        RESULT_REMARKS = #{resultRemarks,jdbcType=VARCHAR},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+        DELETED = #{deleted,jdbcType=DECIMAL},
+        SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
+        ARRIVAL_STATION_ID = #{arrivalStationId,jdbcType=DECIMAL}
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainLoadingResult">
+    update TMSTRAIN_LOADING_RESULT
+    <set>
+      <if test="purchaseOrderRailPlanId != null">
+        PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultWagonNo != null">
+        RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultBillableTonnage != null">
+        RESULT_BILLABLE_TONNAGE = #{resultBillableTonnage,jdbcType=DECIMAL},
+      </if>
+      <if test="resultIsclear != null">
+        RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultMaterialNumber != null">
+        RESULT_MATERIAL_NUMBER = #{resultMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="resultMaterialTheoryweight != null">
+        RESULT_MATERIAL_THEORYWEIGHT = #{resultMaterialTheoryweight,jdbcType=DECIMAL},
+      </if>
+      <if test="batchId != null">
+        BATCH_ID = #{batchId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultClass != null">
+        RESULT_CLASS = #{resultClass,jdbcType=VARCHAR},
+      </if>
+      <if test="resultLoadingDate != null">
+        RESULT_LOADING_DATE = #{resultLoadingDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultRemarks != null">
+        RESULT_REMARKS = #{resultRemarks,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+      <if test="sendStationId != null">
+        SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
+      </if>
+      <if test="arrivalStationId != null">
+        ARRIVAL_STATION_ID = #{arrivalStationId,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </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 TMSTRAIN_LOADING_RESULT
+    (RESULT_ID,
+    PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO,
+    RESULT_BILLABLE_TONNAGE, RESULT_ISCLEAR,
+    CAPACITY_ID, MATERIAL_ID, RESULT_MATERIAL_NUMBER,
+    RESULT_MATERIAL_THEORYWEIGHT, BATCH_ID,
+    RESULT_CLASS, RESULT_LOADING_DATE,
+    RESULT_REMARKS, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETED, SEND_STATION_ID, ARRIVAL_STATION_ID
+    )
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.resultId,jdbcType=DECIMAL},
+    #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}, #{item.resultWagonNo,jdbcType=VARCHAR},
+    #{item.resultBillableTonnage,jdbcType=DECIMAL}, #{item.resultIsclear,jdbcType=VARCHAR},
+    #{item.capacityId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.resultMaterialNumber,jdbcType=DECIMAL},
+    #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}, #{item.batchId,jdbcType=DECIMAL},
+    #{item.resultClass,jdbcType=VARCHAR}, #{item.resultLoadingDate,jdbcType=TIMESTAMP},
+    #{item.resultRemarks,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.deleted,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL}, #{item.arrivalStationId,jdbcType=DECIMAL}
+    from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update TMSTRAIN_LOADING_RESULT
+    set
+    RESULT_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
+    </foreach>
+    ,PURCHASE_ORDER_RAIL_PLAN_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_WAGON_NO=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
+    </foreach>
+    ,RESULT_BILLABLE_TONNAGE=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultBillableTonnage,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_ISCLEAR=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
+    </foreach>
+    ,CAPACITY_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+    </foreach>
+    ,MATERIAL_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_MATERIAL_NUMBER=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialNumber,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_MATERIAL_THEORYWEIGHT=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMaterialTheoryweight,jdbcType=DECIMAL}
+    </foreach>
+    ,BATCH_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_CLASS=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultClass,jdbcType=VARCHAR}
+    </foreach>
+    ,RESULT_LOADING_DATE=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadingDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_REMARKS=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultRemarks,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    ,SEND_STATION_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStationId,jdbcType=DECIMAL}
+    </foreach>
+    ,ARRIVAL_STATION_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.arrivalStationId,jdbcType=DECIMAL}
+    </foreach>
+    where RESULT_ID in
+    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+      #{item.resultId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TMSTRAIN_LOADING_RESULT
+    where RESULT_ID in
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <select id="getTmsWagonLoadInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select * from(
+    select t_load.RESULT_ID "resultId",
+    a_order.PURCHASE_ORDER_NO "purchaseOrderNo",
+    t_load.RESULT_WAGON_NO "resultWagonNo",
+    t_load.RESULT_LOADING_DATE "resultLoadingDate",
+    t_load.RESULT_CLASS "resultClass",
+    d_batch.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+    r_material.MATERIAL_NAME "materialName",
+    r_s_arrival.ARRIVAL_NAME "sendStationName",
+    r_a_arrival.ARRIVAL_NAME "arrivalStationName",
+    t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
+    t_load.RESULT_ISCLEAR "resultIsclear",
+    t_load.RESULT_REMARKS "resultRemarks",
+    t_load.INSERT_TIME "insertTime"
+    from TMSTRAIN_LOADING_RESULT t_load
+    left join AMS_PURCHASE_ORDER a_order
+    on t_load.PURCHASE_ORDER_RAIL_PLAN_ID=a_order.PURCHASE_ORDER_ID
+    left join DIL_BATCH d_batch
+    on t_load.BATCH_ID=d_batch.BATCH_ID
+    left join RMS_MATERIAL r_material
+    on t_load.MATERIAL_ID=r_material.MATERIAL_ID
+    left join RMSTRAIN_ARRIVAL_SEND r_s_arrival
+    on r_s_arrival.ARRIVAL_ID=t_load.SEND_STATION_ID
+    left join RMSTRAIN_ARRIVAL_SEND r_a_arrival
+    on r_a_arrival.ARRIVAL_ID=t_load.ARRIVAL_STATION_ID
+    where t_load.DELETED=0 order by t_load.RESULT_LOADING_DATE desc
+    )
+    <where>
+      <if test="purchaseOrderNo != null">
+        and
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultWagonNo != null">
+        and
+        <foreach collection="resultWagonNo" item="item" open="(" separator="or" close=")">
+          "resultWagonNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultLoadingDate != null">
+        and
+        <foreach collection="resultLoadingDate" item="item" open="(" separator="or" close=")">
+          "resultLoadingDate" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultClass != null">
+        and
+        <foreach collection="resultClass" item="item" open="(" separator="or" close=")">
+          "resultClass" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultForeignShipName != null">
+        and
+        <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+          "resultForeignShipName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="materialName != null">
+        and
+        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+          materialName like '%${item}%'
+        </foreach>
+      </if>
+      <if test="sendStationName != null">
+        and
+        <foreach collection="sendStationName" item="item" open="(" separator="or" close=")">
+          "sendStationName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="arrivalStationName != null">
+        and
+        <foreach collection="arrivalStationName" item="item" open="(" separator="or" close=")">
+          arrivalStationName like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultBillableTonnage != null">
+        and
+        <foreach collection="resultBillableTonnage" item="item" open="(" separator="or" close=")">
+          "resultBillableTonnage" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultIsclear != null">
+        and
+        <foreach collection="resultIsclear" item="item" open="(" separator="or" close=")">
+          "resultIsclear" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultRemarks != null">
+        and
+        <foreach collection="resultRemarks" item="item" open="(" separator="or" close=")">
+          "resultRemarks" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+    <if test="orderField == null  ">
+      order by "insertTime" desc
+    </if>
+  </select>
+
+  <sql id="orderBy">
+    <if test="orderField != null and orderField != ''">
+      order by  "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+  </sql>
+
+  <select id="selectMaxId"  resultType="java.math.BigDecimal">
+    select max(RESULT_ID) from TMSTRAIN_LOADING_RESULT
+  </select>
+
+  <select id="getResultForeignShipName" parameterType="java.math.BigDecimal" resultType="String">
+    select RESULT_FOREIGN_SHIP_NAME
+    FROM DIL_BATCH d_batch
+    where d_batch.BATCH_ID = #{batchId}
+  </select>
+
+  <select id="getMaterialID" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+    select MATERIAL_ID
+    FROM DIL_BATCH d_batch
+    where d_batch.BATCH_ID = #{batchId}
+  </select>
+
+
+  <select id="getPurchaseOrderId" parameterType="java.util.Map" resultType="java.math.BigDecimal">
+    select
+        APO.PURCHASE_ORDER_ID
+    from AMS_PURCHASE_ORDER APO
+    left join DIL_BATCH DB
+        on DB.BATCH_ID = APO.BATCH_ID
+    where DB.BATCH_ID = #{batchId}
+  </select>
+
+  <select id="getSendStationName" resultType="java.util.LinkedHashMap">
+    select
+      ARRIVAL_ID "id",
+      ARRIVAL_ID "value",
+      ARRIVAL_NAME "label"
+    from RMSTRAIN_ARRIVAL_SEND
+  </select>
+
+  <select id="getArrivalStationName" resultType="java.util.LinkedHashMap">
+    select
+      ras.ARRIVAL_ID "id",
+      ras.ARRIVAL_ID "value",
+      ras.ARRIVAL_NAME "label"
+    from RMSTRAIN_ARRIVAL_SEND ras
+  </select>
+
+  <select id="getBatchId" resultType="java.util.LinkedHashMap">
+    select
+      BATCH_ID "id",
+      BATCH_ID "value",
+      CONCAT(CONCAT(RM.MATERIAL_NAME, '"'), CONCAT(DB.RESULT_FOREIGN_SHIP_NAME, '"')) "label"
+    from DIL_BATCH DB
+    left join RMS_MATERIAL RM
+    on RM.MATERIAL_ID = DB.MATERIAL_ID
+  </select>
+
+  <select id="getWagonNo" resultType="java.util.LinkedHashMap">
+    select
+      t_load.RESULT_WAGON_NO "id",
+      t_load.RESULT_WAGON_NO "value",
+      t_load.RESULT_WAGON_NO "label"
+    from TMSTRAIN_LOADING_RESULT t_load
+           left join TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
+                     on t_load.RESULT_WAGON_NO = t_unload.RESULT_WAGON_NO
+    where t_load.RESULT_WAGON_NO not in (select RESULT_WAGON_NO from TMSTRAIN_WAGON_UNLOAD_RESULT) and t_load.DELETED = 0
+  </select>
+
+  <select id="selectByResultId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
+    select
+      t_load.RESULT_WAGON_NO "resultWagonNo",
+      t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
+      t_load.RESULT_ISCLEAR "resultIsclear",
+      t_load.RESULT_CLASS "resultClass",
+      t_load.SEND_STATION_ID "sendStationId",
+      t_load.ARRIVAL_STATION_ID "arrivalStationId",
+      t_load.RESULT_LOADING_DATE "resultLoadingDate",
+      t_load.BATCH_ID "batchId",
+      t_load.RESULT_REMARKS "resultRemarks"
+    from TMSTRAIN_LOADING_RESULT t_load
+    where t_load.RESULT_ID = #{resultId}
+  </select>
+
+
+  <select id="getPortIdBySendStationId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+    select RAS.OWNED_PORT_ID from RMSTRAIN_ARRIVAL_SEND RAS where RAS.ARRIVAL_ID = #{sendStationId}
+  </select>
+</mapper>

+ 802 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstrainPleaseApproveResultMapper.xml

@@ -0,0 +1,802 @@
+<?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.dil.mapper.TmstrainPleaseApproveResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="RAIL_PLAN_ID" jdbcType="DECIMAL" property="railPlanId" />
+    <result column="RESULT_PLEASE_PLAN_NO" jdbcType="VARCHAR" property="resultPleasePlanNo" />
+    <result column="RESULT_PLAN_DATE" jdbcType="TIMESTAMP" property="resultPlanDate" />
+    <result column="RESULT_CATEGORY" jdbcType="VARCHAR" property="resultCategory" />
+    <result column="SHIPPER_ID" jdbcType="DECIMAL" property="shipperId" />
+    <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId" />
+    <result column="TO_THE_STATION_ID" jdbcType="DECIMAL" property="toTheStationId" />
+    <result column="RESULT_PLEASE_NUMBER" jdbcType="DECIMAL" property="resultPleaseNumber" />
+    <result column="RESULT_PLEASE_DATE" jdbcType="TIMESTAMP" property="resultPleaseDate" />
+    <result column="RESULT_APPROVE_NUMBER" jdbcType="DECIMAL" property="resultApproveNumber" />
+    <result column="RESULT_APPROVE_DATE" jdbcType="TIMESTAMP" property="resultApproveDate" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="STATUS" jdbcType="DECIMAL" property="status" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO, RESULT_PLAN_DATE, RESULT_CATEGORY,
+    SHIPPER_ID, SEND_STATION_ID, TO_THE_STATION_ID, RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE,
+    RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.RAIL_PLAN_ID, t.RESULT_PLEASE_PLAN_NO, t.RESULT_PLAN_DATE, t.RESULT_CATEGORY,
+    t.SHIPPER_ID, t.SEND_STATION_ID, t.TO_THE_STATION_ID, t.RESULT_PLEASE_NUMBER, t.RESULT_PLEASE_DATE,
+    t.RESULT_APPROVE_NUMBER, t.RESULT_APPROVE_DATE, t.INSERT_USERNAME, t.INSERT_TIME,
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATUS
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM TMSTRAIN_PLEASE_APPROVE_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM TMSTRAIN_PLEASE_APPROVE_RESULT t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="railPlanId != null">
+        and RAIL_PLAN_ID = #{railPlanId}
+      </if>
+      <if test="resultPleasePlanNo != null and resultPleasePlanNo != ''">
+        and RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo}
+      </if>
+      <if test="resultPlanDate != null">
+        and TO_CHAR(RESULT_PLAN_DATE,'yyyy-MM-dd') = #{resultPlanDate}
+      </if>
+      <if test="resultCategory != null and resultCategory != ''">
+        and RESULT_CATEGORY = #{resultCategory}
+      </if>
+      <if test="shipperId != null">
+        and SHIPPER_ID = #{shipperId}
+      </if>
+      <if test="sendStationId != null">
+        and SEND_STATION_ID = #{sendStationId}
+      </if>
+      <if test="toTheStationId != null">
+        and TO_THE_STATION_ID = #{toTheStationId}
+      </if>
+      <if test="resultPleaseNumber != null">
+        and RESULT_PLEASE_NUMBER = #{resultPleaseNumber}
+      </if>
+      <if test="resultPleaseDate != null">
+        and TO_CHAR(RESULT_PLEASE_DATE,'yyyy-MM-dd') = #{resultPleaseDate}
+      </if>
+      <if test="resultApproveNumber != null">
+        and RESULT_APPROVE_NUMBER = #{resultApproveNumber}
+      </if>
+      <if test="resultApproveDate != null">
+        and TO_CHAR(RESULT_APPROVE_DATE,'yyyy-MM-dd') = #{resultApproveDate}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="status != null">
+        and STATUS = #{status}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="railPlanId != null">
+        and RAIL_PLAN_ID = #{railPlanId}
+      </if>
+      <if test="resultPleasePlanNo != null and resultPleasePlanNo != ''">
+        and RESULT_PLEASE_PLAN_NO LIKE '%${resultPleasePlanNo}%'
+      </if>
+      <if test="resultPlanDate != null">
+        and TO_CHAR(RESULT_PLAN_DATE,'yyyy-MM-dd') = #{resultPlanDate}
+      </if>
+      <if test="resultCategory != null and resultCategory != ''">
+        and RESULT_CATEGORY LIKE '%${resultCategory}%'
+      </if>
+      <if test="shipperId != null">
+        and SHIPPER_ID = #{shipperId}
+      </if>
+      <if test="sendStationId != null">
+        and SEND_STATION_ID = #{sendStationId}
+      </if>
+      <if test="toTheStationId != null">
+        and TO_THE_STATION_ID = #{toTheStationId}
+      </if>
+      <if test="resultPleaseNumber != null">
+        and RESULT_PLEASE_NUMBER = #{resultPleaseNumber}
+      </if>
+      <if test="resultPleaseDate != null">
+        and TO_CHAR(RESULT_PLEASE_DATE,'yyyy-MM-dd') = #{resultPleaseDate}
+      </if>
+      <if test="resultApproveNumber != null">
+        and RESULT_APPROVE_NUMBER = #{resultApproveNumber}
+      </if>
+      <if test="resultApproveDate != null">
+        and TO_CHAR(RESULT_APPROVE_DATE,'yyyy-MM-dd') = #{resultApproveDate}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+      <if test="status != null">
+        and STATUS = #{status}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from TMSTRAIN_PLEASE_APPROVE_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRAIN_PLEASE_APPROVE_RESULT
+    where 1!=1
+    <if test="railPlanId != null">
+      or RAIL_PLAN_ID = #{railPlanId}
+    </if>
+    <if test="resultPleasePlanNo != null and resultPleasePlanNo != ''">
+      or RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo}
+    </if>
+    <if test="resultPlanDate != null">
+      or TO_CHAR(RESULT_PLAN_DATE,'yyyy-MM-dd') = '#{resultPlanDate}'
+    </if>
+    <if test="resultCategory != null and resultCategory != ''">
+      or RESULT_CATEGORY = #{resultCategory}
+    </if>
+    <if test="shipperId != null">
+      or SHIPPER_ID = #{shipperId}
+    </if>
+    <if test="sendStationId != null">
+      or SEND_STATION_ID = #{sendStationId}
+    </if>
+    <if test="toTheStationId != null">
+      or TO_THE_STATION_ID = #{toTheStationId}
+    </if>
+    <if test="resultPleaseNumber != null">
+      or RESULT_PLEASE_NUMBER = #{resultPleaseNumber}
+    </if>
+    <if test="resultPleaseDate != null">
+      or TO_CHAR(RESULT_PLEASE_DATE,'yyyy-MM-dd') = '#{resultPleaseDate}'
+    </if>
+    <if test="resultApproveNumber != null">
+      or RESULT_APPROVE_NUMBER = #{resultApproveNumber}
+    </if>
+    <if test="resultApproveDate != null">
+      or TO_CHAR(RESULT_APPROVE_DATE,'yyyy-MM-dd') = '#{resultApproveDate}'
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+    <if test="status != null">
+      or STATUS = #{status}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
+    insert into TMSTRAIN_PLEASE_APPROVE_RESULT (RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
+                                                RESULT_PLAN_DATE, RESULT_CATEGORY, SHIPPER_ID,
+                                                SEND_STATION_ID, TO_THE_STATION_ID, RESULT_PLEASE_NUMBER,
+                                                RESULT_PLEASE_DATE, RESULT_APPROVE_NUMBER,
+                                                RESULT_APPROVE_DATE, INSERT_USERNAME, INSERT_TIME,
+                                                UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                                                STATUS)
+    values (#{resultId,jdbcType=DECIMAL}, #{railPlanId,jdbcType=DECIMAL}, #{resultPleasePlanNo,jdbcType=VARCHAR},
+            #{resultPlanDate,jdbcType=TIMESTAMP}, #{resultCategory,jdbcType=VARCHAR}, #{shipperId,jdbcType=DECIMAL},
+            #{sendStationId,jdbcType=DECIMAL}, #{toTheStationId,jdbcType=DECIMAL}, #{resultPleaseNumber,jdbcType=DECIMAL},
+            #{resultPleaseDate,jdbcType=TIMESTAMP}, #{resultApproveNumber,jdbcType=DECIMAL},
+            #{resultApproveDate,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+            #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+            #{status,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
+    insert into TMSTRAIN_PLEASE_APPROVE_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="railPlanId != null">
+        RAIL_PLAN_ID,
+      </if>
+      <if test="resultPleasePlanNo != null">
+        RESULT_PLEASE_PLAN_NO,
+      </if>
+      <if test="resultPlanDate != null">
+        RESULT_PLAN_DATE,
+      </if>
+      <if test="resultCategory != null">
+        RESULT_CATEGORY,
+      </if>
+      <if test="shipperId != null">
+        SHIPPER_ID,
+      </if>
+      <if test="sendStationId != null">
+        SEND_STATION_ID,
+      </if>
+      <if test="toTheStationId != null">
+        TO_THE_STATION_ID,
+      </if>
+      <if test="resultPleaseNumber != null">
+        RESULT_PLEASE_NUMBER,
+      </if>
+      <if test="resultPleaseDate != null">
+        RESULT_PLEASE_DATE,
+      </if>
+      <if test="resultApproveNumber != null">
+        RESULT_APPROVE_NUMBER,
+      </if>
+      <if test="resultApproveDate != null">
+        RESULT_APPROVE_DATE,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="status != null">
+        STATUS,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="railPlanId != null">
+        #{railPlanId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPleasePlanNo != null">
+        #{resultPleasePlanNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultPlanDate != null">
+        #{resultPlanDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultCategory != null">
+        #{resultCategory,jdbcType=VARCHAR},
+      </if>
+      <if test="shipperId != null">
+        #{shipperId,jdbcType=DECIMAL},
+      </if>
+      <if test="sendStationId != null">
+        #{sendStationId,jdbcType=DECIMAL},
+      </if>
+      <if test="toTheStationId != null">
+        #{toTheStationId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPleaseNumber != null">
+        #{resultPleaseNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPleaseDate != null">
+        #{resultPleaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultApproveNumber != null">
+        #{resultApproveNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="resultApproveDate != null">
+        #{resultApproveDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
+    update TMSTRAIN_PLEASE_APPROVE_RESULT
+    set RAIL_PLAN_ID = #{railPlanId,jdbcType=DECIMAL},
+        RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo,jdbcType=VARCHAR},
+        RESULT_PLAN_DATE = #{resultPlanDate,jdbcType=TIMESTAMP},
+        RESULT_CATEGORY = #{resultCategory,jdbcType=VARCHAR},
+        SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
+        SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
+        TO_THE_STATION_ID = #{toTheStationId,jdbcType=DECIMAL},
+        RESULT_PLEASE_NUMBER = #{resultPleaseNumber,jdbcType=DECIMAL},
+        RESULT_PLEASE_DATE = #{resultPleaseDate,jdbcType=TIMESTAMP},
+        RESULT_APPROVE_NUMBER = #{resultApproveNumber,jdbcType=DECIMAL},
+        RESULT_APPROVE_DATE = #{resultApproveDate,jdbcType=TIMESTAMP},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+        STATUS = #{status,jdbcType=DECIMAL}
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
+    update TMSTRAIN_PLEASE_APPROVE_RESULT
+    <set>
+      <if test="railPlanId != null">
+        RAIL_PLAN_ID = #{railPlanId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPleasePlanNo != null">
+        RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultPlanDate != null">
+        RESULT_PLAN_DATE = #{resultPlanDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultCategory != null">
+        RESULT_CATEGORY = #{resultCategory,jdbcType=VARCHAR},
+      </if>
+      <if test="shipperId != null">
+        SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
+      </if>
+      <if test="sendStationId != null">
+        SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
+      </if>
+      <if test="toTheStationId != null">
+        TO_THE_STATION_ID = #{toTheStationId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPleaseNumber != null">
+        RESULT_PLEASE_NUMBER = #{resultPleaseNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPleaseDate != null">
+        RESULT_PLEASE_DATE = #{resultPleaseDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultApproveNumber != null">
+        RESULT_APPROVE_NUMBER = #{resultApproveNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="resultApproveDate != null">
+        RESULT_APPROVE_DATE = #{resultApproveDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="status != null">
+        STATUS = #{status,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </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 TMSTRAIN_PLEASE_APPROVE_RESULT
+    (RESULT_ID,
+    RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
+    RESULT_PLAN_DATE, RESULT_CATEGORY,
+    SHIPPER_ID, SEND_STATION_ID, TO_THE_STATION_ID,
+    RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE,
+    RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE,
+    INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, STATUS)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.resultId,jdbcType=DECIMAL},
+    #{item.railPlanId,jdbcType=DECIMAL}, #{item.resultPleasePlanNo,jdbcType=VARCHAR},
+    #{item.resultPlanDate,jdbcType=TIMESTAMP}, #{item.resultCategory,jdbcType=VARCHAR},
+    #{item.shipperId,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL}, #{item.toTheStationId,jdbcType=DECIMAL},
+    #{item.resultPleaseNumber,jdbcType=DECIMAL}, #{item.resultPleaseDate,jdbcType=TIMESTAMP},
+    #{item.resultApproveNumber,jdbcType=DECIMAL}, #{item.resultApproveDate,jdbcType=TIMESTAMP},
+    #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+    #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+    #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL} from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update TMSTRAIN_PLEASE_APPROVE_RESULT
+    set
+    RESULT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
+    </foreach>
+    ,RAIL_PLAN_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.railPlanId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_PLEASE_PLAN_NO=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleasePlanNo,jdbcType=VARCHAR}
+    </foreach>
+    ,RESULT_PLAN_DATE=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPlanDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_CATEGORY=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCategory,jdbcType=VARCHAR}
+    </foreach>
+    ,SHIPPER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
+    </foreach>
+    ,SEND_STATION_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStationId,jdbcType=DECIMAL}
+    </foreach>
+    ,TO_THE_STATION_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.toTheStationId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_PLEASE_NUMBER=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseNumber,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_PLEASE_DATE=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_APPROVE_NUMBER=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveNumber,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_APPROVE_DATE=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,STATUS=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
+    </foreach>
+    where RESULT_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.resultId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TMSTRAIN_PLEASE_APPROVE_RESULT
+    where RESULT_ID in
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+<!-- 查询未下发0 已下发1 请车作业  -->
+  <select id="getAllWagonPlease" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select
+    *
+    from
+    (
+    select
+    t1.RESULT_ID "resultId", t1.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",t1.RESULT_PLEASE_NUMBER "resultPleaseNumber",
+    t1.RESULT_PLEASE_DATE "resultPleaseDate",  t1.RESULT_PLAN_DATE "resultPlanDate", t2.SHIPPER_NAME "shipperName",
+    t3.ARRIVAL_NAME "forwardName", t4.ARRIVAL_NAME "arrivalName", t1.RESULT_CATEGORY "resultCategory",
+    t1.INSERT_USERNAME "insertUserName"
+
+    from TMSTRAIN_PLEASE_APPROVE_RESULT t1
+    left join RMS_SHIPPER t2
+    on t1.SHIPPER_ID = t2.SHIPPER_ID
+    left join RMSTRAIN_ARRIVAL_SEND t3
+    on t1.SEND_STATION_ID = t3.ARRIVAL_ID
+    left join RMSTRAIN_ARRIVAL_SEND t4
+    on t1.TO_THE_STATION_ID = t4.ARRIVAL_ID
+
+    where t1.STATUS = #{status}
+    )
+    <where>
+      <if test="resultId != null">
+        <foreach collection="resultId" item="item" open="(" separator="or" close=")">
+          "resultId" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="shipperName != null">
+        and
+        <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
+          "shipperName" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="forwardName != null">
+        and
+        <foreach collection="forwardName" item="item" open="(" separator="or" close=")">
+          "forwardName" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="resultPleasePlanNo != null">
+        and
+        <foreach collection="resultPleasePlanNo" item="item" open="(" separator="or" close=")">
+          "resultPleasePlanNo" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="arrivalName != null">
+        and
+        <foreach collection="arrivalName" item="item" open="(" separator="or" close=")">
+          "arrivalName" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="pleaseCategory != null">
+        and
+        <foreach collection="pleaseCategory" item="item" open="(" separator="or" close=")">
+          "pleaseCategory" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="resultPleaseNumber != null">
+        and
+        <foreach collection="resultPleaseNumber" item="item" open="(" separator="or" close=")">
+          "resultPleaseNumber" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="resultPleaseDate != null">
+        and
+        <foreach collection="resultPleaseDate" item="item" open="(" separator="or" close=")">
+          "resultPleaseDate" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="resultPlanDate != null">
+        and
+        <foreach collection="resultPlanDate" item="item" open="(" separator="or" close=")">
+          "resultPlanDate" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="insertUserName != null">
+        and
+        <foreach collection="insertUserName" item="item" open="(" separator="or" close=")">
+          "insertUserName" like '%${item}%'
+        </foreach>
+      </if>
+
+    </where>
+    <include refid="orderBy">
+    </include>
+    <if test="orderField == null  ">
+      order by "resultPleaseDate" desc
+    </if>
+
+  </select>
+
+  <!--  排序 -->
+  <sql id="orderBy">
+    <if test="orderField != null and orderField != ''">
+      order by  "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+  </sql>
+
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId"  resultType="java.math.BigDecimal">
+    select max(RESULT_ID) from TMSTRAIN_PLEASE_APPROVE_RESULT
+  </select>
+
+<!--  查询所有已批车作业 状态码为 2 -->
+  <select id="getAllApproveWagonPlease" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select
+    *
+    from
+    (
+    select
+           t1.RESULT_ID "resultId",
+           t1.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
+           t1.RESULT_APPROVE_DATE "resultApproveDate",
+           t1.RESULT_APPROVE_NUMBER "resultApproveNumber",
+           t2.SHIPPER_NAME "shipperName",
+           t1.RESULT_CATEGORY "resultCategory",
+           t3.ARRIVAL_NAME "forwardName",
+           t4.ARRIVAL_NAME "arrivalName"
+    from TMSTRAIN_PLEASE_APPROVE_RESULT t1
+    left join RMS_SHIPPER t2
+    on t1.SHIPPER_ID = t2.SHIPPER_ID
+    left join RMSTRAIN_ARRIVAL_SEND t3
+    on t1.SEND_STATION_ID = t3.ARRIVAL_ID
+    left join RMSTRAIN_ARRIVAL_SEND t4
+    on t1.TO_THE_STATION_ID = t4.ARRIVAL_ID
+
+    where t1.STATUS = 2
+    )
+    <where>
+      <if test="resultId != null">
+        <foreach collection="resultId" item="item" open="(" separator="or" close=")">
+          "resultId" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="shipperName != null">
+        and
+        <foreach collection="shipperName" item="item" open="(" separator="or" close=")">
+          "shipperName" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="forwardName != null">
+        and
+        <foreach collection="forwardName" item="item" open="(" separator="or" close=")">
+          "forwardName" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="resultPleasePlanNo != null">
+        and
+        <foreach collection="resultPleasePlanNo" item="item" open="(" separator="or" close=")">
+          "resultPleasePlanNo" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="arrivalName != null">
+        and
+        <foreach collection="arrivalName" item="item" open="(" separator="or" close=")">
+          "arrivalName" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="pleaseCategory != null">
+        and
+        <foreach collection="pleaseCategory" item="item" open="(" separator="or" close=")">
+          "pleaseCategory" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="resultApproveDate != null">
+        and
+        <foreach collection="resultApproveDate" item="item" open="(" separator="or" close=")">
+          "resultApproveDate" like '%${item}%'
+        </foreach>
+      </if>
+
+      <if test="resultApproveNumber != null">
+        and
+        <foreach collection="resultApproveNumber" item="item" open="(" separator="or" close=")">
+          "resultApproveNumber" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy">
+    </include>
+    <if test="orderField == null  ">
+      order by "resultApproveDate" desc
+    </if>
+  </select>
+
+  <!--  //通过Id查询请车作业 getWagonPleaseById(Integer pleasePlanId);-->
+  <select id="getWagonPleaseById" parameterType="int" resultType="java.util.Map">
+    select
+        APAR.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo", APAR.SHIPPER_ID "shipperId", APAR.SEND_STATION_ID "sendStationId",
+        APAR.TO_THE_STATION_ID "toTheStationId", APAR.RESULT_CATEGORY "resultCategory", APAR.RESULT_PLEASE_NUMBER "resultPleaseNumber",
+        APAR.RESULT_PLAN_DATE "resultPlanDate", APAR.INSERT_USERNAME "insertUsername", APAR.RAIL_PLAN_ID "railPlanId"
+    from TMSTRAIN_PLEASE_APPROVE_RESULT APAR
+    where RESULT_ID = #{resultId}
+  </select>
+
+  <!-- 通过Id查询批车作业-->
+  <select id="getApproveWagonPleaseById" parameterType="int" resultType="java.util.Map">
+    select
+      AOD.DAYPLAN_NO "dayplanNo",
+      APAR.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
+      APAR.RESULT_APPROVE_DATE "resultApproveDate",
+      APAR.RESULT_APPROVE_NUMBER "resultApproveNumber",
+      APAR.SHIPPER_ID "shipperId",
+      APAR.RESULT_CATEGORY "resultCategory",
+      APAR.SEND_STATION_ID "sendStationId",
+      APAR.TO_THE_STATION_ID "toTheStationId"
+    from TMSTRAIN_PLEASE_APPROVE_RESULT APAR
+    left join AMS_RAIL_OFFSET_DAYPLAN AOD
+    on APAR.RAIL_PLAN_ID = AOD.DAYPLAN_ID
+    where RESULT_ID = #{resultId}
+  </select>
+
+
+  <!--  下拉框中获取收货单位 -->
+  <select id="getShipper" resultType="java.util.LinkedHashMap">
+    select
+      RS.SHIPPER_ID "id",
+      RS.SHIPPER_ID "value",
+      RS.SHIPPER_NAME "label"
+    from
+      RMS_SHIPPER RS
+  </select>
+
+  <!--  下拉框中获取发运计划 -->
+  <select id="getRailPlan" resultType="java.util.LinkedHashMap">
+    select
+      AOD.DAYPLAN_ID "id",
+      AOD.DAYPLAN_ID "value",
+      AOD.DAYPLAN_NO "label"
+    from
+      AMS_RAIL_OFFSET_DAYPLAN AOD
+  </select>
+</mapper>

+ 749 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstrainWagonUnloadResultMapper.xml

@@ -0,0 +1,749 @@
+<?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.dil.mapper.TmstrainWagonUnloadResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainWagonUnloadResult">
+    <id column="UNLOADING_ID" jdbcType="DECIMAL" property="unloadingId" />
+    <result column="PURCHASE_ORDER_RAIL_PLAN_ID" jdbcType="DECIMAL" property="purchaseOrderRailPlanId" />
+    <result column="RESULT_WAGON_NO" jdbcType="VARCHAR" property="resultWagonNo" />
+    <result column="RESULT_ARRIVAL_DATE" jdbcType="TIMESTAMP" property="resultArrivalDate" />
+    <result column="RESULT_UNLOAD_TIME" jdbcType="TIMESTAMP" property="resultUnloadTime" />
+    <result column="UNLOADING_POINT_ID" jdbcType="DECIMAL" property="unloadingPointId" />
+    <result column="RESULT_BIG_TICKET_WEIGHT" jdbcType="DECIMAL" property="resultBigTicketWeight" />
+    <result column="RESULT_RAIL_HORIZONTAL_WEIGHT" jdbcType="DECIMAL" property="resultRailHorizontalWeight" />
+    <result column="RESULT_REMARK" jdbcType="VARCHAR" property="resultRemark" />
+    <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+    <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+    <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+    <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+    <result column="DELETED" jdbcType="DECIMAL" property="deleted" />
+  </resultMap>
+  <sql id="columns">
+    UNLOADING_ID, PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO, RESULT_ARRIVAL_DATE, 
+    RESULT_UNLOAD_TIME, UNLOADING_POINT_ID, RESULT_BIG_TICKET_WEIGHT, RESULT_RAIL_HORIZONTAL_WEIGHT, 
+    RESULT_REMARK, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+    DELETED
+  </sql>
+  <sql id="columns_alias">
+    t.UNLOADING_ID, t.PURCHASE_ORDER_RAIL_PLAN_ID, t.RESULT_WAGON_NO, t.RESULT_ARRIVAL_DATE, 
+    t.RESULT_UNLOAD_TIME, t.UNLOADING_POINT_ID, t.RESULT_BIG_TICKET_WEIGHT, t.RESULT_RAIL_HORIZONTAL_WEIGHT, 
+    t.RESULT_REMARK, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
+    t.INSERT_UPDATE_REMARK, t.DELETED
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM TMSTRAIN_WAGON_UNLOAD_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM TMSTRAIN_WAGON_UNLOAD_RESULT t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="unloadingId != null">
+        and UNLOADING_ID = #{unloadingId}
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
+      </if>
+      <if test="resultWagonNo != null and resultWagonNo != ''">
+        and RESULT_WAGON_NO = #{resultWagonNo}
+      </if>
+      <if test="resultArrivalDate != null">
+        and TO_CHAR(RESULT_ARRIVAL_DATE,'yyyy-MM-dd') = #{resultArrivalDate}
+      </if>
+      <if test="resultUnloadTime != null">
+        and TO_CHAR(RESULT_UNLOAD_TIME,'yyyy-MM-dd') = #{resultUnloadTime}
+      </if>
+      <if test="unloadingPointId != null">
+        and UNLOADING_POINT_ID = #{unloadingPointId}
+      </if>
+      <if test="resultBigTicketWeight != null">
+        and RESULT_BIG_TICKET_WEIGHT = #{resultBigTicketWeight}
+      </if>
+      <if test="resultRailHorizontalWeight != null">
+        and RESULT_RAIL_HORIZONTAL_WEIGHT = #{resultRailHorizontalWeight}
+      </if>
+      <if test="resultRemark != null and resultRemark != ''">
+        and RESULT_REMARK = #{resultRemark}
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME = #{insertUsername}
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME = #{updateUsername}
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="unloadingId != null">
+        and UNLOADING_ID = #{unloadingId}
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        and PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
+      </if>
+      <if test="resultWagonNo != null and resultWagonNo != ''">
+        and RESULT_WAGON_NO LIKE '%${resultWagonNo}%'
+      </if>
+      <if test="resultArrivalDate != null">
+        and TO_CHAR(RESULT_ARRIVAL_DATE,'yyyy-MM-dd') = #{resultArrivalDate}
+      </if>
+      <if test="resultUnloadTime != null">
+        and TO_CHAR(RESULT_UNLOAD_TIME,'yyyy-MM-dd') = #{resultUnloadTime}
+      </if>
+      <if test="unloadingPointId != null">
+        and UNLOADING_POINT_ID = #{unloadingPointId}
+      </if>
+      <if test="resultBigTicketWeight != null">
+        and RESULT_BIG_TICKET_WEIGHT = #{resultBigTicketWeight}
+      </if>
+      <if test="resultRailHorizontalWeight != null">
+        and RESULT_RAIL_HORIZONTAL_WEIGHT = #{resultRailHorizontalWeight}
+      </if>
+      <if test="resultRemark != null and resultRemark != ''">
+        and RESULT_REMARK LIKE '%${resultRemark}%'
+      </if>
+      <if test="insertUsername != null and insertUsername != ''">
+        and INSERT_USERNAME LIKE '%${insertUsername}%'
+      </if>
+      <if test="insertTime != null">
+        and TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = #{insertTime}
+      </if>
+      <if test="updateUsername != null and updateUsername != ''">
+        and UPDATE_USERNAME LIKE '%${updateUsername}%'
+      </if>
+      <if test="updateTime != null">
+        and TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = #{updateTime}
+      </if>
+      <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+        and INSERT_UPDATE_REMARK LIKE '%${insertUpdateRemark}%'
+      </if>
+      <if test="deleted != null">
+        and DELETED = #{deleted}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from TMSTRAIN_WAGON_UNLOAD_RESULT
+    where UNLOADING_ID = #{unloadingId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRAIN_WAGON_UNLOAD_RESULT
+    where 1!=1
+    <if test="purchaseOrderRailPlanId != null">
+      or PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId}
+    </if>
+    <if test="resultWagonNo != null and resultWagonNo != ''">
+      or RESULT_WAGON_NO = #{resultWagonNo}
+    </if>
+    <if test="resultArrivalDate != null">
+      or TO_CHAR(RESULT_ARRIVAL_DATE,'yyyy-MM-dd') = '#{resultArrivalDate}'
+    </if>
+    <if test="resultUnloadTime != null">
+      or TO_CHAR(RESULT_UNLOAD_TIME,'yyyy-MM-dd') = '#{resultUnloadTime}'
+    </if>
+    <if test="unloadingPointId != null">
+      or UNLOADING_POINT_ID = #{unloadingPointId}
+    </if>
+    <if test="resultBigTicketWeight != null">
+      or RESULT_BIG_TICKET_WEIGHT = #{resultBigTicketWeight}
+    </if>
+    <if test="resultRailHorizontalWeight != null">
+      or RESULT_RAIL_HORIZONTAL_WEIGHT = #{resultRailHorizontalWeight}
+    </if>
+    <if test="resultRemark != null and resultRemark != ''">
+      or RESULT_REMARK = #{resultRemark}
+    </if>
+    <if test="insertUsername != null and insertUsername != ''">
+      or INSERT_USERNAME = #{insertUsername}
+    </if>
+    <if test="insertTime != null">
+      or TO_CHAR(INSERT_TIME,'yyyy-MM-dd') = '#{insertTime}'
+    </if>
+    <if test="updateUsername != null and updateUsername != ''">
+      or UPDATE_USERNAME = #{updateUsername}
+    </if>
+    <if test="updateTime != null">
+      or TO_CHAR(UPDATE_TIME,'yyyy-MM-dd') = '#{updateTime}'
+    </if>
+    <if test="insertUpdateRemark != null and insertUpdateRemark != ''">
+      or INSERT_UPDATE_REMARK = #{insertUpdateRemark}
+    </if>
+    <if test="deleted != null">
+      or DELETED = #{deleted}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainWagonUnloadResult">
+    insert into TMSTRAIN_WAGON_UNLOAD_RESULT (UNLOADING_ID, PURCHASE_ORDER_RAIL_PLAN_ID,
+                                              RESULT_WAGON_NO, RESULT_ARRIVAL_DATE, RESULT_UNLOAD_TIME,
+                                              UNLOADING_POINT_ID, RESULT_BIG_TICKET_WEIGHT,
+                                              RESULT_RAIL_HORIZONTAL_WEIGHT, RESULT_REMARK,
+                                              INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                              UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED
+    )
+    values (#{unloadingId,jdbcType=DECIMAL}, #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+            #{resultWagonNo,jdbcType=VARCHAR}, #{resultArrivalDate,jdbcType=TIMESTAMP}, #{resultUnloadTime,jdbcType=TIMESTAMP},
+            #{unloadingPointId,jdbcType=DECIMAL}, #{resultBigTicketWeight,jdbcType=DECIMAL},
+            #{resultRailHorizontalWeight,jdbcType=DECIMAL}, #{resultRemark,jdbcType=VARCHAR},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleted,jdbcType=DECIMAL}
+           )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainWagonUnloadResult">
+    insert into TMSTRAIN_WAGON_UNLOAD_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="unloadingId != null">
+        UNLOADING_ID,
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        PURCHASE_ORDER_RAIL_PLAN_ID,
+      </if>
+      <if test="resultWagonNo != null">
+        RESULT_WAGON_NO,
+      </if>
+      <if test="resultArrivalDate != null">
+        RESULT_ARRIVAL_DATE,
+      </if>
+      <if test="resultUnloadTime != null">
+        RESULT_UNLOAD_TIME,
+      </if>
+      <if test="unloadingPointId != null">
+        UNLOADING_POINT_ID,
+      </if>
+      <if test="resultBigTicketWeight != null">
+        RESULT_BIG_TICKET_WEIGHT,
+      </if>
+      <if test="resultRailHorizontalWeight != null">
+        RESULT_RAIL_HORIZONTAL_WEIGHT,
+      </if>
+      <if test="resultRemark != null">
+        RESULT_REMARK,
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME,
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME,
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME,
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME,
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="unloadingId != null">
+        #{unloadingId,jdbcType=DECIMAL},
+      </if>
+      <if test="purchaseOrderRailPlanId != null">
+        #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultWagonNo != null">
+        #{resultWagonNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultArrivalDate != null">
+        #{resultArrivalDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultUnloadTime != null">
+        #{resultUnloadTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="unloadingPointId != null">
+        #{unloadingPointId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultBigTicketWeight != null">
+        #{resultBigTicketWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultRailHorizontalWeight != null">
+        #{resultRailHorizontalWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultRemark != null">
+        #{resultRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUsername != null">
+        #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        #{deleted,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainWagonUnloadResult">
+    update TMSTRAIN_WAGON_UNLOAD_RESULT
+    set PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+        RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
+        RESULT_ARRIVAL_DATE = #{resultArrivalDate,jdbcType=TIMESTAMP},
+        RESULT_UNLOAD_TIME = #{resultUnloadTime,jdbcType=TIMESTAMP},
+        UNLOADING_POINT_ID = #{unloadingPointId,jdbcType=DECIMAL},
+        RESULT_BIG_TICKET_WEIGHT = #{resultBigTicketWeight,jdbcType=DECIMAL},
+        RESULT_RAIL_HORIZONTAL_WEIGHT = #{resultRailHorizontalWeight,jdbcType=DECIMAL},
+        RESULT_REMARK = #{resultRemark,jdbcType=VARCHAR},
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+        DELETED = #{deleted,jdbcType=DECIMAL}
+    where UNLOADING_ID = #{unloadingId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainWagonUnloadResult">
+    update TMSTRAIN_WAGON_UNLOAD_RESULT
+    <set>
+      <if test="purchaseOrderRailPlanId != null">
+        PURCHASE_ORDER_RAIL_PLAN_ID = #{purchaseOrderRailPlanId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultWagonNo != null">
+        RESULT_WAGON_NO = #{resultWagonNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultArrivalDate != null">
+        RESULT_ARRIVAL_DATE = #{resultArrivalDate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultUnloadTime != null">
+        RESULT_UNLOAD_TIME = #{resultUnloadTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="unloadingPointId != null">
+        UNLOADING_POINT_ID = #{unloadingPointId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultBigTicketWeight != null">
+        RESULT_BIG_TICKET_WEIGHT = #{resultBigTicketWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultRailHorizontalWeight != null">
+        RESULT_RAIL_HORIZONTAL_WEIGHT = #{resultRailHorizontalWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultRemark != null">
+        RESULT_REMARK = #{resultRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="insertUsername != null">
+        INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="insertTime != null">
+        INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="updateUsername != null">
+        UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="updateTime != null">
+        UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="insertUpdateRemark != null">
+        INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where UNLOADING_ID = #{unloadingId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where UNLOADING_ID = #{unloadingId,jdbcType=DECIMAL}
+  </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 TMSTRAIN_WAGON_UNLOAD_RESULT
+    (UNLOADING_ID,
+    PURCHASE_ORDER_RAIL_PLAN_ID, RESULT_WAGON_NO,
+    RESULT_ARRIVAL_DATE, RESULT_UNLOAD_TIME,
+    UNLOADING_POINT_ID, RESULT_BIG_TICKET_WEIGHT,
+    RESULT_RAIL_HORIZONTAL_WEIGHT, RESULT_REMARK,
+    INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, DELETED)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.unloadingId,jdbcType=DECIMAL},
+    #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}, #{item.resultWagonNo,jdbcType=VARCHAR},
+    #{item.resultArrivalDate,jdbcType=TIMESTAMP}, #{item.resultUnloadTime,jdbcType=TIMESTAMP},
+    #{item.unloadingPointId,jdbcType=DECIMAL}, #{item.resultBigTicketWeight,jdbcType=DECIMAL},
+    #{item.resultRailHorizontalWeight,jdbcType=DECIMAL}, #{item.resultRemark,jdbcType=VARCHAR},
+    #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+    #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+    #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleted,jdbcType=DECIMAL} from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update TMSTRAIN_WAGON_UNLOAD_RESULT
+    set
+    UNLOADING_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.unloadingId,jdbcType=DECIMAL}
+    </foreach>
+    ,PURCHASE_ORDER_RAIL_PLAN_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.purchaseOrderRailPlanId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_WAGON_NO=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.resultWagonNo,jdbcType=VARCHAR}
+    </foreach>
+    ,RESULT_ARRIVAL_DATE=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.resultArrivalDate,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_UNLOAD_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.resultUnloadTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UNLOADING_POINT_ID=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.unloadingPointId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_BIG_TICKET_WEIGHT=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.resultBigTicketWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_RAIL_HORIZONTAL_WEIGHT=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.resultRailHorizontalWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_REMARK=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.resultRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETED=
+    <foreach collection="list" item="item" index="index" separator=" " open="case UNLOADING_ID" close="end">
+      when #{item.unloadingId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+    </foreach>
+    where UNLOADING_ID in
+    <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+      #{item.unloadingId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TMSTRAIN_WAGON_UNLOAD_RESULT
+    where UNLOADING_ID in
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <select id="getTmsWagonUnLoadInfo" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select * from(
+    select t_unload.UNLOADING_ID "unloadingId",
+    a_order.PURCHASE_ORDER_NO "purchaseOrderNo",
+    t_unload.RESULT_WAGON_NO "resultWagonNo",
+    t_load.RESULT_LOADING_DATE "resultLoadingDate",
+    t_unload.RESULT_ARRIVAL_DATE "resultArrivalDate",
+    t_unload.RESULT_UNLOAD_TIME "resultUnloadTime",
+    t_load.RESULT_CLASS "resultClass",
+    d_batch.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+    r_material.MATERIAL_NAME "materialName",
+    r_s_arrival.ARRIVAL_NAME "sendStationName",
+    r_a_arrival.ARRIVAL_NAME "arrivalStationName",
+    t_unload_point.UNLOAD_POINT_NAME "unloadPointName",
+    t_unload.RESULT_BIG_TICKET_WEIGHT "resultBigTicketWeight",
+    t_unload.RESULT_RAIL_HORIZONTAL_WEIGHT "resultRailHorizontalWeight",
+    t_unload.RESULT_REMARK "resultRemark"
+    from TMSTRAIN_LOADING_RESULT t_load
+    left join TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
+    on t_load.RESULT_WAGON_NO=t_unload.RESULT_WAGON_NO
+    left join AMS_PURCHASE_ORDER a_order
+    on t_unload.PURCHASE_ORDER_RAIL_PLAN_ID=a_order.PURCHASE_ORDER_ID
+    left join DIL_BATCH d_batch
+    on t_load.BATCH_ID=d_batch.BATCH_ID
+    left join RMS_MATERIAL r_material
+    on t_load.MATERIAL_ID=r_material.MATERIAL_ID
+    left join RMSTRAIN_ARRIVAL_SEND r_s_arrival
+    on r_s_arrival.ARRIVAL_ID=t_load.SEND_STATION_ID
+    left join RMSTRAIN_ARRIVAL_SEND r_a_arrival
+    on r_a_arrival.ARRIVAL_ID=t_load.ARRIVAL_STATION_ID
+    left join TMSTRAIN_UNLOAD_POINT t_unload_point
+    on t_unload_point.UNLOAD_POINT_ID=t_unload.UNLOADING_POINT_ID
+    where t_unload.RESULT_WAGON_NO in (select RESULT_WAGON_NO from TMSTRAIN_WAGON_UNLOAD_RESULT)
+      and t_unload.DELETED = 0 and t_load.DELETED = 0
+    order by t_unload.RESULT_UNLOAD_TIME desc)
+    <where>
+      <if test="purchaseOrderNo != null">
+        and
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultWagonNo != null">
+        and
+        <foreach collection="resultWagonNo" item="item" open="(" separator="or" close=")">
+          "resultWagonNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultLoadingDate != null">
+        and
+        <foreach collection="resultLoadingDate" item="item" open="(" separator="or" close=")">
+          "resultLoadingDate" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultArrivalDate != null">
+        and
+        <foreach collection="resultArrivalDate" item="item" open="(" separator="or" close=")">
+          "resultArrivalDate" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultUnloadTime != null">
+        and
+        <foreach collection="resultUnloadTime" item="item" open="(" separator="or" close=")">
+          "resultUnloadTime" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultClass != null">
+        and
+        <foreach collection="resultClass" item="item" open="(" separator="or" close=")">
+          "resultClass" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultForeignShipName != null">
+        and
+        <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+          "resultForeignShipName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="materialName != null">
+        and
+        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+          "materialName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="sendStationName != null">
+        and
+        <foreach collection="sendStationName" item="item" open="(" separator="or" close=")">
+          "sendStationName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="arrivalStationName != null">
+        and
+        <foreach collection="arrivalStationName" item="item" open="(" separator="or" close=")">
+          arrivalStationName like '%${item}%'
+        </foreach>
+      </if>
+      <if test="unloadPointName != null">
+        and
+        <foreach collection="unloadPointName" item="item" open="(" separator="or" close=")">
+          "unloadPointName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultBigTicketWeight != null">
+        and
+        <foreach collection="resultBigTicketWeight" item="item" open="(" separator="or" close=")">
+          "resultBigTicketWeight" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultRailHorizontalWeight != null">
+        and
+        <foreach collection="resultRailHorizontalWeight" item="item" open="(" separator="or" close=")">
+          "resultRailHorizontalWeight" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultRemark != null">
+        and
+        <foreach collection="resultRemark" item="item" open="(" separator="or" close=")">
+          "resultRemark" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+  </select>
+
+  <sql id="orderBy">
+    <if test="orderField != null and orderField != ''">
+      order by  "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+  </sql>
+
+  <select id="selectMaxId"  resultType="java.math.BigDecimal">
+    select max(UNLOADING_ID) from TMSTRAIN_WAGON_UNLOAD_RESULT
+  </select>
+
+  <select id="getPurchaseOrderId" parameterType="String" resultType="java.math.BigDecimal">
+    select PURCHASE_ORDER_RAIL_PLAN_ID from TMSTRAIN_LOADING_RESULT where RESULT_WAGON_NO = #{resultWagonNo} and DELETED = 0
+  </select>
+
+  <select id="getTmstrainResult" resultType="java.util.LinkedHashMap">
+    select * from(
+    select a_order.PURCHASE_ORDER_NO "purchaseOrderNo",
+    t_load.RESULT_WAGON_NO "resultWagonNo",
+    d_batch.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+    r_material.MATERIAL_NAME "materialName",
+    t_load.RESULT_LOADING_DATE "resultLoadingDate",
+    r_s_arrival.ARRIVAL_NAME "sendStationName",
+    r_a_arrival.ARRIVAL_NAME "arrivalStationName",
+    t_unload.RESULT_UNLOAD_TIME "resultUnloadTime",
+    t_load.RESULT_BILLABLE_TONNAGE "resultBillableTonnage",
+    t_unload.RESULT_RAIL_HORIZONTAL_WEIGHT "resultRailHorizontalWeight",
+    (t_load.RESULT_BILLABLE_TONNAGE-t_unload.RESULT_RAIL_HORIZONTAL_WEIGHT) "differentialWeight"
+    from TMSTRAIN_LOADING_RESULT t_load
+    left join AMS_PURCHASE_ORDER a_order
+    on t_load.PURCHASE_ORDER_RAIL_PLAN_ID=a_order.PURCHASE_ORDER_ID
+    left join DIL_BATCH d_batch
+    on t_load.BATCH_ID=d_batch.BATCH_ID
+    left join RMS_MATERIAL r_material
+    on t_load.MATERIAL_ID=r_material.MATERIAL_ID
+    left join RMSTRAIN_ARRIVAL_SEND r_s_arrival
+    on r_s_arrival.ARRIVAL_ID=t_load.SEND_STATION_ID
+    left join RMSTRAIN_ARRIVAL_SEND r_a_arrival
+    on r_a_arrival.ARRIVAL_ID=t_load.ARRIVAL_STATION_ID
+    left join TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
+    on t_unload.RESULT_WAGON_NO=t_load.RESULT_WAGON_NO
+    where t_load.DELETED = 0
+    )
+    <where>
+      <if test="purchaseOrderNo != null">
+        and
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultWagonNo != null">
+        and
+        <foreach collection="resultWagonNo" item="item" open="(" separator="or" close=")">
+          "resultWagonNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultForeignShipName != null">
+        and
+        <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+          "resultForeignShipName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="materialName != null">
+        and
+        <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+          "materialName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultLoadingDate != null">
+        and
+        <foreach collection="resultLoadingDate" item="item" open="(" separator="or" close=")">
+          "resultLoadingDate" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="sendStationName != null">
+        and
+        <foreach collection="sendStationName" item="item" open="(" separator="or" close=")">
+          "sendStationName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="arrivalStationName != null">
+        and
+        <foreach collection="arrivalStationName" item="item" open="(" separator="or" close=")">
+          arrivalStationName like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultUnloadTime != null">
+        and
+        <foreach collection="resultUnloadTime" item="item" open="(" separator="or" close=")">
+          "resultUnloadTime" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultBillableTonnage != null">
+        and
+        <foreach collection="resultBillableTonnage" item="item" open="(" separator="or" close=")">
+          "resultBillableTonnage" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultRailHorizontalWeight != null">
+        and
+        <foreach collection="resultRailHorizontalWeight" item="item" open="(" separator="or" close=")">
+          "resultRailHorizontalWeight" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="differentialWeight != null">
+        and
+        <foreach collection="differentialWeight" item="item" open="(" separator="or" close=")">
+          "differentialWeight" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+    <if test="orderField == null  ">
+      order by "resultUnloadTime" desc
+    </if>
+  </select>
+
+  <select id="getUnloadingPointName" resultType="java.util.LinkedHashMap">
+    select
+      UNLOAD_POINT_ID "id",
+      UNLOAD_POINT_ID "value",
+      UNLOAD_POINT_NAME "label"
+    from TMSTRAIN_UNLOAD_POINT
+  </select>
+
+  <select id="getUnloadingRouteName" resultType="java.util.LinkedHashMap">
+    select
+      UNLOAD_ROUTE_ID "id",
+      UNLOAD_ROUTE_ID "value",
+      UNLOAD_ROUTE_NAME "label"
+    from TMSTRAIN_UNLOAD_ROUTE
+  </select>
+
+  <select id="selectByUnLoadingId" parameterType="java.math.BigDecimal" resultType="java.util.LinkedHashMap">
+    select
+      t_unload.RESULT_WAGON_NO "resultWagonNo",
+      t_unload.RESULT_ARRIVAL_DATE "resultArrivalDate",
+      t_unload.RESULT_UNLOAD_TIME "resultUnloadTime",
+      t_unload.UNLOADING_POINT_ID "unloadingPointId",
+      t_unload.RESULT_BIG_TICKET_WEIGHT "resultBigTicketWeight",
+      t_unload.RESULT_RAIL_HORIZONTAL_WEIGHT "resultRailHorizontalWeight",
+      t_unload.RESULT_REMARK "resultRemark"
+    from TMSTRAIN_WAGON_UNLOAD_RESULT t_unload
+    where t_unload.UNLOADING_ID = #{unloadingId}
+  </select>
+</mapper>

+ 80 - 0
src/main/resources/log4j.properties

@@ -0,0 +1,80 @@
+## LOG4J配置
+log4j.rootCategory=INFO, stdout,file, RUNNING,errorfile
+## 控制台输出
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n
+
+## root日志输出到文件
+log4j.appender.file=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.file.file=/logsdata/logs/springboot-log4j-root.log
+log4j.appender.file.DatePattern='.'yyyy-MM-dd
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n
+
+## 按不同package进行输出
+## com.steer包下的日志配置
+log4j.category.market=DEBUG, steerfile
+log4j.category.com.hnshituo=DEBUG, steerfile
+#log4j.category.com.steer=${logging.level.com.steer}, steerfile
+log4j.category.com.steer=DEBUG, steerfile
+# com.steer下的日志输出
+log4j.appender.steerfile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.steerfile.file=/logsdata/logs/springboot-log4j-steer.log
+log4j.appender.steerfile.DatePattern='.'yyyy-MM-dd
+log4j.appender.steerfile.layout=org.apache.log4j.PatternLayout
+#log4j.appender.steerfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %5p %c{1}:%L - %m%n
+log4j.appender.steerfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n
+
+
+## ERROR级别输出到特定的日志文件中
+log4j.logger.error=errorfile
+## 异常日志####
+log4j.appender.errorfile=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.errorfile.file=/logs/exception/exc.log
+log4j.appender.errorfile.DatePattern='.'yyyy-MM-dd
+log4j.appender.errorfile.Threshold = ERROR
+log4j.appender.errorfile.layout=org.apache.log4j.PatternLayout
+#log4j.appender.errorfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS} %5p %c{1}:%L - %m%n
+log4j.appender.errorfile.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n
+
+### 运行日志 ###
+log4j.appender.RUNNING = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.RUNNING.File =/logs/log/running.log
+log4j.appender.RUNNING.Append = true
+log4j.appender.RUNNING.Threshold = INFO
+log4j.appender.RUNNING.DatePattern='.'yyyy-MM-dd.
+log4j.appender.RUNNING.layout = org.apache.log4j.PatternLayout
+log4j.appender.RUNNING.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n
+
+### 指定类###
+log4j.logger.com.steer.rbac.sysdebuglog.service.DebugLogRecord = DEBUG,DEB
+## 调试日志 ###
+log4j.appender.DEB = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.DEB.File = /logs/debug/debug.log
+log4j.appender.DEB.Append = true
+log4j.appender.DEB.Threshold = DEBUG 
+log4j.appender.DEB.DatePattern='.'yyyy-MM-dd
+log4j.appender.DEB.layout = org.apache.log4j.PatternLayout
+log4j.appender.DEB.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n
+####[%p] [%-d{yyyy-MM-dd HH:mm:ss}] %C.%M(%L) | %m%n
+
+#### 业务日志###
+log4j.logger.com.steer.rbac.sysoperlog.service.BizLogRecord = INFO,BIZ
+log4j.appender.BIZ = org.apache.log4j.DailyRollingFileAppender
+log4j.appender.BIZ.File = /logs/business/biz.log
+log4j.appender.BIZ.Append = true
+log4j.appender.BIZ.Threshold = INFO
+log4j.appender.BIZ.DatePattern='.'yyyy-MM-dd
+log4j.appender.BIZ.layout = org.apache.log4j.PatternLayout
+log4j.appender.BIZ.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n
+#
+#
+#### 资源日志###
+#log4j.appender.ENV = org.apache.log4j.DailyRollingFileAppender
+#log4j.appender.ENV.File = ../logs/env/env.log
+#log4j.appender.ENV.Append = true
+#log4j.appender.ENV.Threshold = INFO
+#log4j.appender.ENV.DatePattern='.'yyyy-MM-dd
+#1420.3og4j.appender.ENV.layout = org.apache.log4j.PatternLayout
+#log4j.appender.ENV.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss,SSS}:%5p %20t [%50F:%3L] - %m%n

+ 4 - 0
src/main/resources/message.properties

@@ -0,0 +1,4 @@
+succeed=操作成功
+failed=操作失败
+unreg=帐号或手机号码未注册
+passerr=密码错误