txf 3 years ago
commit
99435fca24
100 changed files with 15911 additions and 0 deletions
  1. 8 0
      .gitignore
  2. 140 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. 56 0
      src/main/java/com/steerinfo/dil/config/WebSocketConfig.java
  6. 221 0
      src/main/java/com/steerinfo/dil/controller/AmstruckPurplanController.java
  7. 99 0
      src/main/java/com/steerinfo/dil/controller/DropDownController.java
  8. 333 0
      src/main/java/com/steerinfo/dil/controller/OmstruckOrderController.java
  9. 88 0
      src/main/java/com/steerinfo/dil/controller/TmstruckEnfactoryResultController.java
  10. 94 0
      src/main/java/com/steerinfo/dil/controller/TmstruckLeaveFactoryResultController.java
  11. 119 0
      src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java
  12. 49 0
      src/main/java/com/steerinfo/dil/controller/TmstruckMeasureCommissionController.java
  13. 92 0
      src/main/java/com/steerinfo/dil/controller/TmstruckQualityResultController.java
  14. 64 0
      src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java
  15. 76 0
      src/main/java/com/steerinfo/dil/controller/TmstruckUnloadResultController.java
  16. 110 0
      src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java
  17. 19 0
      src/main/java/com/steerinfo/dil/feign/BmsShipFeign.java
  18. 20 0
      src/main/java/com/steerinfo/dil/feign/BmsTruckFeign.java
  19. 21 0
      src/main/java/com/steerinfo/dil/feign/ColumnDataFeign.java
  20. 32 0
      src/main/java/com/steerinfo/dil/feign/ESFeign.java
  21. 23 0
      src/main/java/com/steerinfo/dil/feign/WmsBoundFeign.java
  22. 26 0
      src/main/java/com/steerinfo/dil/interceptors/MyLocaleChangeInterceptor.java
  23. 30 0
      src/main/java/com/steerinfo/dil/mapper/AmstruckPurplanMapper.java
  24. 28 0
      src/main/java/com/steerinfo/dil/mapper/AmstruckPurplanMaterialMapper.java
  25. 46 0
      src/main/java/com/steerinfo/dil/mapper/DropDownMapper.java
  26. 65 0
      src/main/java/com/steerinfo/dil/mapper/OmstruckOrderMapper.java
  27. 24 0
      src/main/java/com/steerinfo/dil/mapper/OmstruckOrderMaterialMapper.java
  28. 31 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.java
  29. 27 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java
  30. 31 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.java
  31. 20 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckMeasureCommissionMapper.java
  32. 20 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.java
  33. 24 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java
  34. 13 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckTotalResultMapper.java
  35. 27 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.java
  36. 29 0
      src/main/java/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.java
  37. 259 0
      src/main/java/com/steerinfo/dil/model/AmstruckPurplan.java
  38. 199 0
      src/main/java/com/steerinfo/dil/model/AmstruckPurplanMaterial.java
  39. 319 0
      src/main/java/com/steerinfo/dil/model/OmstruckOrder.java
  40. 184 0
      src/main/java/com/steerinfo/dil/model/OmstruckOrderMaterial.java
  41. 229 0
      src/main/java/com/steerinfo/dil/model/TmstruckEnfactoryResult.java
  42. 229 0
      src/main/java/com/steerinfo/dil/model/TmstruckLeaveFactoryResult.java
  43. 304 0
      src/main/java/com/steerinfo/dil/model/TmstruckLoadResult.java
  44. 154 0
      src/main/java/com/steerinfo/dil/model/TmstruckMeasureCommission.java
  45. 214 0
      src/main/java/com/steerinfo/dil/model/TmstruckQualityResult.java
  46. 214 0
      src/main/java/com/steerinfo/dil/model/TmstruckReceiptResult.java
  47. 184 0
      src/main/java/com/steerinfo/dil/model/TmstruckTotalResult.java
  48. 259 0
      src/main/java/com/steerinfo/dil/model/TmstruckUnloadResult.java
  49. 291 0
      src/main/java/com/steerinfo/dil/model/TmstruckWeightResult.java
  50. 35 0
      src/main/java/com/steerinfo/dil/service/DropDownService.java
  51. 26 0
      src/main/java/com/steerinfo/dil/service/IAmstruckPurplanMaterialService.java
  52. 45 0
      src/main/java/com/steerinfo/dil/service/IAmstruckPurplanService.java
  53. 23 0
      src/main/java/com/steerinfo/dil/service/IOmstruckOrderMaterialService.java
  54. 65 0
      src/main/java/com/steerinfo/dil/service/IOmstruckOrderService.java
  55. 37 0
      src/main/java/com/steerinfo/dil/service/ITmstruckEnfactoryResultService.java
  56. 43 0
      src/main/java/com/steerinfo/dil/service/ITmstruckLeaveFactoryResultService.java
  57. 37 0
      src/main/java/com/steerinfo/dil/service/ITmstruckLoadResultService.java
  58. 29 0
      src/main/java/com/steerinfo/dil/service/ITmstruckMeasureCommissionService.java
  59. 34 0
      src/main/java/com/steerinfo/dil/service/ITmstruckQualityResultService.java
  60. 24 0
      src/main/java/com/steerinfo/dil/service/ITmstruckReceiptResultService.java
  61. 31 0
      src/main/java/com/steerinfo/dil/service/ITmstruckUnloadResultService.java
  62. 34 0
      src/main/java/com/steerinfo/dil/service/ITmstruckWeightResultService.java
  63. 36 0
      src/main/java/com/steerinfo/dil/service/impl/AmstruckPurplanMaterialServiceImpl.java
  64. 156 0
      src/main/java/com/steerinfo/dil/service/impl/AmstruckPurplanServiceImpl.java
  65. 104 0
      src/main/java/com/steerinfo/dil/service/impl/DropDownServiceImpl.java
  66. 32 0
      src/main/java/com/steerinfo/dil/service/impl/OmstruckOrderMaterialServiceImpl.java
  67. 489 0
      src/main/java/com/steerinfo/dil/service/impl/OmstruckOrderServiceImpl.java
  68. 140 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckEnfactoryResultServiceImpl.java
  69. 219 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java
  70. 161 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java
  71. 72 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckMeasureCommissionServiceImpl.java
  72. 64 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckQualityResultServiceImpl.java
  73. 40 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckReceiptResultServiceImpl.java
  74. 137 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java
  75. 179 0
      src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java
  76. 70 0
      src/main/java/com/steerinfo/dil/util/BaseRESTfulController.java
  77. 38 0
      src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java
  78. 137 0
      src/main/java/com/steerinfo/dil/util/DataChange.java
  79. 33 0
      src/main/java/com/steerinfo/dil/util/PageListAdd.java
  80. 11 0
      src/main/java/com/steerinfo/dil/util/util.java
  81. 43 0
      src/main/java/com/steerinfo/dil/websocket/WebSocketController.java
  82. 9 0
      src/main/resources/application-dev.yml
  83. 8 0
      src/main/resources/application-prod.yml
  84. 0 0
      src/main/resources/application.yml
  85. 55 0
      src/main/resources/bootstrap.yml
  86. 594 0
      src/main/resources/com/steerinfo/dil/mapper/AmstruckPurplanMapper.xml
  87. 540 0
      src/main/resources/com/steerinfo/dil/mapper/AmstruckPurplanMaterialMapper.xml
  88. 103 0
      src/main/resources/com/steerinfo/dil/mapper/DropDownMapper.xml
  89. 1249 0
      src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMapper.xml
  90. 363 0
      src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMaterialMapper.xml
  91. 604 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml
  92. 571 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml
  93. 682 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml
  94. 408 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckMeasureCommissionMapper.xml
  95. 535 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.xml
  96. 555 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml
  97. 350 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckTotalResultMapper.xml
  98. 613 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml
  99. 776 0
      src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml
  100. 80 0
      src/main/resources/log4j.properties

+ 8 - 0
.gitignore

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

+ 140 - 0
pom.xml

@@ -0,0 +1,140 @@
+<?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-api</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>DIL0901</user>
+                    <password>st#0901</password>
+                    <!--包名-->
+                    <targetPackage>com.steerinfo.dil</targetPackage>
+                    <tables>
+                        <param>TMSTRUCK_LOAD_RESULT</param>
+                    </tables>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>steerinfo</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"})
+@EnableFeignClients(basePackages = "com.steerinfo.dil.feign")
+@EnableDiscoveryClient
+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("*");
+    }
+}

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

@@ -0,0 +1,56 @@
+package com.steerinfo.dil.config;
+
+import org.springframework.context.annotation.Bean;
+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;
+import org.springframework.web.socket.server.standard.ServerEndpointExporter;
+
+@Configuration
+@EnableWebSocketMessageBroker
+public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
+
+    @Override
+    public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
+//        stompEndpointRegistry
+//                .addEndpoint("/webSocket")
+//                .setAllowedOrigins("*");
+//                .withSockJS(); //使用sockJS
+
+//        stompEndpointRegistry
+//                .addEndpoint("/event-websocket-app")
+//                .setAllowedOrigins("*");
+        stompEndpointRegistry.addEndpoint("/event-websocket").setAllowedOrigins("*").withSockJS();
+
+    }
+
+    @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) {
+    }
+
+
+    @Bean
+    public ServerEndpointExporter serverEndpointExporter(){
+        return new ServerEndpointExporter();
+    }
+}

+ 221 - 0
src/main/java/com/steerinfo/dil/controller/AmstruckPurplanController.java

@@ -0,0 +1,221 @@
+package com.steerinfo.dil.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.steerinfo.dil.feign.ESFeign;
+import com.steerinfo.dil.model.AmstruckPurplan;
+import com.steerinfo.dil.service.IAmstruckPurplanMaterialService;
+import com.steerinfo.dil.service.IAmstruckPurplanService;
+import com.steerinfo.dil.util.*;
+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.*;
+
+import com.steerinfo.dil.util.ColumnDataUtil;
+
+/**
+ * AmstruckPurplan RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-02 10:38
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-02
+ * 作者:TXF
+ * 参考:
+ * 描述:AmstruckPurplan RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/amstruckpurplans")
+public class AmstruckPurplanController extends BaseRESTfulController {
+
+    @Autowired
+    IAmstruckPurplanMaterialService amstruckPurplanMaterialService;
+
+    @Autowired
+    IAmstruckPurplanService amstruckPurplanService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @Autowired
+    ESFeign esFeign;
+
+    @ApiOperation(value="查询运输预约")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(79)", 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("/getAllPurPlan")
+    public RESTfulResult getAllPurPlan(@RequestBody(required=false) Map<String,Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize,
+                                           Integer status){
+        //初始化过滤
+        List<Map<String, Object>> detailListTotal = null;
+        //如果有条件查询则跳过初始化,和创建索引
+        if(mapValue==null){
+            mapValue = new HashMap<>();
+            mapValue.put("planStatus", status);
+            //将查询结果存入索引中
+            detailListTotal = amstruckPurplanService.getAllPurPlan(mapValue);
+            Map<String, Object> map = new HashMap<>();
+            //添加索引
+            map.put("index","get_pur_plan_list");
+            //添加id
+            map.put("indexId","planId");
+            detailListTotal.add(map);
+            //新建索引
+            String s = JSON.toJSONString(detailListTotal);
+            esFeign.insertIndex(detailListTotal);
+            //删除
+            detailListTotal.remove(detailListTotal.size()-1);
+        }else {
+            mapValue.put("planStatus", status);
+        }
+        if(detailListTotal == null){
+            detailListTotal = amstruckPurplanService.getAllPurPlan(mapValue);
+        }
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> purPlan = amstruckPurplanService.getAllPurPlan(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, detailListTotal,purPlan);
+        return success(pageList);
+    }
+    //框计算查询
+    @PostMapping("/getAllPurPlan/{apiId}")
+    public RESTfulResult getAllPurPlan(@RequestBody(required=false) Map<String,Object> mapValue,
+                                       @PathVariable("apiId") Integer apiId,
+                                       Integer pageNum,
+                                       Integer pageSize,
+                                       Integer status,
+                                       String con){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        //设置要查询的索引名称
+        String index="get_pur_plan_list";
+        mapValue.put("planStatus", status);
+        //获取查询结果
+        PageListAdd pageList = esFeign.getConResult(mapValue,index,apiId,pageNum,pageSize,con);
+        return success(pageList);
+    }
+
+
+
+    @ApiOperation(value="通过Id查询请车作业")
+    @PostMapping ("/getPurPlanById/{planId}")
+    public RESTfulResult getWagonPleaseById(@PathVariable("planId")Integer planId){
+        List<Map<String, Object>> purPlanById = amstruckPurplanService.getPurPlanById(planId);
+        return success(purPlanById);
+    }
+
+    @ApiOperation(value="新增运输计划 状态:0")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "amstruckPurplan", value = "运输计划实绩对象", required = false, dataType = "AmstruckPurplan"),
+    })
+    @PostMapping("/addPurPlan")
+    public RESTfulResult addPurPlan(@RequestBody AmstruckPurplan amstruckPurplan){
+        int i = amstruckPurplanService.addPurPlan(amstruckPurplan);
+        return success(i);
+    }
+
+    @ApiOperation(value="修改运输计划")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "amstruckPurplan", value = "请车作业实绩对象", required = false, dataType = "AmstruckPurplan"),
+    })
+    @PostMapping("/updatePurPlan")
+    public RESTfulResult updatePurPlan(@RequestBody AmstruckPurplan amstruckPurplan){
+        amstruckPurplan.setUpdateTime(new Date()); //设置更新时间
+        int i = amstruckPurplanService.updatePurPlan(amstruckPurplan);
+        return success(i);
+    }
+
+    @ApiOperation(value="下发运输计划 状态:1")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "planId", value = "运输计划Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/sendPurPlan/{planId}")
+    public RESTfulResult sendPurPlan(@PathVariable("planId")Integer planId){
+        AmstruckPurplan amstruckPurplan = new AmstruckPurplan();
+        amstruckPurplan.setPlanId(new BigDecimal(planId));
+        amstruckPurplan.setPlanStatus(new BigDecimal(1));
+        int i = amstruckPurplanService.sendPurPlan(amstruckPurplan);
+        return success(i);
+    }
+
+    @ApiOperation(value="接收运输计划 状态:2")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "planId", value = "运输计划Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/receptionPurPlan/{planId}")
+    public RESTfulResult receptionPurPlan(@PathVariable("planId")Integer planId){
+        AmstruckPurplan amstruckPurplan = new AmstruckPurplan();
+        amstruckPurplan.setPlanId(new BigDecimal(planId));
+        amstruckPurplan.setPlanStatus(new BigDecimal(2));
+        int i = amstruckPurplanService.receptionPurPlan(amstruckPurplan);
+        return success(i);
+    }
+
+    @ApiOperation(value="逻辑删除运输计划 状态:3")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "planId", value = "运输计划Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/deletePurPlan/{planId}")
+    public RESTfulResult deletePurPlan(@PathVariable("planId")Integer planId){
+        AmstruckPurplan amstruckPurplan = new AmstruckPurplan();
+        amstruckPurplan.setPlanId(new BigDecimal(planId));
+        amstruckPurplan.setPlanStatus(new BigDecimal(3));
+        int i = amstruckPurplanService.deletePurPlan(amstruckPurplan);
+        return success(i);
+    }
+
+//    ******************************************************************************************************************
+
+    @ApiOperation(value="查询要分派的计划")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(82)", 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("/getDecomposedPlan")
+    public RESTfulResult getDecomposedPlan(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               Integer planId,
+                                               Integer status){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        if(planId != null){
+            mapValue.put("planId", planId);
+        }
+        if(status != null){
+            mapValue.put("planStatus", status);
+        }
+        //不分页筛选数据
+        List<Map<String, Object>> allPlan = amstruckPurplanMaterialService.getDecomposedPlan(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> plan = amstruckPurplanMaterialService.getDecomposedPlan(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allPlan,plan);
+        return success(pageList);
+    }
+
+
+
+}

+ 99 - 0
src/main/java/com/steerinfo/dil/controller/DropDownController.java

@@ -0,0 +1,99 @@
+package com.steerinfo.dil.controller;
+
+/**
+ * @ author    :TXF
+ * @ time      :2021/9/4 9:32
+ */
+
+import com.steerinfo.dil.service.impl.DropDownServiceImpl;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import io.swagger.annotations.ApiOperation;
+import org.apache.ibatis.type.YearTypeHandler;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.websocket.server.PathParam;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/${api.version}/dropDown")
+public class DropDownController extends BaseRESTfulController {
+
+    //********************************运输计划下拉框接口******************************************
+
+    @Autowired
+    DropDownServiceImpl dropDownService;
+
+    @ApiOperation(value="查询所有的批次")
+    @GetMapping("/getDilBatch")
+    public RESTfulResult getDilBatch(){
+        List<Map<String, Object>> batch = dropDownService.getDilBatch();
+        return success(batch);
+    }
+
+    @ApiOperation(value="查询所有的承运商")
+    @GetMapping("/getCarrier")
+    public RESTfulResult getRailPlan(){
+        List<Map<String, Object>> carrier = dropDownService.getCarrier();
+        return success(carrier);
+    }
+
+    @ApiOperation(value="查询所有的作业路径")
+    @GetMapping("/getLine")
+    public RESTfulResult getLine(){
+        List<Map<String, Object>> line = dropDownService.getLine();
+        return success(line);
+    }
+
+    @ApiOperation(value="查询所有的仓库")
+    @GetMapping("/getWarehouse")
+    public RESTfulResult getWarehouse(@PathParam("type") Integer type){
+        Map<String, Object> map = new HashMap<>();
+        if(type != null){
+            map.put("type", type);
+        }
+        List<Map<String, Object>> warehouse = dropDownService.getWarehouse(map);
+        return success(warehouse);
+    }
+
+    @ApiOperation(value="查询所有的门岗")
+    @GetMapping("/getGatepost")
+    public RESTfulResult getGatepost(){
+        List<Map<String, Object>> gatepost = dropDownService.getGatepost();
+        return success(gatepost);
+    }
+
+    @ApiOperation(value="查询所有的采购订单号")
+    @GetMapping("/getAPO")
+    public RESTfulResult getAPO(){
+        List<Map<String, Object>> APO = dropDownService.getAPO();
+        return success(APO);
+    }
+
+    @ApiOperation(value="查询特定所有的物资")
+    @GetMapping("/getFuMaterial/{type}")
+    public RESTfulResult getFuMaterial(@PathVariable("type")Integer type){
+        List<Map<String, Object>> material = dropDownService.getFuMaterial(type);
+        return success(material);
+    }
+
+    @ApiOperation(value="查询所有的辅料车辆")
+    @GetMapping("/getFuCapacityId")
+    public RESTfulResult getFuCapacityId(){
+        List<Map<String, Object>> capacityId = dropDownService.getFuCapacityId();
+        return success(capacityId);
+    }
+
+    @ApiOperation(value="查询所有的港口")
+    @GetMapping("/getPort")
+    public RESTfulResult getPort(){
+        List<Map<String, Object>> port = dropDownService.getPort();
+        return success(port);
+    }
+}

+ 333 - 0
src/main/java/com/steerinfo/dil/controller/OmstruckOrderController.java

@@ -0,0 +1,333 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.service.IOmstruckOrderService;
+
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+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.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * OmstruckOrder RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-03 03:47
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-03
+ * 作者:TXF
+ * 参考:
+ * 描述:OmstruckOrder RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/omstruckorders")
+public class OmstruckOrderController extends BaseRESTfulController {
+
+    @Autowired
+    IOmstruckOrderService omstruckOrderService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询所有运输订单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(86)", 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("/getAllTruckOrder")
+    public RESTfulResult getAllTruckOrder(@RequestBody(required=false) Map<String,Object> mapValue,
+                                       Integer apiId,
+                                       Integer pageNum,
+                                       Integer pageSize,
+                                       Integer orderStatus,
+                                       Integer planId,
+                                       Integer orderType){
+
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        if(orderStatus != null){
+            mapValue.put("orderStatus", orderStatus);
+        }
+        if(planId != null){
+            mapValue.put("planId", planId);
+        }
+        if(orderType != null){
+            mapValue.put("orderType", orderType);
+        }
+        //不分页筛选数据
+        List<Map<String, Object>> allTruckOrder = omstruckOrderService.getAllTruckOrder(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> truckOrder = omstruckOrderService.getAllTruckOrder(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allTruckOrder,truckOrder);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="不适用表头返回数据")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "运输计划实绩对象", required = false, dataType = "Map"),
+    })
+    @PostMapping("/getAllTruckOrderReturnListMap")
+    public RESTfulResult getAllTruckOrder(
+                                          Integer orderStatus,
+                                          Integer planId,
+                                          Integer orderType){
+        Map<String, Object> map = new HashMap<>();
+        if(orderStatus != null){
+            map.put("orderStatus", orderStatus);
+        }
+        if(planId != null){
+            map.put("planId", planId);
+        }
+        if(orderType != null){
+            map.put("orderType", orderType);
+        }
+        List<Map<String, Object>> truckOrder = omstruckOrderService.getAllTruckOrder(map);
+        return success(truckOrder);
+    }
+
+    @ApiOperation(value="查询所有空闲的运力信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(85)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getAllCapacity")
+    public RESTfulResult getAllCapacity(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               Integer carrierId
+                                               ){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        if(carrierId != null){
+            mapValue.put("carrierId", carrierId);
+        }
+        mapValue.put("capacityTypeId", 1);
+        mapValue.put("capacityStatus", 0);
+        //不分页筛选数据
+        List<Map<String, Object>> allCapacity = omstruckOrderService.getAllCapacity(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> capacity = omstruckOrderService.getAllCapacity(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allCapacity,capacity);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="分解运输计划后 新增订单  或者直接新增订单 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "运输计划实绩对象", required = false, dataType = "Map"),
+    })
+    @PostMapping("/addPurOrder")
+    public RESTfulResult addPurOrder(@RequestBody(required=false) Map<String,Object> mapValue){
+        int i = omstruckOrderService.addPurOrder(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="修改分派计划")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "planId", value = "运输计划Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/updateOrder")
+    public RESTfulResult updateOrder(@RequestBody Map<String, Object> map){
+        int i = omstruckOrderService.updateOrder(map);
+        return success(i);
+    }
+
+    @ApiOperation(value="派单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "planId", value = "运输计划Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/dispatchOrder/{orderId}")
+    public RESTfulResult dispatchOrder(@PathVariable("orderId") Integer orderId){
+        int i = omstruckOrderService.dispatchOrder(orderId);
+        return success(i);
+    }
+
+    @ApiOperation(value="逻辑删除运单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "planId", value = "运输计划Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/deleteOrder")
+    public RESTfulResult deleteOrder(@RequestBody(required = false) Map<String, Object> map,
+                                     Integer planId){
+        if(planId != null){
+            map.put("planId", planId);
+        }
+        Object orderMaterialWeight = map.get("orderMaterialWeight");
+        if(orderMaterialWeight != null){
+            if(orderMaterialWeight instanceof  Integer){
+                map.put("orderMaterialWeight", -((Integer)orderMaterialWeight));
+            }else if(orderMaterialWeight instanceof Double){
+                map.put("orderMaterialWeight", -((Double)orderMaterialWeight));
+            }
+            //模拟前端传来新重量 复用
+            map.put("weight", 0);
+        }
+        int i = omstruckOrderService.deleteOrder(map);
+        return success(i);
+    }
+
+    @ApiOperation(value="司机接收、拒绝接单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "planId", value = "运输计划Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/driverReceiveOrRefuse/{orderId}")
+    public RESTfulResult driverReceiveOrRefuse(@PathVariable("orderId") Integer orderId, Integer orderReceiveStatus){
+        Map<String, Object> map = new HashMap<>();
+        map.put("orderId", orderId);
+        map.put("orderReceiveStatus", orderReceiveStatus);
+        int i = omstruckOrderService.driverReceiveOrRefuse(map);
+        return success(i);
+    }
+
+    @ApiOperation(value="司机接单信息")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(117)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getReceiveRefuseOrder/{orderReceiveStatus}")
+    public RESTfulResult getReceiveRefuseOrder(@RequestBody(required=false) Map<String,Object> mapValue,
+                                        Integer apiId,
+                                        Integer pageNum,
+                                        Integer pageSize,
+                                        @PathVariable Integer orderReceiveStatus,
+                                        Integer orderType,
+                                        Integer orderStatus
+    ){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        if(orderType != null){
+            mapValue.put("orderTypee", orderType);
+        }
+        if(orderReceiveStatus != null){
+            mapValue.put("orderReceiveStatus", orderReceiveStatus);
+        }
+        if(orderStatus != null){
+            mapValue.put("orderStatus", orderStatus);
+        }
+        //不分页筛选数据
+        List<Map<String, Object>> allOrder = omstruckOrderService.getReceiveRefuseOrder(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> order = omstruckOrderService.getReceiveRefuseOrder(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allOrder,order);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="司机APP端调用接口查询数据 4 已下发 5 已接收")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "capacityNumber", value = "运输计划Id", required = false, dataType = "String"),
+    })
+    @PostMapping("/sendMesToDriver")
+    public RESTfulResult sendMesToDriver(String capacityNumber, Integer orderStatus){
+        HashMap<String, Object> map = new HashMap<>();
+        if(orderStatus != null)
+        map.put("orderStatus", orderStatus);
+        if(capacityNumber != null)
+        map.put("capacityNumber", capacityNumber);
+        List<Map<String, Object>> mesToDriver = omstruckOrderService.sendMesToDriver(map);
+        return success(mesToDriver);
+    }
+
+    @ApiOperation(value="通过车牌获取所有已拒绝的订单")
+    @ApiImplicitParams({
+                @ApiImplicitParam(name = "capacityNumber", value = "运输计划Id", required = false, dataType = "String"),
+    })
+    @PostMapping("/getRefuseOrderByCapacityNum")
+    public RESTfulResult sendMesToDriver(String capacityNumber){
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("capacityNumber", capacityNumber);
+        List<Map<String, Object>> receiveRefuseOrderByCapacityId = omstruckOrderService.getReceiveRefuseOrderByCapacityId(map);
+        return success(receiveRefuseOrderByCapacityId);
+    }
+
+    @ApiOperation(value="通过运输订单ID查询运单信息 包含各个作业路径")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "capacityNumber", value = "运输计划Id", required = false, dataType = "String"),
+    })
+    @PostMapping("/getOrderMesByOrderNum/{orderId}")
+    public RESTfulResult getOrderMesByOrderNum(@PathVariable("orderId") Integer orderId){
+        HashMap<String, Object> map = new HashMap<>();
+        map.put("orderId", orderId);
+        List<Map<String, Object>> mesToDriver = omstruckOrderService.getOrderMesByOrderNum(map);
+        return success(mesToDriver);
+    }
+
+    @ApiOperation(value="通过运输订单ID查询实绩地点和时间")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderId", value = "运输订单Id", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/selectPlaceAndTime/{orderId}")
+    public RESTfulResult selectPlaceAndTime(@PathVariable("orderId") Integer orderId){
+        List<Map<String, Object>> placeAndTime = omstruckOrderService.selectPlaceAndTime(new BigDecimal(orderId));
+        return success(placeAndTime);
+    }
+
+    @ApiOperation(value="通过运输订单ID查询运单信息")
+    @PostMapping("/selectOrderByOrderId/{orderId}")
+    public RESTfulResult selectOrderByOrderId(@PathVariable("orderId") Integer orderId){
+        List<Map<String, Object>> mapList = omstruckOrderService.getOrderByOrderId(new BigDecimal(orderId));
+        return  success(mapList);
+    }
+
+    @ApiOperation(value="查看运输派单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(117)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getTransportDispatch/{orderReceiveStatus}")
+    public RESTfulResult getTransportDispatch(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize,
+                                               @PathVariable Integer orderReceiveStatus,
+                                               Integer orderType,
+                                               Integer orderStatus
+    ){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        if(orderType != null){
+            mapValue.put("orderTypee", orderType);
+        }
+        if(orderReceiveStatus != null){
+            mapValue.put("orderReceiveStatus", orderReceiveStatus);
+        }
+        if(orderStatus != null){
+            mapValue.put("orderStatus", orderStatus);
+        }
+        //不分页筛选数据
+        List<Map<String, Object>> allOrder = omstruckOrderService.getTransportDispatch(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> order = omstruckOrderService.getTransportDispatch(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allOrder, order);
+        return success(pageList);
+    }
+}

+ 88 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckEnfactoryResultController.java

@@ -0,0 +1,88 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.service.ITmstruckEnfactoryResultService;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+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.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckEnfactoryResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-08 06:23
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-08
+ * 作者:TXF
+ * 参考:
+ * 描述:TmstruckEnfactoryResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckenfactoryresults")
+public class TmstruckEnfactoryResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckEnfactoryResultService tmstruckEnfactoryResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询所有的进厂实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(99)", 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("/getAllEnFactoryResult")
+    public RESTfulResult getAllEnFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                       Integer apiId,
+                                       Integer pageNum,
+                                       Integer pageSize
+                                       ){
+        //不分页筛选数据
+        List<Map<String, Object>> allEnFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> enFactoryResult = tmstruckEnfactoryResultService.getAllEnFactoryResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allEnFactoryResult,enFactoryResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="通过采集系统传来的数据新增进厂作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "运输计划实绩对象", required = false, dataType = "Map"),
+    })
+    @PostMapping("/addEnFactoryResult")
+    public RESTfulResult addEnFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue){
+        int i = tmstruckEnfactoryResultService.addEnFactoryResult(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="PDA扫描更新进厂作业实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "运输计划实绩对象", required = false, dataType = "Map"),
+    })
+    @PostMapping("/updateEnactoryResult")
+    public RESTfulResult updateEnactoryResult(@RequestBody(required=false) Map<String,Object> mapValue){
+//        String orderNumber= mapValue.get("orderNumber").toString();
+//        int nodeNumber = tmstruckEnfactoryResultService.selectNodeNumber(orderNumber);
+//        if (nodeNumber == 1) {
+            int i = tmstruckEnfactoryResultService.updateEnFactoryByPDA(mapValue);
+            return success(i);
+//        }
+//        return failed();
+    }
+}

+ 94 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckLeaveFactoryResultController.java

@@ -0,0 +1,94 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.model.TmstruckLeaveFactoryResult;
+import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+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 io.swagger.models.auth.In;
+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;
+
+/**
+ * TmstruckLeaveFactoryResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-11 10:32
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-11
+ * 作者:TXF
+ * 参考:
+ * 描述:TmstruckLeaveFactoryResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckleavefactoryresults")
+public class TmstruckLeaveFactoryResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckLeaveFactoryResultService tmstruckLeaveFactoryResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+//    @ApiOperation(value="新增汽车出厂实绩")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
+//    })
+//    @PostMapping("/addLeaveFactoryResult")
+//    public RESTfulResult addLeaveFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue){
+//        int i = tmstruckLeaveFactoryResultService.addLeaveFactoryResult(mapValue);
+//        return success(i);
+//    }
+
+    @ApiOperation(value="查询出厂实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(110)", 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("/getLeaveFactoryResult")
+    public RESTfulResult getLeaveFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                          Integer apiId,
+                                          Integer pageNum,
+                                          Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allLeaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> leaveFactoryResult = tmstruckLeaveFactoryResultService.getLeaveFactoryResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allLeaveFactoryResult,leaveFactoryResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="PAD扫描汽车出厂实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
+    })
+    @PostMapping("/addLeaveFactoryResult")
+    public RESTfulResult addLeaveFactoryResult(@RequestBody(required=false) Map<String,Object> mapValue){
+        String nu=mapValue.get("orderNumber").toString();
+        //执行查询语句找出运输类型进行判断,是否为出厂 4 已完成计皮
+        Integer i = tmstruckLeaveFactoryResultService.selectTransportRoute(nu);
+//        if (i == 4) {
+            int leaveFactory=tmstruckLeaveFactoryResultService.updateLeaveFactoryByPDA(mapValue);
+            return  success(leaveFactory);
+//        }else
+//            return  failed();
+    }
+}

+ 119 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckLoadResultController.java

@@ -0,0 +1,119 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.model.TmstruckLoadResult;
+import com.steerinfo.dil.service.ITmstruckLoadResultService;
+import com.steerinfo.dil.util.ColumnDataUtil;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.dil.util.PageListAdd;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+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 io.swagger.models.auth.In;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.*;
+
+/**
+ * TmstruckLoadResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-02 10:38
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-02
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckLoadResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckloadresults")
+public class TmstruckLoadResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckLoadResultService tmstruckLoadResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询所有装车实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(91)", value = "动态表头", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageNum", value = "页码", required = false, dataType = "Integer"),
+            @ApiImplicitParam(name = "pageSize", value = "页", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getAllLoadResult")
+    public RESTfulResult getAllLoadResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                        Integer apiId,
+                                        Integer pageNum,
+                                        Integer pageSize,
+                                          Integer status ){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        if(status != null){
+            mapValue.put("status", status);
+        }
+        //不分页筛选数据
+        List<Map<String, Object>> allLoadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> loadResult = tmstruckLoadResultService.getAllLoadResult(mapValue);
+        DataChange.changeDateToDayDate(loadResult, "resultLoadStartTime");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allLoadResult,loadResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="新增汽车装车实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
+    })
+    @PostMapping("/addLoadResult")
+    public RESTfulResult addLoadResult(@RequestBody(required=false) Map<String,Object> mapValue){
+        int i = tmstruckLoadResultService.addLoadResult(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="修改汽车装车实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstruckLoadResult", value = "装车作业实绩对象", required = false, dataType = "TmstruckLoadResult"),
+    })
+    @PostMapping("/updateLoadResult")
+    public RESTfulResult updateLoadResult(@RequestBody TmstruckLoadResult tmstruckLoadResult){
+        tmstruckLoadResult.setUpdateUsername("admin");
+        tmstruckLoadResult.setUpdateTime(new Date());
+        int i = tmstruckLoadResultService.updateLoadResult(tmstruckLoadResult);
+        return success(i);
+    }
+
+    @ApiOperation(value="通过ID查询装车实绩 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "装车作业实绩ID", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getLoadResultById/{resultId}")
+    public RESTfulResult getLoadResultById(@PathVariable("resultId") Integer resultId){
+        List<Map<String, Object>> date = tmstruckLoadResultService.getLoadResultById(resultId);
+        return success(date);
+    }
+
+    @ApiOperation(value="逻辑删除车装车实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "tmstruckLoadResult", value = "装车作业实绩对象", required = false, dataType = "TmstruckLoadResult"),
+    })
+    @PostMapping("/deleteLoadResult/{resultId}")
+    public RESTfulResult deleteLoadResult(@PathVariable("resultId")Integer resultId){
+        TmstruckLoadResult tmstruckLoadResult = new TmstruckLoadResult();
+        tmstruckLoadResult.setDeleteName("admin");
+        tmstruckLoadResult.setDeleteTime(new Date());
+        tmstruckLoadResult.setResultId(new BigDecimal(resultId));
+        tmstruckLoadResult.setStatus(new BigDecimal(1));
+        int i = tmstruckLoadResultService.updateLoadResult(tmstruckLoadResult);
+        return success(i);
+    }
+}

+ 49 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckMeasureCommissionController.java

@@ -0,0 +1,49 @@
+package com.steerinfo.dil.controller;
+import com.steerinfo.dil.service.ITmstruckMeasureCommissionService;
+
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+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;
+
+/**
+ * TmstruckMeasureCommission RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 10:28
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckMeasureCommission RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckmeasurecommissions")
+public class TmstruckMeasureCommissionController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckMeasureCommissionService tmstruckMeasureCommissionService;
+
+    @ApiOperation(value="查询计量委托 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "装车作业实绩ID", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getAllMeasureCommission/{type}")
+    public RESTfulResult getAllMeasureCommission(@PathVariable("type") Integer type){
+        HashMap<String, Object> mapValue = new HashMap<>();
+        mapValue.put("type", type);
+        List<Map<String, Object>> allMeasureCommission = tmstruckMeasureCommissionService.getAllMeasureCommission(mapValue);
+        return success(allMeasureCommission);
+    }
+}

+ 92 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckQualityResultController.java

@@ -0,0 +1,92 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.model.TmstruckQualityResult;
+import com.steerinfo.dil.service.ITmstruckQualityResultService;
+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 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;
+
+/**
+ * TmstruckQualityResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-11 04:14
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-11
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckQualityResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckqualityresults")
+public class TmstruckQualityResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckQualityResultService tmstruckQualityResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询所有的质检作业")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(111)", 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("/getQualityResult")
+    public RESTfulResult getQualityResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                          Integer apiId,
+                                          Integer pageNum,
+                                          Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allQualityResult = tmstruckQualityResultService.getQualityResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> qualityResult = tmstruckQualityResultService.getQualityResult(mapValue);
+        DataChange.dataTo2Number(qualityResult, "resultDeduction");
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allQualityResult,qualityResult);
+        return success(pageList);
+    }
+
+
+    @ApiOperation(value="获取质检实绩 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "质检作业实绩ID", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/getQualityResultById/{resultId}")
+    public RESTfulResult getQualityResultById(@PathVariable("resultId") Integer resultId){
+        List<Map<String, Object>> resultById = tmstruckQualityResultService.getQualityResultById(resultId);
+        return success(resultById);
+    }
+
+    @ApiOperation(value="修改质检实绩 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "质检作业实绩ID", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/updateQualityResult")
+    public RESTfulResult updateQualityResult(@RequestBody TmstruckQualityResult tmstruckQualityResult){
+        int i = tmstruckQualityResultService.updateQualityResult(tmstruckQualityResult);
+        return success(i);
+    }
+}

+ 64 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckReceiptResultController.java

@@ -0,0 +1,64 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.service.ITmstruckReceiptResultService;
+
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+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.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckReceiptResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-10 10:10
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-10
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckReceiptResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckreceiptresults")
+public class TmstruckReceiptResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckReceiptResultService tmstruckReceiptResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询收货实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(107)", 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("/getReceiveResult")
+    public RESTfulResult getReceiveResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                          Integer apiId,
+                                          Integer pageNum,
+                                          Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allReceiveResult = tmstruckReceiptResultService.getReceiveResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> receiveResult = tmstruckReceiptResultService.getReceiveResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allReceiveResult,receiveResult);
+        return success(pageList);
+    }
+}

+ 76 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckUnloadResultController.java

@@ -0,0 +1,76 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.service.ITmstruckUnloadResultService;
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+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.util.List;
+import java.util.Map;
+
+
+/**
+ * TmstruckQualityTrackingCard RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 05:44
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckQualityTrackingCard RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckunloadresult")
+public class TmstruckUnloadResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckUnloadResultService tmstruckUnloadResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询卸货实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(103)", 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("/getUnloadResult")
+    public RESTfulResult getUnloadResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allUnloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> unloadResult = tmstruckUnloadResultService.getUnloadResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allUnloadResult,unloadResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="更新卸货实绩 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "resultId", value = "装车作业实绩ID", required = false, dataType = "Integer"),
+    })
+    @PostMapping("/addUnloadResult")
+    public RESTfulResult addUnloadResult(@RequestBody Map<String, Object> mapValue){
+        int i = tmstruckUnloadResultService.updateUnloadResult(mapValue);
+        return success(i);
+    }
+
+}

+ 110 - 0
src/main/java/com/steerinfo/dil/controller/TmstruckWeightResultController.java

@@ -0,0 +1,110 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.dil.service.ITmstruckWeightResultService;
+
+import com.steerinfo.dil.util.BaseRESTfulController;
+import com.steerinfo.dil.util.ColumnDataUtil;
+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.util.List;
+import java.util.Map;
+
+
+/**
+ * TmstruckWeightResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 02:21
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckWeightResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/tmstruckweightresults")
+public class TmstruckWeightResultController extends BaseRESTfulController {
+
+    @Autowired
+    ITmstruckWeightResultService tmstruckWeightResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="查询计毛实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(102)", 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("/getAllJiMaoResult")
+    public RESTfulResult getAllJiMaoResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allJiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiMaoResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allJiMaoResult,jiMaoResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="查询计皮实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(104)", 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("/getAllJiPiResult")
+    public RESTfulResult getAllJiPiResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allJiMaoResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> jiMaoResult = tmstruckWeightResultService.getAllJiPiResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allJiMaoResult,jiMaoResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="采集新增计毛实绩 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "采集的数据", required = false, dataType = "Map"),
+    })
+    @PostMapping("/addJiMaoResult")
+    public RESTfulResult addJiMaoResult(@RequestBody Map<String, Object> mapValue){
+        int i = tmstruckWeightResultService.addJiMaoResult(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="采集新增计皮实绩 ")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "采集的数据", required = false, dataType = "Map"),
+    })
+    @PostMapping("/addJiPiResult")
+    public RESTfulResult addJiPiResult(@RequestBody Map<String, Object> mapValue){
+        int i = tmstruckWeightResultService.addJiPiResult(mapValue);
+        return success(i);
+    }
+}
+
+  

+ 19 - 0
src/main/java/com/steerinfo/dil/feign/BmsShipFeign.java

@@ -0,0 +1,19 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.math.BigDecimal;
+
+/**
+ * @ author    :TXF
+ * @ time      :2021/10/8 21:56
+ */
+
+@FeignClient(value = "dil-bmsship-api-dev", url = "192.168.0.107:8078")
+public interface BmsShipFeign {
+    @PostMapping("api/v1/bmsship/bmsshipdetailsorder/addDetailsOrder/{resultId}")
+    public RESTfulResult addDetailsOrder(@PathVariable("resultId") BigDecimal resultId) throws Exception ;
+}

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

@@ -0,0 +1,20 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.framework.controller.RESTfulResult;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+
+import java.math.BigDecimal;
+
+/**
+ * @ author    :TXF
+ * @ time      :2021/10/8 22:02
+ */
+
+@FeignClient(value = "dil-bmstruck-api-dev", url = "192.168.0.107:8076")
+public interface BmsTruckFeign {
+
+    @PostMapping("api/v1/bmstruck/bmstruckdetailsorder/addDetailsOrder/{orderId}")
+    public RESTfulResult addDetailsOrder(@PathVariable("orderId") BigDecimal orderId) throws Exception ;
+}

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

@@ -0,0 +1,21 @@
+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
+ */
+@Service
+@FeignClient(value = "DIL-COLUMN-DATA-DEV",url = "localhost:8083")
+public interface ColumnDataFeign {
+    @RequestMapping("getColumnData")
+    List<Map<String,Object>> getColumnData(@RequestParam("apiId") Integer apiId);
+}

+ 32 - 0
src/main/java/com/steerinfo/dil/feign/ESFeign.java

@@ -0,0 +1,32 @@
+package com.steerinfo.dil.feign;
+
+import com.steerinfo.dil.util.PageListAdd;
+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.RequestParam;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/7/27 15:49
+ * @Version 1.0
+ */
+
+
+@FeignClient(value = "DIL-ES-DEV",url = "https://portal-dev.steerinfo.com/icore.icp.web/pass/dil/dil-es-api")
+public interface ESFeign {
+    @PostMapping("getConResult")
+    PageListAdd getConResult(@RequestBody(required = false) Map<String, Object> mapValue,
+                             @RequestParam String index,
+                             @RequestParam Integer apiId,
+                             @RequestParam Integer pageNum,
+                             @RequestParam Integer pageSize,
+                             @RequestParam String con);
+
+
+    @PostMapping( value = "insertIndex",consumes = "application/json", produces = "application/json")
+    void insertIndex(@RequestBody List<Map<String, Object>> detailListTotal);
+}

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

@@ -0,0 +1,23 @@
+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 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();
+    }
+
+}

+ 30 - 0
src/main/java/com/steerinfo/dil/mapper/AmstruckPurplanMapper.java

@@ -0,0 +1,30 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.AmstruckPurplan;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface AmstruckPurplanMapper extends IBaseMapper<AmstruckPurplan, BigDecimal> {
+
+    //查询所有运输计划
+    List<Map<String, Object>> getAllPurPlan(Map<String, Object> map);
+
+    //新增运输计划
+    int insertSelective(AmstruckPurplan amstruckPurplan);
+
+    //查询最大ID值
+    BigDecimal selectMaxId();
+
+    //通过ID查询运输计划
+    List<Map<String, Object>> getPurPlanById(@Param("planId") Integer planId);
+
+    //修改运输计划
+    int updateByPrimaryKeySelective(AmstruckPurplan amstruckPurplan);
+
+}

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

@@ -0,0 +1,28 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.AmstruckPurplanMaterial;
+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 AmstruckPurplanMaterialMapper extends IBaseMapper<AmstruckPurplanMaterial, BigDecimal> {
+    //新增运输计划同时新增运输计划子表数据
+    int insertSelective(AmstruckPurplanMaterial amstruckPurplanMaterial);
+
+    //通过Id查询运输计划  包含分解信息  未分配、已分配
+    List<Map<String, Object>> getDecomposedPlan(Map<String, Object> map);
+
+    //通过Id查询已分配重量、未分配重量
+    List<Map<String, Object>> getWeight(Integer planId);
+
+    //查询最大主键Id
+    BigDecimal selectMaxId();
+
+    //通过运输计划Id查询计划子表主键ID
+    BigDecimal getChildIdByPlanId(BigDecimal planId);
+
+}

+ 46 - 0
src/main/java/com/steerinfo/dil/mapper/DropDownMapper.java

@@ -0,0 +1,46 @@
+package com.steerinfo.dil.mapper;
+
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 获取下拉框
+ * @ author    :TXF
+ * @ time      :2021/9/4 9:35
+ */
+
+@Mapper
+public interface DropDownMapper {
+
+    //获取批次下拉框
+    List<Map<String, Object>> getDilBatch();
+
+    //获取承运商下拉框
+    List<Map<String, Object>> getCarrier();
+
+    //获取路径下拉框
+    List<Map<String, Object>> getLine();
+
+    //获取仓库下拉框
+    List<Map<String, Object>> getWarehouse(Map<String, Object> map);
+
+    //获取门岗下拉框
+    List<Map<String, Object>> getGatepost();
+
+    //获取所有采购订单号
+    List<Map<String, Object>> getAPO();
+
+    //获取所有的辅料物资
+    List<Map<String, Object>> getFuMaterial(Integer type);
+
+    //获取所有的辅料车辆
+    List<Map<String, Object>> getFuCapacityId();
+
+    //获取所有的港口
+    List<Map<String, Object>> getPort();
+
+
+
+}

+ 65 - 0
src/main/java/com/steerinfo/dil/mapper/OmstruckOrderMapper.java

@@ -0,0 +1,65 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OmstruckOrder;
+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.Date;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface OmstruckOrderMapper extends IBaseMapper<OmstruckOrder, BigDecimal> {
+    //查询所有运输订单信息 状态:3
+    //查询所有已下发运输订单 状态:4
+    List<Map<String, Object>> getAllTruckOrder(Map<String, Object> map);
+
+    //新增运单
+    int insertSelective(OmstruckOrder omstruckOrder);
+
+    //查询最大主键Id
+    BigDecimal selectMaxId();
+
+    //通过运输订单Id查询运输订单号
+    String getOrderNumberByOrderId(Integer orderId);
+
+    //查询所有运力信息
+    List<Map<String, Object>> getAllCapacity(Map<String, Object> map);
+
+    //通过运力Id 或 车牌号 修改运输状态
+    int updateCapacityByCarIdOrNum(Map<String, Object> map);
+
+    //通过运输订单ID 或 运输订单号 查询运力Id
+    BigDecimal getCapacityIdByOrderOrNum(Map<String, Object> map);
+
+    //修改运输订单 、分配运单给司机
+    int updateByPrimaryKeySelective(OmstruckOrder omstruckOrder);
+
+    //通过ID获取派单时间
+    Date getInsertTimeById(Integer orderId);
+
+    //通过车牌号查询运力id
+    BigDecimal getCapacityIdByCapacityNum(String capacityNumber);
+
+    //司机接单调用接口 通过运力Id匹配  /  通过运单ID查询运单信息 APP
+    //查询所有接单或拒绝接单的订单 PC
+    List<Map<String, Object>> getTruckOrderByCapacityNum(Map<String, Object> map);
+
+    //查询司机所有已拒绝过的订单
+    List<Map<String, Object>> getReceiveRefuseOrderByCapacityId(Map<String, Object> map);
+
+
+    // 查询实绩地点和时间
+    List<Map<String, Object>> selectPlaceAndTime(BigDecimal orderId);
+
+    //通过运单号查询运单信息
+    List<Map<String, Object>> getOrderByOrderId(BigDecimal orderId);
+
+    //通过运输订单号查询预设路径的作业点ID  及 总实绩ID
+    Map<String, Object> getPointIdByOrderNum(String orderNumber);
+
+    //运输派单
+    List<Map<String, Object>> getTransportDispatch(Map<String, Object> map);
+}

+ 24 - 0
src/main/java/com/steerinfo/dil/mapper/OmstruckOrderMaterialMapper.java

@@ -0,0 +1,24 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.dil.model.OmstruckOrderMaterial;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+
+@Mapper
+public interface OmstruckOrderMaterialMapper extends IBaseMapper<OmstruckOrderMaterial, BigDecimal> {
+    //新增运单子表
+    int insertSelective(OmstruckOrderMaterial omstruckOrderMaterial);
+
+    //修改运输订单子表
+    int updateByPrimaryKeySelective(OmstruckOrder omstruckOrder);
+
+    //查询最大主键Id
+    BigDecimal selectMaxId();
+
+    //通过订单Id
+    BigDecimal getOrderMaterialIdByOrderId(BigDecimal orderId);
+
+}

+ 31 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.java

@@ -0,0 +1,31 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckEnfactoryResult;
+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 TmstruckEnfactoryResultMapper extends IBaseMapper<TmstruckEnfactoryResult, Short> {
+    //获取所有进厂实绩
+    List<Map<String, Object>> getAllEnFactoryResult(Map<String, Object> map);
+
+    //查询最大主键Id
+    BigDecimal selectMaxId();
+
+    //通过车牌号和 运输订单 查询 与运输订单关联的实绩总表ID
+    Integer selectOrderIdByCpAndOn(Map<String, Object> map);
+
+    //通过门岗名称查询门岗Id
+    Integer selectGatepostIdByGatepostName(String gatepostName);
+
+    //根据orderNumber获取实绩id
+    Map<String, Object> selectEnFactoryResultId(String orderNumber);
+
+    //查找排队序号
+    Integer selectNodeNumber(String orderNumber);
+
+}

+ 27 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.java

@@ -0,0 +1,27 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckLeaveFactoryResult;
+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 TmstruckLeaveFactoryResultMapper extends IBaseMapper<TmstruckLeaveFactoryResult, BigDecimal> {
+    //查询最大ID
+    BigDecimal selectMaxId();
+
+    //查询所有的出厂实绩、
+    List<Map<String, Object>> getLeaveFactoryResult(Map<String, Object> map);
+
+    //查询运输路线是否为出厂
+    Integer selectTransportRoute(String orderNumber);
+
+    //查询车牌号与门岗
+    Map<String,Object> selectCnAndGnByOrderNumber(String orderNumber);
+
+    //根据订单号获取实绩id
+    Map<String, Object> selectResultId(String orderNumber);
+}

+ 31 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.java

@@ -0,0 +1,31 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckLoadResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface TmstruckLoadResultMapper extends IBaseMapper<TmstruckLoadResult, BigDecimal> {
+    //查询所有的装车实绩
+    List<Map<String, Object>> getAllLoadResult(Map<String, Object> map);
+
+    //新增装车实绩
+    int insertSelective(TmstruckLoadResult tmstruckLoadResult);
+
+    //查询最大ID值
+    BigDecimal selectMaxId();
+
+    //通过Id获取装车实绩 数据 用于修改
+    List<Map<String, Object>> getLoadResultById(Integer resultId);
+
+    //通过发站ID查询所属港口ID
+    BigDecimal getPortIdBySendStationId(BigDecimal sendStationId);
+
+    //通过订单ID查询批次ID
+    BigDecimal getBatchIdByOrderId(BigDecimal orderId);
+}

+ 20 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckMeasureCommissionMapper.java

@@ -0,0 +1,20 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckMeasureCommission;
+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 TmstruckMeasureCommissionMapper extends IBaseMapper<TmstruckMeasureCommission, BigDecimal> {
+
+    //查询所有计量委托
+    List<Map<String, Object>> getAllMeasureCommission(Map<String, Object> map);
+
+    //查询最大主键Id
+    BigDecimal selectMaxId();
+
+}

+ 20 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.java

@@ -0,0 +1,20 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckQualityResult;
+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 TmstruckQualityResultMapper extends IBaseMapper<TmstruckQualityResult, BigDecimal> {
+
+    //查询所有的质检作业
+    List<Map<String, Object>> getQualityResult(Map<String, Object> map);
+
+
+    //通过ID查询质检作业
+    List<Map<String, Object>> getQualityResultById(Integer resultId);
+}

+ 24 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.java

@@ -0,0 +1,24 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckReceiptResult;
+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 TmstruckReceiptResultMapper extends IBaseMapper<TmstruckReceiptResult, BigDecimal> {
+    //查询最大ID值
+    BigDecimal selectMaxId();
+
+    //通过总实绩Id查询主键Id
+    BigDecimal getIdByTotalResultId(Integer totalResultId);
+
+    //计皮完成后 通过总实绩ID 更新状态 为 1
+    int updateByTotalResultId(TmstruckReceiptResult tmstruckReceiptResult);
+
+    //查询所有签收实绩
+    List<Map<String, Object>> getReceiveResult(Map<String, Object> map);
+}

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

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

+ 27 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.java

@@ -0,0 +1,27 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckUnloadResult;
+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 TmstruckUnloadResultMapper extends IBaseMapper<TmstruckUnloadResult, BigDecimal> {
+    //查询卸货实绩
+    List<Map<String, Object>> getUnloadResult(Map<String, Object> map);
+
+    //查询最大ID值
+    BigDecimal selectMaxId();
+
+    // 通过总实绩id查询卸货实绩id
+    BigDecimal getResultIdByTotalId(BigDecimal totalId);
+
+    //通过运输订单号查询 实绩Id 和总实绩Id
+    Map<String, Object> selectTotalIdByOrderNo(String orderNumber);
+
+    //通过卸货地点查询仓库Id
+    BigDecimal getWarehouseIdByWName(String warehouseName);
+}

+ 29 - 0
src/main/java/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.java

@@ -0,0 +1,29 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.TmstruckWeightResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import io.swagger.models.auth.In;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+@Mapper
+public interface TmstruckWeightResultMapper extends IBaseMapper<TmstruckWeightResult, Short> {
+    //查询最大主键Id
+    BigDecimal selectMaxId();
+
+    //通过订单号查询实绩总表Id
+    Map<String, Object> selectTotalIdByOrderNo(String orderNumber);
+
+    //通过汽车衡编号查询汽车衡ID
+    Integer selectTruckCalculateId(String truckCalculateNumber);
+
+    //查询所有计毛实绩
+    List<Map<String, Object>> getAllJiMaoResult(Map<String, Object> map);
+
+    //查询所有计皮实绩
+    List<Map<String, Object>> getAllJiPiResult(Map<String, Object> map);
+
+}

+ 259 - 0
src/main/java/com/steerinfo/dil/model/AmstruckPurplan.java

@@ -0,0 +1,259 @@
+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 AmstruckPurplan implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(PLAN_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal planId;
+
+    /**
+     * 批次ID(BATCH_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="批次ID",required=false)
+    private BigDecimal batchId;
+
+    /**
+     * 运输计划号(PLAN_NO,VARCHAR,25)
+     */
+    @ApiModelProperty(value="运输计划号",required=false)
+    private String planNo;
+
+    /**
+     * 承运商ID(CARRIER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="承运商ID",required=false)
+    private BigDecimal carrierId;
+
+    /**
+     * 车数(PLAN_TRUCK_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="车数",required=false)
+    private BigDecimal planTruckNumber;
+
+    /**
+     * 车型ID(CAPACITY_TYPE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="车型ID",required=false)
+    private BigDecimal capacityTypeId;
+
+    /**
+     * 用车时间(PLAN_TRUCK_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="用车时间",required=false)
+    private Date planTruckTime;
+
+    /**
+     * 计划状态:0:未下发;1:已下发;2:已接收(PLAN_STATUS,DECIMAL,38)
+     */
+    @ApiModelProperty(value="计划状态:0:未下发;1:已下发;2:已接收",required=false)
+    private BigDecimal planStatus;
+
+    /**
+     * 物资总重量(MATERIAL_TOTAL_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资总重量",required=false)
+    private BigDecimal materialTotalWeight;
+
+    /**
+     * 预计进厂时间(PLAN_INCOMING_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="预计进厂时间",required=false)
+    private Date planIncomingTime;
+
+    /**
+     * 记录创建人(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.planId;
+    }
+
+    @Override
+    public void setId(BigDecimal planId) {
+        this.planId = planId;
+    }
+
+    public BigDecimal getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(BigDecimal planId) {
+        this.planId = planId;
+    }
+
+    public BigDecimal getBatchId() {
+        return batchId;
+    }
+
+    public void setBatchId(BigDecimal batchId) {
+        this.batchId = batchId;
+    }
+
+    public String getPlanNo() {
+        return planNo;
+    }
+
+    public void setPlanNo(String planNo) {
+        this.planNo = planNo == null ? null : planNo.trim();
+    }
+
+    public BigDecimal getCarrierId() {
+        return carrierId;
+    }
+
+    public void setCarrierId(BigDecimal carrierId) {
+        this.carrierId = carrierId;
+    }
+
+    public BigDecimal getPlanTruckNumber() {
+        return planTruckNumber;
+    }
+
+    public void setPlanTruckNumber(BigDecimal planTruckNumber) {
+        this.planTruckNumber = planTruckNumber;
+    }
+
+    public BigDecimal getCapacityTypeId() {
+        return capacityTypeId;
+    }
+
+    public void setCapacityTypeId(BigDecimal capacityTypeId) {
+        this.capacityTypeId = capacityTypeId;
+    }
+
+    public Date getPlanTruckTime() {
+        return planTruckTime;
+    }
+
+    public void setPlanTruckTime(Date planTruckTime) {
+        this.planTruckTime = planTruckTime;
+    }
+
+    public BigDecimal getPlanStatus() {
+        return planStatus;
+    }
+
+    public void setPlanStatus(BigDecimal planStatus) {
+        this.planStatus = planStatus;
+    }
+
+    public BigDecimal getMaterialTotalWeight() {
+        return materialTotalWeight;
+    }
+
+    public void setMaterialTotalWeight(BigDecimal materialTotalWeight) {
+        this.materialTotalWeight = materialTotalWeight;
+    }
+
+    public Date getPlanIncomingTime() {
+        return planIncomingTime;
+    }
+
+    public void setPlanIncomingTime(Date planIncomingTime) {
+        this.planIncomingTime = planIncomingTime;
+    }
+
+    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(", planId=").append(planId);
+        sb.append(", batchId=").append(batchId);
+        sb.append(", planNo=").append(planNo);
+        sb.append(", carrierId=").append(carrierId);
+        sb.append(", planTruckNumber=").append(planTruckNumber);
+        sb.append(", capacityTypeId=").append(capacityTypeId);
+        sb.append(", planTruckTime=").append(planTruckTime);
+        sb.append(", planStatus=").append(planStatus);
+        sb.append(", materialTotalWeight=").append(materialTotalWeight);
+        sb.append(", planIncomingTime=").append(planIncomingTime);
+        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();
+    }
+}

+ 199 - 0
src/main/java/com/steerinfo/dil/model/AmstruckPurplanMaterial.java

@@ -0,0 +1,199 @@
+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 AmstruckPurplanMaterial implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(PURPLAN_PLAN_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal purplanPlanMaterialId;
+
+    /**
+     * 计划ID(PLAN_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="计划ID",required=false)
+    private BigDecimal planId;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 物资数量(PURPLAN_MATERIAL_NUMBER,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资数量",required=false)
+    private BigDecimal purplanMaterialNumber;
+
+    /**
+     * 已分配重量(MATERIAL_ALLOCATED_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="已分配重量",required=false)
+    private BigDecimal materialAllocatedWeight;
+
+    /**
+     * 未分配重量(MATERIAL_UNALLOCATED_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="未分配重量",required=false)
+    private BigDecimal materialUnallocatedWeight;
+
+    /**
+     * 记录创建人(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.purplanPlanMaterialId;
+    }
+
+    @Override
+    public void setId(BigDecimal purplanPlanMaterialId) {
+        this.purplanPlanMaterialId = purplanPlanMaterialId;
+    }
+
+    public BigDecimal getPurplanPlanMaterialId() {
+        return purplanPlanMaterialId;
+    }
+
+    public void setPurplanPlanMaterialId(BigDecimal purplanPlanMaterialId) {
+        this.purplanPlanMaterialId = purplanPlanMaterialId;
+    }
+
+    public BigDecimal getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(BigDecimal planId) {
+        this.planId = planId;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getPurplanMaterialNumber() {
+        return purplanMaterialNumber;
+    }
+
+    public void setPurplanMaterialNumber(BigDecimal purplanMaterialNumber) {
+        this.purplanMaterialNumber = purplanMaterialNumber;
+    }
+
+    public BigDecimal getMaterialAllocatedWeight() {
+        return materialAllocatedWeight;
+    }
+
+    public void setMaterialAllocatedWeight(BigDecimal materialAllocatedWeight) {
+        this.materialAllocatedWeight = materialAllocatedWeight;
+    }
+
+    public BigDecimal getMaterialUnallocatedWeight() {
+        return materialUnallocatedWeight;
+    }
+
+    public void setMaterialUnallocatedWeight(BigDecimal materialUnallocatedWeight) {
+        this.materialUnallocatedWeight = materialUnallocatedWeight;
+    }
+
+    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(", purplanPlanMaterialId=").append(purplanPlanMaterialId);
+        sb.append(", planId=").append(planId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", purplanMaterialNumber=").append(purplanMaterialNumber);
+        sb.append(", materialAllocatedWeight=").append(materialAllocatedWeight);
+        sb.append(", materialUnallocatedWeight=").append(materialUnallocatedWeight);
+        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();
+    }
+}

+ 319 - 0
src/main/java/com/steerinfo/dil/model/OmstruckOrder.java

@@ -0,0 +1,319 @@
+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 OmstruckOrder implements IBasePO<BigDecimal> {
+    /**
+     * 运输订单id(ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运输订单id",required=true)
+    private BigDecimal orderId;
+
+    /**
+     * 销售订单和物资的中间表ID/发运计划ID/采购订单ID/内转物流计划ID(ORDER_PLAN_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="销售订单和物资的中间表ID/发运计划ID/采购订单ID/内转物流计划ID",required=false)
+    private BigDecimal orderPlanId;
+
+    /**
+     * 运输订单号(WYSDD-年月日-8位数的顺序号)(ORDER_NUMBER,VARCHAR,50)
+     */
+    @ApiModelProperty(value="运输订单号(WYSDD-年月日-8位数的顺序号)",required=false)
+    private String orderNumber;
+
+    /**
+     * 运力ID(CAPACITY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运力ID",required=false)
+    private BigDecimal capacityId;
+
+    /**
+     * 订单下发时间(ORDER_ISSUE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="订单下发时间",required=false)
+    private Date orderIssueTime;
+
+    /**
+     * 司机操作订单行为:0:拒绝;1:接收(ORDER_RECEIVE_STATUS,DECIMAL,38)
+     */
+    @ApiModelProperty(value="司机操作订单行为:0:拒绝;1:接收",required=false)
+    private BigDecimal orderReceiveStatus;
+
+    /**
+     * 司机接收/拒绝订单时间(ORDER_RECEIVE_REFUSE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="司机接收/拒绝订单时间",required=false)
+    private Date orderReceiveRefuseTime;
+
+    /**
+     * 通信时长=司机接单/拒绝时间-订单下发时间(ORDER_COMMUNICATION_DURATION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="通信时长=司机接单/拒绝时间-订单下发时间",required=false)
+    private BigDecimal orderCommunicationDuration;
+
+    /**
+     * 运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:未接收(ORDER_STATUS,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运单状态 :0:待运输,1:执行中,2:已结束,3:未下发,4:已下发,5:已接收,6:未接收",required=false)
+    private BigDecimal orderStatus;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 逻辑删除(DELETED,DECIMAL,0)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 订单类型(1:销售订单;2:发运计划;3:采购订单;4:内转物流计划)(ORDER_TYPE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="订单类型(1:销售订单;2:发运计划;3:采购订单;4:内转物流计划)",required=false)
+    private BigDecimal orderType;
+
+    /**
+     * 路段顺序号(ORDER_LINE_SEQUENCE,DECIMAL,38)
+     */
+    @ApiModelProperty(value="路段顺序号",required=false)
+    private BigDecimal orderLineSequence;
+
+    /**
+     * 运输路线ID(LINE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="运输路线ID",required=false)
+    private BigDecimal lineId;
+
+    /**
+     * 预计进厂时间(ORDER_ENTRY_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="预计进厂时间",required=false)
+    private Date orderEntryTime;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.orderId;
+    }
+
+    @Override
+    public void setId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getOrderPlanId() {
+        return orderPlanId;
+    }
+
+    public void setOrderPlanId(BigDecimal orderPlanId) {
+        this.orderPlanId = orderPlanId;
+    }
+
+    public String getOrderNumber() {
+        return orderNumber;
+    }
+
+    public void setOrderNumber(String orderNumber) {
+        this.orderNumber = orderNumber == null ? null : orderNumber.trim();
+    }
+
+    public BigDecimal getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(BigDecimal capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public Date getOrderIssueTime() {
+        return orderIssueTime;
+    }
+
+    public void setOrderIssueTime(Date orderIssueTime) {
+        this.orderIssueTime = orderIssueTime;
+    }
+
+    public BigDecimal getOrderReceiveStatus() {
+        return orderReceiveStatus;
+    }
+
+    public void setOrderReceiveStatus(BigDecimal orderReceiveStatus) {
+        this.orderReceiveStatus = orderReceiveStatus;
+    }
+
+    public Date getOrderReceiveRefuseTime() {
+        return orderReceiveRefuseTime;
+    }
+
+    public void setOrderReceiveRefuseTime(Date orderReceiveRefuseTime) {
+        this.orderReceiveRefuseTime = orderReceiveRefuseTime;
+    }
+
+    public BigDecimal getOrderCommunicationDuration() {
+        return orderCommunicationDuration;
+    }
+
+    public void setOrderCommunicationDuration(BigDecimal orderCommunicationDuration) {
+        this.orderCommunicationDuration = orderCommunicationDuration;
+    }
+
+    public BigDecimal getOrderStatus() {
+        return orderStatus;
+    }
+
+    public void setOrderStatus(BigDecimal orderStatus) {
+        this.orderStatus = orderStatus;
+    }
+
+    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 getOrderType() {
+        return orderType;
+    }
+
+    public void setOrderType(BigDecimal orderType) {
+        this.orderType = orderType;
+    }
+
+    public BigDecimal getOrderLineSequence() {
+        return orderLineSequence;
+    }
+
+    public void setOrderLineSequence(BigDecimal orderLineSequence) {
+        this.orderLineSequence = orderLineSequence;
+    }
+
+    public BigDecimal getLineId() {
+        return lineId;
+    }
+
+    public void setLineId(BigDecimal lineId) {
+        this.lineId = lineId;
+    }
+
+    public Date getOrderEntryTime() {
+        return orderEntryTime;
+    }
+
+    public void setOrderEntryTime(Date orderEntryTime) {
+        this.orderEntryTime = orderEntryTime;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", orderId=").append(orderId);
+        sb.append(", orderPlanId=").append(orderPlanId);
+        sb.append(", orderNumber=").append(orderNumber);
+        sb.append(", capacityId=").append(capacityId);
+        sb.append(", orderIssueTime=").append(orderIssueTime);
+        sb.append(", orderReceiveStatus=").append(orderReceiveStatus);
+        sb.append(", orderReceiveRefuseTime=").append(orderReceiveRefuseTime);
+        sb.append(", orderCommunicationDuration=").append(orderCommunicationDuration);
+        sb.append(", orderStatus=").append(orderStatus);
+        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(", orderType=").append(orderType);
+        sb.append(", orderLineSequence=").append(orderLineSequence);
+        sb.append(", lineId=").append(lineId);
+        sb.append(", orderEntryTime=").append(orderEntryTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 184 - 0
src/main/java/com/steerinfo/dil/model/OmstruckOrderMaterial.java

@@ -0,0 +1,184 @@
+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 OmstruckOrderMaterial implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(ORDER_MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal orderMaterialId;
+
+    /**
+     * 订单id(ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="订单id",required=true)
+    private BigDecimal orderId;
+
+    /**
+     * 物资ID(MATERIAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资ID",required=false)
+    private BigDecimal materialId;
+
+    /**
+     * 物资件数(ORDER_MATERIAL_NUMBER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="物资件数",required=false)
+    private BigDecimal orderMaterialNumber;
+
+    /**
+     * 物资重量(ORDER_MATERIAL_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="物资重量",required=false)
+    private BigDecimal orderMaterialWeight;
+
+    /**
+     * 记录创建人(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.orderMaterialId;
+    }
+
+    @Override
+    public void setId(BigDecimal orderMaterialId) {
+        this.orderMaterialId = orderMaterialId;
+    }
+
+    public BigDecimal getOrderMaterialId() {
+        return orderMaterialId;
+    }
+
+    public void setOrderMaterialId(BigDecimal orderMaterialId) {
+        this.orderMaterialId = orderMaterialId;
+    }
+
+    public BigDecimal getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getMaterialId() {
+        return materialId;
+    }
+
+    public void setMaterialId(BigDecimal materialId) {
+        this.materialId = materialId;
+    }
+
+    public BigDecimal getOrderMaterialNumber() {
+        return orderMaterialNumber;
+    }
+
+    public void setOrderMaterialNumber(BigDecimal orderMaterialNumber) {
+        this.orderMaterialNumber = orderMaterialNumber;
+    }
+
+    public BigDecimal getOrderMaterialWeight() {
+        return orderMaterialWeight;
+    }
+
+    public void setOrderMaterialWeight(BigDecimal orderMaterialWeight) {
+        this.orderMaterialWeight = orderMaterialWeight;
+    }
+
+    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(", orderMaterialId=").append(orderMaterialId);
+        sb.append(", orderId=").append(orderId);
+        sb.append(", materialId=").append(materialId);
+        sb.append(", orderMaterialNumber=").append(orderMaterialNumber);
+        sb.append(", orderMaterialWeight=").append(orderMaterialWeight);
+        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();
+    }
+}

+ 229 - 0
src/main/java/com/steerinfo/dil/model/TmstruckEnfactoryResult.java

@@ -0,0 +1,229 @@
+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 TmstruckEnfactoryResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键id(RESULT_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 实绩总表ID(RESULT_TOTAL_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="实绩总表ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 进门门岗ID(GATEPOST_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="进门门岗ID",required=true)
+    private BigDecimal gatepostId;
+
+    /**
+     * 进门方式(手动抬杆、自动抬杆)(RESULT_ENTRY_MODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="进门方式(手动抬杆、自动抬杆)",required=false)
+    private String resultEntryMode;
+
+    /**
+     * 进厂时间(RESULT_ENTRY_GATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="进厂时间",required=false)
+    private Date resultEntryGateTime;
+
+    /**
+     * 备注(RESULT_MEMO,VARCHAR,128)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String resultMemo;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 废除人(DELETE_USERNAME,VARCHAR,16)
+     */
+    @ApiModelProperty(value="废除人",required=false)
+    private String deleteUsername;
+
+    /**
+     * 废除时间(DELETE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="废除时间",required=false)
+    private Date deleteTime;
+
+    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 getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public BigDecimal getGatepostId() {
+        return gatepostId;
+    }
+
+    public void setGatepostId(BigDecimal gatepostId) {
+        this.gatepostId = gatepostId;
+    }
+
+    public String getResultEntryMode() {
+        return resultEntryMode;
+    }
+
+    public void setResultEntryMode(String resultEntryMode) {
+        this.resultEntryMode = resultEntryMode == null ? null : resultEntryMode.trim();
+    }
+
+    public Date getResultEntryGateTime() {
+        return resultEntryGateTime;
+    }
+
+    public void setResultEntryGateTime(Date resultEntryGateTime) {
+        this.resultEntryGateTime = resultEntryGateTime;
+    }
+
+    public String getResultMemo() {
+        return resultMemo;
+    }
+
+    public void setResultMemo(String resultMemo) {
+        this.resultMemo = resultMemo == null ? null : resultMemo.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 getDeleteUsername() {
+        return deleteUsername;
+    }
+
+    public void setDeleteUsername(String deleteUsername) {
+        this.deleteUsername = deleteUsername == null ? null : deleteUsername.trim();
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    @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(", resultTotalId=").append(resultTotalId);
+        sb.append(", gatepostId=").append(gatepostId);
+        sb.append(", resultEntryMode=").append(resultEntryMode);
+        sb.append(", resultEntryGateTime=").append(resultEntryGateTime);
+        sb.append(", resultMemo=").append(resultMemo);
+        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(", deleteUsername=").append(deleteUsername);
+        sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 229 - 0
src/main/java/com/steerinfo/dil/model/TmstruckLeaveFactoryResult.java

@@ -0,0 +1,229 @@
+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 TmstruckLeaveFactoryResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键id(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 实绩总表ID(RESULT_TOTAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="实绩总表ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 出门门岗ID(GATEPOST_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="出门门岗ID",required=true)
+    private BigDecimal gatepostId;
+
+    /**
+     * 出门方式(RESULT_OUT_MODE,VARCHAR,20)
+     */
+    @ApiModelProperty(value="出门方式",required=false)
+    private String resultOutMode;
+
+    /**
+     * 出厂时间(RESULT_OUT_GATE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="出厂时间",required=false)
+    private Date resultOutGateTime;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 废除人(DELETE_USERNAME,VARCHAR,16)
+     */
+    @ApiModelProperty(value="废除人",required=false)
+    private String deleteUsername;
+
+    /**
+     * 废除时间(DELETE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="废除时间",required=false)
+    private Date deleteTime;
+
+    /**
+     * 车厢抓拍图片(RESULT_TRUCK_SNAPSHOT_PICTURE,BLOB,4000)
+     */
+    @ApiModelProperty(value="车厢抓拍图片",required=false)
+    private byte[] resultTruckSnapshotPicture;
+
+    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 getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public BigDecimal getGatepostId() {
+        return gatepostId;
+    }
+
+    public void setGatepostId(BigDecimal gatepostId) {
+        this.gatepostId = gatepostId;
+    }
+
+    public String getResultOutMode() {
+        return resultOutMode;
+    }
+
+    public void setResultOutMode(String resultOutMode) {
+        this.resultOutMode = resultOutMode == null ? null : resultOutMode.trim();
+    }
+
+    public Date getResultOutGateTime() {
+        return resultOutGateTime;
+    }
+
+    public void setResultOutGateTime(Date resultOutGateTime) {
+        this.resultOutGateTime = resultOutGateTime;
+    }
+
+    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 getDeleteUsername() {
+        return deleteUsername;
+    }
+
+    public void setDeleteUsername(String deleteUsername) {
+        this.deleteUsername = deleteUsername == null ? null : deleteUsername.trim();
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    public byte[] getResultTruckSnapshotPicture() {
+        return resultTruckSnapshotPicture;
+    }
+
+    public void setResultTruckSnapshotPicture(byte[] resultTruckSnapshotPicture) {
+        this.resultTruckSnapshotPicture = resultTruckSnapshotPicture;
+    }
+
+    @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(", resultTotalId=").append(resultTotalId);
+        sb.append(", gatepostId=").append(gatepostId);
+        sb.append(", resultOutMode=").append(resultOutMode);
+        sb.append(", resultOutGateTime=").append(resultOutGateTime);
+        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(", deleteUsername=").append(deleteUsername);
+        sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", resultTruckSnapshotPicture=").append(resultTruckSnapshotPicture);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 304 - 0
src/main/java/com/steerinfo/dil/model/TmstruckLoadResult.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 TmstruckLoadResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键id(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 实绩总表ID(RESULT_TOTAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="实绩总表ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 装货开始时间(RESULT_LOAD_START_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="装货开始时间",required=false)
+    private Date resultLoadStartTime;
+
+    /**
+     * 装货结束时间(RESULT_LOAD_END_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="装货结束时间",required=false)
+    private Date resultLoadEndTime;
+
+    /**
+     * 装货实绩时长(RESULT_LOAD_DURATION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="装货实绩时长",required=false)
+    private BigDecimal resultLoadDuration;
+
+    /**
+     * 装货标准时长id(LOAD_STANDARD_TIME_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="装货标准时长id",required=false)
+    private BigDecimal loadStandardTimeId;
+
+    /**
+     * 装卸工ID(LOADER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="装卸工ID",required=false)
+    private BigDecimal loaderId;
+
+    /**
+     * 是否清场(否:未清场;是:清场)(RESULT_ISCLEAR,VARCHAR,10)
+     */
+    @ApiModelProperty(value="是否清场(否:未清场;是:清场)",required=false)
+    private String resultIsclear;
+
+    /**
+     * 废除人(DELETE_NAME,VARCHAR,16)
+     */
+    @ApiModelProperty(value="废除人",required=false)
+    private String deleteName;
+
+    /**
+     * 废除时间(DELETE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="废除时间",required=false)
+    private Date deleteTime;
+
+    /**
+     * 记录创建人(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:逻辑删除(STATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="状态:0 :正常 1:逻辑删除",required=false)
+    private BigDecimal status;
+
+    /**
+     * 计量吨位  装车时的计量吨位(RESULT_MEASURED_TONNAGE,DECIMAL,0)
+     */
+    @ApiModelProperty(value="计量吨位  装车时的计量吨位",required=false)
+    private BigDecimal resultMeasuredTonnage;
+
+    /**
+     * 装货点ID(LOADING_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="装货点ID",required=false)
+    private BigDecimal loadingId;
+
+    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 getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public Date getResultLoadStartTime() {
+        return resultLoadStartTime;
+    }
+
+    public void setResultLoadStartTime(Date resultLoadStartTime) {
+        this.resultLoadStartTime = resultLoadStartTime;
+    }
+
+    public Date getResultLoadEndTime() {
+        return resultLoadEndTime;
+    }
+
+    public void setResultLoadEndTime(Date resultLoadEndTime) {
+        this.resultLoadEndTime = resultLoadEndTime;
+    }
+
+    public BigDecimal getResultLoadDuration() {
+        return resultLoadDuration;
+    }
+
+    public void setResultLoadDuration(BigDecimal resultLoadDuration) {
+        this.resultLoadDuration = resultLoadDuration;
+    }
+
+    public BigDecimal getLoadStandardTimeId() {
+        return loadStandardTimeId;
+    }
+
+    public void setLoadStandardTimeId(BigDecimal loadStandardTimeId) {
+        this.loadStandardTimeId = loadStandardTimeId;
+    }
+
+    public BigDecimal getLoaderId() {
+        return loaderId;
+    }
+
+    public void setLoaderId(BigDecimal loaderId) {
+        this.loaderId = loaderId;
+    }
+
+    public String getResultIsclear() {
+        return resultIsclear;
+    }
+
+    public void setResultIsclear(String resultIsclear) {
+        this.resultIsclear = resultIsclear == null ? null : resultIsclear.trim();
+    }
+
+    public String getDeleteName() {
+        return deleteName;
+    }
+
+    public void setDeleteName(String deleteName) {
+        this.deleteName = deleteName == null ? null : deleteName.trim();
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    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;
+    }
+
+    public BigDecimal getResultMeasuredTonnage() {
+        return resultMeasuredTonnage;
+    }
+
+    public void setResultMeasuredTonnage(BigDecimal resultMeasuredTonnage) {
+        this.resultMeasuredTonnage = resultMeasuredTonnage;
+    }
+
+    public BigDecimal getLoadingId() {
+        return loadingId;
+    }
+
+    public void setLoadingId(BigDecimal loadingId) {
+        this.loadingId = loadingId;
+    }
+
+    @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(", resultTotalId=").append(resultTotalId);
+        sb.append(", resultLoadStartTime=").append(resultLoadStartTime);
+        sb.append(", resultLoadEndTime=").append(resultLoadEndTime);
+        sb.append(", resultLoadDuration=").append(resultLoadDuration);
+        sb.append(", loadStandardTimeId=").append(loadStandardTimeId);
+        sb.append(", loaderId=").append(loaderId);
+        sb.append(", resultIsclear=").append(resultIsclear);
+        sb.append(", deleteName=").append(deleteName);
+        sb.append(", deleteTime=").append(deleteTime);
+        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(", resultMeasuredTonnage=").append(resultMeasuredTonnage);
+        sb.append(", loadingId=").append(loadingId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 154 - 0
src/main/java/com/steerinfo/dil/model/TmstruckMeasureCommission.java

@@ -0,0 +1,154 @@
+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 TmstruckMeasureCommission implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(COMMSSION_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal commssionId;
+
+    /**
+     * 总实绩ID(RESULT_TOTAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="总实绩ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 计量委托类型:0:计量皮重;1:计量毛重(COMMSSION_TYPE,DECIMAL,38)
+     */
+    @ApiModelProperty(value="计量委托类型:0:计量皮重;1:计量毛重",required=false)
+    private BigDecimal commssionType;
+
+    /**
+     * 记录创建人(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.commssionId;
+    }
+
+    @Override
+    public void setId(BigDecimal commssionId) {
+        this.commssionId = commssionId;
+    }
+
+    public BigDecimal getCommssionId() {
+        return commssionId;
+    }
+
+    public void setCommssionId(BigDecimal commssionId) {
+        this.commssionId = commssionId;
+    }
+
+    public BigDecimal getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public BigDecimal getCommssionType() {
+        return commssionType;
+    }
+
+    public void setCommssionType(BigDecimal commssionType) {
+        this.commssionType = commssionType;
+    }
+
+    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(", commssionId=").append(commssionId);
+        sb.append(", resultTotalId=").append(resultTotalId);
+        sb.append(", commssionType=").append(commssionType);
+        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();
+    }
+}

+ 214 - 0
src/main/java/com/steerinfo/dil/model/TmstruckQualityResult.java

@@ -0,0 +1,214 @@
+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 TmstruckQualityResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 总实绩ID(TOTAL_RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="总实绩ID",required=false)
+    private BigDecimal totalResultId;
+
+    /**
+     * 是否已抽样(0:未抽样;1:抽样)(RESULT_ISSAMPLING,DECIMAL,38)
+     */
+    @ApiModelProperty(value="是否已抽样(0:未抽样;1:抽样)",required=false)
+    private String resultIssampling;
+
+    /**
+     * 原料扣减量(RESULT_DEDUCTION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="原料扣减量",required=false)
+    private BigDecimal resultDeduction;
+
+    /**
+     * 原料扣减说明(RESULT_DEDUCTION_DESCRIPTION,VARCHAR,50)
+     */
+    @ApiModelProperty(value="原料扣减说明",required=false)
+    private String resultDeductionDescription;
+
+    /**
+     * 原料取样点(RESULT_SAMPLING_POINT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="原料取样点",required=false)
+    private BigDecimal resultSamplingPointId;
+
+    /**
+     * 钢材质检结果(0:不合格;1:合格)(RESULT_CONCLUSION,DECIMAL,38)
+     */
+    @ApiModelProperty(value="钢材质检结果(0:不合格;1:合格)",required=false)
+    private BigDecimal resultConclusion;
+
+    /**
+     * 记录创建人(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.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 getTotalResultId() {
+        return totalResultId;
+    }
+
+    public void setTotalResultId(BigDecimal totalResultId) {
+        this.totalResultId = totalResultId;
+    }
+
+    public String getResultIssampling() {
+        return resultIssampling;
+    }
+
+    public void setResultIssampling(String resultIssampling) {
+        this.resultIssampling = resultIssampling;
+    }
+
+    public BigDecimal getResultDeduction() {
+        return resultDeduction;
+    }
+
+    public void setResultDeduction(BigDecimal resultDeduction) {
+        this.resultDeduction = resultDeduction;
+    }
+
+    public String getResultDeductionDescription() {
+        return resultDeductionDescription;
+    }
+
+    public void setResultDeductionDescription(String resultDeductionDescription) {
+        this.resultDeductionDescription = resultDeductionDescription == null ? null : resultDeductionDescription.trim();
+    }
+
+    public BigDecimal getResultSamplingPointId() {
+        return resultSamplingPointId;
+    }
+
+    public void setResultSamplingPointId(BigDecimal resultSamplingPointId) {
+        this.resultSamplingPointId = resultSamplingPointId;
+    }
+
+    public BigDecimal getResultConclusion() {
+        return resultConclusion;
+    }
+
+    public void setResultConclusion(BigDecimal resultConclusion) {
+        this.resultConclusion = resultConclusion;
+    }
+
+    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(", resultId=").append(resultId);
+        sb.append(", totalResultId=").append(totalResultId);
+        sb.append(", resultIssampling=").append(resultIssampling);
+        sb.append(", resultDeduction=").append(resultDeduction);
+        sb.append(", resultDeductionDescription=").append(resultDeductionDescription);
+        sb.append(", resultSamplingPointId=").append(resultSamplingPointId);
+        sb.append(", resultConclusion=").append(resultConclusion);
+        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();
+    }
+}

+ 214 - 0
src/main/java/com/steerinfo/dil/model/TmstruckReceiptResult.java

@@ -0,0 +1,214 @@
+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 TmstruckReceiptResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(RESULT_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 总实绩ID(RESULT_TOTAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="总实绩ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 异地库ID(WAREHOUSE_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="异地库ID",required=false)
+    private BigDecimal warehouseId;
+
+    /**
+     * 记录创建人(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 为计皮完成后真实收货实绩(STATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="状态:0 为卸货后新增虚拟收货实绩  1 为计皮完成后真实收货实绩",required=false)
+    private BigDecimal status;
+
+    /**
+     * 空货箱照片(RESULT_EMPTY_CONTAINER_PHOTO,BLOB,4000)
+     */
+    @ApiModelProperty(value="空货箱照片",required=false)
+    private byte[] resultEmptyContainerPhoto;
+
+    /**
+     * 已签字的送货单照片(RESULT_SIGNED_NOTE_PHOTO,BLOB,4000)
+     */
+    @ApiModelProperty(value="已签字的送货单照片",required=false)
+    private byte[] resultSignedNotePhoto;
+
+    /**
+     * 客户签收单照片(RESULT_RECEIVE_NOTE_PHOTO,BLOB,4000)
+     */
+    @ApiModelProperty(value="客户签收单照片",required=false)
+    private byte[] resultReceiveNotePhoto;
+
+    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 getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public BigDecimal getWarehouseId() {
+        return warehouseId;
+    }
+
+    public void setWarehouseId(BigDecimal warehouseId) {
+        this.warehouseId = warehouseId;
+    }
+
+    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;
+    }
+
+    public byte[] getResultEmptyContainerPhoto() {
+        return resultEmptyContainerPhoto;
+    }
+
+    public void setResultEmptyContainerPhoto(byte[] resultEmptyContainerPhoto) {
+        this.resultEmptyContainerPhoto = resultEmptyContainerPhoto;
+    }
+
+    public byte[] getResultSignedNotePhoto() {
+        return resultSignedNotePhoto;
+    }
+
+    public void setResultSignedNotePhoto(byte[] resultSignedNotePhoto) {
+        this.resultSignedNotePhoto = resultSignedNotePhoto;
+    }
+
+    public byte[] getResultReceiveNotePhoto() {
+        return resultReceiveNotePhoto;
+    }
+
+    public void setResultReceiveNotePhoto(byte[] resultReceiveNotePhoto) {
+        this.resultReceiveNotePhoto = resultReceiveNotePhoto;
+    }
+
+    @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(", resultTotalId=").append(resultTotalId);
+        sb.append(", warehouseId=").append(warehouseId);
+        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(", resultEmptyContainerPhoto=").append(resultEmptyContainerPhoto);
+        sb.append(", resultSignedNotePhoto=").append(resultSignedNotePhoto);
+        sb.append(", resultReceiveNotePhoto=").append(resultReceiveNotePhoto);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 184 - 0
src/main/java/com/steerinfo/dil/model/TmstruckTotalResult.java

@@ -0,0 +1,184 @@
+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 TmstruckTotalResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(RESULT_TOTAL_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 订单ID(ORDER_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="订单ID",required=false)
+    private BigDecimal orderId;
+
+    /**
+     * 运输总时长(RESULT_DURATION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="运输总时长",required=false)
+    private BigDecimal resultDuration;
+
+    /**
+     * 运输标准时长(STANDARD_DATA_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运输标准时长",required=true)
+    private BigDecimal standardDataId;
+
+    /**
+     * 运输时长异常值(RESULT_OUTLIER,DECIMAL,0)
+     */
+    @ApiModelProperty(value="运输时长异常值",required=false)
+    private BigDecimal resultOutlier;
+
+    /**
+     * 记录创建人(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.resultTotalId;
+    }
+
+    @Override
+    public void setId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public BigDecimal getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public BigDecimal getOrderId() {
+        return orderId;
+    }
+
+    public void setOrderId(BigDecimal orderId) {
+        this.orderId = orderId;
+    }
+
+    public BigDecimal getResultDuration() {
+        return resultDuration;
+    }
+
+    public void setResultDuration(BigDecimal resultDuration) {
+        this.resultDuration = resultDuration;
+    }
+
+    public BigDecimal getStandardDataId() {
+        return standardDataId;
+    }
+
+    public void setStandardDataId(BigDecimal standardDataId) {
+        this.standardDataId = standardDataId;
+    }
+
+    public BigDecimal getResultOutlier() {
+        return resultOutlier;
+    }
+
+    public void setResultOutlier(BigDecimal resultOutlier) {
+        this.resultOutlier = resultOutlier;
+    }
+
+    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(", resultTotalId=").append(resultTotalId);
+        sb.append(", orderId=").append(orderId);
+        sb.append(", resultDuration=").append(resultDuration);
+        sb.append(", standardDataId=").append(standardDataId);
+        sb.append(", resultOutlier=").append(resultOutlier);
+        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();
+    }
+}

+ 259 - 0
src/main/java/com/steerinfo/dil/model/TmstruckUnloadResult.java

@@ -0,0 +1,259 @@
+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 TmstruckUnloadResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键id(RESULT_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private BigDecimal resultId;
+
+    /**
+     * 卸货实绩编号 DW+YYYYMMDD+5位流水(RESULT_NUMBER,VARCHAR,32)
+     */
+    @ApiModelProperty(value="卸货实绩编号 DW+YYYYMMDD+5位流水",required=false)
+    private String resultNumber;
+
+    /**
+     * 实绩总表ID(RESULT_TOTAL_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="实绩总表ID",required=false)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 卸货开始时间(RESULT_START_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="卸货开始时间",required=false)
+    private Date resultStartTime;
+
+    /**
+     * 卸货结束时间(RESULT_END_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="卸货结束时间",required=false)
+    private Date resultEndTime;
+
+    /**
+     * 卸货时长(RESULT_DURATION,DECIMAL,0)
+     */
+    @ApiModelProperty(value="卸货时长",required=false)
+    private BigDecimal resultDuration;
+
+    /**
+     * 卸货状态:0:拒绝;1:同意(UNLOAD_STATUS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="卸货状态:0:拒绝;1:同意",required=false)
+    private BigDecimal unloadStatus;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 废除人(DELETE_NAME,VARCHAR,16)
+     */
+    @ApiModelProperty(value="废除人",required=false)
+    private String deleteName;
+
+    /**
+     * 废除时间(DELETE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="废除时间",required=false)
+    private Date deleteTime;
+
+    /**
+     * 卸货点(连原料仓库)(RESULT_UNLOAD_PLACE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="卸货点(连原料仓库)",required=false)
+    private BigDecimal resultUnloadPlaceId;
+
+    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 String getResultNumber() {
+        return resultNumber;
+    }
+
+    public void setResultNumber(String resultNumber) {
+        this.resultNumber = resultNumber == null ? null : resultNumber.trim();
+    }
+
+    public BigDecimal getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+    public Date getResultStartTime() {
+        return resultStartTime;
+    }
+
+    public void setResultStartTime(Date resultStartTime) {
+        this.resultStartTime = resultStartTime;
+    }
+
+    public Date getResultEndTime() {
+        return resultEndTime;
+    }
+
+    public void setResultEndTime(Date resultEndTime) {
+        this.resultEndTime = resultEndTime;
+    }
+
+    public BigDecimal getResultDuration() {
+        return resultDuration;
+    }
+
+    public void setResultDuration(BigDecimal resultDuration) {
+        this.resultDuration = resultDuration;
+    }
+
+    public BigDecimal getUnloadStatus() {
+        return unloadStatus;
+    }
+
+    public void setUnloadStatus(BigDecimal unloadStatus) {
+        this.unloadStatus = unloadStatus;
+    }
+
+    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 getDeleteName() {
+        return deleteName;
+    }
+
+    public void setDeleteName(String deleteName) {
+        this.deleteName = deleteName == null ? null : deleteName.trim();
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    public BigDecimal getResultUnloadPlaceId() {
+        return resultUnloadPlaceId;
+    }
+
+    public void setResultUnloadPlaceId(BigDecimal resultUnloadPlaceId) {
+        this.resultUnloadPlaceId = resultUnloadPlaceId;
+    }
+
+    @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(", resultNumber=").append(resultNumber);
+        sb.append(", resultTotalId=").append(resultTotalId);
+        sb.append(", resultStartTime=").append(resultStartTime);
+        sb.append(", resultEndTime=").append(resultEndTime);
+        sb.append(", resultDuration=").append(resultDuration);
+        sb.append(", unloadStatus=").append(unloadStatus);
+        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(", deleteName=").append(deleteName);
+        sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", resultUnloadPlaceId=").append(resultUnloadPlaceId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 291 - 0
src/main/java/com/steerinfo/dil/model/TmstruckWeightResult.java

@@ -0,0 +1,291 @@
+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 TmstruckWeightResult implements IBasePO<BigDecimal> {
+    /**
+     * 主键id(WEIGHT_TASK_RESULT_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private BigDecimal weightTaskResultId;
+
+    /**
+     * 总实绩ID(RESULT_TOTAL_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="总实绩ID",required=false)
+    private BigDecimal resultTotalId;
+
+
+    /**
+     * 磅单号(RESULT_POUND_NO,VARCHAR,20)
+     */
+    @ApiModelProperty(value="磅单号",required=false)
+    private String resultPoundNo;
+
+    /**
+     * 毛重(RESULT_GROSS_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="毛重",required=false)
+    private BigDecimal resultGrossWeight;
+
+    /**
+     * 毛重时间(RESULT_GROSS_WEIGHT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="毛重时间",required=false)
+    private Date resultGrossWeightTime;
+
+    /**
+     * 皮重(RESULT_TARE_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="皮重",required=false)
+    private BigDecimal resultTareWeight;
+
+    /**
+     * 皮重时间(RESULT_TARE_WEIGHT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="皮重时间",required=false)
+    private Date resultTareWeightTime;
+
+    /**
+     * 净重(RESULT_NET_WEIGHT,DECIMAL,0)
+     */
+    @ApiModelProperty(value="净重",required=false)
+    private BigDecimal resultNetWeight;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 废除人(DELETE_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="废除人",required=false)
+    private String deleteName;
+
+    /**
+     * 废除时间(DELETE_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="废除时间",required=false)
+    private Date deleteTime;
+
+    /**
+     * 计毛点ID(汽车衡)(RESULT_GROSS_PLACE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="计毛点ID(汽车衡)",required=false)
+    private BigDecimal resultGrossPlaceId;
+
+    /**
+     * 计皮点ID(汽车衡)(RESULT_TARE_PLACE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="计皮点ID(汽车衡)",required=false)
+    private BigDecimal resultTarePlaceId;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public BigDecimal getId() {
+        return this.weightTaskResultId;
+    }
+
+    @Override
+    public void setId(BigDecimal weightTaskResultId) {
+        this.weightTaskResultId = weightTaskResultId;
+    }
+
+    public BigDecimal getWeightTaskResultId() {
+        return weightTaskResultId;
+    }
+
+    public void setWeightTaskResultId(BigDecimal weightTaskResultId) {
+        this.weightTaskResultId = weightTaskResultId;
+    }
+
+    public BigDecimal getResultTotalId() {
+        return resultTotalId;
+    }
+
+    public void setResultTotalId(BigDecimal resultTotalId) {
+        this.resultTotalId = resultTotalId;
+    }
+
+
+    public String getResultPoundNo() {
+        return resultPoundNo;
+    }
+
+    public void setResultPoundNo(String resultPoundNo) {
+        this.resultPoundNo = resultPoundNo == null ? null : resultPoundNo.trim();
+    }
+
+    public BigDecimal getResultGrossWeight() {
+        return resultGrossWeight;
+    }
+
+    public void setResultGrossWeight(BigDecimal resultGrossWeight) {
+        this.resultGrossWeight = resultGrossWeight;
+    }
+
+    public Date getResultGrossWeightTime() {
+        return resultGrossWeightTime;
+    }
+
+    public void setResultGrossWeightTime(Date resultGrossWeightTime) {
+        this.resultGrossWeightTime = resultGrossWeightTime;
+    }
+
+    public BigDecimal getResultTareWeight() {
+        return resultTareWeight;
+    }
+
+    public void setResultTareWeight(BigDecimal resultTareWeight) {
+        this.resultTareWeight = resultTareWeight;
+    }
+
+    public Date getResultTareWeightTime() {
+        return resultTareWeightTime;
+    }
+
+    public void setResultTareWeightTime(Date resultTareWeightTime) {
+        this.resultTareWeightTime = resultTareWeightTime;
+    }
+
+    public BigDecimal getResultNetWeight() {
+        return resultNetWeight;
+    }
+
+    public void setResultNetWeight(BigDecimal resultNetWeight) {
+        this.resultNetWeight = resultNetWeight;
+    }
+
+    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 getDeleteName() {
+        return deleteName;
+    }
+
+    public void setDeleteName(String deleteName) {
+        this.deleteName = deleteName == null ? null : deleteName.trim();
+    }
+
+    public Date getDeleteTime() {
+        return deleteTime;
+    }
+
+    public void setDeleteTime(Date deleteTime) {
+        this.deleteTime = deleteTime;
+    }
+
+    public BigDecimal getResultGrossPlaceId() {
+        return resultGrossPlaceId;
+    }
+
+    public void setResultGrossPlaceId(BigDecimal resultGrossPlaceId) {
+        this.resultGrossPlaceId = resultGrossPlaceId;
+    }
+
+    public BigDecimal getResultTarePlaceId() {
+        return resultTarePlaceId;
+    }
+
+    public void setResultTarePlaceId(BigDecimal resultTarePlaceId) {
+        this.resultTarePlaceId = resultTarePlaceId;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", weightTaskResultId=").append(weightTaskResultId);
+        sb.append(", resultTotalId=").append(resultTotalId);
+        sb.append(", resultPoundNo=").append(resultPoundNo);
+        sb.append(", resultGrossWeight=").append(resultGrossWeight);
+        sb.append(", resultGrossWeightTime=").append(resultGrossWeightTime);
+        sb.append(", resultTareWeight=").append(resultTareWeight);
+        sb.append(", resultTareWeightTime=").append(resultTareWeightTime);
+        sb.append(", resultNetWeight=").append(resultNetWeight);
+        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(", deleteName=").append(deleteName);
+        sb.append(", deleteTime=").append(deleteTime);
+        sb.append(", resultGrossPlaceId=").append(resultGrossPlaceId);
+        sb.append(", resultTarePlaceId=").append(resultTarePlaceId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 35 - 0
src/main/java/com/steerinfo/dil/service/DropDownService.java

@@ -0,0 +1,35 @@
+package com.steerinfo.dil.service;
+
+import java.util.List;
+import java.util.Map;
+
+
+public interface DropDownService {
+
+    //获取批次下拉框
+    List<Map<String, Object>> getDilBatch();
+
+    //获取承运商下拉框
+    List<Map<String, Object>> getCarrier();
+
+    //获取路径下拉框
+    List<Map<String, Object>> getLine();
+
+    //获取仓库下拉框
+    List<Map<String, Object>> getWarehouse(Map<String, Object> map);
+
+    //获取门岗下拉框
+    List<Map<String, Object>> getGatepost();
+
+    //获取所有采购订单号
+    List<Map<String, Object>> getAPO();
+
+    //获取所有的辅料物资
+    List<Map<String, Object>> getFuMaterial(Integer type);
+
+    //获取所有的辅料车辆
+    List<Map<String, Object>> getFuCapacityId();
+
+    //获取所有的港口
+    List<Map<String, Object>> getPort();
+}

+ 26 - 0
src/main/java/com/steerinfo/dil/service/IAmstruckPurplanMaterialService.java

@@ -0,0 +1,26 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.AmstruckPurplanMaterial;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AmstruckPurplanMaterial服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-03 02:15
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-03
+ * 作者:generator
+ * 参考:
+ * 描述:AmstruckPurplanMaterial服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IAmstruckPurplanMaterialService{
+    //查询所有已分解计划
+    List<Map<String, Object>> getDecomposedPlan(Map<String, Object> map);
+}

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

@@ -0,0 +1,45 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.AmstruckPurplan;
+import com.steerinfo.framework.service.IBaseService;
+import org.apache.ibatis.annotations.Param;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AmstruckPurplan服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-02 10:38
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-02
+ * 作者:generator
+ * 参考:
+ * 描述:AmstruckPurplan服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IAmstruckPurplanService{
+    //查询所有运输计划
+    List<Map<String, Object>> getAllPurPlan(Map<String, Object> map);
+
+    //通过ID查询运输计划
+    List<Map<String, Object>> getPurPlanById(@Param("planId") Integer planId);
+
+    //新增运输计划
+    int addPurPlan(AmstruckPurplan amstruckPurplan);
+
+    //修改运输计划
+    int updatePurPlan(AmstruckPurplan amstruckPurplan);
+
+    //逻辑删除运输计划
+    int deletePurPlan(AmstruckPurplan amstruckPurplan);
+
+    //下发运输计划
+    int sendPurPlan(AmstruckPurplan amstruckPurplan);
+
+    //下发运输计划
+    int receptionPurPlan(AmstruckPurplan amstruckPurplan);
+}

+ 23 - 0
src/main/java/com/steerinfo/dil/service/IOmstruckOrderMaterialService.java

@@ -0,0 +1,23 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.OmstruckOrderMaterial;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+
+/**
+ * OmstruckOrderMaterial服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-03 04:55
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-03
+ * 作者:generator
+ * 参考:
+ * 描述:OmstruckOrderMaterial服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IOmstruckOrderMaterialService{
+
+}

+ 65 - 0
src/main/java/com/steerinfo/dil/service/IOmstruckOrderService.java

@@ -0,0 +1,65 @@
+package com.steerinfo.dil.service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * OmstruckOrder服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-03 03:47
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-03
+ * 作者:generator
+ * 参考:
+ * 描述:OmstruckOrder服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IOmstruckOrderService{
+
+    //查询所有运输订单信息 状态:3
+    //查询所有已经下发的运输订单 用于查询司机车牌 websocket  状态:4
+    List<Map<String, Object>> getAllTruckOrder(Map<String, Object> map);
+
+    //新增采购进口矿 运输订单
+    int addPurOrder(Map<String, Object> map);
+
+    //查询所有运力信息
+    List<Map<String, Object>> getAllCapacity(Map<String, Object> map);
+
+    //修改运输订单 和 运输订单子表
+    int updateOrder(Map<String, Object> map);
+
+    //分派运单给司机
+    int dispatchOrder(Integer id);
+
+    //逻辑删除未下发运单
+    int deleteOrder(Map<String, Object> map);
+
+    //司机接单\拒绝
+    int driverReceiveOrRefuse(Map<String, Object> map);
+
+    //查询所有接单或拒绝接单的订单
+    List<Map<String, Object>> getReceiveRefuseOrder(Map<String, Object> map);
+
+    //司机接单调用接口推送数据 接收车牌号
+    List<Map<String, Object>> sendMesToDriver(Map<String, Object> map);
+
+    //通过运单号查询所有信息
+    List<Map<String, Object>> getOrderMesByOrderNum(Map<String, Object> map);
+
+    //查询司机所有已拒绝过的订单
+    List<Map<String, Object>> getReceiveRefuseOrderByCapacityId(Map<String, Object> map);
+
+    // 查询实绩地点和时间
+    List<Map<String, Object>> selectPlaceAndTime(BigDecimal orderId);
+
+    //通过运单Id获取运单相关信息
+    List<Map<String, Object>> getOrderByOrderId(BigDecimal orderId);
+
+    //运输派单
+    List<Map<String, Object>> getTransportDispatch(Map<String, Object> map);
+}

+ 37 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckEnfactoryResultService.java

@@ -0,0 +1,37 @@
+package com.steerinfo.dil.service;
+
+
+import com.steerinfo.dil.model.TmstruckEnfactoryResult;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckEnfactoryResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-08 06:23
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-08
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckEnfactoryResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckEnfactoryResultService{
+    //获取所有进厂实绩
+    List<Map<String, Object>> getAllEnFactoryResult(Map<String, Object> map);
+
+    //采从门岗系统采集信息后 新增进厂作业
+    int addEnFactoryResult(Map<String, Object> map);
+
+    //使用PDA方式进厂更新实绩
+    int updateEnFactoryByPDA(Map<String,Object> map);
+
+    //使用门禁系统进厂更新实绩
+    int updateEnFactoryByMenJin(Map<String,Object> map);
+
+    //查找排队序号
+    Integer selectNodeNumber(String orderNumber);
+}

+ 43 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckLeaveFactoryResultService.java

@@ -0,0 +1,43 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckLeaveFactoryResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-11 10:32
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-11
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckLeaveFactoryResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckLeaveFactoryResultService {
+    //新增出厂作业实绩
+    int addLeaveFactoryResult(Map<String, Object> map);
+
+    //查询所有的出厂实绩
+    List<Map<String, Object>> getLeaveFactoryResult(Map<String, Object> map);
+
+    //查询运输路线是否为可出厂 路段顺序号为 4:已计皮完成
+    Integer selectTransportRoute(String orderNumber);
+
+    //查询车牌号与门岗名称
+    Map<String,Object> selectLeaveFactory(String orderNumber);
+
+    //新增进厂实绩 派单时新增
+    int addLeaveFactory(Map<String,Object> mapValue);
+
+    //更新出厂实绩
+    int updateLeaveFactoryByPDA(Map<String,Object> mapValue);
+    //根据门禁系统采集获取
+    int updateLeaveFactoryByMenGang(Map<String,Object> mapValue);
+
+}

+ 37 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckLoadResultService.java

@@ -0,0 +1,37 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.TmstruckLoadResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckLoadResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-02 10:38
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-02
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckLoadResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckLoadResultService{
+    //查询所有的装车实绩
+    List<Map<String, Object>> getAllLoadResult(Map<String, Object> map);
+
+    //新增装车实绩
+    int addLoadResult(Map<String, Object> map);
+
+    //修改装车作业
+    int updateLoadResult(TmstruckLoadResult tmstruckLoadResult);
+
+    //通过Id获取装车实绩 数据 用于修改
+    List<Map<String, Object>> getLoadResultById(Integer resultId);
+
+    //逻辑删除装车作业
+    int deleteLoadResult(Integer resultId);
+}

+ 29 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckMeasureCommissionService.java

@@ -0,0 +1,29 @@
+package com.steerinfo.dil.service;
+
+
+import com.steerinfo.dil.model.TmstruckMeasureCommission;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckMeasureCommission服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 10:28
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckMeasureCommission服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckMeasureCommissionService{
+    //查询所有计量委托
+    List<Map<String, Object>> getAllMeasureCommission(Map<String, Object> map);
+
+    //新增计量委托实绩 当进厂作业完成后
+    int addMeasureCommission(BigDecimal totalId, Integer type);
+}

+ 34 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckQualityResultService.java

@@ -0,0 +1,34 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.dil.model.TmstruckQualityResult;
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckQualityResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-11 04:14
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-11
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckQualityResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckQualityResultService {
+
+    //查询所有的质检作业
+    List<Map<String, Object>> getQualityResult(Map<String, Object> map);
+
+    //通过ID查询质检作业
+    List<Map<String, Object>> getQualityResultById(Integer resultId);
+
+    //修改质检作业
+    int updateQualityResult(TmstruckQualityResult tmstruckQualityResult);
+
+}

+ 24 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckReceiptResultService.java

@@ -0,0 +1,24 @@
+package com.steerinfo.dil.service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckReceiptResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-10 10:10
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-10
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckReceiptResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckReceiptResultService{
+
+    //查询所有签收实绩
+    List<Map<String, Object>> getReceiveResult(Map<String, Object> map);
+
+}

+ 31 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckUnloadResultService.java

@@ -0,0 +1,31 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckUnloadResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 07:58
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckUnloadResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckUnloadResultService{
+    //查询卸货实绩
+    List<Map<String, Object>> getUnloadResult(Map<String, Object> map);
+
+    //同意卸货后进行新增卸货实绩
+    int addUnloadResult(Map<String, Object> map);
+
+    // 修改实绩内容
+    int updateUnloadResult(Map<String, Object> map);
+}

+ 34 - 0
src/main/java/com/steerinfo/dil/service/ITmstruckWeightResultService.java

@@ -0,0 +1,34 @@
+package com.steerinfo.dil.service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckWeightResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 02:21
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckWeightResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface ITmstruckWeightResultService{
+    //更新计毛实绩
+    int addJiMaoResult(Map<String, Object> map);
+
+    //查询所有计毛实绩
+    List<Map<String, Object>> getAllJiMaoResult(Map<String, Object> map);
+
+    //查询所有计皮实绩
+    List<Map<String, Object>> getAllJiPiResult(Map<String, Object> map);
+
+    //更新计皮实绩
+    int addJiPiResult(Map<String, Object> map);
+
+    //新增计皮计毛实绩
+    int addWeightResult(Map<String, Object> map);
+}

+ 36 - 0
src/main/java/com/steerinfo/dil/service/impl/AmstruckPurplanMaterialServiceImpl.java

@@ -0,0 +1,36 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.AmstruckPurplanMaterialMapper;
+import com.steerinfo.dil.service.IAmstruckPurplanMaterialService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AmstruckPurplanMaterial服务实现:
+ * @author TXF
+ * @version 1.0-SNAPSHORT 2021-09-03 02:15
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-03
+ * 作者:generator
+ * 参考:
+ * 描述:AmstruckPurplanMaterial服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "amstruckPurplanMaterialService")
+public class AmstruckPurplanMaterialServiceImpl implements IAmstruckPurplanMaterialService {
+
+    @Autowired
+    private AmstruckPurplanMaterialMapper amstruckPurplanMaterialMapper;
+
+
+    @Override
+    public List<Map<String, Object>> getDecomposedPlan(Map<String, Object> map) {
+        return amstruckPurplanMaterialMapper.getDecomposedPlan(map);
+    }
+}

+ 156 - 0
src/main/java/com/steerinfo/dil/service/impl/AmstruckPurplanServiceImpl.java

@@ -0,0 +1,156 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.AmstruckPurplanMapper;
+import com.steerinfo.dil.mapper.AmstruckPurplanMaterialMapper;
+import com.steerinfo.dil.model.AmstruckPurplan;
+import com.steerinfo.dil.model.AmstruckPurplanMaterial;
+import com.steerinfo.dil.service.IAmstruckPurplanService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * AmstruckPurplan服务实现:
+ * @author TXF
+ * @version 1.0-SNAPSHORT 2021-09-02 10:38
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-02
+ * 作者:generator
+ * 参考:
+ * 描述:AmstruckPurplan服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "amstruckPurplanService")
+public class AmstruckPurplanServiceImpl implements IAmstruckPurplanService {
+
+    @Autowired
+    private AmstruckPurplanMapper amstruckPurplanMapper;
+
+    @Autowired
+    private AmstruckPurplanMaterialMapper amstruckPurplanMaterialMapper;
+
+    /**
+     * 查询所有运输计划
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllPurPlan(Map<String, Object> map) {
+        return amstruckPurplanMapper.getAllPurPlan(map);
+    }
+
+    /**
+     * 通过主键Id查询运输计划
+     * @param planId
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getPurPlanById(Integer planId) {
+        return amstruckPurplanMapper.getPurPlanById(planId);
+    }
+
+    /**
+     * 新增运输计划
+     * @param amstruckPurplan
+     * @return
+     */
+    @Override
+    @Transactional
+    public int addPurPlan(AmstruckPurplan amstruckPurplan) {
+        //生成主键Id
+        long id;
+        BigDecimal maxId = amstruckPurplanMapper.selectMaxId();
+        id = maxId == null ? 1 : maxId.longValue() + 1;
+        BigDecimal planId = new BigDecimal(id);
+        amstruckPurplan.setPlanId(planId);
+        //生成运输计划号
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        String planNumber = "WYSJF" + sdf.format(new Date());
+        planNumber += id < 10 ? "0000000" + id : id < 100 ? "000000" + id : id < 1000 ? "00000" + id : id < 10000 ?
+                "0000" + id : id < 100000 ? "000" + id : id < 1000000 ? "00" + id : id < 10000000 ? "0" + id : id;
+        amstruckPurplan.setPlanNo(planNumber);
+        //新增状态为未下发:0
+        amstruckPurplan.setPlanStatus(new BigDecimal(0));
+        //记录创建人
+        amstruckPurplan.setInsertUsername("admin");
+        //生成子表数据
+        AmstruckPurplanMaterial amstruckPurplanMaterial = new AmstruckPurplanMaterial();
+        //生成主键
+        long childId;
+        BigDecimal selectMaxId = amstruckPurplanMaterialMapper.selectMaxId();
+        childId = selectMaxId == null? 1 :selectMaxId.longValue() + 1;
+        amstruckPurplanMaterial.setPurplanPlanMaterialId(new BigDecimal(childId));
+        //设置父表主键
+        amstruckPurplanMaterial.setPlanId(planId);
+        //设置子表未分配数量重量 = 总重量
+        amstruckPurplanMaterial.setMaterialUnallocatedWeight(amstruckPurplan.getMaterialTotalWeight());
+        //设置已分配重量 初始为 0
+        amstruckPurplanMaterial.setMaterialAllocatedWeight(new BigDecimal(0));
+        int i = amstruckPurplanMaterialMapper.insertSelective(amstruckPurplanMaterial);
+        int i1 = amstruckPurplanMapper.insertSelective(amstruckPurplan);
+        return i + i1;
+    }
+
+    /**
+     * 修改运输计划
+     * @param amstruckPurplan
+     * @return
+     */
+    @Override
+    @Transactional
+    public int updatePurPlan(AmstruckPurplan amstruckPurplan) {
+        int i = amstruckPurplanMapper.updateByPrimaryKeySelective(amstruckPurplan);
+        //通过计划ID查询子表主键ID
+        BigDecimal childId = amstruckPurplanMaterialMapper.getChildIdByPlanId(amstruckPurplan.getPlanId());
+        //修改子表数据未分配物资重量
+        AmstruckPurplanMaterial amstruckPurplanMaterial = new AmstruckPurplanMaterial();
+        amstruckPurplanMaterial.setId(childId);
+        amstruckPurplanMaterial.setMaterialUnallocatedWeight(amstruckPurplan.getMaterialTotalWeight());
+        int i1 = amstruckPurplanMaterialMapper.updateByPrimaryKeySelective(amstruckPurplanMaterial);
+        return i + i1;
+    }
+
+    /**
+     * 逻辑删除运输计划 3
+     * @param amstruckPurplan
+     * @return
+     */
+    @Override
+    public int deletePurPlan(AmstruckPurplan amstruckPurplan) {
+
+        return amstruckPurplanMapper.updateByPrimaryKeySelective(amstruckPurplan);
+    }
+
+    /**
+     * 下发运输计划
+     * @param amstruckPurplan
+     * @return
+     */
+    @Override
+    public int sendPurPlan(AmstruckPurplan amstruckPurplan) {
+        //记录下发计划时间
+        amstruckPurplan.setInsertTime(new Date());
+        return amstruckPurplanMapper.updateByPrimaryKeySelective(amstruckPurplan);
+    }
+
+    /**
+     * 接收运输计划
+     * @param amstruckPurplan
+     * @return
+     */
+    @Override
+    public int receptionPurPlan(AmstruckPurplan amstruckPurplan) {
+        //记录接收计划时间
+        amstruckPurplan.setUpdateTime((new Date()));
+        return amstruckPurplanMapper.updateByPrimaryKeySelective(amstruckPurplan);
+    }
+
+}

+ 104 - 0
src/main/java/com/steerinfo/dil/service/impl/DropDownServiceImpl.java

@@ -0,0 +1,104 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.DropDownMapper;
+import com.steerinfo.dil.service.DropDownService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ author    :TXF
+ * @ time      :2021/9/4 9:37
+ */
+
+@Service
+public class DropDownServiceImpl implements DropDownService {
+
+    @Autowired
+    DropDownMapper dropDownMapper;
+
+    /**
+     * 获取批次
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getDilBatch() {
+        return dropDownMapper.getDilBatch();
+    }
+
+    /**
+     * 获取承运商
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getCarrier() {
+        return dropDownMapper.getCarrier();
+    }
+
+    /**
+     * 获取作业路径
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getLine() {
+        return dropDownMapper.getLine();
+    }
+
+    /**
+     * 获取仓库名称
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getWarehouse(Map<String, Object> map) {
+        return dropDownMapper.getWarehouse(map);
+    }
+
+    /**
+     * 获取门岗下拉框
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getGatepost() {
+        return dropDownMapper.getGatepost();
+    }
+
+    /**
+     * 获取采购订单号
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAPO() {
+        return dropDownMapper.getAPO();
+    }
+
+    /**
+     * 获取物资ID
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getFuMaterial(Integer type) {
+        return dropDownMapper.getFuMaterial(type);
+    }
+
+    /**
+     * 获取所有的辅料车辆并且为空闲状态
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getFuCapacityId() {
+        return dropDownMapper.getFuCapacityId();
+    }
+
+    /**
+     * 获取所有的港口
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getPort() {
+        return dropDownMapper.getPort();
+    }
+
+
+}

+ 32 - 0
src/main/java/com/steerinfo/dil/service/impl/OmstruckOrderMaterialServiceImpl.java

@@ -0,0 +1,32 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.OmstruckOrderMaterialMapper;
+import com.steerinfo.dil.model.OmstruckOrderMaterial;
+import com.steerinfo.dil.service.IOmstruckOrderMaterialService;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+
+/**
+ * OmstruckOrderMaterial服务实现:
+ * @author TXF
+ * @version 1.0-SNAPSHORT 2021-09-03 04:55
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-03
+ * 作者:generator
+ * 参考:
+ * 描述:OmstruckOrderMaterial服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "omstruckOrderMaterialService")
+public class OmstruckOrderMaterialServiceImpl implements IOmstruckOrderMaterialService {
+
+    @Autowired
+    private OmstruckOrderMaterialMapper omstruckOrderMaterialMapper;
+
+  }

+ 489 - 0
src/main/java/com/steerinfo/dil/service/impl/OmstruckOrderServiceImpl.java

@@ -0,0 +1,489 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.AmstruckPurplanMaterialMapper;
+import com.steerinfo.dil.mapper.OmstruckOrderMapper;
+import com.steerinfo.dil.mapper.OmstruckOrderMaterialMapper;
+import com.steerinfo.dil.mapper.TmstruckTotalResultMapper;
+import com.steerinfo.dil.model.*;
+import com.steerinfo.dil.service.IOmstruckOrderService;
+import com.steerinfo.dil.util.DataChange;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * OmstruckOrder服务实现:
+ * @author TXF
+ * @version 1.0-SNAPSHORT 2021-09-03 03:47
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-03
+ * 作者:generator
+ * 参考:
+ * 描述:OmstruckOrder服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "omstruckOrderService")
+public class OmstruckOrderServiceImpl implements IOmstruckOrderService {
+
+    @Autowired
+    private OmstruckOrderMapper omstruckOrderMapper;
+
+    @Autowired
+    private AmstruckPurplanMaterialMapper amstruckPurplanMaterialMapper;
+
+    @Autowired
+    private OmstruckOrderMaterialMapper omstruckOrderMaterialMapper;
+
+    @Autowired
+    private TmstruckTotalResultMapper tmstruckTotalResultMapper;
+
+    @Autowired
+    private TmstruckEnfactoryResultServiceImpl tmstruckEnfactoryResultService;
+    @Autowired
+    private TmstruckLeaveFactoryResultServiceImpl tmstruckLeaveFactoryResultService;
+    @Autowired
+    private TmstruckWeightResultServiceImpl tmstruckWeightResultService;
+    @Autowired
+    private TmstruckUnloadResultServiceImpl tmstruckUnloadResultService;
+    /**
+     * 查询所有运输订单
+     * 获取已下发的运输订单 用于websocket
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllTruckOrder(Map<String, Object> map) {
+        return omstruckOrderMapper.getAllTruckOrder(map);
+    }
+
+    /**
+     * 生成运输订单实体类
+     */
+    public OmstruckOrder generateOmsTruckOrder(Map<String, Object> map){
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        //生成订单主键Id
+        long id;
+        BigDecimal maxId = omstruckOrderMapper.selectMaxId();
+        id = maxId == null ? 1 : maxId.longValue() + 1;
+        BigDecimal orderId = new BigDecimal(id);
+        omstruckOrder.setOrderId(orderId);
+        //生成运输订单号
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        String orderNumber = "WYSDD" + sdf.format(new Date());
+        orderNumber +=
+                id < 10 ? "0000000" + id : id < 100 ? "000000" + id : id < 1000 ? "00000" + id : id < 10000 ?
+                        "0000" + id : id < 100000 ? "000" + id : id < 1000000 ? "00" + id : id < 10000000 ? "0" + id : id;
+        omstruckOrder.setOrderNumber(orderNumber);
+        //运单状态 刚分配默认为未下发
+        omstruckOrder.setOrderStatus(new BigDecimal(3));
+        //添加采购订单ID
+        omstruckOrder.setOrderPlanId(DataChange.dataToBigDecimal(map.get("purchaseOrderId")));
+        //添加运力Id
+        BigDecimal capacityId = DataChange.dataToBigDecimal(map.get("capacityId"));
+        omstruckOrder.setCapacityId(capacityId);
+        //添加订单类型 3
+        omstruckOrder.setOrderType(new BigDecimal(3));
+
+        omstruckOrder.setInsertUsername("admin");
+        omstruckOrder.setInsertTime(new Date());
+        return omstruckOrder;
+    }
+
+    /**
+     * 新增采购 运输订单
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int addPurOrder(Map<String, Object> map) {
+        //生成运输订单号和主键
+        OmstruckOrder omstruckOrder = generateOmsTruckOrder(map);
+        //设置线路  遗留问题
+        omstruckOrder.setLineId(new BigDecimal(1));
+        Object orderEntryTime = map.get("orderEntryTime");
+        if(orderEntryTime != null){
+            omstruckOrder.setOrderEntryTime(new Date((long) orderEntryTime)); //新增预计进厂时间
+        }
+        if(map.get("orderMaterialWeight") != null){
+            updateMaterial(map); //更改运输计划子表 增加已分配重量 减少未分配重量
+        }
+        //新增运输订单
+        omstruckOrderMapper.insertSelective(omstruckOrder);
+        //更新运力状态为待运输:2
+        map.put("capacityStatus", 2);
+        omstruckOrderMapper.updateCapacityByCarIdOrNum(map);
+        //新增运输订单子表
+        addOrderMaterial(map, omstruckOrder.getOrderId());
+        //新增实绩总表关联订单
+        addTotalResult(omstruckOrder.getOrderId());
+        return 5;
+    }
+
+
+    /**
+     * 新增实绩总表
+     * 运输订单ID
+     * @param orderId
+     * @return
+     */
+    public int addTotalResult(BigDecimal orderId){
+        TmstruckTotalResult tmstruckTotalResult = new TmstruckTotalResult();
+        BigDecimal selectMaxId = tmstruckTotalResultMapper.selectMaxId();
+        long totalId;
+        totalId = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        tmstruckTotalResult.setResultTotalId(new BigDecimal(totalId));
+        tmstruckTotalResult.setOrderId(orderId);
+        tmstruckTotalResult.setInsertTime(new Date());
+        tmstruckTotalResult.setInsertUsername("admin");
+        return tmstruckTotalResultMapper.insertSelective(tmstruckTotalResult);
+    }
+
+    /**
+     * 新增订单子表
+     * @param map
+     * @param
+     */
+    public void addOrderMaterial(Map<String, Object> map, BigDecimal orderId){
+        //新增运输订单子表
+        OmstruckOrderMaterial omstruckOrderMaterial = new OmstruckOrderMaterial();
+        //生成子表主键
+        long childId;
+        BigDecimal selectMaxId = omstruckOrderMaterialMapper.selectMaxId();
+        childId = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        omstruckOrderMaterial.setOrderMaterialId(new BigDecimal(childId));
+        omstruckOrderMaterial.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
+        omstruckOrderMaterial.setOrderId(orderId);
+        Object orderMaterialWeight = map.get("orderMaterialWeight"); // 采购辅料没有物资重量
+        if(orderMaterialWeight != null){
+            omstruckOrderMaterial.setOrderMaterialWeight(DataChange.dataToBigDecimal(orderMaterialWeight));
+        }
+        omstruckOrderMaterial.setInsertUsername("admin");
+        omstruckOrderMaterial.setInsertTime(new Date());
+        omstruckOrderMaterialMapper.insertSelective(omstruckOrderMaterial);
+    }
+
+    /**
+     * 用于更改计划子表方法
+     * @param map
+     */
+    public void updateMaterial(Map<String, Object> map){
+        Object omw = map.get("orderMaterialWeight");
+        double weight;
+        if(omw instanceof Double){
+            weight = (Double) omw;
+        }else if(omw instanceof Integer){
+            weight = (Integer) omw;
+        }else {
+            weight = Double.parseDouble(omw.toString());
+        }
+        Integer planId = DataChange.dataToBigDecimal(map.get("planId")).intValue();
+        List<Map<String, Object>> weightList = amstruckPurplanMaterialMapper.getWeight(planId);
+        Map<String, Object> weightMap = weightList.get(0);
+        double materialAllocatedWeight = DataChange.dataToBigDecimal(weightMap.get("materialAllocatedWeight")).floatValue();
+        double materialUnallocatedWeight = DataChange.dataToBigDecimal(weightMap.get("materialUnallocatedWeight")).floatValue();
+        //float allWeight = materialAllocatedWeight + materialUnallocatedWeight;
+        //前端判断数据分配重量是否大于未分配重量 此处不做判断
+
+        //通过前端是否传来旧的重量 判断 是否是在原有已分解过的计划上修改 未分配 已分配重量
+        if(map.get("weight") != null){
+            BigDecimal oldWeight = DataChange.dataToBigDecimal(map.get("weight"));
+            double difference = weight - oldWeight.doubleValue();
+            materialAllocatedWeight += difference;
+            materialUnallocatedWeight -= difference;
+        }else {
+            materialAllocatedWeight += weight;
+            materialUnallocatedWeight -= weight;
+        }
+        AmstruckPurplanMaterial amstruckPurplanMaterial = new AmstruckPurplanMaterial();
+        //通过计划Id查询子表主键
+        amstruckPurplanMaterial.setPurplanPlanMaterialId(amstruckPurplanMaterialMapper.getChildIdByPlanId(new BigDecimal(planId)));
+        amstruckPurplanMaterial.setMaterialAllocatedWeight(new BigDecimal(materialAllocatedWeight));
+        amstruckPurplanMaterial.setMaterialUnallocatedWeight(new BigDecimal(materialUnallocatedWeight));
+        amstruckPurplanMaterialMapper.updateByPrimaryKeySelective(amstruckPurplanMaterial);
+    }
+
+    /**
+     * 查询所有运力信息
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllCapacity(Map<String, Object> map) {
+        return omstruckOrderMapper.getAllCapacity(map);
+    }
+
+    /**
+     * 修改运输订单 和订单子表
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int updateOrder(Map<String, Object> map) {
+        //修改运输订单运力ID
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
+        omstruckOrder.setOrderId(orderId);
+        if(map.get("capacityId") != null){
+            omstruckOrder.setCapacityId(DataChange.dataToBigDecimal(map.get("capacityId")));
+        }
+        if(map.get("orderEntryTime") != null){
+            omstruckOrder.setOrderEntryTime(new Date((long) map.get("orderEntryTime")));
+        }
+        omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
+
+        //修改运输订单子表物资重量
+        OmstruckOrderMaterial omstruckOrderMaterial = new OmstruckOrderMaterial();
+        //添加子表主键 通过订单ID查询出子表主键
+        BigDecimal orderMaterialId = omstruckOrderMaterialMapper.getOrderMaterialIdByOrderId(orderId);
+        omstruckOrderMaterial.setOrderMaterialId(orderMaterialId);
+        if(map.get("orderMaterialWeight") != null){
+            omstruckOrderMaterial.setOrderMaterialWeight(DataChange.dataToBigDecimal(map.get("orderMaterialWeight")));
+            //修改运输计划子表 已分配未分配重量
+            updateMaterial(map);
+        }
+        if(map.get("materialId") != null){
+            omstruckOrderMaterial.setMaterialId(DataChange.dataToBigDecimal(map.get("materialId")));
+        }
+        omstruckOrderMaterialMapper.updateByPrimaryKeySelective(omstruckOrderMaterial);
+
+        return 1;
+    }
+
+    /**
+     * 运单派发
+     *  运单ID
+     * 生成进厂实绩、计量实绩、卸货实绩、出厂实绩
+     * @param orderId
+     * @return
+     */
+    @Override
+    @Transactional
+    public int dispatchOrder(Integer orderId) {
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        omstruckOrder.setOrderId(new BigDecimal(orderId));
+        //设置状态为已下发:4
+        //生成订单下发时间 修改订单表
+        omstruckOrder.setOrderIssueTime(new Date());
+        omstruckOrder.setOrderStatus(new BigDecimal(4));
+        omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
+        //通过运输订单ID查询运输订单号 (使用的都是运输订单号)
+        String orderNumber = omstruckOrderMapper.getOrderNumberByOrderId(orderId);
+        //通过运输订单号 查询各个作业点ID 及 总实绩ID
+        Map<String, Object> map = omstruckOrderMapper.getPointIdByOrderNum(orderNumber);
+        tmstruckEnfactoryResultService.addEnFactoryResult(map);
+        tmstruckWeightResultService.addWeightResult(map);
+        tmstruckLeaveFactoryResultService.addLeaveFactory(map);
+        tmstruckUnloadResultService.addUnloadResult(map);
+        return 5;
+    }
+
+    /**
+     * 逻辑删除未下发订单
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int deleteOrder(Map<String, Object> map) {
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        omstruckOrder.setOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
+        //设置状态为逻辑删除:7
+        omstruckOrder.setOrderStatus(new BigDecimal(7));
+        int i = omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
+        //若是传来物资重量则修改已分配未分配重量
+        if(map.get("orderMaterialWeight") != null){
+            updateMaterial(map);
+        }
+        //通过车牌号修改运输状态为空闲中 0
+        String capacityNumber = (String) map.get("capacityNumber");
+        HashMap<String, Object> changeStatusMap = new HashMap<>();
+        changeStatusMap.put("capacityNumber", capacityNumber);
+        changeStatusMap.put("capacityStatus", 0);
+        int i1 = omstruckOrderMapper.updateCapacityByCarIdOrNum(changeStatusMap);
+        return i + i1;
+    }
+
+    /**
+     * 司机接单、拒绝 0:拒绝   1:接收
+     * 需要接收参数 主键Id 与 接收拒绝操作码
+     * @param map
+     * @return
+     */
+    @Override
+    public int driverReceiveOrRefuse(Map<String, Object> map) {
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        if((Integer) map.get("orderReceiveStatus") == 1){
+            omstruckOrder.setOrderReceiveStatus(new BigDecimal(1));
+            omstruckOrder.setOrderStatus(new BigDecimal(5)); //5 :已接收
+        }else { //其他状态都视为 拒绝接单
+            omstruckOrder.setOrderReceiveStatus(new BigDecimal(0));
+            omstruckOrder.setOrderStatus(new BigDecimal(6));// 6:未接收
+            //将司机运力置为空闲 通过运输订单Id 查询运力ID
+            BigDecimal capacityId = omstruckOrderMapper.getCapacityIdByOrderOrNum(map);
+            map.put("capacityId", capacityId);
+            map.put("capacityStatus", 0);
+            //修改运力表
+            omstruckOrderMapper.updateCapacityByCarIdOrNum(map);
+        }
+        BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
+        omstruckOrder.setOrderId(orderId);
+        //生成接收/拒绝时间
+        Date receiveTime = new Date();
+        omstruckOrder.setOrderReceiveRefuseTime(receiveTime);
+        //计算司机从派单到操作时长
+        Date issueTime = omstruckOrderMapper.getInsertTimeById(orderId.intValue());
+        long time = receiveTime.getTime() - issueTime.getTime();
+        long min = time / (1000 * 60);
+        omstruckOrder.setOrderCommunicationDuration(new BigDecimal(min));
+
+        return  omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
+    }
+
+    /**
+     * 用于后台展示司机接单未接单数据
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getReceiveRefuseOrder(Map<String, Object> map) {
+        return omstruckOrderMapper.getTruckOrderByCapacityNum(map);
+    }
+
+    /**
+     * 司机接单推送数据
+     * 车牌号
+     * @param
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> sendMesToDriver(Map<String, Object> map) {
+
+        //通过车牌号匹配运力ID
+        BigDecimal capacityId = omstruckOrderMapper.getCapacityIdByCapacityNum((String) map.get("capacityNumber"));
+        map.put("capacityId", capacityId);
+        if(capacityId == null)
+        return null;
+        //通过运力Id匹配 已下发的运输订单
+        List<Map<String, Object>> truckOrderByCapacityNum = omstruckOrderMapper.getTruckOrderByCapacityNum(map);
+        return truckOrderByCapacityNum;
+    }
+
+    /**
+     * 通过运输订单号查询运单所有信息 包含作业路径名称
+     *
+     * @param map 传运输订单号
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getOrderMesByOrderNum(Map<String, Object> map) {
+        return omstruckOrderMapper.getTruckOrderByCapacityNum(map);
+    }
+
+    /**
+     * 查询所有司机已拒绝的订单
+     * 车牌号
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getReceiveRefuseOrderByCapacityId(Map<String, Object> map) {
+        //通过车牌号查询运力Id
+        BigDecimal capacityId = omstruckOrderMapper.getCapacityIdByCapacityNum((String) map.get("capacityNumber"));
+        map.put("capacityId", capacityId);
+
+        return  omstruckOrderMapper.getReceiveRefuseOrderByCapacityId(map);
+    }
+
+    /**
+     * 得到作业时间和地点
+     * @param orderId
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> selectPlaceAndTime(BigDecimal orderId) {
+        List<Map<String, Object>> mapList = omstruckOrderMapper.selectPlaceAndTime(orderId);
+        Map<String, Object> map = mapList.get(0);
+        String entryGatepost = (String) map.get("entryGatepost");
+        Date entryTime = (Date) map.get("entryTime");
+        String entryResult = entryGatepost + "/" + entryTime;
+        String grossCalculate = (String) map.get("grossCalculate");
+        Date grossTime = (Date) map.get("grossTime");
+        String grossResult = grossCalculate + "/" + grossTime;
+        String unloadWarhouse = (String) map.get("unloadWarhouse");
+        Date unloadTime = (Date) map.get("unloadTime");
+        String unloadResult = unloadWarhouse + "/" + unloadTime;
+        String tareCalculate = (String) map.get("tareCalculate");
+        Date tareTime = (Date) map.get("tareTime");
+        String tareResult = tareCalculate + "/" + tareTime;
+        String leaveGatepost = (String) map.get("leaveGatepost");
+        Date outTime = (Date) map.get("outTime");
+        String leaveResult = leaveGatepost + "/" + outTime;
+        List<Map<String, Object>> resultList = new ArrayList<>();
+        Map<String, Object> map1 = new HashMap<>();
+        map1.put("title","进厂门岗/时间");
+        map1.put("desc",entryResult);
+        resultList.add(map1);
+        Map<String, Object> map2 = new HashMap<>();
+        map2.put("title","毛重衡器/时间");
+        map2.put("desc",grossResult);
+        resultList.add(map2);
+        Map<String, Object> map3 = new HashMap<>();
+        map3.put("title","卸货地点/时间");
+        map3.put("desc",unloadResult);
+        resultList.add(map3);
+        Map<String, Object> map4 = new HashMap<>();
+        map4.put("title","皮重衡器/时间");
+        map4.put("desc",tareResult);
+        resultList.add(map4);
+        Map<String, Object> map5 = new HashMap<>();
+        map5.put("title","出厂门岗/时间");
+        map5.put("desc",leaveResult);
+        resultList.add(map5);
+        Map<String, Object> map6 = new HashMap<>();
+        BigDecimal orderLineSequence = (BigDecimal) map.get("orderLineSequence");
+        map6.put("orderLineSequence",orderLineSequence);
+        resultList.add(map6);
+        return resultList;
+    }
+
+    /**
+     * 通过运单号查询订单详情
+     * 运输订单号
+     * @param
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getOrderByOrderId(BigDecimal orderId) {
+
+        return omstruckOrderMapper.getOrderByOrderId(orderId);
+    }
+
+    /**
+     * 查看运输派单
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getTransportDispatch(Map<String, Object> map) {
+        return omstruckOrderMapper.getTransportDispatch(map);
+    }
+
+    /**
+     * 用于更新路段顺序号
+     * @param map  orderId
+     * @return
+     */
+    public int updateOrderLineSequence(Map<String, Object> map, Integer lineSequence){
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        omstruckOrder.setOrderId(DataChange.dataToBigDecimal(map.get("orderId")));
+        omstruckOrder.setOrderLineSequence(new BigDecimal(lineSequence));
+        return omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
+    }
+}

+ 140 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckEnfactoryResultServiceImpl.java

@@ -0,0 +1,140 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.OmstruckOrderMapper;
+import com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper;
+import com.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper;
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.dil.model.TmstruckEnfactoryResult;
+import com.steerinfo.dil.service.ITmstruckEnfactoryResultService;
+import com.steerinfo.dil.util.DataChange;
+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.List;
+import java.util.Map;
+
+/**
+ * TmstruckEnfactoryResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-08 06:23
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-08
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckEnfactoryResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckEnfactoryResultService")
+public class TmstruckEnfactoryResultServiceImpl implements ITmstruckEnfactoryResultService {
+
+    @Autowired
+    private TmstruckEnfactoryResultMapper tmstruckEnfactoryResultMapper;
+
+    @Autowired
+    private OmstruckOrderServiceImpl omstruckOrderService;
+
+    @Autowired
+    private TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
+
+    /**
+     * 获取所有的进厂实绩
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllEnFactoryResult(Map<String, Object> map) {
+        return tmstruckEnfactoryResultMapper.getAllEnFactoryResult(map);
+    }
+
+    /**
+     * 派单时新增进厂实绩
+     * 总实绩Id、线路起点
+     * @param map
+     * @return
+     */
+    @Override
+    public int addEnFactoryResult(Map<String, Object> map) {
+        TmstruckEnfactoryResult tmstruckEnfactoryResult = new TmstruckEnfactoryResult();
+        //生成进厂作业主键Id
+        long id;
+        BigDecimal maxId = tmstruckEnfactoryResultMapper.selectMaxId();
+        id = maxId == null ? 1 : maxId.longValue() + 1;
+        //添加主键
+        tmstruckEnfactoryResult.setResultId(new BigDecimal(id));
+        //添加门岗ID 路线起点就是进厂门岗
+        tmstruckEnfactoryResult.setGatepostId(DataChange.dataToBigDecimal(map.get("lineStartNodeId")));
+        //添加实绩总表Id
+        tmstruckEnfactoryResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        return tmstruckEnfactoryResultMapper.insertSelective(tmstruckEnfactoryResult);
+    }
+
+    /**
+     * 使用PDA方式进厂
+     * 运输订单号
+     * (操作人员主键ID)
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int updateEnFactoryByPDA(Map<String, Object> map) {
+        TmstruckEnfactoryResult tmstruckEnfactoryResult = new TmstruckEnfactoryResult();
+        String orderNumber = map.get("orderNumber").toString();
+        //获取进厂实绩id
+        map.putAll(tmstruckEnfactoryResultMapper.selectEnFactoryResultId(orderNumber));
+        tmstruckEnfactoryResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
+        //添加进厂时间
+        tmstruckEnfactoryResult.setResultEntryGateTime(new Date());
+        tmstruckEnfactoryResult.setInsertTime(new Date());
+        tmstruckEnfactoryResult.setResultEntryMode("手动抬杠");
+        tmstruckEnfactoryResult.setInsertUsername("admin");
+        int i = tmstruckEnfactoryResultMapper.updateByPrimaryKeySelective(tmstruckEnfactoryResult);
+        //更新订单路段顺序号
+        int i1 = omstruckOrderService.updateOrderLineSequence(map, 1);
+        //新增一条计毛委托
+        //进厂完成后新增一条计毛委托 类型 1
+        BigDecimal resultTotalId = DataChange.dataToBigDecimal(map.get("resultTotalId"));
+        int i2 = tmstruckMeasureCommissionService.addMeasureCommission(resultTotalId, 1);
+        return i + i1 +i2;
+    }
+
+    /**
+     * 使用门禁系统进厂
+     * @param map
+     * @return
+     */
+    @Override
+    public int updateEnFactoryByMenJin(Map<String, Object> map) {
+        TmstruckEnfactoryResult tmstruckEnfactoryResult=new TmstruckEnfactoryResult();
+        String orderNumber = map.get("orderNumber").toString();
+        //获取进厂实绩id
+        map.putAll(tmstruckEnfactoryResultMapper.selectEnFactoryResultId(orderNumber));
+        tmstruckEnfactoryResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
+        //进门方式
+        tmstruckEnfactoryResult.setResultEntryMode("自动抬杆");
+        tmstruckEnfactoryResult.setInsertTime(new Date());
+        tmstruckEnfactoryResult.setInsertUsername("admin");
+        int i = tmstruckEnfactoryResultMapper.updateByPrimaryKeySelective(tmstruckEnfactoryResult);
+        //更新路段顺序号
+        int i1 = omstruckOrderService.updateOrderLineSequence(map, 1);
+        //进厂完成后新增一条计毛委托 类型 1
+        BigDecimal resultTotalId = DataChange.dataToBigDecimal(map.get("resultTotalId"));
+        int i2 = tmstruckMeasureCommissionService.addMeasureCommission(resultTotalId, 1);
+        return i + i1 +i2;
+    }
+
+    /**
+     * 通过运输订单号查找排队顺序号
+     * @param orderNumber
+     * @return
+     */
+    @Override
+    public Integer selectNodeNumber(String orderNumber) {
+        return tmstruckEnfactoryResultMapper.selectNodeNumber(orderNumber);
+    }
+}

+ 219 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckLeaveFactoryResultServiceImpl.java

@@ -0,0 +1,219 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.feign.BmsShipFeign;
+import com.steerinfo.dil.feign.BmsTruckFeign;
+import com.steerinfo.dil.mapper.OmstruckOrderMapper;
+import com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper;
+import com.steerinfo.dil.mapper.TmstruckLeaveFactoryResultMapper;
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.dil.model.TmstruckLeaveFactoryResult;
+import com.steerinfo.dil.service.ITmstruckLeaveFactoryResultService;
+import com.steerinfo.dil.util.DataChange;
+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;
+
+/**
+ * TmstruckLeaveFactoryResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-11 10:32
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-11
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckLeaveFactoryResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckLeaveFactoryResultService")
+public class TmstruckLeaveFactoryResultServiceImpl implements ITmstruckLeaveFactoryResultService {
+
+    @Autowired
+    private TmstruckLeaveFactoryResultMapper tmstruckLeaveFactoryResultMapper;
+
+    @Autowired
+    private TmstruckEnfactoryResultMapper tmstruckEnfactoryResultMapper;
+
+    @Autowired
+    private OmstruckOrderServiceImpl omstruckOrderService;
+
+    @Autowired
+    private OmstruckOrderMapper omstruckOrderMapper;
+
+    @Autowired
+    private BmsShipFeign bmsShipFeign;
+
+    @Autowired
+    private BmsTruckFeign bmsTruckFeign;
+    /**
+     * 新增出厂实绩  需要采集的数据
+     *  运输订单号
+     *  车牌号
+     *  门岗名称
+     *  出厂时间
+     *  出厂方式
+     *  车厢抓拍图片
+     * @param map
+     * @return
+     */
+    @Override
+    public int addLeaveFactoryResult(Map<String, Object> map) {
+        TmstruckLeaveFactoryResult tmstruckLeaveFactoryResult = new TmstruckLeaveFactoryResult();
+        //查询最大主键ID
+        long id;
+        BigDecimal selectMaxId = tmstruckLeaveFactoryResultMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        tmstruckLeaveFactoryResult.setId(new BigDecimal(id));
+        //获取运输订单号
+        String orderNumber = (String) map.get("orderNumber");
+        //获取车牌号
+        String capacityNumber = (String) map.get("capacityNumber");
+        HashMap<String, Object> map1 = new HashMap<>();
+        map1.put("orderNumber", orderNumber);
+        map1.put("capacityNumber", capacityNumber);
+        //通过运输订单号、车牌号查询 总实绩ID
+        Integer totalId = tmstruckEnfactoryResultMapper.selectOrderIdByCpAndOn(map1);
+        tmstruckLeaveFactoryResult.setResultTotalId(new BigDecimal(totalId));
+        //获取门岗名称
+        String gatepostName = (String) map.get("gatepostName");
+        Integer gatepostId = tmstruckEnfactoryResultMapper.selectGatepostIdByGatepostName(gatepostName);
+        tmstruckLeaveFactoryResult.setGatepostId(new BigDecimal(gatepostId));
+        //获取出厂时间
+        long resultOutGateTime = (long)map.get("resultOutGateTime");
+        tmstruckLeaveFactoryResult.setResultOutGateTime(new Date(resultOutGateTime));
+        //获取出厂方式
+        String resultOutMode = (String) map.get("resultOutMode");
+        tmstruckLeaveFactoryResult.setResultOutMode(resultOutMode);
+
+        tmstruckLeaveFactoryResult.setInsertTime(new Date());
+        tmstruckLeaveFactoryResult.setInsertUsername("admin");
+        return tmstruckLeaveFactoryResultMapper.insertSelective(tmstruckLeaveFactoryResult);
+    }
+
+    /**
+     * 查询所有的出厂实绩
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getLeaveFactoryResult(Map<String, Object> map) {
+        return tmstruckLeaveFactoryResultMapper.getLeaveFactoryResult(map);
+    }
+
+    /**
+     * 查看运输线路是否为出厂
+     * @param orderNumber
+     * @return
+     */
+    @Override
+    public Integer selectTransportRoute(String orderNumber) {
+        return tmstruckLeaveFactoryResultMapper.selectTransportRoute(orderNumber);
+    }
+
+    /**
+     * 通过运输订单号获取 车牌号 和 门岗
+     * @param orderNumber
+     * @return
+     */
+    @Override
+    public Map<String, Object> selectLeaveFactory(String orderNumber) {
+        return tmstruckLeaveFactoryResultMapper.selectCnAndGnByOrderNumber(orderNumber);
+    }
+
+    /**
+     * 派单后新增出厂实绩
+     * 总实绩ID、线路终点
+     * @param map
+     * @return
+     */
+    @Override
+    public int addLeaveFactory(Map<String, Object> map) {
+        TmstruckLeaveFactoryResult tmstruckLeaveFactoryResult = new TmstruckLeaveFactoryResult();
+        //查询最大主键ID
+        long id;
+        BigDecimal selectMaxId = tmstruckLeaveFactoryResultMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        //添加主键
+        tmstruckLeaveFactoryResult.setId(new BigDecimal(id));
+        //添加总实绩ID
+        tmstruckLeaveFactoryResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        //添加门岗ID 出厂门岗为线路的终点
+        tmstruckLeaveFactoryResult.setGatepostId(DataChange.dataToBigDecimal(map.get("lineEndNodeId")));
+        return tmstruckLeaveFactoryResultMapper.insertSelective(tmstruckLeaveFactoryResult);
+    }
+
+    /**
+     * 通过PDA进行更新实绩
+     * 运输订单号
+     * @param mapValue
+     * @return
+     */
+    @Override
+    @Transactional
+    public int updateLeaveFactoryByPDA(Map<String, Object> mapValue){
+        //获取订单号
+        String orderNumber = mapValue.get("orderNumber").toString();
+        //根据订单号获取实绩id
+        mapValue.putAll(tmstruckLeaveFactoryResultMapper.selectResultId(orderNumber));
+        TmstruckLeaveFactoryResult tmstruckLeaveFactoryResult = new TmstruckLeaveFactoryResult();
+        tmstruckLeaveFactoryResult.setResultId(DataChange.dataToBigDecimal(mapValue.get("resultId")));
+        //设置常规字段
+        tmstruckLeaveFactoryResult.setResultOutGateTime(new Date());
+        tmstruckLeaveFactoryResult.setResultOutMode("手动抬杠");
+        tmstruckLeaveFactoryResult.setInsertUsername("admin");
+        tmstruckLeaveFactoryResult.setInsertTime(new Date());
+        int i = tmstruckLeaveFactoryResultMapper.updateByPrimaryKeySelective(tmstruckLeaveFactoryResult);
+        //更改路段顺序号为 5 :出厂
+        int i1 = omstruckOrderService.updateOrderLineSequence(mapValue, 5);
+        //将运力置为空闲状态
+        mapValue.put("capacityStatus", 0);
+        int i3 = omstruckOrderMapper.updateCapacityByCarIdOrNum(mapValue);
+        //将订单状态改为已结束 2
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        BigDecimal orderId = DataChange.dataToBigDecimal(mapValue.get("orderId"));
+        omstruckOrder.setOrderId(orderId);
+        omstruckOrder.setOrderStatus(new BigDecimal(2));
+        int i2 = omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
+        //通过feign调用新增详单
+
+        try {
+            bmsShipFeign.addDetailsOrder(tmstruckLeaveFactoryResult.getResultId()); // 出厂实绩Id
+            bmsTruckFeign.addDetailsOrder(orderId);  // 运单ID
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return i + i1 + i2 + i3;
+    }
+
+    /**
+     * 通过门岗系统进行更新实绩
+     * @param mapValue
+     * @return
+     */
+    @Override
+    public int updateLeaveFactoryByMenGang(Map<String, Object> mapValue) {
+        //获取订单号
+        String orderNumber=mapValue.get("orderNumber").toString();
+        //根据订单号获取实绩id
+        mapValue.putAll(tmstruckLeaveFactoryResultMapper.selectResultId(orderNumber));
+        TmstruckLeaveFactoryResult tmstruckLeaveFactoryResult = new TmstruckLeaveFactoryResult();
+        tmstruckLeaveFactoryResult.setResultId(DataChange.dataToBigDecimal(mapValue.get("resultId")));
+        //设置常规字段
+        tmstruckLeaveFactoryResult.setResultOutGateTime(new Date());
+        String  ResultLeaveModel=mapValue.get("ResultLeaveModel").toString();
+        tmstruckLeaveFactoryResult.setResultOutMode(ResultLeaveModel);
+        tmstruckLeaveFactoryResult.setInsertUsername("admin");
+        tmstruckLeaveFactoryResult.setInsertTime(new Date());
+        int i = tmstruckLeaveFactoryResultMapper.updateByPrimaryKeySelective(tmstruckLeaveFactoryResult);
+        //更改路段顺序号为 5 :出厂
+        int i1 = omstruckOrderService.updateOrderLineSequence(mapValue, 5);
+        return i + i1;
+    }
+}

+ 161 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckLoadResultServiceImpl.java

@@ -0,0 +1,161 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.feign.WmsBoundFeign;
+import com.steerinfo.dil.mapper.OmstruckOrderMapper;
+import com.steerinfo.dil.mapper.TmstruckEnfactoryResultMapper;
+import com.steerinfo.dil.mapper.TmstruckLoadResultMapper;
+import com.steerinfo.dil.mapper.TmstruckTotalResultMapper;
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.dil.model.TmstruckLoadResult;
+import com.steerinfo.dil.model.TmstruckTotalResult;
+import com.steerinfo.dil.service.ITmstruckLoadResultService;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckLoadResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-02 10:38
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-02
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckLoadResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckLoadResultService")
+public class TmstruckLoadResultServiceImpl implements ITmstruckLoadResultService {
+
+    @Autowired
+    private TmstruckLoadResultMapper tmstruckLoadResultMapper;
+
+    @Autowired
+    private TmstruckEnfactoryResultMapper tmstruckEnfactoryResultMapper;
+
+    @Autowired
+    private OmstruckOrderMapper omstruckOrderMapper;
+
+    @Autowired
+    private WmsBoundFeign wmsBoundFeign;
+
+    /**
+     * 查询所有装车实绩
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllLoadResult(Map<String, Object> map) {
+        return tmstruckLoadResultMapper.getAllLoadResult(map);
+    }
+
+    /**
+     * 新增装车实绩
+     * 运输订单号 或 运输订单Id
+     * 是否清场
+     * 装车日期
+     * 备注
+     * 计量吨位
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int addLoadResult(Map<String, Object> map) {
+        //通过运输订单号 或 运单Id 查询实绩总表ID  此方法在 进厂作业mapper中
+        Integer totalId = tmstruckEnfactoryResultMapper.selectOrderIdByCpAndOn(map);
+        // 新增装车实绩
+        TmstruckLoadResult tmstruckLoadResult = new TmstruckLoadResult();
+        //添加主键Id
+        long id;
+        BigDecimal selectMaxId = tmstruckLoadResultMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        //新增计量吨位 装车所装的重量
+        BigDecimal resultMeasuredTonnage = DataChange.dataToBigDecimal(map.get("resultMeasuredTonnage"));
+        tmstruckLoadResult.setResultMeasuredTonnage(resultMeasuredTonnage);
+        tmstruckLoadResult.setStatus(new BigDecimal(0));
+        tmstruckLoadResult.setResultId(new BigDecimal(id));
+        tmstruckLoadResult.setResultTotalId(new BigDecimal(totalId));
+        String resultIsclear = (String) (map.get("resultIsclear"));
+        tmstruckLoadResult.setResultIsclear(resultIsclear);
+        tmstruckLoadResult.setResultLoadStartTime(new Date((long) map.get("resultLoadStartTime")));
+        tmstruckLoadResult.setInsertUpdateRemark((String) map.get("insertUpdateRemark"));
+        int i = tmstruckLoadResultMapper.insertSelective(tmstruckLoadResult);
+
+        //修改订单状态为执行中 1
+        OmstruckOrder omstruckOrder = new OmstruckOrder();
+        BigDecimal orderId = DataChange.dataToBigDecimal(map.get("orderId"));
+        omstruckOrder.setOrderId(orderId);
+        omstruckOrder.setOrderStatus(new BigDecimal(1));
+        int i1 = omstruckOrderMapper.updateByPrimaryKeySelective(omstruckOrder);
+
+        //修改运力状态为执行中
+        BigDecimal capacityId = omstruckOrderMapper.getCapacityIdByOrderOrNum(map);
+        HashMap<String, Object> changeMap = new HashMap<>();
+        changeMap.put("capacityId", capacityId);
+        changeMap.put("capacityStatus", 0);
+        int i2 = omstruckOrderMapper.updateCapacityByCarIdOrNum(changeMap);
+
+        //新增出库实绩 并修改实时库存
+        BigDecimal portId = tmstruckLoadResultMapper.getPortIdBySendStationId(DataChange.dataToBigDecimal(map.get("loadingId")));
+        if(portId != null){
+            BigDecimal batchId = tmstruckLoadResultMapper.getBatchIdByOrderId(orderId);
+            if(batchId != null){
+                HashMap<String, Object> hashMap = new HashMap<>();
+                hashMap.put("batchId", batchId);
+                hashMap.put("portId", portId);
+                hashMap.put("resultTonnage",resultMeasuredTonnage);
+                hashMap.put("isClean", resultIsclear);
+                wmsBoundFeign.addResult(hashMap);
+            }
+        }
+
+
+        return i + i1 + i2;
+    }
+
+    /**
+     * 修改装车作业
+     * @param tmstruckLoadResult
+     * @return
+     */
+    @Override
+    public int updateLoadResult(TmstruckLoadResult tmstruckLoadResult) {
+        return tmstruckLoadResultMapper.updateByPrimaryKeySelective(tmstruckLoadResult);
+    }
+
+    /**
+     * 通过ID查询装车实绩
+     * @param resultId
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getLoadResultById(Integer resultId) {
+        return tmstruckLoadResultMapper.getLoadResultById(resultId);
+    }
+
+    /**
+     * 逻辑删除装车实绩 状态 1
+     * @param resultId
+     * @return
+     */
+    @Override
+    public int deleteLoadResult(Integer resultId) {
+        TmstruckLoadResult tmstruckLoadResult = new TmstruckLoadResult();
+        tmstruckLoadResult.setResultId(new BigDecimal(resultId));
+        tmstruckLoadResult.setStatus(new BigDecimal(1));
+        return tmstruckLoadResultMapper.updateByPrimaryKeySelective(tmstruckLoadResult);
+    }
+}

+ 72 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckMeasureCommissionServiceImpl.java

@@ -0,0 +1,72 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.TmstruckMeasureCommissionMapper;
+import com.steerinfo.dil.model.TmstruckMeasureCommission;
+import com.steerinfo.dil.service.ITmstruckMeasureCommissionService;
+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;
+
+/**
+ * TmstruckMeasureCommission服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 10:28
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckMeasureCommission服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckMeasureCommissionService")
+public class TmstruckMeasureCommissionServiceImpl implements ITmstruckMeasureCommissionService {
+
+    @Autowired
+    private TmstruckMeasureCommissionMapper tmstruckMeasureCommissionMapper;
+
+    /**
+     * 查询计量委托 0 :计皮     1:计毛
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllMeasureCommission(Map<String, Object> map) {
+        return tmstruckMeasureCommissionMapper.getAllMeasureCommission(map);
+    }
+
+    /**
+     * 进厂作业完成后 系统自动新增计毛、计皮委托
+     * @return
+     */
+    @Override
+    public int addMeasureCommission(BigDecimal totalId, Integer type) {
+        TmstruckMeasureCommission tmstruckMeasureCommission = new TmstruckMeasureCommission();
+        //生成主键Id
+        long id;
+        BigDecimal selectMaxId = tmstruckMeasureCommissionMapper.selectMaxId();
+        if (selectMaxId == null){
+            id = 1;
+        }else {
+            id = selectMaxId.longValue() + 1;
+        }
+        tmstruckMeasureCommission.setCommssionId(new BigDecimal(id));
+
+        //添加实绩总表Id
+        tmstruckMeasureCommission.setResultTotalId(totalId);
+
+        //添加计量类型
+        tmstruckMeasureCommission.setCommssionType(new BigDecimal(type));
+
+        tmstruckMeasureCommission.setInsertTime(new Date());
+        tmstruckMeasureCommission.setInsertUsername("admin");
+        return tmstruckMeasureCommissionMapper.insertSelective(tmstruckMeasureCommission);
+    }
+
+
+}

+ 64 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckQualityResultServiceImpl.java

@@ -0,0 +1,64 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.TmstruckQualityResultMapper;
+import com.steerinfo.dil.model.TmstruckQualityResult;
+import com.steerinfo.dil.
+service.ITmstruckQualityResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckQualityResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-11 04:14
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-11
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckQualityResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckQualityResultService")
+public class TmstruckQualityResultServiceImpl implements ITmstruckQualityResultService {
+
+    @Autowired
+    private TmstruckQualityResultMapper tmstruckQualityResultMapper;
+
+    /**
+     * 查询所有的质检作业
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQualityResult(Map<String, Object> map) {
+        return tmstruckQualityResultMapper.getQualityResult(map);
+    }
+
+    /**
+     * 通过Id查询质检作业 用于修改显示
+     * @param resultId
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQualityResultById(Integer resultId) {
+        return tmstruckQualityResultMapper.getQualityResultById(resultId);
+    }
+
+    /**
+     * 修改质检作业
+     * @param tmstruckQualityResult
+     * @return
+     */
+    @Override
+    public int updateQualityResult(TmstruckQualityResult tmstruckQualityResult) {
+        tmstruckQualityResult.setUpdateUsername("admin");
+        tmstruckQualityResult.setUpdateTime(new Date());
+        tmstruckQualityResultMapper.updateByPrimaryKeySelective(tmstruckQualityResult);
+        return 0;
+    }
+}

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

@@ -0,0 +1,40 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.TmstruckReceiptResultMapper;
+import com.steerinfo.dil.service.ITmstruckReceiptResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckReceiptResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-10 10:10
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-10
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckReceiptResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckReceiptResultService")
+public class TmstruckReceiptResultServiceImpl implements ITmstruckReceiptResultService {
+
+    @Autowired
+    private TmstruckReceiptResultMapper tmstruckReceiptResultMapper;
+
+    /**
+     * 查询所有签收实绩
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getReceiveResult(Map<String, Object> map) {
+        return tmstruckReceiptResultMapper.getReceiveResult(map);
+    }
+}

+ 137 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckUnloadResultServiceImpl.java

@@ -0,0 +1,137 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.TmstruckReceiptResultMapper;
+import com.steerinfo.dil.mapper.TmstruckUnloadResultMapper;
+import com.steerinfo.dil.mapper.TmstruckWeightResultMapper;
+import com.steerinfo.dil.model.TmstruckReceiptResult;
+import com.steerinfo.dil.model.TmstruckUnloadResult;
+import com.steerinfo.dil.service.ITmstruckUnloadResultService;
+import com.steerinfo.dil.util.DataChange;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckUnloadResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 07:58
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckUnloadResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckUnloadResultService")
+public class TmstruckUnloadResultServiceImpl implements ITmstruckUnloadResultService {
+
+    @Autowired
+    private TmstruckUnloadResultMapper tmstruckUnloadResultMapper;
+
+    @Autowired
+    private TmstruckReceiptResultMapper tmstruckReceiptResultMapper;
+
+    @Autowired
+    private OmstruckOrderServiceImpl omstruckOrderService;
+
+    @Autowired
+    private TmstruckMeasureCommissionServiceImpl tmstruckMeasureCommissionService;
+
+
+    /**
+     * 查询所有卸货实绩
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getUnloadResult(Map<String, Object> map) {
+        return tmstruckUnloadResultMapper.getUnloadResult(map);
+    }
+
+    /**
+     * 新增卸货实绩
+     * 总实绩ID、卸货点
+     * @param map
+     * @return
+     */
+    @Override
+    public int addUnloadResult(Map<String, Object> map) {
+        TmstruckUnloadResult tmstruckUnloadResult = new TmstruckUnloadResult();
+        //生成主键ID
+        long id;
+        BigDecimal selectMaxId = tmstruckUnloadResultMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        tmstruckUnloadResult.setId(new BigDecimal(id));
+        //生成卸货实绩编号
+        StringBuilder resultNumber = new StringBuilder("DW");
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        String timeFormat = sdf.format(new Date());
+        resultNumber.append(timeFormat);
+        resultNumber.append(id < 10 ? "0000" + id : id < 100 ? "000" + id : id < 1000 ? "00" +id : id < 10000 ? "0" + id : String.valueOf(id));
+        tmstruckUnloadResult.setResultNumber(resultNumber.toString());
+        //插入实绩总表ID
+        tmstruckUnloadResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        //插入卸货点
+        tmstruckUnloadResult.setResultUnloadPlaceId(DataChange.dataToBigDecimal(map.get("resultUnloadPlaceId")));
+        //新增卸车实绩
+        int i = tmstruckUnloadResultMapper.insertSelective(tmstruckUnloadResult);
+        return i;
+    }
+
+    /**
+     * 更新卸货实绩内容 扫码人员扫码后获取信息传输数据给接口
+     *  运输订单号
+     *  卸货时间
+     *  卸货地点
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int updateUnloadResult(Map<String, Object> map) {
+        TmstruckUnloadResult tmstruckUnloadResult = new TmstruckUnloadResult();
+        //通过获取的运输订单号查询实绩总表id
+        map.putAll(tmstruckUnloadResultMapper.selectTotalIdByOrderNo((String) map.get("orderNumber")));
+        //得到实绩id
+        tmstruckUnloadResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
+        //通过卸货地点(仓库)查询仓库ID
+        BigDecimal resultUnloadPlaceId = tmstruckUnloadResultMapper.getWarehouseIdByWName((String) map.get("warehouseName"));
+        // 修改卸货点
+        if(resultUnloadPlaceId != null){
+            tmstruckUnloadResult.setResultUnloadPlaceId(resultUnloadPlaceId);
+        }
+        //获得卸货开始时间
+        tmstruckUnloadResult.setResultStartTime(new Date((long) map.get("unloadTime")));
+        //扫码后确认卸货所以卸货状态码为  1 同意
+        tmstruckUnloadResult.setUnloadStatus(new BigDecimal(1));
+        tmstruckUnloadResult.setInsertTime(new Date());
+        tmstruckUnloadResult.setInsertUsername("admin");
+        //新增卸车实绩内容
+        int i = tmstruckUnloadResultMapper.updateByPrimaryKeySelective(tmstruckUnloadResult);
+        //卸货完成后新增一条计皮委托 类型 0
+        BigDecimal resultTotalId = DataChange.dataToBigDecimal(map.get("resultTotalId"));
+        int i1 = tmstruckMeasureCommissionService.addMeasureCommission(resultTotalId, 0);
+
+        //新增完卸车实绩后新增一条收货实绩
+        TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();
+        long id2;
+        BigDecimal selectMaxId2 = tmstruckReceiptResultMapper.selectMaxId();
+        id2 = selectMaxId2 == null ? 1 : selectMaxId2.longValue() + 1;
+        tmstruckReceiptResult.setId(new BigDecimal(id2));//添加主键
+        tmstruckReceiptResult.setResultTotalId(resultTotalId);//添加总实绩Id
+        tmstruckReceiptResult.setStatus(new BigDecimal(0)); // 卸货完成后添加的为虚拟收货实绩
+        int i2 = tmstruckReceiptResultMapper.insertSelective(tmstruckReceiptResult);
+
+        //更新订单路段顺序号
+        int i3 = omstruckOrderService.updateOrderLineSequence(map, 3);
+        return i + i1 + i2 +i3;
+    }
+}

+ 179 - 0
src/main/java/com/steerinfo/dil/service/impl/TmstruckWeightResultServiceImpl.java

@@ -0,0 +1,179 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.OmstruckOrderMapper;
+import com.steerinfo.dil.mapper.TmstruckReceiptResultMapper;
+import com.steerinfo.dil.mapper.TmstruckWeightResultMapper;
+import com.steerinfo.dil.model.OmstruckOrder;
+import com.steerinfo.dil.model.TmstruckReceiptResult;
+import com.steerinfo.dil.model.TmstruckWeightResult;
+import com.steerinfo.dil.service.ITmstruckWeightResultService;
+import com.steerinfo.dil.util.DataChange;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * TmstruckWeightResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-09 02:21
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-09
+ * 作者:generator
+ * 参考:
+ * 描述:TmstruckWeightResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "tmstruckWeightResultService")
+public class TmstruckWeightResultServiceImpl implements ITmstruckWeightResultService {
+
+    @Autowired
+    private TmstruckWeightResultMapper tmstruckWeightResultMapper;
+
+    @Autowired
+    private TmstruckReceiptResultMapper tmstruckReceiptResultMapper;
+
+    @Autowired
+    private OmstruckOrderServiceImpl omstruckOrderService;
+
+    /**
+     * 派单时新增计重实绩
+     * 总实绩ID、计皮点、计毛点
+     * @return
+     */
+    @Override
+    public int addWeightResult(Map<String, Object> map) {
+        TmstruckWeightResult tmstruckWeightResult = new TmstruckWeightResult();
+        //生成最大主键ID
+        long id;
+        BigDecimal selectMaxId = tmstruckWeightResultMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        tmstruckWeightResult.setWeightTaskResultId(new BigDecimal(id));
+        tmstruckWeightResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        // 添加计皮计毛作业点ID
+        tmstruckWeightResult.setResultGrossPlaceId(DataChange.dataToBigDecimal(map.get("truckCalculateIdMao")));
+        tmstruckWeightResult.setResultTarePlaceId(DataChange.dataToBigDecimal(map.get("truckCalculateIdPi")));
+        return tmstruckWeightResultMapper.insertSelective(tmstruckWeightResult);
+    }
+
+    /**
+     * 更新计毛实绩 采集需要的数据
+     *  运输订单号
+     *  汽车衡编号
+     *  //物资名称
+     *  毛重
+     *  毛重时间
+     *  磅单号
+     * @return
+     */
+    @Override
+    @Transactional
+    public int addJiMaoResult(Map<String, Object> map) {
+        TmstruckWeightResult tmstruckWeightResult = new TmstruckWeightResult();
+        double resultGrossWeight = (double) map.get("resultGrossWeight");
+        //通过传来的运输订单号查询总实绩ID 计量实绩Id
+        map.putAll(tmstruckWeightResultMapper.selectTotalIdByOrderNo((String) map.get("orderNumber")));
+        BigDecimal resultId = DataChange.dataToBigDecimal(map.get("weightTaskResultId"));
+        tmstruckWeightResult.setWeightTaskResultId(resultId);
+        //添加毛重
+        DecimalFormat df =  new DecimalFormat("0.00");
+        String grossWeight = df.format(resultGrossWeight);
+        tmstruckWeightResult.setResultGrossWeight(new BigDecimal(grossWeight));
+        //通过汽车衡编号查询汽车衡ID
+        Integer calculateId = tmstruckWeightResultMapper.selectTruckCalculateId((String) map.get("truckCalculateNumber"));
+        //添加计毛汽车衡
+        if(calculateId != null){
+            tmstruckWeightResult.setResultGrossPlaceId(new BigDecimal(calculateId));
+        }
+        //添加磅单号
+        tmstruckWeightResult.setResultPoundNo((String) map.get("resultPoundNo"));
+        //添加毛重时间
+        long resultGrossWeightTime = (long) map.get("resultGrossWeightTime");
+        tmstruckWeightResult.setResultGrossWeightTime(new Date(resultGrossWeightTime));
+        tmstruckWeightResult.setInsertTime(new Date());
+        tmstruckWeightResult.setInsertUsername("admin");
+        tmstruckWeightResult.setInsertUpdateRemark("无");
+        int i = tmstruckWeightResultMapper.updateByPrimaryKeySelective(tmstruckWeightResult);
+        //更新订单路段顺序号
+        int i2 = omstruckOrderService.updateOrderLineSequence(map, 2);
+        return i +i2;
+    }
+
+    /**
+     * 查询所有计毛实绩
+     * @param map
+     * @return
+     */
+
+    @Override
+    public List<Map<String, Object>> getAllJiMaoResult(Map<String, Object> map) {
+        return tmstruckWeightResultMapper.getAllJiMaoResult(map);
+    }
+
+    /**
+     * 查询所有计皮实绩
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllJiPiResult(Map<String, Object> map) {
+        return tmstruckWeightResultMapper.getAllJiPiResult(map);
+    }
+
+    /**
+     * 更新计皮实绩  需要采集的数据
+     * 运输订单号
+     * 汽车衡编号
+     * 皮重
+     * 皮重时间
+     *
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int addJiPiResult(Map<String, Object> map) {
+        TmstruckWeightResult tmstruckWeightResult = new TmstruckWeightResult();
+        //通过传来的运输订单号查询总实绩ID
+        map.putAll(tmstruckWeightResultMapper.selectTotalIdByOrderNo((String) map.get("orderNumber")));
+        BigDecimal resultId = (BigDecimal) map.get("weightTaskResultId");
+        tmstruckWeightResult.setWeightTaskResultId(resultId);
+        //添加皮重
+        DecimalFormat df =  new DecimalFormat("0.00");
+        String resultTareWeight = df.format((double) map.get("resultTareWeight"));
+        tmstruckWeightResult.setResultTareWeight(new BigDecimal(resultTareWeight));
+        //添加皮重时间
+        long resultTareWeightTime = (long) map.get("resultTareWeightTime");
+        tmstruckWeightResult.setResultTareWeightTime(new Date(resultTareWeightTime));
+        //计算净重  先获取毛重
+        double netWeight = ((BigDecimal) map.get("resultGrossWeight")).doubleValue() - ((Double) map.get("resultTareWeight"));
+        String resultNetWeight = df.format(netWeight);
+        tmstruckWeightResult.setResultNetWeight(new BigDecimal(resultNetWeight));
+        //通过汽车衡编号查询汽车衡ID
+        Integer calculateId = tmstruckWeightResultMapper.selectTruckCalculateId((String) map.get("truckCalculateNumber"));
+        //添加计皮汽车衡
+        if(calculateId != null){
+            tmstruckWeightResult.setResultTarePlaceId(new BigDecimal(calculateId));
+        }
+        tmstruckWeightResult.setUpdateTime(new Date());
+        tmstruckWeightResult.setUpdateUsername("admin");
+        int i = tmstruckWeightResultMapper.updateByPrimaryKeySelective(tmstruckWeightResult);
+        //计皮作业完成后自动完成签收
+        TmstruckReceiptResult tmstruckReceiptResult = new TmstruckReceiptResult();
+        tmstruckReceiptResult.setResultTotalId(DataChange.dataToBigDecimal(map.get("resultTotalId")));
+        tmstruckReceiptResult.setStatus(new BigDecimal(1));
+        tmstruckReceiptResult.setInsertUsername("admin");
+        tmstruckReceiptResult.setInsertTime(new Date());
+        int i1 = tmstruckReceiptResultMapper.updateByTotalResultId(tmstruckReceiptResult);
+        //更新订单路段顺序号
+        int i2 = omstruckOrderService.updateOrderLineSequence(map, 4);
+        return i + i1 + i2;
+    }
+}

+ 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;
+    }
+}

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

@@ -0,0 +1,137 @@
+package com.steerinfo.dil.util;
+
+import org.apache.poi.ss.formula.functions.T;
+
+import java.math.BigDecimal;
+import java.text.DecimalFormat;
+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;
+                return new BigDecimal(data1);
+            }
+            if(data instanceof Integer){
+                Integer data2 = (Integer) data;
+                return new BigDecimal(data2);
+            }
+            if(data instanceof BigDecimal){
+                return (BigDecimal) data;
+            }
+        }
+        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);
+                }
+            }
+        }
+    }
+
+    /**
+     * 遍历列表使只显示两位小数
+     * @param list
+     * @param key
+     */
+    public static void dataTo2Number(List<Map<String, Object>> list, String ...key){
+        //遍历List
+        for (Map<String, Object> map : list) {
+            for (String s : key) {
+                //修改数据为带两位小数
+                BigDecimal oldDate = (BigDecimal) map.get(s);
+                DecimalFormat df =  new DecimalFormat("0.00");
+                String resultDeduction = df.format(oldDate.doubleValue());
+                map.put(s, resultDeduction);
+            }
+        }
+    }
+
+    /**
+     * 计算相差时间  日时分秒
+     * @param
+     * @return
+     */
+    public static String calculatedTimeDifference(Date time1, Date time2){
+        long t1 = time1.getTime();
+        long t2 = time2.getTime();
+        if(t1 > t2){
+            long temp = t1;
+            t1 = t2;
+            t2 = temp;
+        }
+        long between = t2 - t1;
+        long day = between / (24 * 60 * 60 * 1000);
+        long hour = (between / (60 * 60 * 1000) - day * 24);
+        long min = ((between / (60 * 1000)) - day * 24 * 60 - hour * 60);
+        long s = (between / 1000 - day * 24 * 60 * 60 - hour * 60 * 60 - min * 60);
+        return day + "天"+  + hour+ "时" + min + "分"  + s + "秒";
+    }
+}

+ 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 {
+
+}

+ 43 - 0
src/main/java/com/steerinfo/dil/websocket/WebSocketController.java

@@ -0,0 +1,43 @@
+package com.steerinfo.dil.websocket;
+
+import com.steerinfo.dil.service.IOmstruckOrderService;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.messaging.simp.SimpMessagingTemplate;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+import org.springframework.stereotype.Controller;
+
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Controller
+public class WebSocketController extends BaseRESTfulController {
+
+    @Autowired
+    private SimpMessagingTemplate simpMessagingTemplate; //消息(发送)推送模板
+
+    @Autowired
+    private IOmstruckOrderService omstruckOrderService;
+
+
+    @Scheduled(fixedDelay = 3000000)
+    public void sendMessage() {
+        Map<String, Object> map = new HashMap<>();
+        //推送给状态为已下发为4 的所有订单
+        map.put("orderStatus", 4);
+
+        //订单推送
+        List<Map<String, Object>> allTruckOrder = omstruckOrderService.getAllTruckOrder(map);
+        for (Map<String, Object> maps : allTruckOrder) {
+            //从map中获取车牌号
+            BigDecimal capacityId = DataChange.dataToBigDecimal(maps.get("capacityId"));
+            System.out.println(capacityId);
+            //推送到队列
+            simpMessagingTemplate.convertAndSend(("/topic/getResponse/" + capacityId).trim(), capacityId);
+        }
+    }
+}

+ 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: dil-tms-truck-dev
+

+ 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: dil-tms-truck-dev

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


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

@@ -0,0 +1,55 @@
+api.version: api/v1/truckTms
+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/
+    registerWithEureka:
+      false
+    fetchRegistry:
+      false
+
+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: 8088

+ 594 - 0
src/main/resources/com/steerinfo/dil/mapper/AmstruckPurplanMapper.xml

@@ -0,0 +1,594 @@
+<?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.AmstruckPurplanMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmstruckPurplan">
+        <id column="PLAN_ID" jdbcType="DECIMAL" property="planId" />
+        <result column="BATCH_ID" jdbcType="DECIMAL" property="batchId" />
+        <result column="PLAN_NO" jdbcType="VARCHAR" property="planNo" />
+        <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
+        <result column="PLAN_TRUCK_NUMBER" jdbcType="DECIMAL" property="planTruckNumber" />
+        <result column="CAPACITY_TYPE_ID" jdbcType="DECIMAL" property="capacityTypeId" />
+        <result column="PLAN_TRUCK_TIME" jdbcType="TIMESTAMP" property="planTruckTime" />
+        <result column="PLAN_STATUS" jdbcType="DECIMAL" property="planStatus" />
+        <result column="MATERIAL_TOTAL_WEIGHT" jdbcType="DECIMAL" property="materialTotalWeight" />
+        <result column="PLAN_INCOMING_TIME" jdbcType="TIMESTAMP" property="planIncomingTime" />
+        <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">
+        PLAN_ID, BATCH_ID, PLAN_NO, CARRIER_ID, PLAN_TRUCK_NUMBER, CAPACITY_TYPE_ID, PLAN_TRUCK_TIME,
+    PLAN_STATUS, MATERIAL_TOTAL_WEIGHT, PLAN_INCOMING_TIME, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+    </sql>
+    <sql id="columns_alias">
+        t.PLAN_ID, t.BATCH_ID, t.PLAN_NO, t.CARRIER_ID, t.PLAN_TRUCK_NUMBER, t.CAPACITY_TYPE_ID,
+    t.PLAN_TRUCK_TIME, t.PLAN_STATUS, t.MATERIAL_TOTAL_WEIGHT, t.PLAN_INCOMING_TIME,
+    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 AMSTRUCK_PURPLAN
+    </sql>
+    <sql id="select_alias">
+        SELECT <include refid="columns_alias" /> FROM AMSTRUCK_PURPLAN t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="planId != null">
+                and PLAN_ID = #{planId}
+            </if>
+            <if test="batchId != null">
+                and BATCH_ID = #{batchId}
+            </if>
+            <if test="planNo != null and planNo != ''">
+                and PLAN_NO = #{planNo}
+            </if>
+            <if test="carrierId != null">
+                and CARRIER_ID = #{carrierId}
+            </if>
+            <if test="planTruckNumber != null">
+                and PLAN_TRUCK_NUMBER = #{planTruckNumber}
+            </if>
+            <if test="capacityTypeId != null">
+                and CAPACITY_TYPE_ID = #{capacityTypeId}
+            </if>
+            <if test="planTruckTime != null">
+                and TO_CHAR(PLAN_TRUCK_TIME,'yyyy-MM-dd') = #{planTruckTime}
+            </if>
+            <if test="planStatus != null">
+                and PLAN_STATUS = #{planStatus}
+            </if>
+            <if test="materialTotalWeight != null">
+                and MATERIAL_TOTAL_WEIGHT = #{materialTotalWeight}
+            </if>
+            <if test="planIncomingTime != null">
+                and TO_CHAR(PLAN_INCOMING_TIME,'yyyy-MM-dd') = #{planIncomingTime}
+            </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="planId != null">
+                and PLAN_ID = #{planId}
+            </if>
+            <if test="batchId != null">
+                and BATCH_ID = #{batchId}
+            </if>
+            <if test="planNo != null and planNo != ''">
+                and PLAN_NO LIKE '%${planNo}%'
+            </if>
+            <if test="carrierId != null">
+                and CARRIER_ID = #{carrierId}
+            </if>
+            <if test="planTruckNumber != null">
+                and PLAN_TRUCK_NUMBER = #{planTruckNumber}
+            </if>
+            <if test="capacityTypeId != null">
+                and CAPACITY_TYPE_ID = #{capacityTypeId}
+            </if>
+            <if test="planTruckTime != null">
+                and TO_CHAR(PLAN_TRUCK_TIME,'yyyy-MM-dd') = #{planTruckTime}
+            </if>
+            <if test="planStatus != null">
+                and PLAN_STATUS = #{planStatus}
+            </if>
+            <if test="materialTotalWeight != null">
+                and MATERIAL_TOTAL_WEIGHT = #{materialTotalWeight}
+            </if>
+            <if test="planIncomingTime != null">
+                and TO_CHAR(PLAN_INCOMING_TIME,'yyyy-MM-dd') = #{planIncomingTime}
+            </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 AMSTRUCK_PURPLAN
+        where PLAN_ID = #{planId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from AMSTRUCK_PURPLAN
+        where 1!=1
+        <if test="batchId != null">
+            or BATCH_ID = #{batchId}
+        </if>
+        <if test="planNo != null and planNo != ''">
+            or PLAN_NO = #{planNo}
+        </if>
+        <if test="carrierId != null">
+            or CARRIER_ID = #{carrierId}
+        </if>
+        <if test="planTruckNumber != null">
+            or PLAN_TRUCK_NUMBER = #{planTruckNumber}
+        </if>
+        <if test="capacityTypeId != null">
+            or CAPACITY_TYPE_ID = #{capacityTypeId}
+        </if>
+        <if test="planTruckTime != null">
+            or TO_CHAR(PLAN_TRUCK_TIME,'yyyy-MM-dd') = '#{planTruckTime}'
+        </if>
+        <if test="planStatus != null">
+            or PLAN_STATUS = #{planStatus}
+        </if>
+        <if test="materialTotalWeight != null">
+            or MATERIAL_TOTAL_WEIGHT = #{materialTotalWeight}
+        </if>
+        <if test="planIncomingTime != null">
+            or TO_CHAR(PLAN_INCOMING_TIME,'yyyy-MM-dd') = '#{planIncomingTime}'
+        </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.AmstruckPurplan">
+        insert into AMSTRUCK_PURPLAN (PLAN_ID, BATCH_ID, PLAN_NO,
+                                      CARRIER_ID, PLAN_TRUCK_NUMBER, CAPACITY_TYPE_ID,
+                                      PLAN_TRUCK_TIME, PLAN_STATUS, MATERIAL_TOTAL_WEIGHT,
+                                      PLAN_INCOMING_TIME, INSERT_USERNAME, INSERT_TIME,
+                                      UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+        )
+        values (#{planId,jdbcType=DECIMAL}, #{batchId,jdbcType=DECIMAL}, #{planNo,jdbcType=VARCHAR},
+                #{carrierId,jdbcType=DECIMAL}, #{planTruckNumber,jdbcType=DECIMAL}, #{capacityTypeId,jdbcType=DECIMAL},
+                #{planTruckTime,jdbcType=TIMESTAMP}, #{planStatus,jdbcType=DECIMAL}, #{materialTotalWeight,jdbcType=DECIMAL},
+                #{planIncomingTime,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.AmstruckPurplan">
+        insert into AMSTRUCK_PURPLAN
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="planId != null">
+                PLAN_ID,
+            </if>
+            <if test="batchId != null">
+                BATCH_ID,
+            </if>
+            <if test="planNo != null">
+                PLAN_NO,
+            </if>
+            <if test="carrierId != null">
+                CARRIER_ID,
+            </if>
+            <if test="planTruckNumber != null">
+                PLAN_TRUCK_NUMBER,
+            </if>
+            <if test="capacityTypeId != null">
+                CAPACITY_TYPE_ID,
+            </if>
+            <if test="planTruckTime != null">
+                PLAN_TRUCK_TIME,
+            </if>
+            <if test="planStatus != null">
+                PLAN_STATUS,
+            </if>
+            <if test="materialTotalWeight != null">
+                MATERIAL_TOTAL_WEIGHT,
+            </if>
+            <if test="planIncomingTime != null">
+                PLAN_INCOMING_TIME,
+            </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="planId != null">
+                #{planId,jdbcType=DECIMAL},
+            </if>
+            <if test="batchId != null">
+                #{batchId,jdbcType=DECIMAL},
+            </if>
+            <if test="planNo != null">
+                #{planNo,jdbcType=VARCHAR},
+            </if>
+            <if test="carrierId != null">
+                #{carrierId,jdbcType=DECIMAL},
+            </if>
+            <if test="planTruckNumber != null">
+                #{planTruckNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityTypeId != null">
+                #{capacityTypeId,jdbcType=DECIMAL},
+            </if>
+            <if test="planTruckTime != null">
+                #{planTruckTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="planStatus != null">
+                #{planStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="materialTotalWeight != null">
+                #{materialTotalWeight,jdbcType=DECIMAL},
+            </if>
+            <if test="planIncomingTime != null">
+                #{planIncomingTime,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.AmstruckPurplan">
+        update AMSTRUCK_PURPLAN
+        set BATCH_ID = #{batchId,jdbcType=DECIMAL},
+            PLAN_NO = #{planNo,jdbcType=VARCHAR},
+            CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+            PLAN_TRUCK_NUMBER = #{planTruckNumber,jdbcType=DECIMAL},
+            CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
+            PLAN_TRUCK_TIME = #{planTruckTime,jdbcType=TIMESTAMP},
+            PLAN_STATUS = #{planStatus,jdbcType=DECIMAL},
+            MATERIAL_TOTAL_WEIGHT = #{materialTotalWeight,jdbcType=DECIMAL},
+            PLAN_INCOMING_TIME = #{planIncomingTime,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 PLAN_ID = #{planId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckPurplan">
+        update AMSTRUCK_PURPLAN
+        <set>
+            <if test="batchId != null">
+                BATCH_ID = #{batchId,jdbcType=DECIMAL},
+            </if>
+            <if test="planNo != null">
+                PLAN_NO = #{planNo,jdbcType=VARCHAR},
+            </if>
+            <if test="carrierId != null">
+                CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+            </if>
+            <if test="planTruckNumber != null">
+                PLAN_TRUCK_NUMBER = #{planTruckNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityTypeId != null">
+                CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
+            </if>
+            <if test="planTruckTime != null">
+                PLAN_TRUCK_TIME = #{planTruckTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="planStatus != null">
+                PLAN_STATUS = #{planStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="materialTotalWeight != null">
+                MATERIAL_TOTAL_WEIGHT = #{materialTotalWeight,jdbcType=DECIMAL},
+            </if>
+            <if test="planIncomingTime != null">
+                PLAN_INCOMING_TIME = #{planIncomingTime,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 PLAN_ID = #{planId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+        <include refid="select" />
+        where PLAN_ID = #{planId,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 AMSTRUCK_PURPLAN
+        (PLAN_ID,
+        BATCH_ID, PLAN_NO, CARRIER_ID,
+        PLAN_TRUCK_NUMBER, CAPACITY_TYPE_ID,
+        PLAN_TRUCK_TIME, PLAN_STATUS,
+        MATERIAL_TOTAL_WEIGHT, PLAN_INCOMING_TIME,
+        INSERT_USERNAME, INSERT_TIME,
+        UPDATE_USERNAME, UPDATE_TIME,
+        INSERT_UPDATE_REMARK)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.planId,jdbcType=DECIMAL},
+        #{item.batchId,jdbcType=DECIMAL}, #{item.planNo,jdbcType=VARCHAR}, #{item.carrierId,jdbcType=DECIMAL},
+        #{item.planTruckNumber,jdbcType=DECIMAL}, #{item.capacityTypeId,jdbcType=DECIMAL},
+        #{item.planTruckTime,jdbcType=TIMESTAMP}, #{item.planStatus,jdbcType=DECIMAL},
+        #{item.materialTotalWeight,jdbcType=DECIMAL}, #{item.planIncomingTime,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 AMSTRUCK_PURPLAN
+        set
+        PLAN_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.planId,jdbcType=DECIMAL}
+        </foreach>
+        ,BATCH_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.batchId,jdbcType=DECIMAL}
+        </foreach>
+        ,PLAN_NO=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.planNo,jdbcType=VARCHAR}
+        </foreach>
+        ,CARRIER_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
+        </foreach>
+        ,PLAN_TRUCK_NUMBER=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.planTruckNumber,jdbcType=DECIMAL}
+        </foreach>
+        ,CAPACITY_TYPE_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.capacityTypeId,jdbcType=DECIMAL}
+        </foreach>
+        ,PLAN_TRUCK_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.planTruckTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,PLAN_STATUS=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.planStatus,jdbcType=DECIMAL}
+        </foreach>
+        ,MATERIAL_TOTAL_WEIGHT=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.materialTotalWeight,jdbcType=DECIMAL}
+        </foreach>
+        ,PLAN_INCOMING_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.planIncomingTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_USERNAME=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_USERNAME=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_UPDATE_REMARK=
+        <foreach close="end" collection="list" index="index" item="item" open="case PLAN_ID" separator=" ">
+            when #{item.planId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+        </foreach>
+        where PLAN_ID in
+        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+            #{item.planId,jdbcType=DECIMAL}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from AMSTRUCK_PURPLAN
+        where PLAN_ID in
+        <foreach close=")" collection="list" item="id" open="(" 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>
+
+    <!-- 通过状态 0:未下发 1:已下发 查询运输计划 -->
+    <select id="getAllPurPlan" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+        *
+        from (
+        select
+            AP.PLAN_ID "planId",
+            APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+            DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+            RM.MATERIAL_NAME "materialName",
+            AP.PLAN_NO "planNo",
+            RC.CARRIER_NAME "carrierName",
+            AP.MATERIAL_TOTAL_WEIGHT "materialTotalWeight",
+            AP.PLAN_TRUCK_TIME "planTruckTime",
+            AP.PLAN_INCOMING_TIME "planIncomingTime"
+        from AMSTRUCK_PURPLAN AP
+        left join AMS_PURCHASE_ORDER APO
+        on AP.BATCH_ID = APO.BATCH_ID
+        left join DIL_BATCH DB
+        on AP.BATCH_ID = DB.BATCH_ID
+        left join RMS_MATERIAL RM
+        on RM.MATERIAL_ID = DB.MATERIAL_ID
+        left join RMS_CARRIER RC
+        on AP.CARRIER_ID = RC.CARRIER_ID
+        where AP.PLAN_STATUS = #{planStatus}
+        )
+        <where>
+            <if test="planId != null">
+                <foreach collection="planId" item="item" open="(" separator="or" close=")">
+                    "planId" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="purchaseOrderNo != null">
+                and
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" 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="planNo != null">
+                and
+                <foreach collection="planNo" item="item" open="(" separator="or" close=")">
+                    "planNo" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="carrierName != null">
+                and
+                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                    "carrierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialTotalWeight != null">
+                and
+                <foreach collection="materialTotalWeight" item="item" open="(" separator="or" close=")">
+                    "materialTotalWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="planTruckTime != null">
+                and
+                <foreach collection="planTruckTime" item="item" open="(" separator="or" close=")">
+                    "planTruckTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="planIncomingTime != null">
+                and
+                <foreach collection="planIncomingTime" item="item" open="(" separator="or" close=")">
+                    "planIncomingTime" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "planIncomingTime" desc
+        </if>
+    </select>
+
+
+    <!--  通过ID查询运输计划 -->
+    <select id="getPurPlanById" parameterType="int" resultType="java.util.Map">
+        select DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+               DB.MATERIAL_ID              "materialId",
+               AP.CARRIER_ID               "carrierId",
+               AP.MATERIAL_TOTAL_WEIGHT    "materialTotalWeight",
+               AP.PLAN_TRUCK_TIME          "planTruckTime",
+               AP.PLAN_INCOMING_TIME "planIncomingTime",
+               AP.BATCH_ID                 "batchId",
+               AP.PLAN_ID                  "planId"
+        from AMSTRUCK_PURPLAN AP
+                 left join DIL_BATCH DB
+                           on AP.BATCH_ID = DB.BATCH_ID
+        where PLAN_ID = #{planId}
+    </select>
+
+    <!--  获取最大ID值  -->
+    <select id="selectMaxId" resultType="java.math.BigDecimal">
+        select max(PLAN_ID)
+        from AMSTRUCK_PURPLAN
+    </select>
+
+
+</mapper>

+ 540 - 0
src/main/resources/com/steerinfo/dil/mapper/AmstruckPurplanMaterialMapper.xml

@@ -0,0 +1,540 @@
+<?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.AmstruckPurplanMaterialMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.AmstruckPurplanMaterial">
+        <id column="PURPLAN_PLAN_MATERIAL_ID" jdbcType="DECIMAL" property="purplanPlanMaterialId"/>
+        <result column="PLAN_ID" jdbcType="DECIMAL" property="planId"/>
+        <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId"/>
+        <result column="PURPLAN_MATERIAL_NUMBER" jdbcType="DECIMAL" property="purplanMaterialNumber"/>
+        <result column="MATERIAL_ALLOCATED_WEIGHT" jdbcType="DECIMAL" property="materialAllocatedWeight"/>
+        <result column="MATERIAL_UNALLOCATED_WEIGHT" jdbcType="DECIMAL" property="materialUnallocatedWeight"/>
+        <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">
+        PURPLAN_PLAN_MATERIAL_ID, PLAN_ID, MATERIAL_ID, PURPLAN_MATERIAL_NUMBER, MATERIAL_ALLOCATED_WEIGHT,
+    MATERIAL_UNALLOCATED_WEIGHT, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+    INSERT_UPDATE_REMARK
+    </sql>
+    <sql id="columns_alias">
+        t.PURPLAN_PLAN_MATERIAL_ID, t.PLAN_ID, t.MATERIAL_ID, t.PURPLAN_MATERIAL_NUMBER,
+    t.MATERIAL_ALLOCATED_WEIGHT, t.MATERIAL_UNALLOCATED_WEIGHT, 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 AMSTRUCK_PURPLAN_MATERIAL
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM AMSTRUCK_PURPLAN_MATERIAL t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="purplanPlanMaterialId != null">
+                and PURPLAN_PLAN_MATERIAL_ID = #{purplanPlanMaterialId}
+            </if>
+            <if test="planId != null">
+                and PLAN_ID = #{planId}
+            </if>
+            <if test="materialId != null">
+                and MATERIAL_ID = #{materialId}
+            </if>
+            <if test="purplanMaterialNumber != null">
+                and PURPLAN_MATERIAL_NUMBER = #{purplanMaterialNumber}
+            </if>
+            <if test="materialAllocatedWeight != null">
+                and MATERIAL_ALLOCATED_WEIGHT = #{materialAllocatedWeight}
+            </if>
+            <if test="materialUnallocatedWeight != null">
+                and MATERIAL_UNALLOCATED_WEIGHT = #{materialUnallocatedWeight}
+            </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="purplanPlanMaterialId != null">
+                and PURPLAN_PLAN_MATERIAL_ID = #{purplanPlanMaterialId}
+            </if>
+            <if test="planId != null">
+                and PLAN_ID = #{planId}
+            </if>
+            <if test="materialId != null">
+                and MATERIAL_ID = #{materialId}
+            </if>
+            <if test="purplanMaterialNumber != null">
+                and PURPLAN_MATERIAL_NUMBER = #{purplanMaterialNumber}
+            </if>
+            <if test="materialAllocatedWeight != null">
+                and MATERIAL_ALLOCATED_WEIGHT = #{materialAllocatedWeight}
+            </if>
+            <if test="materialUnallocatedWeight != null">
+                and MATERIAL_UNALLOCATED_WEIGHT = #{materialUnallocatedWeight}
+            </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 AMSTRUCK_PURPLAN_MATERIAL
+        where PURPLAN_PLAN_MATERIAL_ID = #{purplanPlanMaterialId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from AMSTRUCK_PURPLAN_MATERIAL
+        where 1!=1
+        <if test="planId != null">
+            or PLAN_ID = #{planId}
+        </if>
+        <if test="materialId != null">
+            or MATERIAL_ID = #{materialId}
+        </if>
+        <if test="purplanMaterialNumber != null">
+            or PURPLAN_MATERIAL_NUMBER = #{purplanMaterialNumber}
+        </if>
+        <if test="materialAllocatedWeight != null">
+            or MATERIAL_ALLOCATED_WEIGHT = #{materialAllocatedWeight}
+        </if>
+        <if test="materialUnallocatedWeight != null">
+            or MATERIAL_UNALLOCATED_WEIGHT = #{materialUnallocatedWeight}
+        </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.AmstruckPurplanMaterial">
+        insert into AMSTRUCK_PURPLAN_MATERIAL (PURPLAN_PLAN_MATERIAL_ID, PLAN_ID, MATERIAL_ID,
+                                               PURPLAN_MATERIAL_NUMBER, MATERIAL_ALLOCATED_WEIGHT,
+                                               MATERIAL_UNALLOCATED_WEIGHT, INSERT_USERNAME,
+                                               INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                                               INSERT_UPDATE_REMARK)
+        values (#{purplanPlanMaterialId,jdbcType=DECIMAL}, #{planId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL},
+                #{purplanMaterialNumber,jdbcType=DECIMAL}, #{materialAllocatedWeight,jdbcType=DECIMAL},
+                #{materialUnallocatedWeight,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR},
+                #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+                #{insertUpdateRemark,jdbcType=VARCHAR})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.AmstruckPurplanMaterial">
+        insert into AMSTRUCK_PURPLAN_MATERIAL
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="purplanPlanMaterialId != null">
+                PURPLAN_PLAN_MATERIAL_ID,
+            </if>
+            <if test="planId != null">
+                PLAN_ID,
+            </if>
+            <if test="materialId != null">
+                MATERIAL_ID,
+            </if>
+            <if test="purplanMaterialNumber != null">
+                PURPLAN_MATERIAL_NUMBER,
+            </if>
+            <if test="materialAllocatedWeight != null">
+                MATERIAL_ALLOCATED_WEIGHT,
+            </if>
+            <if test="materialUnallocatedWeight != null">
+                MATERIAL_UNALLOCATED_WEIGHT,
+            </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="purplanPlanMaterialId != null">
+                #{purplanPlanMaterialId,jdbcType=DECIMAL},
+            </if>
+            <if test="planId != null">
+                #{planId,jdbcType=DECIMAL},
+            </if>
+            <if test="materialId != null">
+                #{materialId,jdbcType=DECIMAL},
+            </if>
+            <if test="purplanMaterialNumber != null">
+                #{purplanMaterialNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="materialAllocatedWeight != null">
+                #{materialAllocatedWeight,jdbcType=DECIMAL},
+            </if>
+            <if test="materialUnallocatedWeight != null">
+                #{materialUnallocatedWeight,jdbcType=DECIMAL},
+            </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.AmstruckPurplanMaterial">
+        update AMSTRUCK_PURPLAN_MATERIAL
+        set PLAN_ID                     = #{planId,jdbcType=DECIMAL},
+            MATERIAL_ID                 = #{materialId,jdbcType=DECIMAL},
+            PURPLAN_MATERIAL_NUMBER     = #{purplanMaterialNumber,jdbcType=DECIMAL},
+            MATERIAL_ALLOCATED_WEIGHT   = #{materialAllocatedWeight,jdbcType=DECIMAL},
+            MATERIAL_UNALLOCATED_WEIGHT = #{materialUnallocatedWeight,jdbcType=DECIMAL},
+            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 PURPLAN_PLAN_MATERIAL_ID = #{purplanPlanMaterialId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.AmstruckPurplanMaterial">
+        update AMSTRUCK_PURPLAN_MATERIAL
+        <set>
+            <if test="planId != null">
+                PLAN_ID = #{planId,jdbcType=DECIMAL},
+            </if>
+            <if test="materialId != null">
+                MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+            </if>
+            <if test="purplanMaterialNumber != null">
+                PURPLAN_MATERIAL_NUMBER = #{purplanMaterialNumber,jdbcType=DECIMAL},
+            </if>
+            <if test="materialAllocatedWeight != null">
+                MATERIAL_ALLOCATED_WEIGHT = #{materialAllocatedWeight,jdbcType=DECIMAL},
+            </if>
+            <if test="materialUnallocatedWeight != null">
+                MATERIAL_UNALLOCATED_WEIGHT = #{materialUnallocatedWeight,jdbcType=DECIMAL},
+            </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 PURPLAN_PLAN_MATERIAL_ID = #{purplanPlanMaterialId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where PURPLAN_PLAN_MATERIAL_ID = #{purplanPlanMaterialId,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 AMSTRUCK_PURPLAN_MATERIAL
+        (PURPLAN_PLAN_MATERIAL_ID,
+        PLAN_ID, MATERIAL_ID, PURPLAN_MATERIAL_NUMBER,
+        MATERIAL_ALLOCATED_WEIGHT, MATERIAL_UNALLOCATED_WEIGHT,
+        INSERT_USERNAME, INSERT_TIME,
+        UPDATE_USERNAME, UPDATE_TIME,
+        INSERT_UPDATE_REMARK)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.purplanPlanMaterialId,jdbcType=DECIMAL},
+        #{item.planId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL},
+        #{item.purplanMaterialNumber,jdbcType=DECIMAL},
+        #{item.materialAllocatedWeight,jdbcType=DECIMAL}, #{item.materialUnallocatedWeight,jdbcType=DECIMAL},
+        #{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 AMSTRUCK_PURPLAN_MATERIAL
+        set
+        PURPLAN_PLAN_MATERIAL_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.purplanPlanMaterialId,jdbcType=DECIMAL}
+        </foreach>
+        ,PLAN_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.planId,jdbcType=DECIMAL}
+        </foreach>
+        ,MATERIAL_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+        </foreach>
+        ,PURPLAN_MATERIAL_NUMBER=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.purplanMaterialNumber,jdbcType=DECIMAL}
+        </foreach>
+        ,MATERIAL_ALLOCATED_WEIGHT=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.materialAllocatedWeight,jdbcType=DECIMAL}
+        </foreach>
+        ,MATERIAL_UNALLOCATED_WEIGHT=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.materialUnallocatedWeight,jdbcType=DECIMAL}
+        </foreach>
+        ,INSERT_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_UPDATE_REMARK=
+        <foreach collection="list" item="item" index="index" separator=" " open="case PURPLAN_PLAN_MATERIAL_ID"
+                 close="end">
+            when #{item.purplanPlanMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+        </foreach>
+        where PURPLAN_PLAN_MATERIAL_ID in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item.purplanPlanMaterialId,jdbcType=DECIMAL}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from AMSTRUCK_PURPLAN_MATERIAL
+        where PURPLAN_PLAN_MATERIAL_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>
+        <if test="orderField == null  ">
+            order by "insertTime" desc
+        </if>
+    </sql>
+
+
+    <!--查询分解计划 -->
+    <select id="getDecomposedPlan" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+        *
+        from (
+        select
+        APO.PURCHASE_ORDER_ID "purchaseOrderId",
+        APM.PURPLAN_PLAN_MATERIAL_ID "purplanPlanMaterialId",
+        APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+        DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+        RM.MATERIAL_NAME "materialName",
+        AP.PLAN_NO "planNo",
+        RC.CARRIER_NAME "carrierName",
+        AP.MATERIAL_TOTAL_WEIGHT "materialTotalWeight",
+        APM.MATERIAL_ALLOCATED_WEIGHT "materialAllocatedWeight",
+        APM.MATERIAL_UNALLOCATED_WEIGHT "materialUnallocatedWeight",
+        AP.PLAN_TRUCK_TIME "planTruckTime",
+        RM.MATERIAL_ID "materialId",
+        AP.PLAN_INCOMING_TIME "planIncomingTime",
+        AP.PLAN_ID "planId",
+        AP.INSERT_TIME "insertTime"
+        from AMSTRUCK_PURPLAN AP
+        left join AMSTRUCK_PURPLAN_MATERIAL APM
+        on AP.PLAN_ID = APM.PLAN_ID
+        left join AMS_PURCHASE_ORDER APO
+        on AP.BATCH_ID = APO.BATCH_ID
+        left join DIL_BATCH DB
+        on AP.BATCH_ID = DB.BATCH_ID
+        left join RMS_MATERIAL RM
+        on RM.MATERIAL_ID = DB.MATERIAL_ID
+        left join RMS_CARRIER RC
+        on AP.CARRIER_ID = RC.CARRIER_ID
+        <where>
+            <if test="planId != null">
+                AP.PLAN_ID = #{planId}
+            </if>
+            <if test="planStatus != null">
+                and AP.PLAN_STATUS = #{planStatus}
+            </if>
+        </where>
+        )
+        <where>
+            <if test="purplanPlanMaterialId != null">
+
+                <foreach collection="purplanPlanMaterialId" item="item" open="(" separator="or" close=")">
+                    "purplanPlanMaterialId" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="purchaseOrderNo != null">
+                and
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" 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="planNo != null">
+                and
+                <foreach collection="planNo" item="item" open="(" separator="or" close=")">
+                    "planNo" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="carrierName != null">
+                and
+                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                    "carrierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialTotalWeight != null">
+                and
+                <foreach collection="materialTotalWeight" item="item" open="(" separator="or" close=")">
+                    "materialTotalWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="planTruckTime != null">
+                and
+                <foreach collection="planTruckTime" item="item" open="(" separator="or" close=")">
+                    "planTruckTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="lineDesc != null">
+                and
+                <foreach collection="lineDesc" item="item" open="(" separator="or" close=")">
+                    "lineDesc" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="planIncomingTime != null">
+                and
+                <foreach collection="planIncomingTime" item="item" open="(" separator="or" close=")">
+                    "planIncomingTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialAllocatedWeight != null">
+                and
+                <foreach collection="materialAllocatedWeight" item="item" open="(" separator="or" close=")">
+                    "materialAllocatedWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="materialUnallocatedWeight != null">
+                and
+                <foreach collection="materialUnallocatedWeight" item="item" open="(" separator="or" close=")">
+                    "materialUnallocatedWeight" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+    </select>
+
+    <!--获取未分配重量 已分配重量-->
+    <select id="getWeight" parameterType="int" resultType="java.util.LinkedHashMap">
+        select APM.MATERIAL_ALLOCATED_WEIGHT   "materialAllocatedWeight",
+               APM.MATERIAL_UNALLOCATED_WEIGHT "materialUnallocatedWeight"
+        from AMSTRUCK_PURPLAN_MATERIAL APM
+        where APM.PLAN_ID = #{planId}
+    </select>
+
+    <!--  获取最大ID值  -->
+    <select id="selectMaxId" resultType="java.math.BigDecimal">
+        select max(APM.PURPLAN_PLAN_MATERIAL_ID)
+        from AMSTRUCK_PURPLAN_MATERIAL APM
+    </select>
+
+<!--  通过计划Id查询子表主键ID -->
+    <select id="getChildIdByPlanId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+        select PURPLAN_PLAN_MATERIAL_ID
+        from AMSTRUCK_PURPLAN_MATERIAL
+        where PLAN_ID = #{planId}
+    </select>
+</mapper>

+ 103 - 0
src/main/resources/com/steerinfo/dil/mapper/DropDownMapper.xml

@@ -0,0 +1,103 @@
+<?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.DropDownMapper">
+
+<!--   下拉框  -->
+<select id="getDilBatch" 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="getCarrier" resultType="java.util.LinkedHashMap">
+    select
+        RC.CARRIER_ID "id",
+        RC.CARRIER_ID "value",
+        RC.CARRIER_NAME "label"
+    from
+        RMS_CARRIER RC
+</select>
+
+
+<select id="getLine" resultType="java.util.LinkedHashMap">
+    select
+        RL.LINE_ID "id",
+        RL.LINE_ID "value",
+        RL.LINE_DESC "label"
+    from
+        RMS_LINE RL
+</select>
+
+<!--   仓库下拉框  -->
+    <select id="getWarehouse" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+            RW.WAREHOUSE_ID "id",
+            RW.WAREHOUSE_ID "value",
+            RW.WAREHOUSE_NAME "label"
+        from
+            RMS_WAREHOUSE RW
+        <where>
+            <if test="type != null">
+                RW.WAREHOUSE_TYPE_ID = #{type}
+            </if>
+        </where>
+    </select>
+
+<!--    门岗下拉框  -->
+    <select id="getGatepost" resultType="java.util.LinkedHashMap">
+        select
+            RG.GATEPOST_ID "id",
+            RG.GATEPOST_ID "value",
+            RG.GATEPOST_NAME "label"
+        from
+            RMS_GATEPOST RG
+    </select>
+
+<!--    采购订单号下拉框 -->
+    <select id="getAPO" resultType="java.util.LinkedHashMap">
+        select
+            APO.PURCHASE_ORDER_ID "id",
+            APO.PURCHASE_ORDER_ID "value",
+            APO.PURCHASE_ORDER_NO "label"
+        from
+            AMS_PURCHASE_ORDER APO
+        ORDER BY PURCHASE_ORDER_ID DESC
+    </select>
+
+<!--    获取辅料物资 -->
+    <select id="getFuMaterial" parameterType="int" resultType="java.util.LinkedHashMap">
+        select
+            RM.MATERIAL_ID "id",
+            RM.MATERIAL_ID "value",
+            RM.MATERIAL_NAME "label"
+        from
+            RMS_MATERIAL RM
+        where RM.MATERIAL_TYPE_ID = #{type}
+    </select>
+
+<!--    获取辅料车辆 并且为空闲状态 -->
+    <select id="getFuCapacityId" resultType="java.util.LinkedHashMap">
+        select
+            RC.CAPACITY_ID "id",
+            RC.CAPACITY_ID "value",
+            RC.CAPACITY_NUMBER "label"
+        from
+            RMS_CAPACITY RC
+        where RC.CAPACITY_STATUS = 0 and RC.CARRIER_ID = 2
+    </select>
+
+<!--    获取所有的港口 -->
+    <select id="getPort" resultType="java.util.LinkedHashMap">
+        select
+            RP.PORT_ID "id",
+            RP.PORT_ID "value",
+            RP.PORT_NAME "label"
+        from
+            RMS_PORT RP
+    </select>
+</mapper>

+ 1249 - 0
src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMapper.xml

@@ -0,0 +1,1249 @@
+<?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.OmstruckOrderMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrder">
+        <id column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+        <result column="ORDER_PLAN_ID" jdbcType="DECIMAL" property="orderPlanId" />
+        <result column="ORDER_NUMBER" jdbcType="VARCHAR" property="orderNumber" />
+        <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+        <result column="ORDER_ISSUE_TIME" jdbcType="TIMESTAMP" property="orderIssueTime" />
+        <result column="ORDER_RECEIVE_STATUS" jdbcType="DECIMAL" property="orderReceiveStatus" />
+        <result column="ORDER_RECEIVE_REFUSE_TIME" jdbcType="TIMESTAMP" property="orderReceiveRefuseTime" />
+        <result column="ORDER_COMMUNICATION_DURATION" jdbcType="DECIMAL" property="orderCommunicationDuration" />
+        <result column="ORDER_STATUS" jdbcType="DECIMAL" property="orderStatus" />
+        <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="ORDER_TYPE" jdbcType="DECIMAL" property="orderType" />
+        <result column="ORDER_LINE_SEQUENCE" jdbcType="DECIMAL" property="orderLineSequence" />
+        <result column="LINE_ID" jdbcType="DECIMAL" property="lineId" />
+        <result column="ORDER_ENTRY_TIME" jdbcType="TIMESTAMP" property="orderEntryTime" />
+    </resultMap>
+    <sql id="columns">
+        ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS, 
+    ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION, ORDER_STATUS, INSERT_USERNAME, 
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETED, ORDER_TYPE, 
+    ORDER_LINE_SEQUENCE, LINE_ID, ORDER_ENTRY_TIME
+    </sql>
+    <sql id="columns_alias">
+        t.ORDER_ID, t.ORDER_PLAN_ID, t.ORDER_NUMBER, t.CAPACITY_ID, t.ORDER_ISSUE_TIME, t.ORDER_RECEIVE_STATUS, 
+    t.ORDER_RECEIVE_REFUSE_TIME, t.ORDER_COMMUNICATION_DURATION, t.ORDER_STATUS, t.INSERT_USERNAME, 
+    t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETED, 
+    t.ORDER_TYPE, t.ORDER_LINE_SEQUENCE, t.LINE_ID, t.ORDER_ENTRY_TIME
+    </sql>
+    <sql id="select">
+        SELECT <include refid="columns"/> FROM OMSTRUCK_ORDER
+    </sql>
+    <sql id="select_alias">
+        SELECT <include refid="columns_alias"/> FROM OMSTRUCK_ORDER t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="orderId != null">
+                and ORDER_ID = #{orderId}
+            </if>
+            <if test="orderPlanId != null">
+                and ORDER_PLAN_ID = #{orderPlanId}
+            </if>
+            <if test="orderNumber != null and orderNumber != ''">
+                and ORDER_NUMBER = #{orderNumber}
+            </if>
+            <if test="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="orderIssueTime != null">
+                and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
+            </if>
+            <if test="orderReceiveStatus != null">
+                and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
+            </if>
+            <if test="orderCommunicationDuration != null">
+                and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
+            </if>
+            <if test="orderStatus != null">
+                and ORDER_STATUS = #{orderStatus}
+            </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="orderType != null">
+                and ORDER_TYPE = #{orderType}
+            </if>
+            <if test="orderLineSequence != null">
+                and ORDER_LINE_SEQUENCE = #{orderLineSequence}
+            </if>
+            <if test="lineId != null">
+                and LINE_ID = #{lineId}
+            </if>
+            <if test="orderEntryTime != null">
+                and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="orderId != null">
+                and ORDER_ID = #{orderId}
+            </if>
+            <if test="orderPlanId != null">
+                and ORDER_PLAN_ID = #{orderPlanId}
+            </if>
+            <if test="orderNumber != null and orderNumber != ''">
+                and ORDER_NUMBER LIKE '%${orderNumber}%'
+            </if>
+            <if test="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="orderIssueTime != null">
+                and TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = #{orderIssueTime}
+            </if>
+            <if test="orderReceiveStatus != null">
+                and ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                and TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = #{orderReceiveRefuseTime}
+            </if>
+            <if test="orderCommunicationDuration != null">
+                and ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
+            </if>
+            <if test="orderStatus != null">
+                and ORDER_STATUS = #{orderStatus}
+            </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="orderType != null">
+                and ORDER_TYPE = #{orderType}
+            </if>
+            <if test="orderLineSequence != null">
+                and ORDER_LINE_SEQUENCE = #{orderLineSequence}
+            </if>
+            <if test="lineId != null">
+                and LINE_ID = #{lineId}
+            </if>
+            <if test="orderEntryTime != null">
+                and TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = #{orderEntryTime}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+        delete from OMSTRUCK_ORDER
+        where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from OMSTRUCK_ORDER
+        where 1!=1
+        <if test="orderPlanId != null">
+            or ORDER_PLAN_ID = #{orderPlanId}
+        </if>
+        <if test="orderNumber != null and orderNumber != ''">
+            or ORDER_NUMBER = #{orderNumber}
+        </if>
+        <if test="capacityId != null">
+            or CAPACITY_ID = #{capacityId}
+        </if>
+        <if test="orderIssueTime != null">
+            or TO_CHAR(ORDER_ISSUE_TIME,'yyyy-MM-dd') = '#{orderIssueTime}'
+        </if>
+        <if test="orderReceiveStatus != null">
+            or ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+        </if>
+        <if test="orderReceiveRefuseTime != null">
+            or TO_CHAR(ORDER_RECEIVE_REFUSE_TIME,'yyyy-MM-dd') = '#{orderReceiveRefuseTime}'
+        </if>
+        <if test="orderCommunicationDuration != null">
+            or ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration}
+        </if>
+        <if test="orderStatus != null">
+            or ORDER_STATUS = #{orderStatus}
+        </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="orderType != null">
+            or ORDER_TYPE = #{orderType}
+        </if>
+        <if test="orderLineSequence != null">
+            or ORDER_LINE_SEQUENCE = #{orderLineSequence}
+        </if>
+        <if test="lineId != null">
+            or LINE_ID = #{lineId}
+        </if>
+        <if test="orderEntryTime != null">
+            or TO_CHAR(ORDER_ENTRY_TIME,'yyyy-MM-dd') = '#{orderEntryTime}'
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        insert into OMSTRUCK_ORDER (ORDER_ID, ORDER_PLAN_ID, ORDER_NUMBER,
+                                    CAPACITY_ID, ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
+                                    ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
+                                    ORDER_STATUS, INSERT_USERNAME, INSERT_TIME,
+                                    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                                    DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
+                                    LINE_ID, ORDER_ENTRY_TIME)
+        values (#{orderId,jdbcType=DECIMAL}, #{orderPlanId,jdbcType=DECIMAL}, #{orderNumber,jdbcType=VARCHAR},
+                #{capacityId,jdbcType=DECIMAL}, #{orderIssueTime,jdbcType=TIMESTAMP}, #{orderReceiveStatus,jdbcType=DECIMAL},
+                #{orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{orderCommunicationDuration,jdbcType=DECIMAL},
+                #{orderStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{deleted,jdbcType=DECIMAL}, #{orderType,jdbcType=DECIMAL}, #{orderLineSequence,jdbcType=DECIMAL},
+                #{lineId,jdbcType=DECIMAL}, #{orderEntryTime,jdbcType=TIMESTAMP})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        insert into OMSTRUCK_ORDER
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">
+                ORDER_ID,
+            </if>
+            <if test="orderPlanId != null">
+                ORDER_PLAN_ID,
+            </if>
+            <if test="orderNumber != null">
+                ORDER_NUMBER,
+            </if>
+            <if test="capacityId != null">
+                CAPACITY_ID,
+            </if>
+            <if test="orderIssueTime != null">
+                ORDER_ISSUE_TIME,
+            </if>
+            <if test="orderReceiveStatus != null">
+                ORDER_RECEIVE_STATUS,
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                ORDER_RECEIVE_REFUSE_TIME,
+            </if>
+            <if test="orderCommunicationDuration != null">
+                ORDER_COMMUNICATION_DURATION,
+            </if>
+            <if test="orderStatus != null">
+                ORDER_STATUS,
+            </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="orderType != null">
+                ORDER_TYPE,
+            </if>
+            <if test="orderLineSequence != null">
+                ORDER_LINE_SEQUENCE,
+            </if>
+            <if test="lineId != null">
+                LINE_ID,
+            </if>
+            <if test="orderEntryTime != null">
+                ORDER_ENTRY_TIME,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="orderId != null">
+                #{orderId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderPlanId != null">
+                #{orderPlanId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderNumber != null">
+                #{orderNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityId != null">
+                #{capacityId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderIssueTime != null">
+                #{orderIssueTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderReceiveStatus != null">
+                #{orderReceiveStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderCommunicationDuration != null">
+                #{orderCommunicationDuration,jdbcType=DECIMAL},
+            </if>
+            <if test="orderStatus != null">
+                #{orderStatus,jdbcType=DECIMAL},
+            </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="orderType != null">
+                #{orderType,jdbcType=DECIMAL},
+            </if>
+            <if test="orderLineSequence != null">
+                #{orderLineSequence,jdbcType=DECIMAL},
+            </if>
+            <if test="lineId != null">
+                #{lineId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderEntryTime != null">
+                #{orderEntryTime,jdbcType=TIMESTAMP},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        update OMSTRUCK_ORDER
+        set ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
+            ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
+            CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+            ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
+            ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
+            ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
+            ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
+            ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
+            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},
+            ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
+            ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
+            LINE_ID = #{lineId,jdbcType=DECIMAL},
+            ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP}
+        where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrder">
+        update OMSTRUCK_ORDER
+        <set>
+            <if test="orderPlanId != null">
+                ORDER_PLAN_ID = #{orderPlanId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderNumber != null">
+                ORDER_NUMBER = #{orderNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="capacityId != null">
+                CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderIssueTime != null">
+                ORDER_ISSUE_TIME = #{orderIssueTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderReceiveStatus != null">
+                ORDER_RECEIVE_STATUS = #{orderReceiveStatus,jdbcType=DECIMAL},
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                ORDER_RECEIVE_REFUSE_TIME = #{orderReceiveRefuseTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="orderCommunicationDuration != null">
+                ORDER_COMMUNICATION_DURATION = #{orderCommunicationDuration,jdbcType=DECIMAL},
+            </if>
+            <if test="orderStatus != null">
+                ORDER_STATUS = #{orderStatus,jdbcType=DECIMAL},
+            </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="orderType != null">
+                ORDER_TYPE = #{orderType,jdbcType=DECIMAL},
+            </if>
+            <if test="orderLineSequence != null">
+                ORDER_LINE_SEQUENCE = #{orderLineSequence,jdbcType=DECIMAL},
+            </if>
+            <if test="lineId != null">
+                LINE_ID = #{lineId,jdbcType=DECIMAL},
+            </if>
+            <if test="orderEntryTime != null">
+                ORDER_ENTRY_TIME = #{orderEntryTime,jdbcType=TIMESTAMP},
+            </if>
+        </set>
+        where ORDER_ID = #{orderId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+        <include refid="select"/>
+        where ORDER_ID = #{orderId,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 OMSTRUCK_ORDER
+        (ORDER_ID,
+        ORDER_PLAN_ID, ORDER_NUMBER, CAPACITY_ID,
+        ORDER_ISSUE_TIME, ORDER_RECEIVE_STATUS,
+        ORDER_RECEIVE_REFUSE_TIME, ORDER_COMMUNICATION_DURATION,
+        ORDER_STATUS, INSERT_USERNAME,
+        INSERT_TIME, UPDATE_USERNAME,
+        UPDATE_TIME, INSERT_UPDATE_REMARK,
+        DELETED, ORDER_TYPE, ORDER_LINE_SEQUENCE,
+        LINE_ID, ORDER_ENTRY_TIME)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.orderId,jdbcType=DECIMAL},
+        #{item.orderPlanId,jdbcType=DECIMAL}, #{item.orderNumber,jdbcType=VARCHAR}, #{item.capacityId,jdbcType=DECIMAL},
+        #{item.orderIssueTime,jdbcType=TIMESTAMP}, #{item.orderReceiveStatus,jdbcType=DECIMAL},
+        #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}, #{item.orderCommunicationDuration,jdbcType=DECIMAL},
+        #{item.orderStatus,jdbcType=DECIMAL}, #{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.orderType,jdbcType=DECIMAL}, #{item.orderLineSequence,jdbcType=DECIMAL},
+        #{item.lineId,jdbcType=DECIMAL}, #{item.orderEntryTime,jdbcType=TIMESTAMP} from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update OMSTRUCK_ORDER
+        set
+        ORDER_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_PLAN_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderPlanId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_NUMBER=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderNumber,jdbcType=VARCHAR}
+        </foreach>
+        ,CAPACITY_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_ISSUE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderIssueTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,ORDER_RECEIVE_STATUS=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveStatus,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_RECEIVE_REFUSE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderReceiveRefuseTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,ORDER_COMMUNICATION_DURATION=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderCommunicationDuration,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_STATUS=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderStatus,jdbcType=DECIMAL}
+        </foreach>
+        ,INSERT_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,INSERT_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,UPDATE_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,UPDATE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,INSERT_UPDATE_REMARK=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+        </foreach>
+        ,DELETED=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_TYPE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderType,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_LINE_SEQUENCE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderLineSequence,jdbcType=DECIMAL}
+        </foreach>
+        ,LINE_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.lineId,jdbcType=DECIMAL}
+        </foreach>
+        ,ORDER_ENTRY_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_ID" close="end">
+            when #{item.orderId,jdbcType=DECIMAL} then #{item.orderEntryTime,jdbcType=TIMESTAMP}
+        </foreach>
+        where ORDER_ID in
+        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+            #{item.orderId,jdbcType=DECIMAL}
+        </foreach>
+    </update>
+    <delete id="batchDelete" parameterType="java.util.List">
+        delete from OMSTRUCK_ORDER
+        where 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="getAllTruckOrder" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+        *
+        from
+        (
+        select
+                OO.ORDER_ID "orderId",
+                APO.PURCHASE_ORDER_ID "purchaseOrderId",
+                AP.PLAN_ID "planId",
+                APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+                RM.MATERIAL_NAME "materialName",
+                AP.PLAN_NO "planNo",
+                RC.CAPACITY_NUMBER "capacityNumber",
+                RC.CAPACITY_ID "capacityId",
+                RCD.DRIVER_NAME "driverName",
+                OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
+                AP.PLAN_TRUCK_TIME "planTruckTime",
+                AP.PLAN_INCOMING_TIME "planIncomingTime",
+                OO.INSERT_USERNAME "insertUsername",
+                OO.INSERT_TIME "insertTime",
+                OO.ORDER_NUMBER "orderNumber",
+                RW.WAREHOUSE_NAME "warehouseName", --卸货点
+                OO.ORDER_ENTRY_TIME "orderEntryTime", --进厂时间
+                RS.SUPPLIER_NAME "supplierName",  --发货单位
+                RCSE.CONSIGNEE_COMPANY_NAME "consigneeCompanyName" --收货单位
+
+        from OMSTRUCK_ORDER OO
+        left join AMS_PURCHASE_ORDER APO
+        on OO.ORDER_PLAN_ID = APO.PURCHASE_ORDER_ID
+        left join AMSTRUCK_PURPLAN AP
+        on AP.BATCH_ID = APO.BATCH_ID and AP.PLAN_STATUS != 3
+        left join RMS_CAPACITY RC
+        on RC.CAPACITY_ID = OO.CAPACITY_ID
+        left join RMS_DRIVER_CAPACITY RDC
+        on RDC.CAPACITY_ID = RC.CAPACITY_ID
+        left join RMS_CAR_DRIVER RCD
+        on RCD.DRIVER_ID = RDC.DRIVER_ID
+        left join OMSTRUCK_ORDER_MATERIAL OOM
+        on OOM.ORDER_ID = OO.ORDER_ID
+        left join RMS_MATERIAL RM
+        on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        left join RMS_LINE RL
+        on OO.LINE_ID = RL.LINE_ID
+        left join RMS_LINE_SEGEMNT RLS --查找卸货点
+        on RLS.LINE_ID = RL.LINE_ID and RLS.SEGMENT_END_NODE_TYPE = 3
+        left join RMS_WAREHOUSE RW
+        on RLS.SEGMENT_END_NODE_ID = RW.WAREHOUSE_ID
+        left join RMS_SUPPLIER RS
+        on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+        left join RMS_CONSIGNEE RCSE
+        on APO.RECEIVE_UNIT_ID = RCSE.CONSIGNEE_ID
+        <where>
+            <if test="orderStatus != null">
+                OO.ORDER_STATUS = #{orderStatus}
+            </if>
+            <if test="planId != null ">
+                and AP.PLAN_ID = #{planId}
+            </if>
+            <if test="orderType != null">
+                and ORDER_TYPE = #{orderType}
+            </if>
+        </where>
+        )
+        <where>
+            <if test="materialName != null">
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderMaterialWeight != null">
+                and
+                <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+                    "orderMaterialWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="planNo != null">
+                and
+                <foreach collection="planNo" item="item" open="(" separator="or" close=")">
+                    "planNo" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="capacityNumber != null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="driverName != null">
+                and
+                <foreach collection="driverName" item="item" open="(" separator="or" close=")">
+                    "driverName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="planTruckTime != null">
+                and
+                <foreach collection="planTruckTime" item="item" open="(" separator="or" close=")">
+                    "planTruckTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="planIncomingTime != null">
+                and
+                <foreach collection="planIncomingTime" item="item" open="(" separator="or" close=")">
+                    "planIncomingTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="insertUsername != null">
+                and
+                <foreach collection="insertUsername" item="item" open="(" separator="or" close=")">
+                    "insertUsername" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="insertTime != null">
+                and
+                <foreach collection="insertTime" item="item" open="(" separator="or" close=")">
+                    "insertTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderEntryTime != null">
+                and
+                <foreach collection="orderEntryTime" item="item" open="(" separator="or" close=")">
+                    "orderEntryTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="supplierName != null">
+                and
+                <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+                    "supplierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="consigneeCompanyName != null">
+                and
+                <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
+                    "consigneeCompanyName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy">
+        </include>
+        <if test="orderField == null  ">
+            order by "insertTime" desc
+        </if>
+    </select>
+
+    <!--  获取最大ID值  -->
+    <select id="selectMaxId" resultType="java.math.BigDecimal">
+        select max(OO.ORDER_ID)
+        from OMSTRUCK_ORDER OO
+    </select>
+
+    <!--  通过运输订单Id查询运输订单号 -->
+    <select id="getOrderNumberByOrderId" parameterType="int" resultType="string">
+        select OO.ORDER_NUMBER "orderNumber"
+        from OMSTRUCK_ORDER OO
+        where OO.ORDER_ID = #{orderId}
+    </select>
+
+    <!--  获取所有的运力信息 -->
+    <select id="getAllCapacity" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+               *
+        from
+             (
+        select
+            RC.CAPACITY_ID "capacityId",
+            RC.CAPACITY_NUMBER "capacityNumber",
+            RCT.CAPACITY_TYPE_NAME "capacityTypeName",
+            RC.CAPACITY_CORLOR "capacityCorlor",
+            RC2.CARRIER_NAME "carrierName",
+            RC.CAPACITY_OWNERIS "capacityOwneris",
+            RC.CAPACITY_BLACKLIST "capacityBlacklist",
+            RC.CAPACITY_VIP "capacityVip",
+            RC.INSERT_TIME "insertTime"
+        from RMS_CAPACITY RC
+        left join RMS_CAPACITY_TYPE RCT
+        on RC.CAPACITY_TYPE_ID = RCT.CAPACITY_TYPE_ID
+        left join RMS_CARRIER RC2
+        on RC.CARRIER_ID = RC2.CARRIER_ID
+        <where>
+            <if test="capacityTypeId != null">
+                RC.CAPACITY_TYPE_ID = #{capacityTypeId}
+            </if>
+            <if test="capacityStatus != null">
+                and RC.CAPACITY_STATUS = #{capacityStatus}
+            </if>
+            <if test="carrierId != null">
+                and RC.CARRIER_ID = #{carrierId}
+            </if>
+        </where>
+        )
+        <where>
+            <if test="capacityNumber != null">
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+
+            <if test="capacityCorlor != null">
+                and
+                <foreach collection="capacityCorlor" item="item" open="(" separator="or" close=")">
+                    "capacityCorlor" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="carrierName != null">
+                and
+                <foreach collection="carrierName" item="item" open="(" separator="or" close=")">
+                    "carrierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="capacityTypeName != null">
+                and
+                <foreach collection="capacityTypeName" item="item" open="(" separator="or" close=")">
+                    "capacityTypeName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="capacityBlacklist != null">
+                and
+                <foreach collection="capacityBlacklist" item="item" open="(" separator="or" close=")">
+                    "capacityBlacklist" like '%${item}%'
+                </foreach>
+            </if>
+
+            <if test="capacityOwneris != null">
+                and
+                <foreach collection="capacityOwneris" item="item" open="(" separator="or" close=")">
+                    "capacityOwneris" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="capacityVip != null">
+                and
+                <foreach collection="capacityVip" item="item" open="(" separator="or" close=")">
+                    "capacityVip" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy">
+        </include>
+        <if test="orderField == null  ">
+            order by "insertTime" desc
+        </if>
+    </select>
+
+    <!--  通过Id查询派发时间 -->
+    <select id="getInsertTimeById" parameterType="int" resultType="java.util.Date">
+        select ORDER_ISSUE_TIME
+        from OMSTRUCK_ORDER
+        where ORDER_ID = #{orderId}
+    </select>
+
+    <!--  通过车牌号匹配运力Id -->
+    <select id="getCapacityIdByCapacityNum" parameterType="string" resultType="java.math.BigDecimal">
+        select CAPACITY_ID
+        from RMS_CAPACITY
+        where CAPACITY_NUMBER = #{capacityNumber}
+    </select>
+
+<!--  通过运输订单ID 或运输订单号 查询 运力ID  -->
+    <select id="getCapacityIdByOrderOrNum" parameterType="java.util.Map" resultType="java.math.BigDecimal">
+        select CAPACITY_ID
+        from OMSTRUCK_ORDER
+        <where>
+            <if test="orderId != null">
+                ORDER_ID = #{orderId}
+            </if>
+            <if test="orderNumber != null">
+                and ORDER_NUMBER = #{orderNumber}
+            </if>
+        </where>
+
+    </select>
+
+    <!--  通过运力ID 或车牌号 修改 运力状态  -->
+    <update id="updateCapacityByCarIdOrNum" parameterType="java.util.Map">
+        update RMS_CAPACITY RC
+        set RC.CAPACITY_STATUS = #{capacityStatus}
+        where
+              <if test="capacityId != null">
+                  RC.CAPACITY_ID = #{capacityId}
+              </if>
+            <if test="capacityNumber != null">
+                  RC.CAPACITY_NUMBER = #{capacityNumber}
+            </if>
+    </update>
+
+    <!-- 通过运力ID 查询司机接单数据  、通过运单号查询所有运单信息-->
+    <select id="getTruckOrderByCapacityNum" parameterType="java.util.Map" resultType="java.util.Map">
+
+        select
+        *
+        from(
+        select
+        OO.ORDER_ID "orderId",
+        OO.ORDER_NUMBER "orderNumber",
+        RC.CAPACITY_NUMBER "capacityNumber",
+        RM.MATERIAL_NAME "materialName",
+        OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
+        OO.ORDER_RECEIVE_REFUSE_TIME "orderReceiveRefuseTime",
+        <include refid="columnSql">
+        </include>
+        AP.PLAN_INCOMING_TIME "entryTime"
+        from OMSTRUCK_ORDER OO
+        left join AMS_PURCHASE_ORDER APO
+        on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+        left join AMSTRUCK_PURPLAN AP
+        on AP.BATCH_ID = APO.BATCH_ID
+        left join RMS_CAPACITY RC --车牌号
+        on RC.CAPACITY_ID = OO.CAPACITY_ID
+        left join OMSTRUCK_ORDER_MATERIAL OOM --物资重量
+        on OOM.ORDER_ID = OO.ORDER_ID
+        left join RMS_MATERIAL RM --物资名称
+        on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        left join RMS_LINE RL
+        on RL.LINE_ID = OO.LINE_ID
+        <include refid="placeSql">
+        </include>
+        <where>
+            <if test="capacityId != null">
+                OO.CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="orderStatus != null">
+                and OO.ORDER_STATUS = #{orderStatus}
+            </if>
+            <if test="orderId != null">
+                and OO.ORDER_ID = #{orderId}
+            </if>
+            <if test="orderTypee != null">
+                and OO.ORDER_TYPE = #{orderTypee}
+            </if>
+            <if test="orderReceiveStatus != null">
+                and OO.ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+            </if>
+        </where>
+        )
+        <where>
+            <if test="orderNumber != null">
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" 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="orderMaterialWeight != null">
+                and
+                <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+                    "orderMaterialWeight" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderReceiveRefuseTime != null">
+                and
+                <foreach collection="orderReceiveRefuseTime" item="item" open="(" separator="or" close=")">
+                    "orderReceiveRefuseTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="entryTime != null">
+                and
+                <foreach collection="entryTime" item="item" open="(" separator="or" close=")">
+                    "entryTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="gatepostName1 != null">
+                and
+                <foreach collection="gatepostName1" item="item" open="(" separator="or" close=")">
+                    "gatepostName1" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="gatepostName2 != null">
+                and
+                <foreach collection="gatepostName2" item="item" open="(" separator="or" close=")">
+                    "gatepostName2" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="truckCalculateNumber != null">
+                and
+                <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="warehouseName != null">
+                and
+                <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                    "warehouseName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="truckCalculateNum != null">
+                and
+                <foreach collection="truckCalculateNum" item="item" open="(" separator="or" close=")">
+                    "truckCalculateNum" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy">
+        </include>
+        <if test="orderField == null  ">
+            order by "orderReceiveRefuseTime" desc
+        </if>
+    </select>
+
+    <!-- 查询五个门岗名称sql片段 -->
+    <sql id="columnSql">
+    RG1.GATEPOST_NAME "gatepostName1",
+     RG2.GATEPOST_NAME "gatepostName2",
+     RTC1.TRUCK_CALCULATE_NUMBER "truckCalculateNumber",
+     RW.WAREHOUSE_NAME    "warehouseName",
+     RTC2.TRUCK_CALCULATE_NUMBER "truckCalculateNum",
+    </sql>
+
+    <sql id="placeSql">
+    left join RMS_GATEPOST RG1 --进厂门岗
+    on RG1.GATEPOST_ID = RL.LINE_START_NODE_ID
+    left join RMS_GATEPOST RG2 --出厂门岗
+    on RG2.GATEPOST_ID = RL.LINE_END_NODE_ID
+
+    left join RMS_LINE_SEGEMNT RLS1
+    on RL.LINE_ID = RLS1.LINE_ID and RLS1.SEGMENT_END_NODE_TYPE = 1
+    left join RMS_TRUCK_CALCULATE RTC1 -- 计毛汽车衡
+    on RLS1.SEGMENT_END_NODE_ID = RTC1.TRUCK_CALCULATE_ID
+
+    left join RMS_LINE_SEGEMNT RLS2
+    on RL.LINE_ID = RLS2.LINE_ID and RLS2.SEGMENT_END_NODE_TYPE = 3
+    left join RMS_WAREHOUSE RW -- 卸货仓库
+    on RW.WAREHOUSE_ID = RLS2.SEGMENT_END_NODE_ID
+
+    left join RMS_LINE_SEGEMNT RLS3
+    on RL.LINE_ID = RLS3.LINE_ID and RLS3.SEGMENT_END_NODE_TYPE = 2
+    left join RMS_TRUCK_CALCULATE RTC2 -- 计皮汽车衡
+    on RLS3.SEGMENT_END_NODE_ID = RTC2.TRUCK_CALCULATE_ID
+    </sql>
+    <!--  通过运力ID 查询司机所有已拒绝已接收的订单 -->
+    <select id="getReceiveRefuseOrderByCapacityId" parameterType="java.util.Map" resultType="java.util.Map">
+        select OO.ORDER_ID     "orderId",
+               OO.ORDER_NUMBER "orderNumber"
+        from OMSTRUCK_ORDER OO
+        where CAPACITY_ID = #{capacityId}
+          and ORDER_RECEIVE_STATUS = 0
+
+    </select>
+
+    <!-- 查询实绩流程 -->
+    <select id="selectPlaceAndTime" parameterType="DECIMAL" resultType="java.util.Map">
+        SELECT
+               erg.GATEPOST_NAME            as "entryGatepost",
+               ter.RESULT_ENTRY_GATE_TIME   as "entryTime",
+               grtc.TRUCK_CALCULATE_NUMBER  as "grossCalculate",
+               twr.RESULT_GROSS_WEIGHT_TIME as "grossTime",
+               rw.WAREHOUSE_NAME            as "unloadWarhouse",
+               tur.RESULT_START_TIME        as "unloadTime",
+               trtc.TRUCK_CALCULATE_NUMBER  as "tareCalculate",
+               twr.RESULT_TARE_WEIGHT_TIME  as "tareTime",
+               lrg.GATEPOST_NAME            as "leaveGatepost",
+               tlfr.RESULT_OUT_GATE_TIME    as "outTime",
+               oo.ORDER_LINE_SEQUENCE       as "orderLineSequence"
+        FROM OMSTRUCK_ORDER OO
+                 LEFT JOIN TMSTRUCK_TOTAL_RESULT TTR
+                           ON TTR.ORDER_ID = OO.ORDER_ID
+                 LEFT JOIN TMSTRUCK_ENFACTORY_RESULT TER
+                           ON TER.RESULT_TOTAL_ID = TER.RESULT_TOTAL_ID
+                 LEFT JOIN RMS_GATEPOST ERG  --进厂门岗
+                           ON ERG.GATEPOST_ID = TER.GATEPOST_ID
+                 LEFT JOIN TMSTRUCK_WEIGHT_RESULT TWR
+                           ON TTR.RESULT_TOTAL_ID = TWR.RESULT_TOTAL_ID
+                 LEFT JOIN RMS_TRUCK_CALCULATE GRTC --毛重汽车衡
+                           ON TWR.RESULT_GROSS_PLACE_ID = GRTC.TRUCK_CALCULATE_ID
+                 LEFT JOIN RMS_TRUCK_CALCULATE TRTC  --皮重汽车衡
+                           ON TWR.RESULT_TARE_PLACE_ID = TRTC.TRUCK_CALCULATE_ID
+                 LEFT JOIN TMSTRUCK_UNLOAD_RESULT TUR
+                           ON TTR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID
+                 LEFT JOIN RMS_WAREHOUSE RW --卸货点
+                           ON RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
+                 LEFT JOIN TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
+                           ON TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
+                 LEFT JOIN RMS_GATEPOST LRG  --出厂门岗
+                           ON LRG.GATEPOST_ID = TLFR.GATEPOST_ID
+        WHERE RW.WAREHOUSE_TYPE_ID = 3
+          AND OO.ORDER_ID = #{orderId}
+    </select>
+
+    <!--  通过运输订单ID查询运输订单相关信息 -->
+    <select id="getOrderByOrderId" parameterType="java.math.BigDecimal" resultType="java.util.Map">
+        SELECT
+               APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+               RC.CAPACITY_NUMBER "capacityNumber",
+               RM.MATERIAL_ID "materialId",
+               OO.ORDER_ENTRY_TIME "orderEntryTime"
+        FROM OMSTRUCK_ORDER OO
+                 LEFT JOIN RMS_CAPACITY RC
+                     ON OO.CAPACITY_ID = RC.CAPACITY_ID
+                 left join AMS_PURCHASE_ORDER APO
+                     on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                 left join OMSTRUCK_ORDER_MATERIAL OOM
+                     on OOM.ORDER_ID = OO.ORDER_ID
+                 left join RMS_MATERIAL RM
+                     on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        WHERE OO.ORDER_ID = #{orderId}
+    </select>
+
+    <!--  通过运输订单号查询各路段预设作业点 以及总实绩ID -->
+    <select id="getPointIdByOrderNum" parameterType="string" resultType="java.util.Map">
+        select
+            RL.LINE_START_NODE_ID "lineStartNodeId",
+            RL.LINE_END_NODE_ID     "lineEndNodeId",
+            RLS1.SEGMENT_END_NODE_ID "truckCalculateIdMao",
+            RLS2.SEGMENT_END_NODE_ID "truckCalculateIdPi",
+            RLS3.SEGMENT_END_NODE_ID "resultUnloadPlaceId",
+            TTR.RESULT_TOTAL_ID "resultTotalId"
+
+        from OMSTRUCK_ORDER OO
+                 left join RMS_LINE RL
+                           on RL.LINE_ID = OO.LINE_ID
+
+                 left join TMSTRUCK_TOTAL_RESULT TTR
+                           on TTR.ORDER_ID = OO.ORDER_ID
+
+                 left join RMS_LINE_SEGEMNT RLS1 --查询计毛汽车衡
+                           on RL.LINE_ID = RLS1.LINE_ID and RLS1.SEGMENT_END_NODE_TYPE = 1
+
+                 left join RMS_LINE_SEGEMNT RLS2 --查询计皮汽车衡
+                           on RL.LINE_ID = RLS2.LINE_ID and RLS2.SEGMENT_END_NODE_TYPE = 2
+
+                 left join RMS_LINE_SEGEMNT RLS3 --查询卸货点
+                           on RL.LINE_ID = RLS3.LINE_ID and RLS3.SEGMENT_END_NODE_TYPE = 3
+
+            where OO.ORDER_NUMBER = #{orderNumber}
+    </select>
+
+<!--  查询运输派单信息  -->
+    <select id="getTransportDispatch" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+
+        select
+        *
+        from(
+
+            select
+                APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+                RS.SUPPLIER_NAME "supplierName",
+                RCON.CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
+                RW.WAREHOUSE_NAME "warehouseName",
+                RCON.CONSIGNEE_CONTACT_NAME "consigneeContactName",
+                RCON.CONSIGNEE_CONTACT_TEL "consigneeContactTel",
+                APO.PUCHASE_ORDER_DELIVERY_DATE "puchaseOrderDeliveryDate",
+                RM.MATERIAL_NAME "materialName",
+                OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
+                OO.ORDER_ISSUE_TIME "orderIssueTime",
+                OO.ORDER_RECEIVE_REFUSE_TIME "orderReceiveRefuseTime"
+
+            from OMSTRUCK_ORDER OO
+            left join AMS_PURCHASE_ORDER APO
+            on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+            left join OMSTRUCK_ORDER_MATERIAL OOM
+            on OOM.ORDER_ID = OO.ORDER_ID
+            left join RMS_MATERIAL RM
+            on RM.MATERIAL_ID = OOM.MATERIAL_ID
+            left join RMS_SUPPLIER RS
+            on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+            left join RMS_CONSIGNEE RCON
+            on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
+            left join RMS_LINE_SEGEMNT RLS
+            on RLS.LINE_ID = OO.LINE_ID and RLS.SEGMENT_END_NODE_TYPE = 3
+            left join RMS_WAREHOUSE RW
+            on RW.WAREHOUSE_ID = RLS.SEGMENT_END_NODE_ID
+            <where>
+                <if test="orderStatus != null">
+                    OO.ORDER_STATUS = #{orderStatus}
+                </if>
+                <if test="orderType != null">
+                    and OO.ORDER_TYPE = #{orderType}
+                </if>
+                <if test="orderReceiveStatus != null">
+                    and OO.ORDER_RECEIVE_STATUS = #{orderReceiveStatus}
+                </if>
+            </where>
+        )
+    <where>
+        <if test="purchaseOrderNo != null">
+            <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                "purchaseOrderNo" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="supplierName != null">
+            and
+            <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+                "supplierName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="consigneeCompanyName != null">
+            and
+            <foreach collection="consigneeCompanyName" item="item" open="(" separator="or" close=")">
+                "consigneeCompanyName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="warehouseName != null">
+            and
+            <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+                "warehouseName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="consigneeContactName != null">
+            and
+            <foreach collection="consigneeContactName" item="item" open="(" separator="or" close=")">
+                "consigneeContactName" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="consigneeContactTel != null">
+            and
+            <foreach collection="consigneeContactTel" item="item" open="(" separator="or" close=")">
+                "consigneeContactTel" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="puchaseOrderDeliveryDate != null">
+            and
+            <foreach collection="puchaseOrderDeliveryDate" item="item" open="(" separator="or" close=")">
+                "puchaseOrderDeliveryDate" 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="orderMaterialWeight != null">
+            and
+            <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+                "orderMaterialWeight" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="orderReceiveRefuseTime != null">
+            and
+            <foreach collection="orderReceiveRefuseTime" item="item" open="(" separator="or" close=")">
+                "orderReceiveRefuseTime" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="orderIssueTime != null">
+            and
+            <foreach collection="orderIssueTime" item="item" open="(" separator="or" close=")">
+                "orderIssueTime" like '%${item}%'
+            </foreach>
+        </if>
+    </where>
+    <include refid="orderBy">
+    </include>
+        <if test="orderField == null  ">
+            order by "orderReceiveRefuseTime" desc
+        </if>
+    </select>
+
+</mapper>

+ 363 - 0
src/main/resources/com/steerinfo/dil/mapper/OmstruckOrderMaterialMapper.xml

@@ -0,0 +1,363 @@
+<?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.OmstruckOrderMaterialMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    <id column="ORDER_MATERIAL_ID" jdbcType="DECIMAL" property="orderMaterialId" />
+    <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+    <result column="MATERIAL_ID" jdbcType="DECIMAL" property="materialId" />
+    <result column="ORDER_MATERIAL_NUMBER" jdbcType="DECIMAL" property="orderMaterialNumber" />
+    <result column="ORDER_MATERIAL_WEIGHT" jdbcType="DECIMAL" property="orderMaterialWeight" />
+    <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">
+    ORDER_MATERIAL_ID, ORDER_ID, MATERIAL_ID, ORDER_MATERIAL_NUMBER, ORDER_MATERIAL_WEIGHT, 
+    INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.ORDER_MATERIAL_ID, t.ORDER_ID, t.MATERIAL_ID, t.ORDER_MATERIAL_NUMBER, t.ORDER_MATERIAL_WEIGHT, 
+    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 OMSTRUCK_ORDER_MATERIAL
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM OMSTRUCK_ORDER_MATERIAL t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="orderMaterialId != null">
+        and ORDER_MATERIAL_ID = #{orderMaterialId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="orderMaterialNumber != null">
+        and ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
+      </if>
+      <if test="orderMaterialWeight != null">
+        and ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
+      </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="orderMaterialId != null">
+        and ORDER_MATERIAL_ID = #{orderMaterialId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="materialId != null">
+        and MATERIAL_ID = #{materialId}
+      </if>
+      <if test="orderMaterialNumber != null">
+        and ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
+      </if>
+      <if test="orderMaterialWeight != null">
+        and ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
+      </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 OMSTRUCK_ORDER_MATERIAL
+    where ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from OMSTRUCK_ORDER_MATERIAL
+    where 1!=1 
+      <if test="orderId != null">
+        or ORDER_ID = #{orderId}
+      </if>
+      <if test="materialId != null">
+        or MATERIAL_ID = #{materialId}
+      </if>
+      <if test="orderMaterialNumber != null">
+        or ORDER_MATERIAL_NUMBER = #{orderMaterialNumber}
+      </if>
+      <if test="orderMaterialWeight != null">
+        or ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight}
+      </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.OmstruckOrderMaterial">
+    insert into OMSTRUCK_ORDER_MATERIAL (ORDER_MATERIAL_ID, ORDER_ID, MATERIAL_ID, 
+      ORDER_MATERIAL_NUMBER, ORDER_MATERIAL_WEIGHT, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK)
+    values (#{orderMaterialId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL}, #{materialId,jdbcType=DECIMAL}, 
+      #{orderMaterialNumber,jdbcType=DECIMAL}, #{orderMaterialWeight,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    insert into OMSTRUCK_ORDER_MATERIAL
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="orderMaterialId != null">
+        ORDER_MATERIAL_ID,
+      </if>
+      <if test="orderId != null">
+        ORDER_ID,
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID,
+      </if>
+      <if test="orderMaterialNumber != null">
+        ORDER_MATERIAL_NUMBER,
+      </if>
+      <if test="orderMaterialWeight != null">
+        ORDER_MATERIAL_WEIGHT,
+      </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="orderMaterialId != null">
+        #{orderMaterialId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderId != null">
+        #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialNumber != null">
+        #{orderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialWeight != null">
+        #{orderMaterialWeight,jdbcType=DECIMAL},
+      </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.OmstruckOrderMaterial">
+    update OMSTRUCK_ORDER_MATERIAL
+    set ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      ORDER_MATERIAL_NUMBER = #{orderMaterialNumber,jdbcType=DECIMAL},
+      ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight,jdbcType=DECIMAL},
+      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 ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.OmstruckOrderMaterial">
+    update OMSTRUCK_ORDER_MATERIAL
+    <set>
+      <if test="orderId != null">
+        ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="materialId != null">
+        MATERIAL_ID = #{materialId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialNumber != null">
+        ORDER_MATERIAL_NUMBER = #{orderMaterialNumber,jdbcType=DECIMAL},
+      </if>
+      <if test="orderMaterialWeight != null">
+        ORDER_MATERIAL_WEIGHT = #{orderMaterialWeight,jdbcType=DECIMAL},
+      </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 ORDER_MATERIAL_ID = #{orderMaterialId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where ORDER_MATERIAL_ID = #{orderMaterialId,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 OMSTRUCK_ORDER_MATERIAL 
+      (ORDER_MATERIAL_ID, 
+      ORDER_ID, MATERIAL_ID, ORDER_MATERIAL_NUMBER, 
+      ORDER_MATERIAL_WEIGHT, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.orderMaterialId,jdbcType=DECIMAL}, 
+      #{item.orderId,jdbcType=DECIMAL}, #{item.materialId,jdbcType=DECIMAL}, #{item.orderMaterialNumber,jdbcType=DECIMAL}, 
+      #{item.orderMaterialWeight,jdbcType=DECIMAL}, #{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 OMSTRUCK_ORDER_MATERIAL
+     set
+       ORDER_MATERIAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialId,jdbcType=DECIMAL}
+       </foreach>
+       ,ORDER_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+       </foreach>
+       ,MATERIAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.materialId,jdbcType=DECIMAL}
+       </foreach>
+       ,ORDER_MATERIAL_NUMBER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialNumber,jdbcType=DECIMAL}
+       </foreach>
+       ,ORDER_MATERIAL_WEIGHT=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.orderMaterialWeight,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case ORDER_MATERIAL_ID" close="end">
+          when #{item.orderMaterialId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where ORDER_MATERIAL_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.orderMaterialId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from OMSTRUCK_ORDER_MATERIAL
+    where ORDER_MATERIAL_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>
+
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(OOM.ORDER_MATERIAL_ID)
+    from OMSTRUCK_ORDER_MATERIAL OOM
+  </select>
+
+<!--  通过orderId获取子表主键 -->
+  <select id="getOrderMaterialIdByOrderId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+    select OOM.ORDER_MATERIAL_ID from OMSTRUCK_ORDER_MATERIAL OOM where OOM.ORDER_ID = #{orderId}
+  </select>
+
+</mapper>

+ 604 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckEnfactoryResultMapper.xml

@@ -0,0 +1,604 @@
+<?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.TmstruckEnfactoryResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckEnfactoryResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+    <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId" />
+    <result column="RESULT_ENTRY_MODE" jdbcType="VARCHAR" property="resultEntryMode" />
+    <result column="RESULT_ENTRY_GATE_TIME" jdbcType="TIMESTAMP" property="resultEntryGateTime" />
+    <result column="RESULT_MEMO" jdbcType="VARCHAR" property="resultMemo" />
+    <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="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername" />
+    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID, RESULT_ENTRY_MODE, RESULT_ENTRY_GATE_TIME, 
+    RESULT_MEMO, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+    DELETE_USERNAME, DELETE_TIME
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.RESULT_TOTAL_ID, t.GATEPOST_ID, t.RESULT_ENTRY_MODE, t.RESULT_ENTRY_GATE_TIME, 
+    t.RESULT_MEMO, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
+    t.INSERT_UPDATE_REMARK, t.DELETE_USERNAME, t.DELETE_TIME
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM TMSTRUCK_ENFACTORY_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM TMSTRUCK_ENFACTORY_RESULT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="gatepostId != null">
+        and GATEPOST_ID = #{gatepostId}
+      </if>
+      <if test="resultEntryMode != null and resultEntryMode != ''">
+        and RESULT_ENTRY_MODE = #{resultEntryMode}
+      </if>
+      <if test="resultEntryGateTime != null">
+        and TO_CHAR(RESULT_ENTRY_GATE_TIME,'yyyy-MM-dd') = #{resultEntryGateTime}
+      </if>
+      <if test="resultMemo != null and resultMemo != ''">
+        and RESULT_MEMO = #{resultMemo}
+      </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="deleteUsername != null and deleteUsername != ''">
+        and DELETE_USERNAME = #{deleteUsername}
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="gatepostId != null">
+        and GATEPOST_ID = #{gatepostId}
+      </if>
+      <if test="resultEntryMode != null and resultEntryMode != ''">
+        and RESULT_ENTRY_MODE LIKE '%${resultEntryMode}%'
+      </if>
+      <if test="resultEntryGateTime != null">
+        and TO_CHAR(RESULT_ENTRY_GATE_TIME,'yyyy-MM-dd') = #{resultEntryGateTime}
+      </if>
+      <if test="resultMemo != null and resultMemo != ''">
+        and RESULT_MEMO LIKE '%${resultMemo}%'
+      </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="deleteUsername != null and deleteUsername != ''">
+        and DELETE_USERNAME LIKE '%${deleteUsername}%'
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from TMSTRUCK_ENFACTORY_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_ENFACTORY_RESULT
+    where 1!=1 
+      <if test="resultTotalId != null">
+        or RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="gatepostId != null">
+        or GATEPOST_ID = #{gatepostId}
+      </if>
+      <if test="resultEntryMode != null and resultEntryMode != ''">
+        or RESULT_ENTRY_MODE = #{resultEntryMode}
+      </if>
+      <if test="resultEntryGateTime != null">
+        or TO_CHAR(RESULT_ENTRY_GATE_TIME,'yyyy-MM-dd') = '#{resultEntryGateTime}'
+      </if>
+      <if test="resultMemo != null and resultMemo != ''">
+        or RESULT_MEMO = #{resultMemo}
+      </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="deleteUsername != null and deleteUsername != ''">
+        or DELETE_USERNAME = #{deleteUsername}
+      </if>
+      <if test="deleteTime != null">
+        or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
+    insert into TMSTRUCK_ENFACTORY_RESULT (RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID, 
+      RESULT_ENTRY_MODE, RESULT_ENTRY_GATE_TIME, 
+      RESULT_MEMO, INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      DELETE_USERNAME, DELETE_TIME)
+    values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{gatepostId,jdbcType=DECIMAL}, 
+      #{resultEntryMode,jdbcType=VARCHAR}, #{resultEntryGateTime,jdbcType=TIMESTAMP}, 
+      #{resultMemo,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, 
+      #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{deleteUsername,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
+    insert into TMSTRUCK_ENFACTORY_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID,
+      </if>
+      <if test="gatepostId != null">
+        GATEPOST_ID,
+      </if>
+      <if test="resultEntryMode != null">
+        RESULT_ENTRY_MODE,
+      </if>
+      <if test="resultEntryGateTime != null">
+        RESULT_ENTRY_GATE_TIME,
+      </if>
+      <if test="resultMemo != null">
+        RESULT_MEMO,
+      </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="deleteUsername != null">
+        DELETE_USERNAME,
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTotalId != null">
+        #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="gatepostId != null">
+        #{gatepostId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultEntryMode != null">
+        #{resultEntryMode,jdbcType=VARCHAR},
+      </if>
+      <if test="resultEntryGateTime != null">
+        #{resultEntryGateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultMemo != null">
+        #{resultMemo,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="deleteUsername != null">
+        #{deleteUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        #{deleteTime,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
+    update TMSTRUCK_ENFACTORY_RESULT
+    set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
+      RESULT_ENTRY_MODE = #{resultEntryMode,jdbcType=VARCHAR},
+      RESULT_ENTRY_GATE_TIME = #{resultEntryGateTime,jdbcType=TIMESTAMP},
+      RESULT_MEMO = #{resultMemo,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},
+      DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
+      DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP}
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckEnfactoryResult">
+    update TMSTRUCK_ENFACTORY_RESULT
+    <set>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="gatepostId != null">
+        GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultEntryMode != null">
+        RESULT_ENTRY_MODE = #{resultEntryMode,jdbcType=VARCHAR},
+      </if>
+      <if test="resultEntryGateTime != null">
+        RESULT_ENTRY_GATE_TIME = #{resultEntryGateTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultMemo != null">
+        RESULT_MEMO = #{resultMemo,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="deleteUsername != null">
+        DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" 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 TMSTRUCK_ENFACTORY_RESULT 
+      (RESULT_ID, 
+      RESULT_TOTAL_ID, GATEPOST_ID, RESULT_ENTRY_MODE, 
+      RESULT_ENTRY_GATE_TIME, RESULT_MEMO, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK, DELETE_USERNAME, 
+      DELETE_TIME)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultId,jdbcType=DECIMAL}, 
+      #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL}, #{item.resultEntryMode,jdbcType=VARCHAR}, 
+      #{item.resultEntryGateTime,jdbcType=TIMESTAMP}, #{item.resultMemo,jdbcType=VARCHAR}, 
+      #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP}, 
+      #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP}, 
+      #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteUsername,jdbcType=VARCHAR}, 
+      #{item.deleteTime,jdbcType=TIMESTAMP} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update TMSTRUCK_ENFACTORY_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>
+       ,RESULT_TOTAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+       </foreach>
+       ,GATEPOST_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.gatepostId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_ENTRY_MODE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEntryMode,jdbcType=VARCHAR}
+       </foreach>
+       ,RESULT_ENTRY_GATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEntryGateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,RESULT_MEMO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMemo,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>
+       ,DELETE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,DELETE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
+       </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 TMSTRUCK_ENFACTORY_RESULT
+    where RESULT_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+<!--  按照进厂时间进行排序 -->
+  <sql id="orderByEnterTime">
+    <if test="orderField != null and orderField != ''">
+      order by "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+    <if test="orderField == null  ">
+      order by "resultEntryGateTime" desc
+    </if>
+  </sql>
+
+<!--  查询所有的进厂作业实绩 -->
+  <select id="getAllEnFactoryResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select *
+    from (
+           select
+                  TER.RESULT_ID               "resultId",
+                  APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
+                  RM.MATERIAL_NAME            "materialName",
+                  DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+                  OO.ORDER_NUMBER             "orderNumber",
+                  RC.CAPACITY_NUMBER          "capacityNumber",
+                  RG.GATEPOST_NAME         "gatepostName",
+                  TER.RESULT_ENTRY_MODE       "resultEntryMode",
+                  TER.RESULT_ENTRY_GATE_TIME  "resultEntryGateTime",
+                  RS.SUPPLIER_NAME            "supplierName",
+                  OOM.ORDER_MATERIAL_WEIGHT   "orderMaterialWeight",
+                  TER.INSERT_TIME             "insertTime",
+                  RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
+           from TMSTRUCK_ENFACTORY_RESULT TER
+                  left join TMSTRUCK_TOTAL_RESULT TTR
+                            on TER.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+                  left join OMSTRUCK_ORDER OO
+                            on TTR.ORDER_ID = OO.ORDER_ID
+                  left join AMS_PURCHASE_ORDER APO
+                            on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                  left join DIL_BATCH DB
+                            on DB.BATCH_ID = APO.BATCH_ID
+                  left join RMS_CAPACITY RC
+                            on RC.CAPACITY_ID = OO.CAPACITY_ID
+                  left join RMS_SUPPLIER RS
+                            on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+                  left join RMS_CONSIGNEE RCON
+                            on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
+                  left join OMSTRUCK_ORDER_MATERIAL OOM
+                            on OOM.ORDER_ID = OO.ORDER_ID
+                  left join RMS_MATERIAL RM
+                            on RM.MATERIAL_ID = OOM.MATERIAL_ID
+                  left join RMS_GATEPOST RG
+                            on RG.GATEPOST_ID = TER.GATEPOST_ID
+            where TER.RESULT_ENTRY_GATE_TIME is not null
+         )
+      <where>
+        <if test="purchaseOrderId != null">
+        <foreach collection="purchaseOrderId" item="item" open="(" separator="or" close=")">
+          "purchaseOrderId" 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="resultForeignShipName != null">
+        and
+        <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+          "resultForeignShipName" like '%${item}%'
+        </foreach>
+        </if>
+        <if test="orderNumber != null">
+        and
+        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+          "orderNumber" like '%${item}%'
+        </foreach>
+        </if>
+        <if test="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" like '%${item}%'
+        </foreach>
+        </if>
+        <if test="warehouseName != null">
+        and
+        <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+          "warehouseName" like '%${item}%'
+        </foreach>
+        </if>
+        <if test="resultEntryMode != null">
+        and
+        <foreach collection="resultEntryMode" item="item" open="(" separator="or" close=")">
+          "resultEntryMode" like '%${item}%'
+        </foreach>
+        </if>
+        <if test="supplierName != null">
+        and
+        <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+          "supplierName" like '%${item}%'
+        </foreach>
+        </if>
+        <if test="orderMaterialWeight != null">
+        and
+        <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+          "orderMaterialWeight" like '%${item}%'
+        </foreach>
+        </if>
+      </where>
+    <include refid="orderByEnterTime"></include>
+  </select>
+
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(TER.RESULT_ID)
+    from TMSTRUCK_ENFACTORY_RESULT TER
+  </select>
+  
+<!--  通过车牌号并且状态不为2 或 运输订单 或运输订单ID  查询关联的实绩总表ID -->
+  <select id="selectOrderIdByCpAndOn" parameterType="java.util.Map" resultType="int">
+    select TTR.RESULT_TOTAL_ID "resultTotalId"
+    from OMSTRUCK_ORDER OO
+           left join TMSTRUCK_TOTAL_RESULT TTR
+                on TTR.ORDER_ID = OO.ORDER_ID
+           left join RMS_CAPACITY RC
+                on RC.CAPACITY_ID = OO.CAPACITY_ID
+    <where>
+      <if test="orderId != null">
+        OO.ORDER_ID = #{orderId}
+      </if>
+
+      <if test="orderNumber != null">
+         OO.ORDER_NUMBER = #{orderNumber}
+      </if>
+      <if test="capacityNumber != null">
+        RC.CAPACITY_NUMBER = #{capacityNumber} and OO.ORDER_STATUS != 2 --司机还未结束不能生成下一单
+      </if>
+    </where>
+  </select>
+
+<!--  通过门岗名称查询门岗Id-->
+  <select id="selectGatepostIdByGatepostName" parameterType="java.lang.String" resultType="int">
+    select GATEPOST_ID "gatepostId"
+    from RMS_GATEPOST
+    where GATEPOST_NAME = #{gatepostName}
+  </select>
+
+<!--  通过运输订单号查找实绩Id -->
+  <select id="selectEnFactoryResultId" parameterType="string" resultType="java.util.Map">
+    select  TER.RESULT_ID "resultId",
+            OO.ORDER_ID "orderId",
+            TER.RESULT_TOTAL_ID "resultTotalId"
+    from OMSTRUCK_ORDER OO
+           left join TMSTRUCK_TOTAL_RESULT TTR
+                     on OO.ORDER_ID=TTR.ORDER_ID
+           left join TMSTRUCK_ENFACTORY_RESULT TER
+                     on TER.RESULT_TOTAL_ID=TTR.RESULT_TOTAL_ID
+    where OO.ORDER_NUMBER=#{orderNumber}
+  </select>
+
+<!--  查找排队序号 -->
+  <select id="selectNodeNumber" resultType="int" parameterType="string">
+    select
+           (
+        <![CDATA[
+             select
+               count(*)
+             from
+               QMS_QUEUE_LIST QQL2
+                 join QMS_QUEUE_GRID QQG2
+                      on QQG2.GRID_ID = QQL2.GRID_ID
+             where
+               QQL2.LIST_NODE_ORDER <= QQL.LIST_NODE_ORDER
+               and QQL2.GRID_ID = QQL.GRID_ID
+               and QQL2.DELETED = 0
+        ]]>
+      ) "listNodeOrder"
+    from OMSTRUCK_ORDER OO
+           left join QMS_QUEUE_LIST QQL
+                     on OO.CAPACITY_ID = QQL.CAPACITY_ID
+    where OO.ORDER_NUMBER = #{orderNumber} and QQL.DELETED = 1
+  </select>
+</mapper>

+ 571 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLeaveFactoryResultMapper.xml

@@ -0,0 +1,571 @@
+<?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.TmstruckLeaveFactoryResultMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
+        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
+        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId"/>
+        <result column="GATEPOST_ID" jdbcType="DECIMAL" property="gatepostId"/>
+        <result column="RESULT_OUT_MODE" jdbcType="VARCHAR" property="resultOutMode"/>
+        <result column="RESULT_OUT_GATE_TIME" jdbcType="TIMESTAMP" property="resultOutGateTime"/>
+        <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="DELETE_USERNAME" jdbcType="VARCHAR" property="deleteUsername"/>
+        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime"/>
+        <result column="RESULT_TRUCK_SNAPSHOT_PICTURE" jdbcType="BLOB" property="resultTruckSnapshotPicture"/>
+    </resultMap>
+    <sql id="columns">
+        RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID, RESULT_OUT_MODE, RESULT_OUT_GATE_TIME, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_USERNAME, 
+    DELETE_TIME, RESULT_TRUCK_SNAPSHOT_PICTURE
+    </sql>
+    <sql id="columns_alias">
+        t.RESULT_ID, t.RESULT_TOTAL_ID, t.GATEPOST_ID, t.RESULT_OUT_MODE, t.RESULT_OUT_GATE_TIME,
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
+    t.DELETE_USERNAME, t.DELETE_TIME, t.RESULT_TRUCK_SNAPSHOT_PICTURE
+    </sql>
+    <sql id="select">
+        SELECT
+        <include refid="columns"/>
+        FROM TMSTRUCK_LEAVE_FACTORY_RESULT
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM TMSTRUCK_LEAVE_FACTORY_RESULT t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="resultId != null">
+                and RESULT_ID = #{resultId}
+            </if>
+            <if test="resultTotalId != null">
+                and RESULT_TOTAL_ID = #{resultTotalId}
+            </if>
+            <if test="gatepostId != null">
+                and GATEPOST_ID = #{gatepostId}
+            </if>
+            <if test="resultOutMode != null and resultOutMode != ''">
+                and RESULT_OUT_MODE = #{resultOutMode}
+            </if>
+            <if test="resultOutGateTime != null">
+                and TO_CHAR(RESULT_OUT_GATE_TIME,'yyyy-MM-dd') = #{resultOutGateTime}
+            </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="deleteUsername != null and deleteUsername != ''">
+                and DELETE_USERNAME = #{deleteUsername}
+            </if>
+            <if test="deleteTime != null">
+                and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+            </if>
+            <if test="resultTruckSnapshotPicture != null">
+                and RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="resultId != null">
+                and RESULT_ID = #{resultId}
+            </if>
+            <if test="resultTotalId != null">
+                and RESULT_TOTAL_ID = #{resultTotalId}
+            </if>
+            <if test="gatepostId != null">
+                and GATEPOST_ID = #{gatepostId}
+            </if>
+            <if test="resultOutMode != null and resultOutMode != ''">
+                and RESULT_OUT_MODE LIKE '%${resultOutMode}%'
+            </if>
+            <if test="resultOutGateTime != null">
+                and TO_CHAR(RESULT_OUT_GATE_TIME,'yyyy-MM-dd') = #{resultOutGateTime}
+            </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="deleteUsername != null and deleteUsername != ''">
+                and DELETE_USERNAME LIKE '%${deleteUsername}%'
+            </if>
+            <if test="deleteTime != null">
+                and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+            </if>
+            <if test="resultTruckSnapshotPicture != null">
+                and RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+        delete
+        from TMSTRUCK_LEAVE_FACTORY_RESULT
+        where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from TMSTRUCK_LEAVE_FACTORY_RESULT
+        where 1!=1
+        <if test="resultTotalId != null">
+            or RESULT_TOTAL_ID = #{resultTotalId}
+        </if>
+        <if test="gatepostId != null">
+            or GATEPOST_ID = #{gatepostId}
+        </if>
+        <if test="resultOutMode != null and resultOutMode != ''">
+            or RESULT_OUT_MODE = #{resultOutMode}
+        </if>
+        <if test="resultOutGateTime != null">
+            or TO_CHAR(RESULT_OUT_GATE_TIME,'yyyy-MM-dd') = '#{resultOutGateTime}'
+        </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="deleteUsername != null and deleteUsername != ''">
+            or DELETE_USERNAME = #{deleteUsername}
+        </if>
+        <if test="deleteTime != null">
+            or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
+        </if>
+        <if test="resultTruckSnapshotPicture != null">
+            or RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture}
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
+        insert into TMSTRUCK_LEAVE_FACTORY_RESULT (RESULT_ID, RESULT_TOTAL_ID, GATEPOST_ID,
+                                                   RESULT_OUT_MODE, RESULT_OUT_GATE_TIME, INSERT_USERNAME,
+                                                   INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                                                   INSERT_UPDATE_REMARK, DELETE_USERNAME, DELETE_TIME,
+                                                   RESULT_TRUCK_SNAPSHOT_PICTURE)
+        values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{gatepostId,jdbcType=DECIMAL},
+                #{resultOutMode,jdbcType=VARCHAR}, #{resultOutGateTime,jdbcType=TIMESTAMP},
+                #{insertUsername,jdbcType=VARCHAR},
+                #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+                #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleteUsername,jdbcType=VARCHAR},
+                #{deleteTime,jdbcType=TIMESTAMP},
+                #{resultTruckSnapshotPicture,jdbcType=BLOB})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
+        insert into TMSTRUCK_LEAVE_FACTORY_RESULT
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="resultId != null">
+                RESULT_ID,
+            </if>
+            <if test="resultTotalId != null">
+                RESULT_TOTAL_ID,
+            </if>
+            <if test="gatepostId != null">
+                GATEPOST_ID,
+            </if>
+            <if test="resultOutMode != null">
+                RESULT_OUT_MODE,
+            </if>
+            <if test="resultOutGateTime != null">
+                RESULT_OUT_GATE_TIME,
+            </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="deleteUsername != null">
+                DELETE_USERNAME,
+            </if>
+            <if test="deleteTime != null">
+                DELETE_TIME,
+            </if>
+            <if test="resultTruckSnapshotPicture != null">
+                RESULT_TRUCK_SNAPSHOT_PICTURE,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="resultId != null">
+                #{resultId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultTotalId != null">
+                #{resultTotalId,jdbcType=DECIMAL},
+            </if>
+            <if test="gatepostId != null">
+                #{gatepostId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultOutMode != null">
+                #{resultOutMode,jdbcType=VARCHAR},
+            </if>
+            <if test="resultOutGateTime != null">
+                #{resultOutGateTime,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="deleteUsername != null">
+                #{deleteUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="deleteTime != null">
+                #{deleteTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultTruckSnapshotPicture != null">
+                #{resultTruckSnapshotPicture,jdbcType=BLOB},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
+        update TMSTRUCK_LEAVE_FACTORY_RESULT
+        set RESULT_TOTAL_ID               = #{resultTotalId,jdbcType=DECIMAL},
+            GATEPOST_ID                   = #{gatepostId,jdbcType=DECIMAL},
+            RESULT_OUT_MODE               = #{resultOutMode,jdbcType=VARCHAR},
+            RESULT_OUT_GATE_TIME          = #{resultOutGateTime,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},
+            DELETE_USERNAME               = #{deleteUsername,jdbcType=VARCHAR},
+            DELETE_TIME                   = #{deleteTime,jdbcType=TIMESTAMP},
+            RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture,jdbcType=BLOB}
+        where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckLeaveFactoryResult">
+        update TMSTRUCK_LEAVE_FACTORY_RESULT
+        <set>
+            <if test="resultTotalId != null">
+                RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            </if>
+            <if test="gatepostId != null">
+                GATEPOST_ID = #{gatepostId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultOutMode != null">
+                RESULT_OUT_MODE = #{resultOutMode,jdbcType=VARCHAR},
+            </if>
+            <if test="resultOutGateTime != null">
+                RESULT_OUT_GATE_TIME = #{resultOutGateTime,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="deleteUsername != null">
+                DELETE_USERNAME = #{deleteUsername,jdbcType=VARCHAR},
+            </if>
+            <if test="deleteTime != null">
+                DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultTruckSnapshotPicture != null">
+                RESULT_TRUCK_SNAPSHOT_PICTURE = #{resultTruckSnapshotPicture,jdbcType=BLOB},
+            </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 TMSTRUCK_LEAVE_FACTORY_RESULT
+        (RESULT_ID,
+        RESULT_TOTAL_ID, GATEPOST_ID, RESULT_OUT_MODE,
+        RESULT_OUT_GATE_TIME, INSERT_USERNAME,
+        INSERT_TIME, UPDATE_USERNAME,
+        UPDATE_TIME, INSERT_UPDATE_REMARK,
+        DELETE_USERNAME, DELETE_TIME,
+        RESULT_TRUCK_SNAPSHOT_PICTURE)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.resultId,jdbcType=DECIMAL},
+        #{item.resultTotalId,jdbcType=DECIMAL}, #{item.gatepostId,jdbcType=DECIMAL},
+        #{item.resultOutMode,jdbcType=VARCHAR},
+        #{item.resultOutGateTime,jdbcType=TIMESTAMP}, #{item.insertUsername,jdbcType=VARCHAR},
+        #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+        #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+        #{item.deleteUsername,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP},
+        #{item.resultTruckSnapshotPicture,jdbcType=BLOB} from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update TMSTRUCK_LEAVE_FACTORY_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>
+        ,RESULT_TOTAL_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+        </foreach>
+        ,GATEPOST_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.gatepostId,jdbcType=DECIMAL}
+        </foreach>
+        ,RESULT_OUT_MODE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultOutMode,jdbcType=VARCHAR}
+        </foreach>
+        ,RESULT_OUT_GATE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultOutGateTime,jdbcType=TIMESTAMP}
+        </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>
+        ,DELETE_USERNAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteUsername,jdbcType=VARCHAR}
+        </foreach>
+        ,DELETE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_TRUCK_SNAPSHOT_PICTURE=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTruckSnapshotPicture,jdbcType=BLOB}
+        </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 TMSTRUCK_LEAVE_FACTORY_RESULT
+        where RESULT_ID in
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+    <!--  获取最大ID值  -->
+    <select id="selectMaxId" resultType="java.math.BigDecimal">
+        select max(TLFR.RESULT_ID)
+        from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
+    </select>
+
+    <sql id="orderByOutTime">
+        <if test="orderField != null and orderField != ''">
+            order by "${orderField}"
+            <if test="orderType != null and orderType != ''">
+                ${orderType}
+            </if>
+        </if>
+        <if test="orderField == null  ">
+            order by "resultOutGateTime" desc
+        </if>
+    </sql>
+
+    <!-- 查询所有的出厂实绩 -->
+    <select id="getLeaveFactoryResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select *
+        from (
+        select
+                TLFR.RESULT_ID "resultId",
+                APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+                RM.MATERIAL_NAME "materialName",
+                DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+                OO.ORDER_NUMBER "orderNumber",
+                RC.CAPACITY_NUMBER "capacityNumber",
+                RG.GATEPOST_NAME "gatepostName",
+                TLFR.RESULT_OUT_MODE "resultOutMode",
+                TLFR.RESULT_OUT_GATE_TIME "resultOutGateTime",
+                TLFR.RESULT_TRUCK_SNAPSHOT_PICTURE "resultTruckSnapshotPicture"
+        from TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
+        left join TMSTRUCK_TOTAL_RESULT TTR
+            on TTR.RESULT_TOTAL_ID = TLFR.RESULT_TOTAL_ID
+        left join OMSTRUCK_ORDER OO
+            on OO.ORDER_ID = TTR.ORDER_ID
+        left join AMS_PURCHASE_ORDER APO
+            on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+        left join DIL_BATCH DB
+            on DB.BATCH_ID = APO.BATCH_ID
+        left join OMSTRUCK_ORDER_MATERIAL OOM
+            on OOM.ORDER_ID = OO.ORDER_ID
+        left join RMS_MATERIAL RM
+            on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        left join RMS_CAPACITY RC
+            on RC.CAPACITY_ID = OO.CAPACITY_ID
+        left join RMS_GATEPOST RG
+            on RG.GATEPOST_ID = TLFR.GATEPOST_ID
+
+        where RESULT_OUT_GATE_TIME is not null
+        )
+        <where>
+            <if test="purchaseOrderNo != null">
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" 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="resultForeignShipName != null">
+                and
+                <foreach collection="resultForeignShipName" item="item" open="(" separator="or" close=")">
+                    "resultForeignShipName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="capacityNumber != null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="gatepostName != null">
+                and
+                <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+                    "gatepostName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultOutMode != null">
+                and
+                <foreach collection="resultOutMode" item="item" open="(" separator="or" close=")">
+                    "resultOutMode" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultOutGateTime != null">
+                and
+                <foreach collection="resultOutGateTime" item="item" open="(" separator="or" close=")">
+                    "resultOutGateTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultTruckSnapshotPicture != null">
+                and
+                <foreach collection="resultTruckSnapshotPicture" item="item" open="(" separator="or" close=")">
+                    "resultTruckSnapshotPicture" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderByOutTime"></include>
+    </select>
+
+    <!--  通过运输订单号查询 路段顺序号是否为 4 :已计皮-->
+    <select id="selectTransportRoute" parameterType="string" resultType="int">
+        select ORDER_LINE_SEQUENCE
+        from OMSTRUCK_ORDER
+        where ORDER_NUMBER = #{orderNumber}
+    </select>
+
+    <!--  通过运输订单号查询 出厂门岗ID 和 实绩ID -->
+    <select id="selectCnAndGnByOrderNumber" parameterType="string" resultType="java.util.Map">
+        select RL.LINE_END_NODE_ID "lineEndNodeId",
+               TTR.RESULT_TOTAL_ID "resultTotalId"
+        from OMSTRUCK_ORDER OO
+                 left join TMSTRUCK_TOTAL_RESULT TTR
+                           on TTR.ORDER_ID = OO.ORDER_ID
+                 left join RMS_LINE RL
+                           on RL.LINE_ID = OO.LINE_ID
+        where OO.ORDER_NUMBER = #{orderNumber}
+    </select>
+
+    <!--  通过运输订单号获取实绩ID -->
+    <select id="selectResultId" parameterType="string" resultType="java.util.Map">
+        select TLFR.RESULT_ID "resultId",
+               OO.ORDER_ID "orderId",
+               OO.CAPACITY_ID "capacityId"
+        from OMSTRUCK_ORDER OO
+                 left join TMSTRUCK_TOTAL_RESULT TTR
+                           on OO.ORDER_ID = TTR.ORDER_ID
+                 left join TMSTRUCK_LEAVE_FACTORY_RESULT TLFR
+                           on TLFR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        where OO.ORDER_NUMBER = #{orderNumber}
+    </select>
+</mapper>

+ 682 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckLoadResultMapper.xml

@@ -0,0 +1,682 @@
+<?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.TmstruckLoadResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckLoadResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+    <result column="RESULT_LOAD_START_TIME" jdbcType="TIMESTAMP" property="resultLoadStartTime" />
+    <result column="RESULT_LOAD_END_TIME" jdbcType="TIMESTAMP" property="resultLoadEndTime" />
+    <result column="RESULT_LOAD_DURATION" jdbcType="DECIMAL" property="resultLoadDuration" />
+    <result column="LOAD_STANDARD_TIME_ID" jdbcType="DECIMAL" property="loadStandardTimeId" />
+    <result column="LOADER_ID" jdbcType="DECIMAL" property="loaderId" />
+    <result column="RESULT_ISCLEAR" jdbcType="VARCHAR" property="resultIsclear" />
+    <result column="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
+    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+    <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" />
+    <result column="RESULT_MEASURED_TONNAGE" jdbcType="DECIMAL" property="resultMeasuredTonnage" />
+    <result column="LOADING_ID" jdbcType="DECIMAL" property="loadingId" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME, RESULT_LOAD_END_TIME, RESULT_LOAD_DURATION, 
+    LOAD_STANDARD_TIME_ID, LOADER_ID, RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME, INSERT_USERNAME, 
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE, 
+    LOADING_ID
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.RESULT_TOTAL_ID, t.RESULT_LOAD_START_TIME, t.RESULT_LOAD_END_TIME, 
+    t.RESULT_LOAD_DURATION, t.LOAD_STANDARD_TIME_ID, t.LOADER_ID, t.RESULT_ISCLEAR, t.DELETE_NAME, 
+    t.DELETE_TIME, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, 
+    t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_MEASURED_TONNAGE, t.LOADING_ID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM TMSTRUCK_LOAD_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM TMSTRUCK_LOAD_RESULT t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="resultLoadStartTime != null">
+        and TO_CHAR(RESULT_LOAD_START_TIME,'yyyy-MM-dd') = #{resultLoadStartTime}
+      </if>
+      <if test="resultLoadEndTime != null">
+        and TO_CHAR(RESULT_LOAD_END_TIME,'yyyy-MM-dd') = #{resultLoadEndTime}
+      </if>
+      <if test="resultLoadDuration != null">
+        and RESULT_LOAD_DURATION = #{resultLoadDuration}
+      </if>
+      <if test="loadStandardTimeId != null">
+        and LOAD_STANDARD_TIME_ID = #{loadStandardTimeId}
+      </if>
+      <if test="loaderId != null">
+        and LOADER_ID = #{loaderId}
+      </if>
+      <if test="resultIsclear != null and resultIsclear != ''">
+        and RESULT_ISCLEAR = #{resultIsclear}
+      </if>
+      <if test="deleteName != null and deleteName != ''">
+        and DELETE_NAME = #{deleteName}
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </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>
+      <if test="resultMeasuredTonnage != null">
+        and RESULT_MEASURED_TONNAGE = #{resultMeasuredTonnage}
+      </if>
+      <if test="loadingId != null">
+        and LOADING_ID = #{loadingId}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="resultLoadStartTime != null">
+        and TO_CHAR(RESULT_LOAD_START_TIME,'yyyy-MM-dd') = #{resultLoadStartTime}
+      </if>
+      <if test="resultLoadEndTime != null">
+        and TO_CHAR(RESULT_LOAD_END_TIME,'yyyy-MM-dd') = #{resultLoadEndTime}
+      </if>
+      <if test="resultLoadDuration != null">
+        and RESULT_LOAD_DURATION = #{resultLoadDuration}
+      </if>
+      <if test="loadStandardTimeId != null">
+        and LOAD_STANDARD_TIME_ID = #{loadStandardTimeId}
+      </if>
+      <if test="loaderId != null">
+        and LOADER_ID = #{loaderId}
+      </if>
+      <if test="resultIsclear != null and resultIsclear != ''">
+        and RESULT_ISCLEAR LIKE '%${resultIsclear}%'
+      </if>
+      <if test="deleteName != null and deleteName != ''">
+        and DELETE_NAME LIKE '%${deleteName}%'
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </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>
+      <if test="resultMeasuredTonnage != null">
+        and RESULT_MEASURED_TONNAGE = #{resultMeasuredTonnage}
+      </if>
+      <if test="loadingId != null">
+        and LOADING_ID = #{loadingId}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from TMSTRUCK_LOAD_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_LOAD_RESULT
+    where 1!=1
+    <if test="resultTotalId != null">
+      or RESULT_TOTAL_ID = #{resultTotalId}
+    </if>
+    <if test="resultLoadStartTime != null">
+      or TO_CHAR(RESULT_LOAD_START_TIME,'yyyy-MM-dd') = '#{resultLoadStartTime}'
+    </if>
+    <if test="resultLoadEndTime != null">
+      or TO_CHAR(RESULT_LOAD_END_TIME,'yyyy-MM-dd') = '#{resultLoadEndTime}'
+    </if>
+    <if test="resultLoadDuration != null">
+      or RESULT_LOAD_DURATION = #{resultLoadDuration}
+    </if>
+    <if test="loadStandardTimeId != null">
+      or LOAD_STANDARD_TIME_ID = #{loadStandardTimeId}
+    </if>
+    <if test="loaderId != null">
+      or LOADER_ID = #{loaderId}
+    </if>
+    <if test="resultIsclear != null and resultIsclear != ''">
+      or RESULT_ISCLEAR = #{resultIsclear}
+    </if>
+    <if test="deleteName != null and deleteName != ''">
+      or DELETE_NAME = #{deleteName}
+    </if>
+    <if test="deleteTime != null">
+      or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
+    </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>
+    <if test="resultMeasuredTonnage != null">
+      or RESULT_MEASURED_TONNAGE = #{resultMeasuredTonnage}
+    </if>
+    <if test="loadingId != null">
+      or LOADING_ID = #{loadingId}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
+    insert into TMSTRUCK_LOAD_RESULT (RESULT_ID, RESULT_TOTAL_ID, RESULT_LOAD_START_TIME,
+                                      RESULT_LOAD_END_TIME, RESULT_LOAD_DURATION,
+                                      LOAD_STANDARD_TIME_ID, LOADER_ID, RESULT_ISCLEAR,
+                                      DELETE_NAME, DELETE_TIME, INSERT_USERNAME,
+                                      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME,
+                                      INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
+                                      LOADING_ID)
+    values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{resultLoadStartTime,jdbcType=TIMESTAMP},
+            #{resultLoadEndTime,jdbcType=TIMESTAMP}, #{resultLoadDuration,jdbcType=DECIMAL},
+            #{loadStandardTimeId,jdbcType=DECIMAL}, #{loaderId,jdbcType=DECIMAL}, #{resultIsclear,jdbcType=VARCHAR},
+            #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR},
+            #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+            #{insertUpdateRemark,jdbcType=VARCHAR}, #{status,jdbcType=DECIMAL}, #{resultMeasuredTonnage,jdbcType=DECIMAL},
+            #{loadingId,jdbcType=DECIMAL})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
+    insert into TMSTRUCK_LOAD_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID,
+      </if>
+      <if test="resultLoadStartTime != null">
+        RESULT_LOAD_START_TIME,
+      </if>
+      <if test="resultLoadEndTime != null">
+        RESULT_LOAD_END_TIME,
+      </if>
+      <if test="resultLoadDuration != null">
+        RESULT_LOAD_DURATION,
+      </if>
+      <if test="loadStandardTimeId != null">
+        LOAD_STANDARD_TIME_ID,
+      </if>
+      <if test="loaderId != null">
+        LOADER_ID,
+      </if>
+      <if test="resultIsclear != null">
+        RESULT_ISCLEAR,
+      </if>
+      <if test="deleteName != null">
+        DELETE_NAME,
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME,
+      </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>
+      <if test="resultMeasuredTonnage != null">
+        RESULT_MEASURED_TONNAGE,
+      </if>
+      <if test="loadingId != null">
+        LOADING_ID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTotalId != null">
+        #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultLoadStartTime != null">
+        #{resultLoadStartTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultLoadEndTime != null">
+        #{resultLoadEndTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultLoadDuration != null">
+        #{resultLoadDuration,jdbcType=DECIMAL},
+      </if>
+      <if test="loadStandardTimeId != null">
+        #{loadStandardTimeId,jdbcType=DECIMAL},
+      </if>
+      <if test="loaderId != null">
+        #{loaderId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultIsclear != null">
+        #{resultIsclear,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteName != null">
+        #{deleteName,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        #{deleteTime,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>
+      <if test="resultMeasuredTonnage != null">
+        #{resultMeasuredTonnage,jdbcType=DECIMAL},
+      </if>
+      <if test="loadingId != null">
+        #{loadingId,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
+    update TMSTRUCK_LOAD_RESULT
+    set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+        RESULT_LOAD_START_TIME = #{resultLoadStartTime,jdbcType=TIMESTAMP},
+        RESULT_LOAD_END_TIME = #{resultLoadEndTime,jdbcType=TIMESTAMP},
+        RESULT_LOAD_DURATION = #{resultLoadDuration,jdbcType=DECIMAL},
+        LOAD_STANDARD_TIME_ID = #{loadStandardTimeId,jdbcType=DECIMAL},
+        LOADER_ID = #{loaderId,jdbcType=DECIMAL},
+        RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
+        DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+        DELETE_TIME = #{deleteTime,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},
+        RESULT_MEASURED_TONNAGE = #{resultMeasuredTonnage,jdbcType=DECIMAL},
+        LOADING_ID = #{loadingId,jdbcType=DECIMAL}
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckLoadResult">
+    update TMSTRUCK_LOAD_RESULT
+    <set>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultLoadStartTime != null">
+        RESULT_LOAD_START_TIME = #{resultLoadStartTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultLoadEndTime != null">
+        RESULT_LOAD_END_TIME = #{resultLoadEndTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultLoadDuration != null">
+        RESULT_LOAD_DURATION = #{resultLoadDuration,jdbcType=DECIMAL},
+      </if>
+      <if test="loadStandardTimeId != null">
+        LOAD_STANDARD_TIME_ID = #{loadStandardTimeId,jdbcType=DECIMAL},
+      </if>
+      <if test="loaderId != null">
+        LOADER_ID = #{loaderId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultIsclear != null">
+        RESULT_ISCLEAR = #{resultIsclear,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteName != null">
+        DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME = #{deleteTime,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>
+      <if test="resultMeasuredTonnage != null">
+        RESULT_MEASURED_TONNAGE = #{resultMeasuredTonnage,jdbcType=DECIMAL},
+      </if>
+      <if test="loadingId != null">
+        LOADING_ID = #{loadingId,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 TMSTRUCK_LOAD_RESULT
+    (RESULT_ID,
+    RESULT_TOTAL_ID, RESULT_LOAD_START_TIME,
+    RESULT_LOAD_END_TIME, RESULT_LOAD_DURATION,
+    LOAD_STANDARD_TIME_ID, LOADER_ID,
+    RESULT_ISCLEAR, DELETE_NAME, DELETE_TIME,
+    INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME,
+    INSERT_UPDATE_REMARK, STATUS, RESULT_MEASURED_TONNAGE,
+    LOADING_ID)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.resultId,jdbcType=DECIMAL},
+    #{item.resultTotalId,jdbcType=DECIMAL}, #{item.resultLoadStartTime,jdbcType=TIMESTAMP},
+    #{item.resultLoadEndTime,jdbcType=TIMESTAMP}, #{item.resultLoadDuration,jdbcType=DECIMAL},
+    #{item.loadStandardTimeId,jdbcType=DECIMAL}, #{item.loaderId,jdbcType=DECIMAL},
+    #{item.resultIsclear,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,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}, #{item.resultMeasuredTonnage,jdbcType=DECIMAL},
+    #{item.loadingId,jdbcType=DECIMAL} from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update TMSTRUCK_LOAD_RESULT
+    set
+    RESULT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_TOTAL_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_LOAD_START_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadStartTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_LOAD_END_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadEndTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_LOAD_DURATION=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultLoadDuration,jdbcType=DECIMAL}
+    </foreach>
+    ,LOAD_STANDARD_TIME_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.loadStandardTimeId,jdbcType=DECIMAL}
+    </foreach>
+    ,LOADER_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.loaderId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_ISCLEAR=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIsclear,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETE_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,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>
+    ,RESULT_MEASURED_TONNAGE=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.resultMeasuredTonnage,jdbcType=DECIMAL}
+    </foreach>
+    ,LOADING_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+      when #{item.resultId,jdbcType=DECIMAL} then #{item.loadingId,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 TMSTRUCK_LOAD_RESULT
+    where RESULT_ID in
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <sql id="orderByResultLoadStartTime">
+    <if test="orderField != null and orderField != ''">
+      order by "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+    <if test="orderField == null  ">
+      order by "resultLoadStartTime" desc
+    </if>
+  </sql>
+
+<!--  获取所有装车实绩  -->
+  <select id="getAllLoadResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+
+    select *
+    from (
+           select TLR.RESULT_ID              "resultId",
+                  APO.PURCHASE_ORDER_NO      "purchaseOrderNo",
+                  RM.MATERIAL_NAME           "materialName",
+                  OO.ORDER_NUMBER            "orderNumber",
+                  RC.CAPACITY_NUMBER         "capacityNumber",
+                  TLR.RESULT_MEASURED_TONNAGE   "resultMeasuredTonnage",
+                  TLR.RESULT_ISCLEAR         "resultIsclear",
+                  TLR.RESULT_LOAD_START_TIME "resultLoadStartTime",
+                  TLR.INSERT_UPDATE_REMARK   "insertUpdateRemark",
+                  TLR.INSERT_TIME            "insertTime",
+                  RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName",
+                  RS.SUPPLIER_NAME           "supplierName"
+           from TMSTRUCK_LOAD_RESULT TLR
+                  left join TMSTRUCK_TOTAL_RESULT TTR
+                            on TLR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+                  left join OMSTRUCK_ORDER OO
+                            on TTR.ORDER_ID = OO.ORDER_ID
+                  left join OMSTRUCK_ORDER_MATERIAL OOM
+                            on OO.ORDER_ID = OOM.ORDER_ID
+                  left join AMS_PURCHASE_ORDER APO
+                            on OO.ORDER_PLAN_ID = APO.PURCHASE_ORDER_ID
+                  left join DIL_BATCH DB
+                            on DB.BATCH_ID = APO.BATCH_ID
+                  left join RMS_MATERIAL RM
+                            on OOM.MATERIAL_ID = RM.MATERIAL_ID
+                  left join RMS_CAPACITY RC
+                            on RC.CAPACITY_ID = OO.CAPACITY_ID
+                  left join RMS_SUPPLIER RS
+                            on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+                  left join RMS_CONSIGNEE RCON
+                            on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
+           where TLR.STATUS = #{status}
+         )
+    <where>
+      <if test="purchaseOrderId != null">
+        <foreach collection="purchaseOrderId" item="item" open="(" separator="or" close=")">
+          "purchaseOrderId" 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="orderNumber != null">
+        and
+        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+          "orderNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="orderMaterialWeight != null">
+        and
+        <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+          "orderMaterialWeight" 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="resultLoadStartTime != null">
+        and
+        <foreach collection="resultLoadStartTime" item="item" open="(" separator="or" close=")">
+          "resultLoadStartTime" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="insertUpdateRemark != null">
+        and
+        <foreach collection="insertUpdateRemark" item="item" open="(" separator="or" close=")">
+          "insertUpdateRemark" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderByResultLoadStartTime"></include>
+  </select>
+
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(RESULT_ID)
+    from TMSTRUCK_LOAD_RESULT
+  </select>
+
+<!--  通过Id获取装车实绩 数据 用于修改-->
+  <select id="getLoadResultById" parameterType="int" resultType="java.util.LinkedHashMap">
+    select TLR.RESULT_ISCLEAR         "resultIsclear",
+           TLR.RESULT_LOAD_START_TIME "resultLoadStartTime",
+           TLR.INSERT_UPDATE_REMARK   "insertUpdateRemark"
+    from TMSTRUCK_LOAD_RESULT TLR
+    where 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>
+  
+<!--  通过运输订单查询批次 -->
+  <select id="getBatchIdByOrderId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+    select APO.BATCH_ID
+    from OMSTRUCK_ORDER OO
+    left join AMS_PURCHASE_ORDER APO
+    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+    where OO.ORDER_ID = #{orderId}
+  </select>
+</mapper>

+ 408 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckMeasureCommissionMapper.xml

@@ -0,0 +1,408 @@
+<?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.TmstruckMeasureCommissionMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckMeasureCommission">
+    <id column="COMMSSION_ID" jdbcType="DECIMAL" property="commssionId" />
+    <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+    <result column="COMMSSION_TYPE" jdbcType="DECIMAL" property="commssionType" />
+    <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">
+    COMMSSION_ID, RESULT_TOTAL_ID, COMMSSION_TYPE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.COMMSSION_ID, t.RESULT_TOTAL_ID, t.COMMSSION_TYPE, 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 TMSTRUCK_MEASURE_COMMISSION
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM TMSTRUCK_MEASURE_COMMISSION t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="commssionId != null">
+        and COMMSSION_ID = #{commssionId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="commssionType != null">
+        and COMMSSION_TYPE = #{commssionType}
+      </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="commssionId != null">
+        and COMMSSION_ID = #{commssionId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="commssionType != null">
+        and COMMSSION_TYPE = #{commssionType}
+      </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 TMSTRUCK_MEASURE_COMMISSION
+    where COMMSSION_ID = #{commssionId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_MEASURE_COMMISSION
+    where 1!=1 
+      <if test="resultTotalId != null">
+        or RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="commssionType != null">
+        or COMMSSION_TYPE = #{commssionType}
+      </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.TmstruckMeasureCommission">
+    insert into TMSTRUCK_MEASURE_COMMISSION (COMMSSION_ID, RESULT_TOTAL_ID, COMMSSION_TYPE, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK)
+    values (#{commssionId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{commssionType,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckMeasureCommission">
+    insert into TMSTRUCK_MEASURE_COMMISSION
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="commssionId != null">
+        COMMSSION_ID,
+      </if>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID,
+      </if>
+      <if test="commssionType != null">
+        COMMSSION_TYPE,
+      </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="commssionId != null">
+        #{commssionId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTotalId != null">
+        #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="commssionType != null">
+        #{commssionType,jdbcType=DECIMAL},
+      </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.TmstruckMeasureCommission">
+    update TMSTRUCK_MEASURE_COMMISSION
+    set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      COMMSSION_TYPE = #{commssionType,jdbcType=DECIMAL},
+      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 COMMSSION_ID = #{commssionId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckMeasureCommission">
+    update TMSTRUCK_MEASURE_COMMISSION
+    <set>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="commssionType != null">
+        COMMSSION_TYPE = #{commssionType,jdbcType=DECIMAL},
+      </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 COMMSSION_ID = #{commssionId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where COMMSSION_ID = #{commssionId,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 TMSTRUCK_MEASURE_COMMISSION 
+      (COMMSSION_ID, 
+      RESULT_TOTAL_ID, COMMSSION_TYPE, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.commssionId,jdbcType=DECIMAL}, 
+      #{item.resultTotalId,jdbcType=DECIMAL}, #{item.commssionType,jdbcType=DECIMAL}, 
+      #{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 TMSTRUCK_MEASURE_COMMISSION
+     set
+       COMMSSION_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.commssionId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_TOTAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+       </foreach>
+       ,COMMSSION_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.commssionType,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case COMMSSION_ID" close="end">
+          when #{item.commssionId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where COMMSSION_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.commssionId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TMSTRUCK_MEASURE_COMMISSION
+    where COMMSSION_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(TMC.COMMSSION_ID)
+    from TMSTRUCK_MEASURE_COMMISSION TMC
+  </select>
+
+<!--  排序 -->
+  <sql id="orderBy">
+    <if test="orderField != null and orderField != ''">
+      order by "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+    <if test="orderField == null  ">
+      order by "insertTime" desc
+    </if>
+  </sql>
+
+  <!--  查询计量委托实绩 -->
+  <select id="getAllMeasureCommission" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select
+           TMC.COMMSSION_ID          "commssionId",
+           APO.PURCHASE_ORDER_NO     "purchaseOrderNo",
+           RM.MATERIAL_NAME          "materialName",
+           OO.ORDER_NUMBER           "orderNumber",
+           RC.CAPACITY_NUMBER        "capacityNumber",
+           RS.SUPPLIER_NAME          "supplierName",
+           RTC.TRUCK_CALCULATE_NUMBER   "truckCalculateNumber",
+           OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
+           OOM.ORDER_MATERIAL_NUMBER "orderMaterialNumber",
+           TMC.COMMSSION_TYPE        "commssionType",
+           TMC.INSERT_TIME           "insertTime"
+    from TMSTRUCK_MEASURE_COMMISSION TMC
+           left join TMSTRUCK_TOTAL_RESULT TTR
+                     on TMC.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+           left join OMSTRUCK_ORDER OO
+                     on OO.ORDER_ID = TTR.ORDER_ID
+           left join AMS_PURCHASE_ORDER APO
+                     on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+           left join DIL_BATCH DB
+                     on DB.BATCH_ID = APO.BATCH_ID
+           left join RMS_CAPACITY RC
+                     on RC.CAPACITY_ID = OO.CAPACITY_ID
+           <if test="type == 0"> --计皮
+             left join TMSTRUCK_WEIGHT_RESULT TWR
+                       on TWR.RESULT_TOTAL_ID = TMC.RESULT_TOTAL_ID
+             left join RMS_TRUCK_CALCULATE RTC
+                       on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
+           </if>
+           <if test="type == 1"> --计毛
+             left join TMSTRUCK_WEIGHT_RESULT TWR
+                       on TWR.RESULT_TOTAL_ID = TMC.RESULT_TOTAL_ID
+             left join RMS_TRUCK_CALCULATE RTC
+                       on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
+           </if>
+
+           left join OMSTRUCK_ORDER_MATERIAL OOM
+                     on OOM.ORDER_ID = OO.ORDER_ID
+           left join RMS_MATERIAL RM
+                     on RM.MATERIAL_ID = OOM.MATERIAL_ID
+           left join RMS_SUPPLIER RS
+                     on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+           where TMC.COMMSSION_TYPE = #{type}
+    <where>
+      <if test="purchaseOrderNo != null">
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" 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="orderNumber != null">
+        and
+        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+          "orderNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="orderMaterialNumber != null">
+        and
+        <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
+          "orderMaterialNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="commssionType != null">
+        and
+        <foreach collection="commssionType" item="item" open="(" separator="or" close=")">
+          "commssionType" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="supplierName != null">
+        and
+        <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+          "supplierName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="orderMaterialWeight != null">
+        and
+        <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+          "orderMaterialWeight" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+  </select>
+
+</mapper>

+ 535 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckQualityResultMapper.xml

@@ -0,0 +1,535 @@
+<?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.TmstruckQualityResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckQualityResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="TOTAL_RESULT_ID" jdbcType="DECIMAL" property="totalResultId" />
+    <result column="RESULT_ISSAMPLING" jdbcType="DECIMAL" property="resultIssampling" />
+    <result column="RESULT_DEDUCTION" jdbcType="DECIMAL" property="resultDeduction" />
+    <result column="RESULT_DEDUCTION_DESCRIPTION" jdbcType="VARCHAR" property="resultDeductionDescription" />
+    <result column="RESULT_SAMPLING_POINT_ID" jdbcType="DECIMAL" property="resultSamplingPointId" />
+    <result column="RESULT_CONCLUSION" jdbcType="DECIMAL" property="resultConclusion" />
+    <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">
+    RESULT_ID, TOTAL_RESULT_ID, RESULT_ISSAMPLING, RESULT_DEDUCTION, RESULT_DEDUCTION_DESCRIPTION, 
+    RESULT_SAMPLING_POINT_ID, RESULT_CONCLUSION, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.TOTAL_RESULT_ID, t.RESULT_ISSAMPLING, t.RESULT_DEDUCTION, t.RESULT_DEDUCTION_DESCRIPTION, 
+    t.RESULT_SAMPLING_POINT_ID, t.RESULT_CONCLUSION, 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 TMSTRUCK_QUALITY_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM TMSTRUCK_QUALITY_RESULT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="totalResultId != null">
+        and TOTAL_RESULT_ID = #{totalResultId}
+      </if>
+      <if test="resultIssampling != null">
+        and RESULT_ISSAMPLING = #{resultIssampling}
+      </if>
+      <if test="resultDeduction != null">
+        and RESULT_DEDUCTION = #{resultDeduction}
+      </if>
+      <if test="resultDeductionDescription != null and resultDeductionDescription != ''">
+        and RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription}
+      </if>
+      <if test="resultSamplingPointId != null">
+        and RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId}
+      </if>
+      <if test="resultConclusion != null">
+        and RESULT_CONCLUSION = #{resultConclusion}
+      </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="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="totalResultId != null">
+        and TOTAL_RESULT_ID = #{totalResultId}
+      </if>
+      <if test="resultIssampling != null">
+        and RESULT_ISSAMPLING = #{resultIssampling}
+      </if>
+      <if test="resultDeduction != null">
+        and RESULT_DEDUCTION = #{resultDeduction}
+      </if>
+      <if test="resultDeductionDescription != null and resultDeductionDescription != ''">
+        and RESULT_DEDUCTION_DESCRIPTION LIKE '%${resultDeductionDescription}%'
+      </if>
+      <if test="resultSamplingPointId != null">
+        and RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId}
+      </if>
+      <if test="resultConclusion != null">
+        and RESULT_CONCLUSION = #{resultConclusion}
+      </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 TMSTRUCK_QUALITY_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_QUALITY_RESULT
+    where 1!=1 
+      <if test="totalResultId != null">
+        or TOTAL_RESULT_ID = #{totalResultId}
+      </if>
+      <if test="resultIssampling != null">
+        or RESULT_ISSAMPLING = #{resultIssampling}
+      </if>
+      <if test="resultDeduction != null">
+        or RESULT_DEDUCTION = #{resultDeduction}
+      </if>
+      <if test="resultDeductionDescription != null and resultDeductionDescription != ''">
+        or RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription}
+      </if>
+      <if test="resultSamplingPointId != null">
+        or RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId}
+      </if>
+      <if test="resultConclusion != null">
+        or RESULT_CONCLUSION = #{resultConclusion}
+      </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.TmstruckQualityResult">
+    insert into TMSTRUCK_QUALITY_RESULT (RESULT_ID, TOTAL_RESULT_ID, RESULT_ISSAMPLING, 
+      RESULT_DEDUCTION, RESULT_DEDUCTION_DESCRIPTION, 
+      RESULT_SAMPLING_POINT_ID, RESULT_CONCLUSION, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK)
+    values (#{resultId,jdbcType=DECIMAL}, #{totalResultId,jdbcType=DECIMAL}, #{resultIssampling,jdbcType=DECIMAL}, 
+      #{resultDeduction,jdbcType=DECIMAL}, #{resultDeductionDescription,jdbcType=VARCHAR}, 
+      #{resultSamplingPointId,jdbcType=DECIMAL}, #{resultConclusion,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
+    insert into TMSTRUCK_QUALITY_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="totalResultId != null">
+        TOTAL_RESULT_ID,
+      </if>
+      <if test="resultIssampling != null">
+        RESULT_ISSAMPLING,
+      </if>
+      <if test="resultDeduction != null">
+        RESULT_DEDUCTION,
+      </if>
+      <if test="resultDeductionDescription != null">
+        RESULT_DEDUCTION_DESCRIPTION,
+      </if>
+      <if test="resultSamplingPointId != null">
+        RESULT_SAMPLING_POINT_ID,
+      </if>
+      <if test="resultConclusion != null">
+        RESULT_CONCLUSION,
+      </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="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="totalResultId != null">
+        #{totalResultId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultIssampling != null">
+        #{resultIssampling,jdbcType=DECIMAL},
+      </if>
+      <if test="resultDeduction != null">
+        #{resultDeduction,jdbcType=DECIMAL},
+      </if>
+      <if test="resultDeductionDescription != null">
+        #{resultDeductionDescription,jdbcType=VARCHAR},
+      </if>
+      <if test="resultSamplingPointId != null">
+        #{resultSamplingPointId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultConclusion != null">
+        #{resultConclusion,jdbcType=DECIMAL},
+      </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.TmstruckQualityResult">
+    update TMSTRUCK_QUALITY_RESULT
+    set TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
+      RESULT_ISSAMPLING = #{resultIssampling,jdbcType=DECIMAL},
+      RESULT_DEDUCTION = #{resultDeduction,jdbcType=DECIMAL},
+      RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription,jdbcType=VARCHAR},
+      RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId,jdbcType=DECIMAL},
+      RESULT_CONCLUSION = #{resultConclusion,jdbcType=DECIMAL},
+      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 RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckQualityResult">
+    update TMSTRUCK_QUALITY_RESULT
+    <set>
+      <if test="totalResultId != null">
+        TOTAL_RESULT_ID = #{totalResultId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultIssampling != null">
+        RESULT_ISSAMPLING = #{resultIssampling,jdbcType=DECIMAL},
+      </if>
+      <if test="resultDeduction != null">
+        RESULT_DEDUCTION = #{resultDeduction,jdbcType=DECIMAL},
+      </if>
+      <if test="resultDeductionDescription != null">
+        RESULT_DEDUCTION_DESCRIPTION = #{resultDeductionDescription,jdbcType=VARCHAR},
+      </if>
+      <if test="resultSamplingPointId != null">
+        RESULT_SAMPLING_POINT_ID = #{resultSamplingPointId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultConclusion != null">
+        RESULT_CONCLUSION = #{resultConclusion,jdbcType=DECIMAL},
+      </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 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 TMSTRUCK_QUALITY_RESULT 
+      (RESULT_ID, 
+      TOTAL_RESULT_ID, RESULT_ISSAMPLING, 
+      RESULT_DEDUCTION, RESULT_DEDUCTION_DESCRIPTION, 
+      RESULT_SAMPLING_POINT_ID, RESULT_CONCLUSION, 
+      INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultId,jdbcType=DECIMAL}, 
+      #{item.totalResultId,jdbcType=DECIMAL}, #{item.resultIssampling,jdbcType=DECIMAL}, 
+      #{item.resultDeduction,jdbcType=DECIMAL}, #{item.resultDeductionDescription,jdbcType=VARCHAR}, 
+      #{item.resultSamplingPointId,jdbcType=DECIMAL}, #{item.resultConclusion,jdbcType=DECIMAL}, 
+      #{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 TMSTRUCK_QUALITY_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>
+       ,TOTAL_RESULT_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.totalResultId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_ISSAMPLING=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultIssampling,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_DEDUCTION=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeduction,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_DEDUCTION_DESCRIPTION=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDeductionDescription,jdbcType=VARCHAR}
+       </foreach>
+       ,RESULT_SAMPLING_POINT_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSamplingPointId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_CONCLUSION=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultConclusion,jdbcType=DECIMAL}
+       </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>
+     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 TMSTRUCK_QUALITY_RESULT
+    where RESULT_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>
+    <if test="orderField == null  ">
+      order by "insertTime" desc
+    </if>
+  </sql>
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(TQR.RESULT_ID)
+    from TMSTRUCK_QUALITY_RESULT TQR
+  </select>
+<!--  查询所有的质检作业   -->
+  <select id="getQualityResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select *
+    from (
+           select
+                  TQR.RESULT_ID                 "resultId",
+                  APO.PURCHASE_ORDER_NO         "purchaseOrderNo",
+                  RM.MATERIAL_NAME         "materialName",
+                  DB.RESULT_FOREIGN_SHIP_NAME   "resultForeignShipName",
+                  OO.ORDER_NUMBER               "orderNumber",
+                  TWR.RESULT_POUND_NO           "resultPoundNo",
+                  RC.CAPACITY_NUMBER            "capacityNumber",
+                  TQR.RESULT_ISSAMPLING         "resultIssampling",
+                  TQR.RESULT_DEDUCTION          "resultDeduction",
+                  TQR.RESULT_DEDUCTION_DESCRIPTION "resultDeductionDescription",
+                  RW.WAREHOUSE_NAME      "warehouseName",
+                  TQR.INSERT_TIME        "insertTime"
+
+           from TMSTRUCK_QUALITY_RESULT TQR
+                  left join TMSTRUCK_TOTAL_RESULT TTR
+                            on TQR.TOTAL_RESULT_ID = TTR.RESULT_TOTAL_ID
+                  left join OMSTRUCK_ORDER OO
+                            on OO.ORDER_ID = TTR.ORDER_ID
+                  left join AMS_PURCHASE_ORDER APO
+                            on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                  left join DIL_BATCH DB
+                            on DB.BATCH_ID = APO.BATCH_ID
+                  left join TMSTRUCK_WEIGHT_RESULT TWR
+                            on TWR.RESULT_TOTAL_ID = TQR.TOTAL_RESULT_ID
+                  left join RMS_CAPACITY RC
+                            on RC.CAPACITY_ID = OO.CAPACITY_ID
+                  left join RMS_WAREHOUSE RW
+                            on RW.WAREHOUSE_ID = TQR.RESULT_SAMPLING_POINT_ID
+                  left join RMS_MATERIAL RM
+                            on RM.MATERIAL_ID = DB.MATERIAL_ID
+         )
+    <where>
+      <if test="purchaseOrderNo != null">
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" 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="orderNumber != null">
+        and
+        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+          "orderNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" 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="resultPoundNo != null">
+        and
+        <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
+          "resultPoundNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultIssampling != null">
+        and
+        <foreach collection="resultIssampling" item="item" open="(" separator="or" close=")">
+          "resultIssampling" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultDeduction != null">
+        and
+        <foreach collection="resultDeduction" item="item" open="(" separator="or" close=")">
+          "resultDeduction" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultDeductionDescription != null">
+        and
+        <foreach collection="resultDeductionDescription" item="item" open="(" separator="or" close=")">
+          "resultDeductionDescription" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="warehouseName != null">
+        and
+        <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+          "warehouseName" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+  </select>
+
+<!--  通过ID查询质检作业实绩 -->
+  <select id="getQualityResultById" parameterType="int" resultType="java.util.Map">
+    select
+      OO.ORDER_NUMBER               "orderNumber",
+      TWR.RESULT_POUND_NO           "resultPoundNo",
+      RC.CAPACITY_NUMBER            "capacityNumber",
+      TQR.RESULT_ISSAMPLING         "resultIssampling",
+      TQR.RESULT_DEDUCTION          "resultDeduction",
+      TQR.RESULT_DEDUCTION_DESCRIPTION "resultDeductionDescription",
+      TQR.RESULT_SAMPLING_POINT_ID      "resultSamplingPointId"
+    from TMSTRUCK_QUALITY_RESULT TQR
+           left join TMSTRUCK_TOTAL_RESULT TTR
+                     on TQR.TOTAL_RESULT_ID = TTR.RESULT_TOTAL_ID
+           left join OMSTRUCK_ORDER OO
+                     on OO.ORDER_ID = TTR.ORDER_ID
+           left join RMS_CAPACITY RC
+                     on RC.CAPACITY_ID = OO.CAPACITY_ID
+           left join TMSTRUCK_WEIGHT_RESULT TWR
+                     on TWR.RESULT_TOTAL_ID = TQR.TOTAL_RESULT_ID
+    where RESULT_ID = #{resultId}
+  </select>
+</mapper>

+ 555 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckReceiptResultMapper.xml

@@ -0,0 +1,555 @@
+<?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.TmstruckReceiptResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckReceiptResult">
+    <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+    <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+    <result column="WAREHOUSE_ID" jdbcType="DECIMAL" property="warehouseId" />
+    <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" />
+    <result column="RESULT_EMPTY_CONTAINER_PHOTO" jdbcType="BLOB" property="resultEmptyContainerPhoto" />
+    <result column="RESULT_SIGNED_NOTE_PHOTO" jdbcType="BLOB" property="resultSignedNotePhoto" />
+    <result column="RESULT_RECEIVE_NOTE_PHOTO" jdbcType="BLOB" property="resultReceiveNotePhoto" />
+  </resultMap>
+  <sql id="columns">
+    RESULT_ID, RESULT_TOTAL_ID, WAREHOUSE_ID, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO, 
+    RESULT_RECEIVE_NOTE_PHOTO
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_ID, t.RESULT_TOTAL_ID, t.WAREHOUSE_ID, t.INSERT_USERNAME, t.INSERT_TIME, 
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_EMPTY_CONTAINER_PHOTO, 
+    t.RESULT_SIGNED_NOTE_PHOTO, t.RESULT_RECEIVE_NOTE_PHOTO
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns"/> FROM TMSTRUCK_RECEIPT_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM TMSTRUCK_RECEIPT_RESULT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </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>
+      <if test="resultEmptyContainerPhoto != null">
+        and RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
+      </if>
+      <if test="resultSignedNotePhoto != null">
+        and RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
+      </if>
+      <if test="resultReceiveNotePhoto != null">
+        and RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="resultId != null">
+        and RESULT_ID = #{resultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="warehouseId != null">
+        and WAREHOUSE_ID = #{warehouseId}
+      </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>
+      <if test="resultEmptyContainerPhoto != null">
+        and RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
+      </if>
+      <if test="resultSignedNotePhoto != null">
+        and RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
+      </if>
+      <if test="resultReceiveNotePhoto != null">
+        and RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+    delete from TMSTRUCK_RECEIPT_RESULT
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_RECEIPT_RESULT
+    where 1!=1 
+      <if test="resultTotalId != null">
+        or RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="warehouseId != null">
+        or WAREHOUSE_ID = #{warehouseId}
+      </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>
+      <if test="resultEmptyContainerPhoto != null">
+        or RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto}
+      </if>
+      <if test="resultSignedNotePhoto != null">
+        or RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto}
+      </if>
+      <if test="resultReceiveNotePhoto != null">
+        or RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
+    insert into TMSTRUCK_RECEIPT_RESULT (RESULT_ID, RESULT_TOTAL_ID, WAREHOUSE_ID, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, 
+      RESULT_EMPTY_CONTAINER_PHOTO, RESULT_SIGNED_NOTE_PHOTO, 
+      RESULT_RECEIVE_NOTE_PHOTO)
+    values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{warehouseId,jdbcType=DECIMAL}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{status,jdbcType=DECIMAL}, 
+      #{resultEmptyContainerPhoto,jdbcType=BLOB}, #{resultSignedNotePhoto,jdbcType=BLOB}, 
+      #{resultReceiveNotePhoto,jdbcType=BLOB})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
+    insert into TMSTRUCK_RECEIPT_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        RESULT_ID,
+      </if>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID,
+      </if>
+      <if test="warehouseId != null">
+        WAREHOUSE_ID,
+      </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>
+      <if test="resultEmptyContainerPhoto != null">
+        RESULT_EMPTY_CONTAINER_PHOTO,
+      </if>
+      <if test="resultSignedNotePhoto != null">
+        RESULT_SIGNED_NOTE_PHOTO,
+      </if>
+      <if test="resultReceiveNotePhoto != null">
+        RESULT_RECEIVE_NOTE_PHOTO,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="resultId != null">
+        #{resultId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTotalId != null">
+        #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="warehouseId != null">
+        #{warehouseId,jdbcType=DECIMAL},
+      </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>
+      <if test="resultEmptyContainerPhoto != null">
+        #{resultEmptyContainerPhoto,jdbcType=BLOB},
+      </if>
+      <if test="resultSignedNotePhoto != null">
+        #{resultSignedNotePhoto,jdbcType=BLOB},
+      </if>
+      <if test="resultReceiveNotePhoto != null">
+        #{resultReceiveNotePhoto,jdbcType=BLOB},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
+    update TMSTRUCK_RECEIPT_RESULT
+    set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      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},
+      RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=BLOB},
+      RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=BLOB},
+      RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=BLOB}
+    where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckReceiptResult">
+    update TMSTRUCK_RECEIPT_RESULT
+    <set>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="warehouseId != null">
+        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      </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>
+      <if test="resultEmptyContainerPhoto != null">
+        RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=BLOB},
+      </if>
+      <if test="resultSignedNotePhoto != null">
+        RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=BLOB},
+      </if>
+      <if test="resultReceiveNotePhoto != null">
+        RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=BLOB},
+      </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 TMSTRUCK_RECEIPT_RESULT 
+      (RESULT_ID, 
+      RESULT_TOTAL_ID, WAREHOUSE_ID, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      STATUS, RESULT_EMPTY_CONTAINER_PHOTO, 
+      RESULT_SIGNED_NOTE_PHOTO, RESULT_RECEIVE_NOTE_PHOTO
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultId,jdbcType=DECIMAL}, 
+      #{item.resultTotalId,jdbcType=DECIMAL}, #{item.warehouseId,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{item.status,jdbcType=DECIMAL}, #{item.resultEmptyContainerPhoto,jdbcType=BLOB}, 
+      #{item.resultSignedNotePhoto,jdbcType=BLOB}, #{item.resultReceiveNotePhoto,jdbcType=BLOB}
+       from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update TMSTRUCK_RECEIPT_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>
+       ,RESULT_TOTAL_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+       </foreach>
+       ,WAREHOUSE_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.warehouseId,jdbcType=DECIMAL}
+       </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>
+       ,STATUS=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_EMPTY_CONTAINER_PHOTO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEmptyContainerPhoto,jdbcType=BLOB}
+       </foreach>
+       ,RESULT_SIGNED_NOTE_PHOTO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultSignedNotePhoto,jdbcType=BLOB}
+       </foreach>
+       ,RESULT_RECEIVE_NOTE_PHOTO=
+       <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+          when #{item.resultId,jdbcType=DECIMAL} then #{item.resultReceiveNotePhoto,jdbcType=BLOB}
+       </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 TMSTRUCK_RECEIPT_RESULT
+    where RESULT_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(TRR.RESULT_ID)
+    from TMSTRUCK_RECEIPT_RESULT TRR
+  </select>
+
+<!--  通过总实绩ID 查询签收实绩ID -->
+  <select id="getIdByTotalResultId" parameterType="int" resultType="int">
+    select TRR.RESULT_ID from TMSTRUCK_RECEIPT_RESULT TRR where TRR.RESULT_TOTAL_ID = #{totalResultId}
+  </select>
+
+<!--通过总实绩Id 更新 状态码 为 1 已签收-->
+  <update id="updateByTotalResultId" parameterType="java.util.Map">
+    update TMSTRUCK_RECEIPT_RESULT
+    <set>
+      <if test="warehouseId != null">
+        WAREHOUSE_ID = #{warehouseId,jdbcType=DECIMAL},
+      </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>
+      <if test="resultEmptyContainerPhoto != null">
+        RESULT_EMPTY_CONTAINER_PHOTO = #{resultEmptyContainerPhoto,jdbcType=BLOB},
+      </if>
+      <if test="resultSignedNotePhoto != null">
+        RESULT_SIGNED_NOTE_PHOTO = #{resultSignedNotePhoto,jdbcType=BLOB},
+      </if>
+      <if test="resultReceiveNotePhoto != null">
+        RESULT_RECEIVE_NOTE_PHOTO = #{resultReceiveNotePhoto,jdbcType=BLOB},
+      </if>
+    </set>
+    where RESULT_TOTAL_ID = #{resultTotalId}
+  </update>
+
+  <!--  通过签收时间排序 -->
+  <sql id="orderBy">
+    <if test="orderField != null and orderField != ''">
+      order by "${orderField}"
+      <if test="orderType != null and orderType != ''">
+        ${orderType}
+      </if>
+    </if>
+    <if test="orderField == null  ">
+      order by "insertTime" desc
+    </if>
+  </sql>
+
+<!--  查询所有签收实绩 -->
+  <select id="getReceiveResult" parameterType="java.util.Map" resultType="java.util.Map">
+    select
+           *
+    from (
+           select TRR.RESULT_ID               "resultId",
+                  APO.PURCHASE_ORDER_NO       "purchaseOrderNo",
+                  RM.MATERIAL_NAME            "materialName",
+                  OO.ORDER_NUMBER             "orderNumber",
+                  RC.CAPACITY_NUMBER          "capacityNumber",
+                  DB.RESULT_FOREIGN_SHIP_NAME "resultForeignShipName",
+                  TUR.UNLOAD_STATUS           "unloadStatus",
+                  TWR.RESULT_NET_WEIGHT       "resultNetWeight",
+                  RW.WAREHOUSE_NAME           "warehouseName",
+                  TRR.INSERT_USERNAME         "insertUsername",
+                  TRR.INSERT_TIME             "insertTime"
+           from TMSTRUCK_RECEIPT_RESULT TRR
+                  left join TMSTRUCK_TOTAL_RESULT TTR
+                            on TTR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+                  left join OMSTRUCK_ORDER OO
+                            on OO.ORDER_ID = TTR.ORDER_ID
+                  left join AMS_PURCHASE_ORDER APO
+                            on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+                  left join DIL_BATCH DB
+                            on DB.BATCH_ID = APO.BATCH_ID
+                  left join RMS_CAPACITY RC
+                            on RC.CAPACITY_ID = OO.CAPACITY_ID
+                  left join TMSTRUCK_WEIGHT_RESULT TWR
+                            on TWR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+                  left join TMSTRUCK_UNLOAD_RESULT TUR
+                            on TUR.RESULT_TOTAL_ID = TRR.RESULT_TOTAL_ID
+                  left join OMSTRUCK_ORDER_MATERIAL OOM
+                            on OOM.ORDER_ID = OO.ORDER_ID
+                  left join RMS_MATERIAL RM
+                            on OOM.MATERIAL_ID = RM.MATERIAL_ID
+                  left join RMS_WAREHOUSE RW
+                            on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
+                where TRR.STATUS = 1
+         )
+        <where>
+          <if test="purchaseOrderNo != null">
+            <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+              "purchaseOrderNo" 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="orderNumber != null">
+            and
+            <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+              "orderNumber" like '%${item}%'
+            </foreach>
+          </if>
+          <if test="capacityNumber != null">
+            and
+            <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+              "capacityNumber" 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="unloadStatus != null">
+            and
+            <foreach collection="unloadStatus" item="item" open="(" separator="or" close=")">
+              "unloadStatus" like '%${item}%'
+            </foreach>
+          </if>
+          <if test="resultNetWeight != null">
+            and
+            <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+              "resultNetWeight" like '%${item}%'
+            </foreach>
+          </if>
+          <if test="warehouseName != null">
+            and
+            <foreach collection="warehouseName" item="item" open="(" separator="or" close=")">
+              "warehouseName" 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>
+  </select>
+</mapper>

+ 350 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckTotalResultMapper.xml

@@ -0,0 +1,350 @@
+<?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.TmstruckTotalResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckTotalResult">
+    <id column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+    <result column="ORDER_ID" jdbcType="DECIMAL" property="orderId" />
+    <result column="RESULT_DURATION" jdbcType="DECIMAL" property="resultDuration" />
+    <result column="STANDARD_DATA_ID" jdbcType="DECIMAL" property="standardDataId" />
+    <result column="RESULT_OUTLIER" jdbcType="DECIMAL" property="resultOutlier" />
+    <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">
+    RESULT_TOTAL_ID, ORDER_ID, RESULT_DURATION, STANDARD_DATA_ID, RESULT_OUTLIER, INSERT_USERNAME, 
+    INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.RESULT_TOTAL_ID, t.ORDER_ID, t.RESULT_DURATION, t.STANDARD_DATA_ID, t.RESULT_OUTLIER, 
+    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 TMSTRUCK_TOTAL_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM TMSTRUCK_TOTAL_RESULT t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="resultDuration != null">
+        and RESULT_DURATION = #{resultDuration}
+      </if>
+      <if test="standardDataId != null">
+        and STANDARD_DATA_ID = #{standardDataId}
+      </if>
+      <if test="resultOutlier != null">
+        and RESULT_OUTLIER = #{resultOutlier}
+      </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="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="orderId != null">
+        and ORDER_ID = #{orderId}
+      </if>
+      <if test="resultDuration != null">
+        and RESULT_DURATION = #{resultDuration}
+      </if>
+      <if test="standardDataId != null">
+        and STANDARD_DATA_ID = #{standardDataId}
+      </if>
+      <if test="resultOutlier != null">
+        and RESULT_OUTLIER = #{resultOutlier}
+      </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 TMSTRUCK_TOTAL_RESULT
+    where RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_TOTAL_RESULT
+    where 1!=1 
+      <if test="orderId != null">
+        or ORDER_ID = #{orderId}
+      </if>
+      <if test="resultDuration != null">
+        or RESULT_DURATION = #{resultDuration}
+      </if>
+      <if test="standardDataId != null">
+        or STANDARD_DATA_ID = #{standardDataId}
+      </if>
+      <if test="resultOutlier != null">
+        or RESULT_OUTLIER = #{resultOutlier}
+      </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.TmstruckTotalResult">
+    insert into TMSTRUCK_TOTAL_RESULT (RESULT_TOTAL_ID, ORDER_ID, RESULT_DURATION, 
+      STANDARD_DATA_ID, RESULT_OUTLIER, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    values (#{resultTotalId,jdbcType=DECIMAL}, #{orderId,jdbcType=DECIMAL}, #{resultDuration,jdbcType=DECIMAL}, 
+      #{standardDataId,jdbcType=DECIMAL}, #{resultOutlier,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, 
+      #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckTotalResult">
+    insert into TMSTRUCK_TOTAL_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID,
+      </if>
+      <if test="orderId != null">
+        ORDER_ID,
+      </if>
+      <if test="resultDuration != null">
+        RESULT_DURATION,
+      </if>
+      <if test="standardDataId != null">
+        STANDARD_DATA_ID,
+      </if>
+      <if test="resultOutlier != null">
+        RESULT_OUTLIER,
+      </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="resultTotalId != null">
+        #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="orderId != null">
+        #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultDuration != null">
+        #{resultDuration,jdbcType=DECIMAL},
+      </if>
+      <if test="standardDataId != null">
+        #{standardDataId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultOutlier != null">
+        #{resultOutlier,jdbcType=DECIMAL},
+      </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.TmstruckTotalResult">
+    update TMSTRUCK_TOTAL_RESULT
+    set ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
+      STANDARD_DATA_ID = #{standardDataId,jdbcType=DECIMAL},
+      RESULT_OUTLIER = #{resultOutlier,jdbcType=DECIMAL},
+      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 RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckTotalResult">
+    update TMSTRUCK_TOTAL_RESULT
+    <set>
+      <if test="orderId != null">
+        ORDER_ID = #{orderId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultDuration != null">
+        RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
+      </if>
+      <if test="standardDataId != null">
+        STANDARD_DATA_ID = #{standardDataId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultOutlier != null">
+        RESULT_OUTLIER = #{resultOutlier,jdbcType=DECIMAL},
+      </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 RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select" />
+    where RESULT_TOTAL_ID = #{resultTotalId,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 TMSTRUCK_TOTAL_RESULT 
+      (RESULT_TOTAL_ID, 
+      ORDER_ID, RESULT_DURATION, STANDARD_DATA_ID, 
+      RESULT_OUTLIER, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK
+      )
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.resultTotalId,jdbcType=DECIMAL}, 
+      #{item.orderId,jdbcType=DECIMAL}, #{item.resultDuration,jdbcType=DECIMAL}, #{item.standardDataId,jdbcType=DECIMAL}, 
+      #{item.resultOutlier,jdbcType=DECIMAL}, #{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 TMSTRUCK_TOTAL_RESULT
+     set
+       RESULT_TOTAL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+       </foreach>
+       ,ORDER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.orderId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_DURATION=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.resultDuration,jdbcType=DECIMAL}
+       </foreach>
+       ,STANDARD_DATA_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.standardDataId,jdbcType=DECIMAL}
+       </foreach>
+       ,RESULT_OUTLIER=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.resultOutlier,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case RESULT_TOTAL_ID" separator=" ">
+          when #{item.resultTotalId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where RESULT_TOTAL_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.resultTotalId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TMSTRUCK_TOTAL_RESULT
+    where RESULT_TOTAL_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(RESULT_TOTAL_ID)
+    from TMSTRUCK_TOTAL_RESULT
+  </select>
+  
+</mapper>

+ 613 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckUnloadResultMapper.xml

@@ -0,0 +1,613 @@
+<?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.TmstruckUnloadResultMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckUnloadResult">
+        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
+        <result column="RESULT_NUMBER" jdbcType="VARCHAR" property="resultNumber"/>
+        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId"/>
+        <result column="RESULT_START_TIME" jdbcType="TIMESTAMP" property="resultStartTime"/>
+        <result column="RESULT_END_TIME" jdbcType="TIMESTAMP" property="resultEndTime"/>
+        <result column="RESULT_DURATION" jdbcType="DECIMAL" property="resultDuration"/>
+        <result column="UNLOAD_STATUS" jdbcType="DECIMAL" property="unloadStatus"/>
+        <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="DELETE_NAME" jdbcType="VARCHAR" property="deleteName"/>
+        <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime"/>
+        <result column="RESULT_UNLOAD_PLACE_ID" jdbcType="DECIMAL" property="resultUnloadPlaceId"/>
+    </resultMap>
+    <sql id="columns">
+        RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID, RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
+    UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+    DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID
+    </sql>
+    <sql id="columns_alias">
+        t.RESULT_ID, t.RESULT_NUMBER, t.RESULT_TOTAL_ID, t.RESULT_START_TIME, t.RESULT_END_TIME,
+    t.RESULT_DURATION, t.UNLOAD_STATUS, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, 
+    t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.DELETE_NAME, t.DELETE_TIME, t.RESULT_UNLOAD_PLACE_ID
+    </sql>
+    <sql id="select">
+        SELECT
+        <include refid="columns"/>
+        FROM TMSTRUCK_UNLOAD_RESULT
+    </sql>
+    <sql id="select_alias">
+        SELECT
+        <include refid="columns_alias"/>
+        FROM TMSTRUCK_UNLOAD_RESULT t
+    </sql>
+    <sql id="where">
+        <where>
+            <if test="resultId != null">
+                and RESULT_ID = #{resultId}
+            </if>
+            <if test="resultNumber != null and resultNumber != ''">
+                and RESULT_NUMBER = #{resultNumber}
+            </if>
+            <if test="resultTotalId != null">
+                and RESULT_TOTAL_ID = #{resultTotalId}
+            </if>
+            <if test="resultStartTime != null">
+                and TO_CHAR(RESULT_START_TIME,'yyyy-MM-dd') = #{resultStartTime}
+            </if>
+            <if test="resultEndTime != null">
+                and TO_CHAR(RESULT_END_TIME,'yyyy-MM-dd') = #{resultEndTime}
+            </if>
+            <if test="resultDuration != null">
+                and RESULT_DURATION = #{resultDuration}
+            </if>
+            <if test="unloadStatus != null">
+                and UNLOAD_STATUS = #{unloadStatus}
+            </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="deleteName != null and deleteName != ''">
+                and DELETE_NAME = #{deleteName}
+            </if>
+            <if test="deleteTime != null">
+                and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+            </if>
+            <if test="resultUnloadPlaceId != null">
+                and RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
+            </if>
+        </where>
+    </sql>
+    <sql id="whereLike">
+        <where>
+            <if test="resultId != null">
+                and RESULT_ID = #{resultId}
+            </if>
+            <if test="resultNumber != null and resultNumber != ''">
+                and RESULT_NUMBER LIKE '%${resultNumber}%'
+            </if>
+            <if test="resultTotalId != null">
+                and RESULT_TOTAL_ID = #{resultTotalId}
+            </if>
+            <if test="resultStartTime != null">
+                and TO_CHAR(RESULT_START_TIME,'yyyy-MM-dd') = #{resultStartTime}
+            </if>
+            <if test="resultEndTime != null">
+                and TO_CHAR(RESULT_END_TIME,'yyyy-MM-dd') = #{resultEndTime}
+            </if>
+            <if test="resultDuration != null">
+                and RESULT_DURATION = #{resultDuration}
+            </if>
+            <if test="unloadStatus != null">
+                and UNLOAD_STATUS = #{unloadStatus}
+            </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="deleteName != null and deleteName != ''">
+                and DELETE_NAME LIKE '%${deleteName}%'
+            </if>
+            <if test="deleteTime != null">
+                and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+            </if>
+            <if test="resultUnloadPlaceId != null">
+                and RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+        delete
+        from TMSTRUCK_UNLOAD_RESULT
+        where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from TMSTRUCK_UNLOAD_RESULT
+        where 1!=1
+        <if test="resultNumber != null and resultNumber != ''">
+            or RESULT_NUMBER = #{resultNumber}
+        </if>
+        <if test="resultTotalId != null">
+            or RESULT_TOTAL_ID = #{resultTotalId}
+        </if>
+        <if test="resultStartTime != null">
+            or TO_CHAR(RESULT_START_TIME,'yyyy-MM-dd') = '#{resultStartTime}'
+        </if>
+        <if test="resultEndTime != null">
+            or TO_CHAR(RESULT_END_TIME,'yyyy-MM-dd') = '#{resultEndTime}'
+        </if>
+        <if test="resultDuration != null">
+            or RESULT_DURATION = #{resultDuration}
+        </if>
+        <if test="unloadStatus != null">
+            or UNLOAD_STATUS = #{unloadStatus}
+        </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="deleteName != null and deleteName != ''">
+            or DELETE_NAME = #{deleteName}
+        </if>
+        <if test="deleteTime != null">
+            or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
+        </if>
+        <if test="resultUnloadPlaceId != null">
+            or RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId}
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
+        insert into TMSTRUCK_UNLOAD_RESULT (RESULT_ID, RESULT_NUMBER, RESULT_TOTAL_ID,
+                                            RESULT_START_TIME, RESULT_END_TIME, RESULT_DURATION,
+                                            UNLOAD_STATUS, INSERT_USERNAME, INSERT_TIME,
+                                            UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                                            DELETE_NAME, DELETE_TIME, RESULT_UNLOAD_PLACE_ID)
+        values (#{resultId,jdbcType=DECIMAL}, #{resultNumber,jdbcType=VARCHAR}, #{resultTotalId,jdbcType=DECIMAL},
+                #{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP},
+                #{resultDuration,jdbcType=DECIMAL},
+                #{unloadStatus,jdbcType=DECIMAL}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
+                #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{deleteName,jdbcType=VARCHAR}, #{deleteTime,jdbcType=TIMESTAMP},
+                #{resultUnloadPlaceId,jdbcType=DECIMAL})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
+        insert into TMSTRUCK_UNLOAD_RESULT
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="resultId != null">
+                RESULT_ID,
+            </if>
+            <if test="resultNumber != null">
+                RESULT_NUMBER,
+            </if>
+            <if test="resultTotalId != null">
+                RESULT_TOTAL_ID,
+            </if>
+            <if test="resultStartTime != null">
+                RESULT_START_TIME,
+            </if>
+            <if test="resultEndTime != null">
+                RESULT_END_TIME,
+            </if>
+            <if test="resultDuration != null">
+                RESULT_DURATION,
+            </if>
+            <if test="unloadStatus != null">
+                UNLOAD_STATUS,
+            </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="deleteName != null">
+                DELETE_NAME,
+            </if>
+            <if test="deleteTime != null">
+                DELETE_TIME,
+            </if>
+            <if test="resultUnloadPlaceId != null">
+                RESULT_UNLOAD_PLACE_ID,
+            </if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="resultId != null">
+                #{resultId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultNumber != null">
+                #{resultNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="resultTotalId != null">
+                #{resultTotalId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultStartTime != null">
+                #{resultStartTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultEndTime != null">
+                #{resultEndTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultDuration != null">
+                #{resultDuration,jdbcType=DECIMAL},
+            </if>
+            <if test="unloadStatus != null">
+                #{unloadStatus,jdbcType=DECIMAL},
+            </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="deleteName != null">
+                #{deleteName,jdbcType=VARCHAR},
+            </if>
+            <if test="deleteTime != null">
+                #{deleteTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultUnloadPlaceId != null">
+                #{resultUnloadPlaceId,jdbcType=DECIMAL},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
+        update TMSTRUCK_UNLOAD_RESULT
+        set RESULT_NUMBER          = #{resultNumber,jdbcType=VARCHAR},
+            RESULT_TOTAL_ID        = #{resultTotalId,jdbcType=DECIMAL},
+            RESULT_START_TIME      = #{resultStartTime,jdbcType=TIMESTAMP},
+            RESULT_END_TIME        = #{resultEndTime,jdbcType=TIMESTAMP},
+            RESULT_DURATION        = #{resultDuration,jdbcType=DECIMAL},
+            UNLOAD_STATUS          = #{unloadStatus,jdbcType=DECIMAL},
+            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},
+            DELETE_NAME            = #{deleteName,jdbcType=VARCHAR},
+            DELETE_TIME            = #{deleteTime,jdbcType=TIMESTAMP},
+            RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL}
+        where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckUnloadResult">
+        update TMSTRUCK_UNLOAD_RESULT
+        <set>
+            <if test="resultNumber != null">
+                RESULT_NUMBER = #{resultNumber,jdbcType=VARCHAR},
+            </if>
+            <if test="resultTotalId != null">
+                RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultStartTime != null">
+                RESULT_START_TIME = #{resultStartTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultEndTime != null">
+                RESULT_END_TIME = #{resultEndTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultDuration != null">
+                RESULT_DURATION = #{resultDuration,jdbcType=DECIMAL},
+            </if>
+            <if test="unloadStatus != null">
+                UNLOAD_STATUS = #{unloadStatus,jdbcType=DECIMAL},
+            </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="deleteName != null">
+                DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+            </if>
+            <if test="deleteTime != null">
+                DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultUnloadPlaceId != null">
+                RESULT_UNLOAD_PLACE_ID = #{resultUnloadPlaceId,jdbcType=DECIMAL},
+            </if>
+        </set>
+        where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+    </update>
+    <select id="selectByPrimaryKey" parameterType="java.lang.Short" 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 TMSTRUCK_UNLOAD_RESULT
+        (RESULT_ID,
+        RESULT_NUMBER, RESULT_TOTAL_ID,
+        RESULT_START_TIME, RESULT_END_TIME,
+        RESULT_DURATION, UNLOAD_STATUS,
+        INSERT_USERNAME, INSERT_TIME,
+        UPDATE_USERNAME, UPDATE_TIME,
+        INSERT_UPDATE_REMARK, DELETE_NAME,
+        DELETE_TIME, RESULT_UNLOAD_PLACE_ID
+        )
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.resultId,jdbcType=DECIMAL},
+        #{item.resultNumber,jdbcType=VARCHAR}, #{item.resultTotalId,jdbcType=DECIMAL},
+        #{item.resultStartTime,jdbcType=TIMESTAMP}, #{item.resultEndTime,jdbcType=TIMESTAMP},
+        #{item.resultDuration,jdbcType=DECIMAL}, #{item.unloadStatus,jdbcType=DECIMAL},
+        #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+        #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+        #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.deleteName,jdbcType=VARCHAR},
+        #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultUnloadPlaceId,jdbcType=DECIMAL}
+        from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update TMSTRUCK_UNLOAD_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>
+        ,RESULT_NUMBER=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultNumber,jdbcType=VARCHAR}
+        </foreach>
+        ,RESULT_TOTAL_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+        </foreach>
+        ,RESULT_START_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultStartTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_END_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultEndTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_DURATION=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDuration,jdbcType=DECIMAL}
+        </foreach>
+        ,UNLOAD_STATUS=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.unloadStatus,jdbcType=DECIMAL}
+        </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>
+        ,DELETE_NAME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
+        </foreach>
+        ,DELETE_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_UNLOAD_PLACE_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultUnloadPlaceId,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 TMSTRUCK_UNLOAD_RESULT
+        where RESULT_ID in
+        <foreach collection="list" item="id" open="(" close=")" separator=",">
+            #{id}
+        </foreach>
+    </delete>
+    <!-- 友情提示!!!-->
+    <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+    <!--  获取最大ID值  -->
+    <select id="selectMaxId" resultType="java.math.BigDecimal">
+        select max(TUR.RESULT_ID)
+        from TMSTRUCK_UNLOAD_RESULT TUR
+    </select>
+
+    <!--  排序 -->
+    <sql id="orderBy">
+        <if test="orderField != null and orderField != ''">
+            order by "${orderField}"
+            <if test="orderType != null and orderType != ''">
+                ${orderType}
+            </if>
+        </if>
+        <if test="orderField == null  ">
+            order by "insertTime" desc
+        </if>
+    </sql>
+
+    <!-- 获取卸货实绩 -->
+    <select id="getUnloadResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select *
+        from (
+        select
+                TUR.RESULT_ID "resultId",
+                APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+                OO.ORDER_NUMBER "orderNumber",
+                RC.CAPACITY_NUMBER "capacityNumber",
+                RM.MATERIAL_NAME "materialName",
+                TWR.RESULT_NET_WEIGHT "resultNetWeight",
+                RW.WAREHOUSE_NAME "warehouseName",
+                TUR.RESULT_START_TIME "resultStartTime",
+                TUR.INSERT_TIME "insertTime"
+        from TMSTRUCK_UNLOAD_RESULT TUR
+        left join TMSTRUCK_TOTAL_RESULT TTR
+        on TUR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+        left join TMSTRUCK_WEIGHT_RESULT TWR
+        on TWR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID
+        left join OMSTRUCK_ORDER OO
+        on OO.ORDER_ID = TTR.ORDER_ID
+        left join AMS_PURCHASE_ORDER APO
+        on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+        left join OMSTRUCK_ORDER_MATERIAL OOM
+        on OOM.ORDER_ID = OO.ORDER_ID
+        left join RMS_MATERIAL RM
+        on OOM.MATERIAL_ID = RM.MATERIAL_ID
+        left join RMS_CAPACITY RC
+        on RC.CAPACITY_ID = OO.CAPACITY_ID
+        left join RMS_WAREHOUSE RW
+        on RW.WAREHOUSE_ID = TUR.RESULT_UNLOAD_PLACE_ID
+        where RESULT_START_TIME is not null
+        )
+        <where>
+            <if test="purchaseOrderNo != null">
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" 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="orderNumber != null">
+                and
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="capacityNumber != null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderMaterialNumber != null">
+                and
+                <foreach collection="orderMaterialNumber" item="item" open="(" separator="or" close=")">
+                    "orderMaterialNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="commssionType != null">
+                and
+                <foreach collection="commssionType" item="item" open="(" separator="or" close=")">
+                    "commssionType" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="supplierName != null">
+                and
+                <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+                    "supplierName" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="orderMaterialWeight != null">
+                and
+                <foreach collection="orderMaterialWeight" item="item" open="(" separator="or" close=")">
+                    "orderMaterialWeight" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+    </select>
+
+    <!-- 通过总实绩Id查询卸货实绩Id -->
+    <select id="getResultIdByTotalId" parameterType="DECIMAL" resultType="DECIMAL">
+        SELECT RESULT_ID
+        FROM TMSTRUCK_UNLOAD_RESULT
+        WHERE RESULT_TOTAL_ID = #{resultTotalId}
+    </select>
+
+    <!--  通过运输订单号 查询实绩Id、总实绩ID -->
+    <select id="selectTotalIdByOrderNo" parameterType="java.lang.String" resultType="java.util.Map">
+        select OO.ORDER_ID         "orderId",
+               TUR.RESULT_ID       "resultId",
+               TTR.RESULT_TOTAL_ID "resultTotalId"
+        from OMSTRUCK_ORDER OO
+                 left join TMSTRUCK_TOTAL_RESULT TTR
+                           on OO.ORDER_ID = TTR.ORDER_ID
+                 left join TMSTRUCK_UNLOAD_RESULT TUR
+                           on TTR.RESULT_TOTAL_ID = TUR.RESULT_TOTAL_ID
+        where OO.ORDER_NUMBER = #{orderNumber}
+    </select>
+
+    <!--  通过卸货地点查询 仓库ID-->
+    <select id="getWarehouseIdByWName" parameterType="string" resultType="java.math.BigDecimal">
+        select WAREHOUSE_ID
+        from RMS_WAREHOUSE
+        where WAREHOUSE_NAME = #{warehouseName}
+    </select>
+
+</mapper>

+ 776 - 0
src/main/resources/com/steerinfo/dil/mapper/TmstruckWeightResultMapper.xml

@@ -0,0 +1,776 @@
+<?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.TmstruckWeightResultMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstruckWeightResult">
+    <id column="WEIGHT_TASK_RESULT_ID" jdbcType="DECIMAL" property="weightTaskResultId" />
+    <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+
+    <result column="RESULT_POUND_NO" jdbcType="VARCHAR" property="resultPoundNo" />
+    <result column="RESULT_GROSS_WEIGHT" jdbcType="DECIMAL" property="resultGrossWeight" />
+    <result column="RESULT_GROSS_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultGrossWeightTime" />
+    <result column="RESULT_TARE_WEIGHT" jdbcType="DECIMAL" property="resultTareWeight" />
+    <result column="RESULT_TARE_WEIGHT_TIME" jdbcType="TIMESTAMP" property="resultTareWeightTime" />
+    <result column="RESULT_NET_WEIGHT" jdbcType="DECIMAL" property="resultNetWeight" />
+    <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="DELETE_NAME" jdbcType="VARCHAR" property="deleteName" />
+    <result column="DELETE_TIME" jdbcType="TIMESTAMP" property="deleteTime" />
+    <result column="RESULT_GROSS_PLACE_ID" jdbcType="DECIMAL" property="resultGrossPlaceId" />
+    <result column="RESULT_TARE_PLACE_ID" jdbcType="DECIMAL" property="resultTarePlaceId" />
+  </resultMap>
+  <sql id="columns">
+    WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID,  RESULT_POUND_NO, RESULT_GROSS_WEIGHT,
+    RESULT_GROSS_WEIGHT_TIME, RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME, RESULT_NET_WEIGHT,
+    INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID, RESULT_TARE_PLACE_ID
+  </sql>
+  <sql id="columns_alias">
+    t.WEIGHT_TASK_RESULT_ID, t.RESULT_TOTAL_ID,  t.RESULT_POUND_NO, t.RESULT_GROSS_WEIGHT,
+    t.RESULT_GROSS_WEIGHT_TIME, t.RESULT_TARE_WEIGHT, t.RESULT_TARE_WEIGHT_TIME, t.RESULT_NET_WEIGHT,
+    t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK,
+    t.DELETE_NAME, t.DELETE_TIME, t.RESULT_GROSS_PLACE_ID, t.RESULT_TARE_PLACE_ID
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM TMSTRUCK_WEIGHT_RESULT
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM TMSTRUCK_WEIGHT_RESULT t
+  </sql>
+  <sql id="where">
+    <where>
+      <if test="weightTaskResultId != null">
+        and WEIGHT_TASK_RESULT_ID = #{weightTaskResultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="resultPoundNo != null and resultPoundNo != ''">
+        and RESULT_POUND_NO = #{resultPoundNo}
+      </if>
+      <if test="resultGrossWeight != null">
+        and RESULT_GROSS_WEIGHT = #{resultGrossWeight}
+      </if>
+      <if test="resultGrossWeightTime != null">
+        and TO_CHAR(RESULT_GROSS_WEIGHT_TIME,'yyyy-MM-dd') = #{resultGrossWeightTime}
+      </if>
+      <if test="resultTareWeight != null">
+        and RESULT_TARE_WEIGHT = #{resultTareWeight}
+      </if>
+      <if test="resultTareWeightTime != null">
+        and TO_CHAR(RESULT_TARE_WEIGHT_TIME,'yyyy-MM-dd') = #{resultTareWeightTime}
+      </if>
+      <if test="resultNetWeight != null">
+        and RESULT_NET_WEIGHT = #{resultNetWeight}
+      </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="deleteName != null and deleteName != ''">
+        and DELETE_NAME = #{deleteName}
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </if>
+      <if test="resultGrossPlaceId != null">
+        and RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId}
+      </if>
+      <if test="resultTarePlaceId != null">
+        and RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where>
+      <if test="weightTaskResultId != null">
+        and WEIGHT_TASK_RESULT_ID = #{weightTaskResultId}
+      </if>
+      <if test="resultTotalId != null">
+        and RESULT_TOTAL_ID = #{resultTotalId}
+      </if>
+      <if test="resultPoundNo != null and resultPoundNo != ''">
+        and RESULT_POUND_NO LIKE '%${resultPoundNo}%'
+      </if>
+      <if test="resultGrossWeight != null">
+        and RESULT_GROSS_WEIGHT = #{resultGrossWeight}
+      </if>
+      <if test="resultGrossWeightTime != null">
+        and TO_CHAR(RESULT_GROSS_WEIGHT_TIME,'yyyy-MM-dd') = #{resultGrossWeightTime}
+      </if>
+      <if test="resultTareWeight != null">
+        and RESULT_TARE_WEIGHT = #{resultTareWeight}
+      </if>
+      <if test="resultTareWeightTime != null">
+        and TO_CHAR(RESULT_TARE_WEIGHT_TIME,'yyyy-MM-dd') = #{resultTareWeightTime}
+      </if>
+      <if test="resultNetWeight != null">
+        and RESULT_NET_WEIGHT = #{resultNetWeight}
+      </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="deleteName != null and deleteName != ''">
+        and DELETE_NAME LIKE '%${deleteName}%'
+      </if>
+      <if test="deleteTime != null">
+        and TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = #{deleteTime}
+      </if>
+      <if test="resultGrossPlaceId != null">
+        and RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId}
+      </if>
+      <if test="resultTarePlaceId != null">
+        and RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from TMSTRUCK_WEIGHT_RESULT
+    where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from TMSTRUCK_WEIGHT_RESULT
+    where 1!=1
+    <if test="resultTotalId != null">
+      or RESULT_TOTAL_ID = #{resultTotalId}
+    </if>
+    <if test="resultPoundNo != null and resultPoundNo != ''">
+      or RESULT_POUND_NO = #{resultPoundNo}
+    </if>
+    <if test="resultGrossWeight != null">
+      or RESULT_GROSS_WEIGHT = #{resultGrossWeight}
+    </if>
+    <if test="resultGrossWeightTime != null">
+      or TO_CHAR(RESULT_GROSS_WEIGHT_TIME,'yyyy-MM-dd') = '#{resultGrossWeightTime}'
+    </if>
+    <if test="resultTareWeight != null">
+      or RESULT_TARE_WEIGHT = #{resultTareWeight}
+    </if>
+    <if test="resultTareWeightTime != null">
+      or TO_CHAR(RESULT_TARE_WEIGHT_TIME,'yyyy-MM-dd') = '#{resultTareWeightTime}'
+    </if>
+    <if test="resultNetWeight != null">
+      or RESULT_NET_WEIGHT = #{resultNetWeight}
+    </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="deleteName != null and deleteName != ''">
+      or DELETE_NAME = #{deleteName}
+    </if>
+    <if test="deleteTime != null">
+      or TO_CHAR(DELETE_TIME,'yyyy-MM-dd') = '#{deleteTime}'
+    </if>
+    <if test="resultGrossPlaceId != null">
+      or RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId}
+    </if>
+    <if test="resultTarePlaceId != null">
+      or RESULT_TARE_PLACE_ID = #{resultTarePlaceId}
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
+    insert into TMSTRUCK_WEIGHT_RESULT (WEIGHT_TASK_RESULT_ID, RESULT_TOTAL_ID,
+                                        RESULT_POUND_NO, RESULT_GROSS_WEIGHT,
+                                        RESULT_GROSS_WEIGHT_TIME, RESULT_TARE_WEIGHT,
+                                        RESULT_TARE_WEIGHT_TIME, RESULT_NET_WEIGHT,
+                                        INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME,
+                                        UPDATE_TIME, INSERT_UPDATE_REMARK, DELETE_NAME,
+                                        DELETE_TIME, RESULT_GROSS_PLACE_ID, RESULT_TARE_PLACE_ID
+    )
+    values (#{weightTaskResultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL},
+            #{resultPoundNo,jdbcType=VARCHAR}, #{resultGrossWeight,jdbcType=DECIMAL},
+            #{resultGrossWeightTime,jdbcType=TIMESTAMP}, #{resultTareWeight,jdbcType=DECIMAL},
+            #{resultTareWeightTime,jdbcType=TIMESTAMP}, #{resultNetWeight,jdbcType=DECIMAL},
+            #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR},
+            #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{deleteName,jdbcType=VARCHAR},
+            #{deleteTime,jdbcType=TIMESTAMP}, #{resultGrossPlaceId,jdbcType=DECIMAL}, #{resultTarePlaceId,jdbcType=DECIMAL}
+           )
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
+    insert into TMSTRUCK_WEIGHT_RESULT
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="weightTaskResultId != null">
+        WEIGHT_TASK_RESULT_ID,
+      </if>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID,
+      </if>
+      <if test="resultPoundNo != null">
+        RESULT_POUND_NO,
+      </if>
+      <if test="resultGrossWeight != null">
+        RESULT_GROSS_WEIGHT,
+      </if>
+      <if test="resultGrossWeightTime != null">
+        RESULT_GROSS_WEIGHT_TIME,
+      </if>
+      <if test="resultTareWeight != null">
+        RESULT_TARE_WEIGHT,
+      </if>
+      <if test="resultTareWeightTime != null">
+        RESULT_TARE_WEIGHT_TIME,
+      </if>
+      <if test="resultNetWeight != null">
+        RESULT_NET_WEIGHT,
+      </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="deleteName != null">
+        DELETE_NAME,
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME,
+      </if>
+      <if test="resultGrossPlaceId != null">
+        RESULT_GROSS_PLACE_ID,
+      </if>
+      <if test="resultTarePlaceId != null">
+        RESULT_TARE_PLACE_ID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="weightTaskResultId != null">
+        #{weightTaskResultId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTotalId != null">
+        #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPoundNo != null">
+        #{resultPoundNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultGrossWeight != null">
+        #{resultGrossWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultGrossWeightTime != null">
+        #{resultGrossWeightTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultTareWeight != null">
+        #{resultTareWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTareWeightTime != null">
+        #{resultTareWeightTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultNetWeight != null">
+        #{resultNetWeight,jdbcType=DECIMAL},
+      </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="deleteName != null">
+        #{deleteName,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        #{deleteTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultGrossPlaceId != null">
+        #{resultGrossPlaceId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTarePlaceId != null">
+        #{resultTarePlaceId,jdbcType=DECIMAL},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
+    update TMSTRUCK_WEIGHT_RESULT
+    set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+        RESULT_POUND_NO = #{resultPoundNo,jdbcType=VARCHAR},
+        RESULT_GROSS_WEIGHT = #{resultGrossWeight,jdbcType=DECIMAL},
+        RESULT_GROSS_WEIGHT_TIME = #{resultGrossWeightTime,jdbcType=TIMESTAMP},
+        RESULT_TARE_WEIGHT = #{resultTareWeight,jdbcType=DECIMAL},
+        RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime,jdbcType=TIMESTAMP},
+        RESULT_NET_WEIGHT = #{resultNetWeight,jdbcType=DECIMAL},
+        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},
+        DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+        RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId,jdbcType=DECIMAL},
+        RESULT_TARE_PLACE_ID = #{resultTarePlaceId,jdbcType=DECIMAL}
+    where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstruckWeightResult">
+    update TMSTRUCK_WEIGHT_RESULT
+    <set>
+      <if test="resultTotalId != null">
+        RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultPoundNo != null">
+        RESULT_POUND_NO = #{resultPoundNo,jdbcType=VARCHAR},
+      </if>
+      <if test="resultGrossWeight != null">
+        RESULT_GROSS_WEIGHT = #{resultGrossWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultGrossWeightTime != null">
+        RESULT_GROSS_WEIGHT_TIME = #{resultGrossWeightTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultTareWeight != null">
+        RESULT_TARE_WEIGHT = #{resultTareWeight,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTareWeightTime != null">
+        RESULT_TARE_WEIGHT_TIME = #{resultTareWeightTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultNetWeight != null">
+        RESULT_NET_WEIGHT = #{resultNetWeight,jdbcType=DECIMAL},
+      </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="deleteName != null">
+        DELETE_NAME = #{deleteName,jdbcType=VARCHAR},
+      </if>
+      <if test="deleteTime != null">
+        DELETE_TIME = #{deleteTime,jdbcType=TIMESTAMP},
+      </if>
+      <if test="resultGrossPlaceId != null">
+        RESULT_GROSS_PLACE_ID = #{resultGrossPlaceId,jdbcType=DECIMAL},
+      </if>
+      <if test="resultTarePlaceId != null">
+        RESULT_TARE_PLACE_ID = #{resultTarePlaceId,jdbcType=DECIMAL},
+      </if>
+    </set>
+    where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select" />
+    where WEIGHT_TASK_RESULT_ID = #{weightTaskResultId,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 TMSTRUCK_WEIGHT_RESULT
+    (WEIGHT_TASK_RESULT_ID,
+    RESULT_TOTAL_ID, RESULT_POUND_NO,
+    RESULT_GROSS_WEIGHT, RESULT_GROSS_WEIGHT_TIME,
+    RESULT_TARE_WEIGHT, RESULT_TARE_WEIGHT_TIME,
+    RESULT_NET_WEIGHT, INSERT_USERNAME,
+    INSERT_TIME, UPDATE_USERNAME,
+    UPDATE_TIME, INSERT_UPDATE_REMARK,
+    DELETE_NAME, DELETE_TIME, RESULT_GROSS_PLACE_ID,
+    RESULT_TARE_PLACE_ID)
+    ( <foreach collection="list" item="item" separator="union all">
+    select
+    #{item.weightTaskResultId,jdbcType=DECIMAL},
+    #{item.resultTotalId,jdbcType=DECIMAL},  #{item.resultPoundNo,jdbcType=VARCHAR},
+    #{item.resultGrossWeight,jdbcType=DECIMAL}, #{item.resultGrossWeightTime,jdbcType=TIMESTAMP},
+    #{item.resultTareWeight,jdbcType=DECIMAL}, #{item.resultTareWeightTime,jdbcType=TIMESTAMP},
+    #{item.resultNetWeight,jdbcType=DECIMAL}, #{item.insertUsername,jdbcType=VARCHAR},
+    #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR},
+    #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR},
+    #{item.deleteName,jdbcType=VARCHAR}, #{item.deleteTime,jdbcType=TIMESTAMP}, #{item.resultGrossPlaceId,jdbcType=DECIMAL},
+    #{item.resultTarePlaceId,jdbcType=DECIMAL} from dual
+  </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+    update TMSTRUCK_WEIGHT_RESULT
+    set
+    WEIGHT_TASK_RESULT_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.weightTaskResultId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_TOTAL_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTotalId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_POUND_NO=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultPoundNo,jdbcType=VARCHAR}
+    </foreach>
+    ,RESULT_GROSS_WEIGHT=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_GROSS_WEIGHT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossWeightTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_TARE_WEIGHT=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_TARE_WEIGHT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTareWeightTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_NET_WEIGHT=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultNetWeight,jdbcType=DECIMAL}
+    </foreach>
+    ,INSERT_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,INSERT_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,UPDATE_USERNAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+    </foreach>
+    ,UPDATE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,INSERT_UPDATE_REMARK=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETE_NAME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteName,jdbcType=VARCHAR}
+    </foreach>
+    ,DELETE_TIME=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.deleteTime,jdbcType=TIMESTAMP}
+    </foreach>
+    ,RESULT_GROSS_PLACE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultGrossPlaceId,jdbcType=DECIMAL}
+    </foreach>
+    ,RESULT_TARE_PLACE_ID=
+    <foreach close="end" collection="list" index="index" item="item" open="case WEIGHT_TASK_RESULT_ID" separator=" ">
+      when #{item.weightTaskResultId,jdbcType=DECIMAL} then #{item.resultTarePlaceId,jdbcType=DECIMAL}
+    </foreach>
+    where WEIGHT_TASK_RESULT_ID in
+    <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+      #{item.weightTaskResultId,jdbcType=DECIMAL}
+    </foreach>
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from TMSTRUCK_WEIGHT_RESULT
+    where WEIGHT_TASK_RESULT_ID in
+    <foreach close=")" collection="list" item="id" open="(" 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>
+
+  <!--  获取最大ID值  -->
+  <select id="selectMaxId" resultType="java.math.BigDecimal">
+    select max(TWR.WEIGHT_TASK_RESULT_ID)
+    from TMSTRUCK_WEIGHT_RESULT TWR
+  </select>
+
+  <!--  通过运输订单号 查询实绩Id、总实绩ID -->
+  <select id="selectTotalIdByOrderNo" parameterType="java.lang.String" resultType="java.util.Map">
+    select
+           OO.ORDER_ID "orderId",
+           TWR.WEIGHT_TASK_RESULT_ID "weightTaskResultId",
+           TWR.RESULT_GROSS_WEIGHT "resultGrossWeight",
+           TTR.RESULT_TOTAL_ID "resultTotalId"
+    from OMSTRUCK_ORDER OO
+           left join TMSTRUCK_TOTAL_RESULT TTR
+                     on OO.ORDER_ID = TTR.ORDER_ID
+           left join TMSTRUCK_WEIGHT_RESULT TWR
+                     on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+    where OO.ORDER_NUMBER = #{orderNumber}
+  </select>
+
+  <!--  通过汽车衡编号查询对应的汽车衡ID  -->
+  <select id="selectTruckCalculateId" parameterType="java.lang.String" resultType="int">
+    select TRUCK_CALCULATE_ID
+    from RMS_TRUCK_CALCULATE
+    where TRUCK_CALCULATE_NUMBER = #{truckCalculateNumber}
+  </select>
+
+  <!--  查询所有的计毛实绩  -->
+  <select id="getAllJiMaoResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select *
+    from (
+    select
+      TWR.WEIGHT_TASK_RESULT_ID    "weightTaskResultId",
+      APO.PURCHASE_ORDER_NO        "purchaseOrderNo",
+      RM.MATERIAL_NAME             "materialName",
+      OO.ORDER_NUMBER              "orderNumber",
+      RC.CAPACITY_NUMBER           "capacityNumber",
+      RTC.TRUCK_CALCULATE_NUMBER   "truckCalculateNumber",
+      TWR.RESULT_GROSS_WEIGHT      "resultGrossWeight",
+      TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+      RS.SUPPLIER_NAME             "supplierName",
+    RCON. CONSIGNEE_COMPANY_NAME "consigneeCompanyName"
+    from TMSTRUCK_WEIGHT_RESULT TWR
+    left join TMSTRUCK_TOTAL_RESULT TTR
+    on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+    left join OMSTRUCK_ORDER OO
+    on TTR.ORDER_ID = OO.ORDER_ID
+    left join AMS_PURCHASE_ORDER APO
+    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+    left join RMS_CAPACITY RC
+    on RC.CAPACITY_ID = OO.CAPACITY_ID
+    left join RMS_TRUCK_CALCULATE RTC
+    on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_GROSS_PLACE_ID
+    left join OMSTRUCK_ORDER_MATERIAL OOM
+        on OOM.ORDER_ID = OO.ORDER_ID
+    left join RMS_MATERIAL RM
+    on RM.MATERIAL_ID = OOM.MATERIAL_ID
+    left join RMS_SUPPLIER RS
+    on RS.SUPPLIER_ID = APO.SUPPLIER_UNIT_ID
+    left join RMS_CONSIGNEE RCON
+    on RCON.CONSIGNEE_ID = APO.RECEIVE_UNIT_ID
+        where RESULT_GROSS_WEIGHT_TIME is not null
+    )
+    <where>
+      <if test="purchaseOrderNo != null">
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" 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="orderNumber != null">
+        and
+        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+          "orderNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="truckCalculateNumber != null">
+        and
+        <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
+          "truckCalculateNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultGrossWeight != null">
+        and
+        <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
+          "resultGrossWeight" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="supplierName != null">
+        and
+        <foreach collection="supplierName" item="item" open="(" separator="or" close=")">
+          "supplierName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultGrossWeightTime != null">
+        and
+        <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
+          "resultGrossWeightTime" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+    <if test="orderField == null  ">
+      order by "resultGrossWeightTime" desc
+    </if>
+  </select>
+
+  <!--  查询所有的计皮实绩  -->
+  <select id="getAllJiPiResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+    select *
+    from (
+    select
+    TWR.WEIGHT_TASK_RESULT_ID    "weightTaskResultId",
+    APO.PURCHASE_ORDER_NO        "purchaseOrderNo",
+    RM.MATERIAL_NAME             "materialName",
+    OO.ORDER_NUMBER              "orderNumber",
+    RC.CAPACITY_NUMBER           "capacityNumber",
+    RTC.TRUCK_CALCULATE_NUMBER   "truckCalculateNumber",
+    TWR.RESULT_GROSS_WEIGHT      "resultGrossWeight",
+    TWR.RESULT_GROSS_WEIGHT_TIME "resultGrossWeightTime",
+    DB.RESULT_FOREIGN_SHIP_NAME  "resultForeignShipName",
+    TWR.RESULT_TARE_WEIGHT       "resultTareWeight",
+    TWR.RESULT_TARE_WEIGHT_TIME  "resultTareWeightTime",
+    TWR.RESULT_NET_WEIGHT        "resultNetWeight",
+    TWR.RESULT_POUND_NO          "resultPoundNo"
+    from TMSTRUCK_WEIGHT_RESULT TWR
+    left join TMSTRUCK_TOTAL_RESULT TTR
+    on TWR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+    left join OMSTRUCK_ORDER OO
+    on TTR.ORDER_ID = OO.ORDER_ID
+    left join AMS_PURCHASE_ORDER APO
+    on APO.PURCHASE_ORDER_ID = OO.ORDER_PLAN_ID
+    left join DIL_BATCH DB
+    on DB.BATCH_ID = APO.BATCH_ID
+    left join RMS_CAPACITY RC
+    on RC.CAPACITY_ID = OO.CAPACITY_ID
+    left join RMS_TRUCK_CALCULATE RTC
+    on RTC.TRUCK_CALCULATE_ID = TWR.RESULT_TARE_PLACE_ID
+    left join OMSTRUCK_ORDER_MATERIAL OOM
+        on OOM.ORDER_ID = OO.ORDER_ID
+    left join RMS_MATERIAL RM
+    on RM.MATERIAL_ID = OOM.MATERIAL_ID
+        where RESULT_TARE_WEIGHT_TIME is not null
+    )
+    <where>
+      <if test="purchaseOrderNo != null">
+        <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+          "purchaseOrderNo" 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="orderNumber != null">
+        and
+        <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+          "orderNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="capacityNumber != null">
+        and
+        <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+          "capacityNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="truckCalculateNumber != null">
+        and
+        <foreach collection="truckCalculateNumber" item="item" open="(" separator="or" close=")">
+          "truckCalculateNumber" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultGrossWeight != null">
+        and
+        <foreach collection="resultGrossWeight" item="item" open="(" separator="or" close=")">
+          "resultGrossWeight" 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="resultGrossWeightTime != null">
+        and
+        <foreach collection="resultGrossWeightTime" item="item" open="(" separator="or" close=")">
+          "resultGrossWeightTime" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultTareWeight != null">
+        and
+        <foreach collection="resultTareWeight" item="item" open="(" separator="or" close=")">
+          "resultTareWeight" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultPoundNo != null">
+        and
+        <foreach collection="resultPoundNo" item="item" open="(" separator="or" close=")">
+          "resultPoundNo" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultTareWeightTime != null">
+        and
+        <foreach collection="resultTareWeightTime" item="item" open="(" separator="or" close=")">
+          "resultTareWeightTime" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="resultNetWeight != null">
+        and
+        <foreach collection="resultNetWeight" item="item" open="(" separator="or" close=")">
+          "resultNetWeight" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+    <if test="orderField == null  ">
+      order by "resultTareWeightTime" desc
+    </if>
+  </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

Some files were not shown because too many files changed in this diff