txf 3 år sedan
incheckning
52fb7b3500
44 ändrade filer med 6351 tillägg och 0 borttagningar
  1. 8 0
      .gitignore
  2. 157 0
      pom.xml
  3. 26 0
      src/main/java/com/steerinfo/DilApplicationMain.java
  4. 22 0
      src/main/java/com/steerinfo/dil/config/CorsConfig1.java
  5. 43 0
      src/main/java/com/steerinfo/dil/config/WebSocketConfig.java
  6. 45 0
      src/main/java/com/steerinfo/dil/controller/QmsQueueGridController.java
  7. 116 0
      src/main/java/com/steerinfo/dil/controller/QmsQueueListController.java
  8. 317 0
      src/main/java/com/steerinfo/dil/controller/QmsQueueResultController.java
  9. 21 0
      src/main/java/com/steerinfo/dil/feign/ColumnDataFeign.java
  10. 18 0
      src/main/java/com/steerinfo/dil/feign/ContractFeignService.java
  11. 23 0
      src/main/java/com/steerinfo/dil/feign/TmsTruckFeign.java
  12. 26 0
      src/main/java/com/steerinfo/dil/interceptors/MyLocaleChangeInterceptor.java
  13. 14 0
      src/main/java/com/steerinfo/dil/mapper/QmsQueueGridMapper.java
  14. 31 0
      src/main/java/com/steerinfo/dil/mapper/QmsQueueListMapper.java
  15. 101 0
      src/main/java/com/steerinfo/dil/mapper/QmsQueueResultMapper.java
  16. 11 0
      src/main/java/com/steerinfo/dil/mapper/RmsCapacityMapper.java
  17. 183 0
      src/main/java/com/steerinfo/dil/model/QmsQueueGrid.java
  18. 183 0
      src/main/java/com/steerinfo/dil/model/QmsQueueList.java
  19. 363 0
      src/main/java/com/steerinfo/dil/model/QmsQueueResult.java
  20. 362 0
      src/main/java/com/steerinfo/dil/model/RmsCapacity.java
  21. 23 0
      src/main/java/com/steerinfo/dil/service/IQmsQueueGridService.java
  22. 42 0
      src/main/java/com/steerinfo/dil/service/IQmsQueueListService.java
  23. 73 0
      src/main/java/com/steerinfo/dil/service/IQmsQueueResultService.java
  24. 23 0
      src/main/java/com/steerinfo/dil/service/IRmsCapacityService.java
  25. 32 0
      src/main/java/com/steerinfo/dil/service/impl/QmsQueueGridServiceImpl.java
  26. 266 0
      src/main/java/com/steerinfo/dil/service/impl/QmsQueueListServiceImpl.java
  27. 284 0
      src/main/java/com/steerinfo/dil/service/impl/QmsQueueResultServiceImpl.java
  28. 29 0
      src/main/java/com/steerinfo/dil/service/impl/RmsCapacityServiceImpl.java
  29. 71 0
      src/main/java/com/steerinfo/dil/util/BaseRESTfulController.java
  30. 38 0
      src/main/java/com/steerinfo/dil/util/ColumnDataUtil.java
  31. 136 0
      src/main/java/com/steerinfo/dil/util/DataChange.java
  32. 33 0
      src/main/java/com/steerinfo/dil/util/PageListAdd.java
  33. 11 0
      src/main/java/com/steerinfo/dil/util/util.java
  34. 37 0
      src/main/java/com/steerinfo/dil/websocket/WebSocketController.java
  35. 8 0
      src/main/resources/application-dev.yml
  36. 8 0
      src/main/resources/application-prod.yml
  37. 0 0
      src/main/resources/application.yml
  38. 63 0
      src/main/resources/bootstrap.yml
  39. 323 0
      src/main/resources/com/steerinfo/dil/mapper/QmsQueueGridMapper.xml
  40. 432 0
      src/main/resources/com/steerinfo/dil/mapper/QmsQueueListMapper.xml
  41. 1608 0
      src/main/resources/com/steerinfo/dil/mapper/QmsQueueResultMapper.xml
  42. 657 0
      src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml
  43. 80 0
      src/main/resources/log4j.properties
  44. 4 0
      src/main/resources/message.properties

+ 8 - 0
.gitignore

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

+ 157 - 0
pom.xml

@@ -0,0 +1,157 @@
+<?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>QMS_QUEUE_LIST</param>&lt;!&ndash;运力&ndash;&gt;-->
+                        <param>TMSTRUCK_LOAD_RESULT</param><!--运力-->
+                    </tables>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>steerinfo</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>repackage</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+        <resources>
+            <!-- maven项目中src源代码下的xml等资源文件编译进classes文件夹,
+                注意:如果没有这个,它会自动搜索resources下是否有mapper.xml文件,
+                如果没有就会报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.pet.mapper.PetMapper.selectByPrimaryKey-->
+            <resource>
+                <directory>src/main/resources</directory>
+                <includes>
+                    <include>**/*.xml</include>
+                </includes>
+            </resource>
+
+            <!--  将resources目录下的配置文件编译进classes文件  -->
+            <resource>
+                <directory>src/main/resources</directory>
+            </resource>
+        </resources>
+    </build>
+</project>

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

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

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

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

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

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

+ 45 - 0
src/main/java/com/steerinfo/dil/controller/QmsQueueGridController.java

@@ -0,0 +1,45 @@
+package com.steerinfo.dil.controller;
+
+import com.steerinfo.framework.controller.BaseRESTfulController;
+import com.steerinfo.framework.controller.RESTfulResult;
+import com.steerinfo.framework.service.pagehelper.PageList;
+import com.steerinfo.framework.utils.collection.ListUtils;
+import com.steerinfo.dil.model.QmsQueueGrid;
+import com.steerinfo.dil.service.IQmsQueueGridService;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.shiro.authz.annotation.RequiresPermissions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.ArrayList;
+import java.math.BigDecimal;
+
+/**
+ * QmsQueueGrid RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:29
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:QmsQueueGrid RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/qmsqueuegrids")
+public class QmsQueueGridController extends BaseRESTfulController {
+
+    @Autowired
+    IQmsQueueGridService qmsQueueGridService;
+
+
+
+}

+ 116 - 0
src/main/java/com/steerinfo/dil/controller/QmsQueueListController.java

@@ -0,0 +1,116 @@
+package com.steerinfo.dil.controller;
+
+
+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.dil.service.IQmsQueueListService;
+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.*;
+import java.math.BigDecimal;
+
+/**
+ * QmsQueueList RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:29
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:QmsQueueList RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/qmsqueuelists")
+public class QmsQueueListController extends BaseRESTfulController {
+
+    @Autowired
+    IQmsQueueListService qmsQueueListService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="指令接收-->新增排队链表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderNumber", value = "运输订单号", required = false, dataType = "String"),
+    })
+    @PostMapping("/addQueueList")
+    public RESTfulResult addQueueList(@RequestBody(required = false)  Map<String, Object> mapValue){
+        String orderNumber = (String) mapValue.get("orderNumber");
+        int i = qmsQueueListService.addQueueList(orderNumber);
+        return success(i);
+    }
+
+    @ApiOperation(value="排队转移-->新增排队链表:实绩Id、门岗名称、转移原因")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderNumber", value = "运输订单号", required = false, dataType = "String"),
+    })
+    @PostMapping("/changeQueue")
+    public RESTfulResult changeQueue(@RequestBody(required=false) Map<String, Object> mapValue){
+        int i = qmsQueueListService.changeQueue(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="排队取消-->修改排队链表deleted为1")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderNumber", value = "运输订单号", required = false, dataType = "String"),
+    })
+    @PostMapping("/queueCancel")
+    public RESTfulResult queueCancel(@RequestBody(required=false) Map<String, Object> mapValue){
+        int i = qmsQueueListService.queueCancel(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="排队插队-->修改排队链表顺序号为最小")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderNumber", value = "运输订单号", required = false, dataType = "String"),
+    })
+    @PostMapping("/queueCutInLine")
+    public RESTfulResult queueCutInLine(@RequestBody(required=false) Map<String, Object> mapValue){
+        int i = qmsQueueListService.queueCutInLine(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="排队结束-->修改deleted = 1")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "orderNumber", value = "运输订单号", required = false, dataType = "String"),
+    })
+    @PostMapping("/queueEndByPDA")
+    public RESTfulResult queueEnd(@RequestBody(required=false) Map<String, Object> mapValue){
+        int i = qmsQueueListService.queueEndByPDA(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="链表监控")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(134)", 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("/listMonitor")
+    public RESTfulResult listMonitor(@RequestBody(required=false) Map<String,Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allListMonitor = qmsQueueListService.listMonitor(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> listMonitor = qmsQueueListService.listMonitor(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allListMonitor,listMonitor);
+        return success(pageList);
+    }
+
+}

+ 317 - 0
src/main/java/com/steerinfo/dil/controller/QmsQueueResultController.java

@@ -0,0 +1,317 @@
+package com.steerinfo.dil.controller;
+
+
+import com.steerinfo.dil.model.QmsQueueResult;
+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.dil.service.IQmsQueueResultService;
+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.*;
+
+/**
+ * QmsQueueResult RESTful接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:27
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:QmsQueueResult RESTful接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@RestController
+@RequestMapping("/${api.version}/qmsqueueresults")
+public class QmsQueueResultController extends BaseRESTfulController {
+
+    @Autowired
+    IQmsQueueResultService qmsQueueResultService;
+
+    @Autowired
+    ColumnDataUtil columnDataUtil;
+
+    @ApiOperation(value="触发电子围栏-->新增排队实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
+    })
+    @PostMapping("/addQueueResult")
+    public RESTfulResult addQueueResult(String orderNumber){
+        Map<String, Object> mapValue = new HashMap<>();
+        mapValue.put("orderNumber", orderNumber);
+        int i = qmsQueueResultService.addQueueResult(mapValue);
+        return success(i);
+    }
+
+    @ApiOperation(value="查询排队申请")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(125)", 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("/getQueueApply")
+    public RESTfulResult getQueueApply(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allQueueApply = qmsQueueResultService.getQueueApply(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> queueApply = qmsQueueResultService.getQueueApply(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allQueueApply,queueApply);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="查询执行中订单")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(156)", 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("/getAllExecutionOrder")
+    public RESTfulResult getAllExecutionOrder(@RequestBody(required=false) Map<String,Object> mapValue,
+                                       Integer apiId,
+                                       Integer pageNum,
+                                       Integer pageSize,
+                                       Integer orderType,
+                                       Integer status
+    ){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        mapValue.put("orderTypee", orderType);
+        mapValue.put("orderStatus", status);
+
+        //不分页筛选数据
+        List<Map<String, Object>> AllExecutionOrder = qmsQueueResultService.getAllExecutionOrder(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> executionOrder = qmsQueueResultService.getAllExecutionOrder(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, AllExecutionOrder,executionOrder);
+        return success(pageList);
+    }
+
+
+    @ApiOperation(value="指令接收")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(130)", 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("/orderReceive")
+    public RESTfulResult orderReceive(@RequestBody(required=false) Map<String,Object> mapValue,
+                                       Integer apiId,
+                                       Integer pageNum,
+                                       Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allOrderReceive = qmsQueueResultService.orderReceive(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> orderReceive = qmsQueueResultService.orderReceive(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allOrderReceive,orderReceive);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="查询排队开始")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(128)", 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("/getQueueListByQueueUp")
+    public RESTfulResult getQueueListByQueueUp(@RequestBody(required=false) Map<String,Object> mapValue,
+                                       Integer apiId,
+                                       Integer pageNum,
+                                       Integer pageSize,
+                                       Integer gridId
+    ){
+        if(mapValue == null){
+            mapValue = new HashMap<>();
+        }
+        if(gridId != null){
+            mapValue.put("gridId", gridId);
+        }
+        //不分页筛选数据
+        List<Map<String, Object>> allQueueApply = qmsQueueResultService.getQueueListByQueueUp(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> queueApply = qmsQueueResultService.getQueueListByQueueUp(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allQueueApply,queueApply);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="查询排队转移")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(124)", 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("/getChangeQueue")
+    public RESTfulResult getChangeQueue(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allChangeQueueMes = qmsQueueResultService.getChangeQueueMes(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> changeQueueMes = qmsQueueResultService.getChangeQueueMes(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allChangeQueueMes,changeQueueMes);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="查询排队取消")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(131)", 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("/getQueueCancel")
+    public RESTfulResult getQueueCancel(@RequestBody(required=false) Map<String,Object> mapValue,
+                                               Integer apiId,
+                                               Integer pageNum,
+                                               Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allQueueCancel = qmsQueueResultService.getQueueCancel(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> queueCancel = qmsQueueResultService.getQueueCancel(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allQueueCancel,queueCancel);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="通过Id查询排队取消实绩")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
+    })
+    @PostMapping("/getQueueCancelByResultId/{resultId}")
+    public RESTfulResult getQueueCancelByResultId(@PathVariable("resultId") Integer resultId){
+        List<Map<String, Object>> mes = qmsQueueResultService.getQueueCancelByResultId(resultId);
+        return success(mes);
+    }
+
+    @ApiOperation(value="修改排队取消实绩:时间、原因")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "", required = false, dataType = "Map"),
+    })
+    @PostMapping("/updateQueueCancel")
+    public RESTfulResult updateQueueCancel(@RequestBody QmsQueueResult qmsQueueResult){
+        int i = qmsQueueResultService.updateQueueCancel(qmsQueueResult);
+        return success(i);
+    }
+
+    @ApiOperation(value="查询排队插队")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(132)", 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("/getQueueInsert")
+    public RESTfulResult getQueueInsert(@RequestBody(required=false) Map<String,Object> mapValue,
+                                        Integer apiId,
+                                        Integer pageNum,
+                                        Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allInsetResult = qmsQueueResultService.getQueueInsert(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> insertResult = qmsQueueResultService.getQueueInsert(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allInsetResult,insertResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="查询排队结束")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(133)", 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("/getQueueEndResult")
+    public RESTfulResult getQueueEndResult(@RequestBody(required=false) Map<String,Object> mapValue,
+                                              Integer apiId,
+                                              Integer pageNum,
+                                              Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allQueueEndResult = qmsQueueResultService.getQueueEndResult(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> queueEndResult = qmsQueueResultService.getQueueEndResult(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allQueueEndResult,queueEndResult);
+        return success(pageList);
+    }
+
+    @ApiOperation(value="汽车监控")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "mapValue", value = "表头和参数", required = false, dataType = "map"),
+            @ApiImplicitParam(name = "apiId(135)", 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("/capacityMonitor")
+    public RESTfulResult capacityMonitor(@RequestBody(required=false) Map<String,Object> mapValue,
+                                           Integer apiId,
+                                           Integer pageNum,
+                                           Integer pageSize
+    ){
+        //不分页筛选数据
+        List<Map<String, Object>> allCapacityMonitor = qmsQueueResultService.capacityMonitor(mapValue);
+        PageHelper.startPage(pageNum,pageSize);
+        //分页数据
+        List<Map<String, Object>> capacityMonitor = qmsQueueResultService.capacityMonitor(mapValue);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allCapacityMonitor,capacityMonitor);
+        return success(pageList);
+    }
+
+
+    @ApiOperation(value="查询各仓库,门岗的排队状态列表")
+    @PostMapping("/getQueueStatusList")
+    public RESTfulResult getQueueStatusList(){
+        List<Map<String, Object>> queueStatusList = qmsQueueResultService.getQueueStatusList();
+        return success(queueStatusList);
+    }
+
+    @ApiOperation(value="通过车牌号查询司机接收排队信息")
+    @PostMapping("/getOrderReceive/{capacityNumber}")
+    public RESTfulResult getOrderReceive(@PathVariable("capacityNumber") String capacityNumber){
+        List<Map<String, Object>> orderReceiveMap = qmsQueueResultService.getOrderReceive2(capacityNumber);
+        return success(orderReceiveMap);
+    }
+
+    @ApiOperation(value="通过车牌号取消排队")
+    @PostMapping("/cancelQueue")
+    public RESTfulResult cancelQueue(@RequestBody Map<String,Object> mapValue){
+        int code = qmsQueueResultService.cancelQueue(mapValue);
+        return success(code);
+    }
+}

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

+ 18 - 0
src/main/java/com/steerinfo/dil/feign/ContractFeignService.java

@@ -0,0 +1,18 @@
+package com.steerinfo.dil.feign;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zhangnan
+ * @Date 2021/6/8 9:24
+ * @Version 1.0
+ */
+@FeignClient("DIL-API")
+public interface ContractFeignService {
+    @RequestMapping("/getContractPurchaseByNumber")
+    List<Map<String, Object>> avc(Map<String, Object> map);
+}

+ 23 - 0
src/main/java/com/steerinfo/dil/feign/TmsTruckFeign.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.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import java.util.Map;
+
+/**
+ * @ author    :TXF
+ * @ time      :2021/10/8 19:07
+ */
+
+
+@FeignClient(value = "dil-tms-truck-dev",url = "localhost:8088")
+public interface TmsTruckFeign {
+
+    @PostMapping("api/v1/truckTms/tmstruckenfactoryresults/updateEnactoryResult")
+    public RESTfulResult updateEnactoryResult(@RequestBody(required = false) Map<String, Object> mapValue);
+
+}

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

+ 14 - 0
src/main/java/com/steerinfo/dil/mapper/QmsQueueGridMapper.java

@@ -0,0 +1,14 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.QmsQueueGrid;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface QmsQueueGridMapper extends IBaseMapper<QmsQueueGrid, BigDecimal> {
+
+}

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

@@ -0,0 +1,31 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.QmsQueueList;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface QmsQueueListMapper extends IBaseMapper<QmsQueueList, BigDecimal> {
+    //查询主键MaxId
+    BigDecimal selectMaxId();
+
+    //查询当前链表最大序号
+    Integer getMaxListNodeOrder(Map<String, Object> map);
+
+    //通过运输订单号 或实绩Id 关联 实绩总表 查询 排队实绩
+    Map<String, Object> getQueueResultByOrderNumber(Map<String, Object> map);
+
+    //通过链表ID 查询当前网格id
+    BigDecimal getGridIdByListId(BigDecimal listId);
+
+    //通过链表Id查询当前网格中所有的排队车数 以及最小的顺序号
+    Map<String, Object> getQueueNumAndMin(BigDecimal gridId);
+
+    //链表监控
+    List<Map<String, Object>> listMonitor(Map<String, Object> map);
+
+}

+ 101 - 0
src/main/java/com/steerinfo/dil/mapper/QmsQueueResultMapper.java

@@ -0,0 +1,101 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.QmsQueueResult;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import java.math.*;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface QmsQueueResultMapper extends IBaseMapper<QmsQueueResult, BigDecimal> {
+    //查询最大主键
+    BigDecimal selectMaxId();
+
+    //车辆进入电子围栏后触发排队申请 发送数据:运输订单号 返回 运力Id、实绩总表Id、订单ID
+    Map<String, Object> queryCIdAndTIdByOrderNumber(String orderNumber);
+
+    //人工添加排队申请查询所有执行中订单 订单状态 :1
+    List<Map<String, Object>> getAllExecutionOrder(Map<String, Object> map);
+
+    //根据运输订单Id查询物资Id
+    BigDecimal queryOrderMesByOrderId(BigDecimal orderId);
+
+    //根据物资Id、门岗规则 查询门岗id (可能会查询出多个)
+    List<BigDecimal> queryGatepostByMaterialId(Map<String, Object> map);
+
+    //通过门岗名称查询门岗ID
+    BigDecimal getGatepostIdByGatepostName(String gatepostName);
+
+    //通过门岗ID 和 网格类型 匹配 网格主键
+    BigDecimal getGridIdByGatepostIdAndGridType(Map<String, Object> map);
+
+    //查询排队申请 判断条件:接收时间为空
+    //查询指令下发 判断条件:接收时间为空
+    List<Map<String, Object>> getQueueApply(Map<String, Object> map);
+
+    //指令接收 通过接收时间判断是否已接收  查询判断条件:是否结束进厂
+    List<Map<String, Object>> getOrderReceive(Map<String, Object> map);
+
+    //查询排队开始、详情数据  正在排队的数据
+    List<Map<String, Object>> getQueueListByQueueUp(Map<String, Object> map);
+
+    //查询排队转移详情
+    List<Map<String, Object>> getChangeQueueMes(Map<String, Object> map);
+
+    //通过实绩Id查询链表ID
+    Map<String, Object> getListIdByResultId(BigDecimal resultId);
+
+    //查询排队取消
+    List<Map<String, Object>> getQueueCancel(Map<String, Object> map);
+
+    //通过实绩Id查询排队取消实绩
+    List<Map<String, Object>> getQueueCancelByResultId(Integer resultId);
+
+    //查询插队详情
+    List<Map<String, Object>> getQueueInsert(Map<String, Object> map);
+
+    //查询排队结束
+    List<Map<String, Object>> getQueueEndResult(Map<String, Object> map);
+
+    //汽车监控
+    List<Map<String, Object>> capacityMonitor(Map<String, Object> map);
+
+    /*
+    ***************APP**********************
+    */
+
+    // 通过门岗查询门岗的排队数
+    List<Map<String, Object>> getQueueListByGatepost(BigDecimal gatepostId);
+
+    // 查询排队取消列表
+    List<Map<String, Object>> getQueueCancelList();
+
+    // 查看各个门岗,仓库的实时状态
+    List<Map<String, Object>> getQueueStatusList();
+
+    // 查询司机接单列表
+    List<Map<String, Object>> getOrderReceiveList();
+
+    // 查询司机接单
+    List<Map<String, Object>> getOrderReceive2(Map<String,Object> map);
+
+    // 通过运单号得到总实绩id
+    BigDecimal getResultTotalId(String orderNumber);
+
+    // 通过总实绩id和运单id查询排队实绩id
+    BigDecimal getQueueResultId(Map<String,Object> map);
+
+    // 通过运力id得到实绩id
+    BigDecimal getResultIdByCapacityId(String capacityNumber);
+
+    // 通过车牌号得到网格id
+    BigDecimal getGridId(String capacityNumber);
+
+    // 通过车牌号得到网格id
+    BigDecimal getGridIdNotNull(String capacityNumber);
+
+
+}

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

@@ -0,0 +1,11 @@
+package com.steerinfo.dil.mapper;
+
+import com.steerinfo.dil.model.RmsCapacity;
+import com.steerinfo.framework.mapper.IBaseMapper;
+
+import org.apache.ibatis.annotations.Mapper;
+
+@Mapper
+public interface RmsCapacityMapper extends IBaseMapper<RmsCapacity, Short> {
+
+}

+ 183 - 0
src/main/java/com/steerinfo/dil/model/QmsQueueGrid.java

@@ -0,0 +1,183 @@
+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 QmsQueueGrid implements IBasePO<BigDecimal> {
+    /**
+     * 排队网格ID(GRID_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="排队网格ID",required=true)
+    private BigDecimal gridId;
+
+    /**
+     * 排队地点名称(GRID_NAME,VARCHAR,20)
+     */
+    @ApiModelProperty(value="排队地点名称",required=false)
+    private String gridName;
+
+    /**
+     * 排队网格类型1:成品仓库;2:原料仓库;3:进厂门岗;4:毛重衡;5:皮重衡;6:出厂门岗(GRID_TYPE,DECIMAL,38)
+     */
+    @ApiModelProperty(value="排队网格类型1:成品仓库;2:原料仓库;3:进厂门岗;4:毛重衡;5:皮重衡;6:出厂门岗",required=false)
+    private BigDecimal gridType;
+
+    /**
+     * 排队地点id(QUEUE_LOCATION_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="排队地点id",required=false)
+    private BigDecimal queueLocationId;
+
+    /**
+     * 排队网格优先次序(GRID_ORDER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="排队网格优先次序",required=false)
+    private BigDecimal gridOrder;
+
+    /**
+     * 记录创建人(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.gridId;
+    }
+
+    @Override
+    public void setId(BigDecimal gridId) {
+        this.gridId = gridId;
+    }
+
+    public BigDecimal getGridId() {
+        return gridId;
+    }
+
+    public void setGridId(BigDecimal gridId) {
+        this.gridId = gridId;
+    }
+
+    public String getGridName() {
+        return gridName;
+    }
+
+    public void setGridName(String gridName) {
+        this.gridName = gridName == null ? null : gridName.trim();
+    }
+
+    public BigDecimal getGridType() {
+        return gridType;
+    }
+
+    public void setGridType(BigDecimal gridType) {
+        this.gridType = gridType;
+    }
+
+    public BigDecimal getQueueLocationId() {
+        return queueLocationId;
+    }
+
+    public void setQueueLocationId(BigDecimal queueLocationId) {
+        this.queueLocationId = queueLocationId;
+    }
+
+    public BigDecimal getGridOrder() {
+        return gridOrder;
+    }
+
+    public void setGridOrder(BigDecimal gridOrder) {
+        this.gridOrder = gridOrder;
+    }
+
+    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(", gridId=").append(gridId);
+        sb.append(", gridName=").append(gridName);
+        sb.append(", gridType=").append(gridType);
+        sb.append(", queueLocationId=").append(queueLocationId);
+        sb.append(", gridOrder=").append(gridOrder);
+        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();
+    }
+}

+ 183 - 0
src/main/java/com/steerinfo/dil/model/QmsQueueList.java

@@ -0,0 +1,183 @@
+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 QmsQueueList implements IBasePO<BigDecimal> {
+    /**
+     * 主键ID(LIST_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="主键ID",required=true)
+    private BigDecimal listId;
+
+    /**
+     * 排队网格ID(GRID_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="排队网格ID",required=false)
+    private BigDecimal gridId;
+
+    /**
+     * 运力ID(CAPACITY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运力ID",required=false)
+    private BigDecimal capacityId;
+
+    /**
+     * 排队链表顺序号(LIST_NODE_ORDER,DECIMAL,38)
+     */
+    @ApiModelProperty(value="排队链表顺序号",required=false)
+    private BigDecimal listNodeOrder;
+
+    /**
+     * 逻辑删除(DELETED,VARCHAR,1)
+     */
+    @ApiModelProperty(value="逻辑删除",required=false)
+    private BigDecimal deleted;
+
+    /**
+     * 记录创建人(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.listId;
+    }
+
+    @Override
+    public void setId(BigDecimal listId) {
+        this.listId = listId;
+    }
+
+    public BigDecimal getListId() {
+        return listId;
+    }
+
+    public void setListId(BigDecimal listId) {
+        this.listId = listId;
+    }
+
+    public BigDecimal getGridId() {
+        return gridId;
+    }
+
+    public void setGridId(BigDecimal gridId) {
+        this.gridId = gridId;
+    }
+
+    public BigDecimal getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(BigDecimal capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public BigDecimal getListNodeOrder() {
+        return listNodeOrder;
+    }
+
+    public void setListNodeOrder(BigDecimal listNodeOrder) {
+        this.listNodeOrder = listNodeOrder;
+    }
+
+    public BigDecimal getDeleted() {
+        return deleted;
+    }
+
+    public void setDeleted(BigDecimal deleted) {
+        this.deleted = deleted;
+    }
+
+    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(", listId=").append(listId);
+        sb.append(", gridId=").append(gridId);
+        sb.append(", capacityId=").append(capacityId);
+        sb.append(", listNodeOrder=").append(listNodeOrder);
+        sb.append(", deleted=").append(deleted);
+        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();
+    }
+}

+ 363 - 0
src/main/java/com/steerinfo/dil/model/QmsQueueResult.java

@@ -0,0 +1,363 @@
+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 QmsQueueResult 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=true)
+    private BigDecimal resultTotalId;
+
+    /**
+     * 运力id(CAPACITY_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="运力id",required=false)
+    private BigDecimal capacityId;
+
+    /**
+     * 排队申请时间(RESULT_APPLYFOR_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="排队申请时间",required=false)
+    private Date resultApplyforTime;
+
+    /**
+     * 排队申请地点(RESULT_APPLYFOR_LOCATION,VARCHAR,20)
+     */
+    @ApiModelProperty(value="排队申请地点",required=false)
+    private String resultApplyforLocation;
+
+    /**
+     * 排队网格id(GRID_ID,DECIMAL,38)
+     */
+    @ApiModelProperty(value="排队网格id",required=false)
+    private BigDecimal gridId;
+
+    /**
+     * 排队下发时间(RESULT_DOWN_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="排队下发时间",required=false)
+    private Date resultDownTime;
+
+    /**
+     * 排队接收时间(RESULT_ACCEPT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="排队接收时间",required=false)
+    private Date resultAcceptTime;
+
+    /**
+     * 排队开始时间(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_CANCEL_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="排队取消时间",required=false)
+    private Date resultCancelTime;
+
+    /**
+     * 取消排队原因(RESULT_CANCEL_REASON,VARCHAR,100)
+     */
+    @ApiModelProperty(value="取消排队原因",required=false)
+    private String resultCancelReason;
+
+    /**
+     * 插队时间(RESULT_INSERT_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="插队时间",required=false)
+    private Date resultInsertTime;
+
+    /**
+     * 插队原因(RESULT_INSERT_REASON,VARCHAR,100)
+     */
+    @ApiModelProperty(value="插队原因",required=false)
+    private String resultInsertReason;
+
+    /**
+     * 排队转移时间(RESULT_TRANSFER_TIME,TIMESTAMP,7)
+     */
+    @ApiModelProperty(value="排队转移时间",required=false)
+    private Date resultTransferTime;
+
+    /**
+     * 排队转移原因(RESULT_TRANSFER_REASON,VARCHAR,20)
+     */
+    @ApiModelProperty(value="排队转移原因",required=false)
+    private String resultTransferReason;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 链表ID(LIST_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="链表ID",required=false)
+    private BigDecimal listId;
+
+    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 getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(BigDecimal capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public Date getResultApplyforTime() {
+        return resultApplyforTime;
+    }
+
+    public void setResultApplyforTime(Date resultApplyforTime) {
+        this.resultApplyforTime = resultApplyforTime;
+    }
+
+    public String getResultApplyforLocation() {
+        return resultApplyforLocation;
+    }
+
+    public void setResultApplyforLocation(String resultApplyforLocation) {
+        this.resultApplyforLocation = resultApplyforLocation == null ? null : resultApplyforLocation.trim();
+    }
+
+    public BigDecimal getGridId() {
+        return gridId;
+    }
+
+    public void setGridId(BigDecimal gridId) {
+        this.gridId = gridId;
+    }
+
+    public Date getResultDownTime() {
+        return resultDownTime;
+    }
+
+    public void setResultDownTime(Date resultDownTime) {
+        this.resultDownTime = resultDownTime;
+    }
+
+    public Date getResultAcceptTime() {
+        return resultAcceptTime;
+    }
+
+    public void setResultAcceptTime(Date resultAcceptTime) {
+        this.resultAcceptTime = resultAcceptTime;
+    }
+
+    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 Date getResultCancelTime() {
+        return resultCancelTime;
+    }
+
+    public void setResultCancelTime(Date resultCancelTime) {
+        this.resultCancelTime = resultCancelTime;
+    }
+
+    public String getResultCancelReason() {
+        return resultCancelReason;
+    }
+
+    public void setResultCancelReason(String resultCancelReason) {
+        this.resultCancelReason = resultCancelReason == null ? null : resultCancelReason.trim();
+    }
+
+    public Date getResultInsertTime() {
+        return resultInsertTime;
+    }
+
+    public void setResultInsertTime(Date resultInsertTime) {
+        this.resultInsertTime = resultInsertTime;
+    }
+
+    public String getResultInsertReason() {
+        return resultInsertReason;
+    }
+
+    public void setResultInsertReason(String resultInsertReason) {
+        this.resultInsertReason = resultInsertReason == null ? null : resultInsertReason.trim();
+    }
+
+    public Date getResultTransferTime() {
+        return resultTransferTime;
+    }
+
+    public void setResultTransferTime(Date resultTransferTime) {
+        this.resultTransferTime = resultTransferTime;
+    }
+
+    public String getResultTransferReason() {
+        return resultTransferReason;
+    }
+
+    public void setResultTransferReason(String resultTransferReason) {
+        this.resultTransferReason = resultTransferReason == null ? null : resultTransferReason.trim();
+    }
+
+    public String getInsertUsername() {
+        return insertUsername;
+    }
+
+    public void setInsertUsername(String insertUsername) {
+        this.insertUsername = insertUsername == null ? null : insertUsername.trim();
+    }
+
+    public Date getInsertTime() {
+        return insertTime;
+    }
+
+    public void setInsertTime(Date insertTime) {
+        this.insertTime = insertTime;
+    }
+
+    public String getUpdateUsername() {
+        return updateUsername;
+    }
+
+    public void setUpdateUsername(String updateUsername) {
+        this.updateUsername = updateUsername == null ? null : updateUsername.trim();
+    }
+
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public String getInsertUpdateRemark() {
+        return insertUpdateRemark;
+    }
+
+    public void setInsertUpdateRemark(String insertUpdateRemark) {
+        this.insertUpdateRemark = insertUpdateRemark == null ? null : insertUpdateRemark.trim();
+    }
+
+    public BigDecimal getListId() {
+        return listId;
+    }
+
+    public void setListId(BigDecimal listId) {
+        this.listId = listId;
+    }
+
+    @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(", capacityId=").append(capacityId);
+        sb.append(", resultApplyforTime=").append(resultApplyforTime);
+        sb.append(", resultApplyforLocation=").append(resultApplyforLocation);
+        sb.append(", gridId=").append(gridId);
+        sb.append(", resultDownTime=").append(resultDownTime);
+        sb.append(", resultAcceptTime=").append(resultAcceptTime);
+        sb.append(", resultStartTime=").append(resultStartTime);
+        sb.append(", resultEndTime=").append(resultEndTime);
+        sb.append(", resultCancelTime=").append(resultCancelTime);
+        sb.append(", resultCancelReason=").append(resultCancelReason);
+        sb.append(", resultInsertTime=").append(resultInsertTime);
+        sb.append(", resultInsertReason=").append(resultInsertReason);
+        sb.append(", resultTransferTime=").append(resultTransferTime);
+        sb.append(", resultTransferReason=").append(resultTransferReason);
+        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(", listId=").append(listId);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 362 - 0
src/main/java/com/steerinfo/dil/model/RmsCapacity.java

@@ -0,0 +1,362 @@
+package com.steerinfo.dil.model;
+
+import com.steerinfo.framework.model.IBasePO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.Date;
+
+@ApiModel(value="运力信息")
+public class RmsCapacity implements IBasePO<Short> {
+    /**
+     * 主键id(CAPACITY_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="主键id",required=true)
+    private Short capacityId;
+
+    /**
+     * 运力编号(CAPACITY_NUMBER,VARCHAR,32)
+     */
+    @ApiModelProperty(value="运力编号",required=false)
+    private String capacityNumber;
+
+    /**
+     * 运力额定载重(CAPACITY_MAX_LOAD,DECIMAL,0)
+     */
+    @ApiModelProperty(value="运力额定载重",required=false)
+    private Short capacityMaxLoad;
+
+    /**
+     * 运力类型ID(CAPACITY_TYPE_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="运力类型ID",required=false)
+    private Short capacityTypeId;
+
+    /**
+     * 运力状态(0:空闲中、1:运输中:2:待运中:3:维保中)(CAPACITY_STATUS,VARCHAR,20)
+     */
+    @ApiModelProperty(value="运力状态(0:空闲中、1:运输中:2:待运中:3:维保中)",required=false)
+    private String capacityStatus;
+
+    /**
+     * 承运单位(CARRIER_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="承运单位",required=false)
+    private Short carrierId;
+
+    /**
+     * 能源名称(CAPACITY_ENERGY_ID,VARCHAR,16)
+     */
+    @ApiModelProperty(value="能源名称",required=false)
+    private String capacityEnergyId;
+
+    /**
+     * 可载长度上限(M)(CAPACITY_LEN_VAL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="可载长度上限(M)",required=false)
+    private Short capacityLenVal;
+
+    /**
+     * 可载宽度上限(M)(CAPACITY_WID_VAL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="可载宽度上限(M)",required=false)
+    private Short capacityWidVal;
+
+    /**
+     * 可载高度上限(M)(CAPACITY_HIG_VAL,DECIMAL,0)
+     */
+    @ApiModelProperty(value="可载高度上限(M)",required=false)
+    private Short capacityHigVal;
+
+    /**
+     * 油品代码(CAPACITY_OIL_ID,DECIMAL,0)
+     */
+    @ApiModelProperty(value="油品代码",required=false)
+    private Short capacityOilId;
+
+    /**
+     * 油耗(升/100公里)(CAPACITY_FUEL_CONSUMPTION,VARCHAR,16)
+     */
+    @ApiModelProperty(value="油耗(升/100公里)",required=false)
+    private String capacityFuelConsumption;
+
+    /**
+     * 是否自有车辆(0:是;1:不是)(CAPACITY_OWNERIS,DECIMAL,0)
+     */
+    @ApiModelProperty(value="是否自有车辆(0:是;1:不是)",required=false)
+    private Short capacityOwneris;
+
+    /**
+     * 运力是否黑名单(0:是;1:不是)(CAPACITY_BLACKLIST,DECIMAL,0)
+     */
+    @ApiModelProperty(value="运力是否黑名单(0:是;1:不是)",required=false)
+    private Short capacityBlacklist;
+
+    /**
+     * 备注(MEMO,VARCHAR,128)
+     */
+    @ApiModelProperty(value="备注",required=false)
+    private String memo;
+
+    /**
+     * 记录创建人(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;
+
+    /**
+     * 车牌颜色(CAPACITY_CORLOR,VARCHAR,20)
+     */
+    @ApiModelProperty(value="车牌颜色",required=false)
+    private String capacityCorlor;
+
+    /**
+     * 是否VIP(CAPACITY_VIP,VARCHAR,20)
+     */
+    @ApiModelProperty(value="是否VIP",required=false)
+    private String capacityVip;
+
+    private static final long serialVersionUID = 1L;
+
+    @Override
+    public Short getId() {
+        return this.capacityId;
+    }
+
+    @Override
+    public void setId(Short capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public Short getCapacityId() {
+        return capacityId;
+    }
+
+    public void setCapacityId(Short capacityId) {
+        this.capacityId = capacityId;
+    }
+
+    public String getCapacityNumber() {
+        return capacityNumber;
+    }
+
+    public void setCapacityNumber(String capacityNumber) {
+        this.capacityNumber = capacityNumber == null ? null : capacityNumber.trim();
+    }
+
+    public Short getCapacityMaxLoad() {
+        return capacityMaxLoad;
+    }
+
+    public void setCapacityMaxLoad(Short capacityMaxLoad) {
+        this.capacityMaxLoad = capacityMaxLoad;
+    }
+
+    public Short getCapacityTypeId() {
+        return capacityTypeId;
+    }
+
+    public void setCapacityTypeId(Short capacityTypeId) {
+        this.capacityTypeId = capacityTypeId;
+    }
+
+    public String getCapacityStatus() {
+        return capacityStatus;
+    }
+
+    public void setCapacityStatus(String capacityStatus) {
+        this.capacityStatus = capacityStatus == null ? null : capacityStatus.trim();
+    }
+
+    public Short getCarrierId() {
+        return carrierId;
+    }
+
+    public void setCarrierId(Short carrierId) {
+        this.carrierId = carrierId;
+    }
+
+    public String getCapacityEnergyId() {
+        return capacityEnergyId;
+    }
+
+    public void setCapacityEnergyId(String capacityEnergyId) {
+        this.capacityEnergyId = capacityEnergyId == null ? null : capacityEnergyId.trim();
+    }
+
+    public Short getCapacityLenVal() {
+        return capacityLenVal;
+    }
+
+    public void setCapacityLenVal(Short capacityLenVal) {
+        this.capacityLenVal = capacityLenVal;
+    }
+
+    public Short getCapacityWidVal() {
+        return capacityWidVal;
+    }
+
+    public void setCapacityWidVal(Short capacityWidVal) {
+        this.capacityWidVal = capacityWidVal;
+    }
+
+    public Short getCapacityHigVal() {
+        return capacityHigVal;
+    }
+
+    public void setCapacityHigVal(Short capacityHigVal) {
+        this.capacityHigVal = capacityHigVal;
+    }
+
+    public Short getCapacityOilId() {
+        return capacityOilId;
+    }
+
+    public void setCapacityOilId(Short capacityOilId) {
+        this.capacityOilId = capacityOilId;
+    }
+
+    public String getCapacityFuelConsumption() {
+        return capacityFuelConsumption;
+    }
+
+    public void setCapacityFuelConsumption(String capacityFuelConsumption) {
+        this.capacityFuelConsumption = capacityFuelConsumption == null ? null : capacityFuelConsumption.trim();
+    }
+
+    public Short getCapacityOwneris() {
+        return capacityOwneris;
+    }
+
+    public void setCapacityOwneris(Short capacityOwneris) {
+        this.capacityOwneris = capacityOwneris;
+    }
+
+    public Short getCapacityBlacklist() {
+        return capacityBlacklist;
+    }
+
+    public void setCapacityBlacklist(Short capacityBlacklist) {
+        this.capacityBlacklist = capacityBlacklist;
+    }
+
+    public String getMemo() {
+        return memo;
+    }
+
+    public void setMemo(String memo) {
+        this.memo = memo == null ? null : memo.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 getCapacityCorlor() {
+        return capacityCorlor;
+    }
+
+    public void setCapacityCorlor(String capacityCorlor) {
+        this.capacityCorlor = capacityCorlor == null ? null : capacityCorlor.trim();
+    }
+
+    public String getCapacityVip() {
+        return capacityVip;
+    }
+
+    public void setCapacityVip(String capacityVip) {
+        this.capacityVip = capacityVip == null ? null : capacityVip.trim();
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", capacityId=").append(capacityId);
+        sb.append(", capacityNumber=").append(capacityNumber);
+        sb.append(", capacityMaxLoad=").append(capacityMaxLoad);
+        sb.append(", capacityTypeId=").append(capacityTypeId);
+        sb.append(", capacityStatus=").append(capacityStatus);
+        sb.append(", carrierId=").append(carrierId);
+        sb.append(", capacityEnergyId=").append(capacityEnergyId);
+        sb.append(", capacityLenVal=").append(capacityLenVal);
+        sb.append(", capacityWidVal=").append(capacityWidVal);
+        sb.append(", capacityHigVal=").append(capacityHigVal);
+        sb.append(", capacityOilId=").append(capacityOilId);
+        sb.append(", capacityFuelConsumption=").append(capacityFuelConsumption);
+        sb.append(", capacityOwneris=").append(capacityOwneris);
+        sb.append(", capacityBlacklist=").append(capacityBlacklist);
+        sb.append(", memo=").append(memo);
+        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(", capacityCorlor=").append(capacityCorlor);
+        sb.append(", capacityVip=").append(capacityVip);
+        sb.append(", serialVersionUID=").append(serialVersionUID);
+        sb.append("]");
+        return sb.toString();
+    }
+}

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

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

+ 42 - 0
src/main/java/com/steerinfo/dil/service/IQmsQueueListService.java

@@ -0,0 +1,42 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.dil.model.QmsQueueList;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * QmsQueueList服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:29
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:QmsQueueList服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IQmsQueueListService{
+
+    //添加汽车排队链表
+    int addQueueList(String orderNumber);
+
+    //排队转移 新增一条链表 修改实绩链表Id
+    int changeQueue(Map<String, Object> map);
+
+    //排队取消 通过运输订单号进行查询取消 或 实绩Id  修改
+    int queueCancel(Map<String, Object> map);
+
+    //排队插队 调度人员通过查询出来的列表 通过实绩ID进行插队
+    int queueCutInLine(Map<String, Object> map);
+
+    //排队结束 通过扫描二维码获取运输订单号
+    int queueEndByPDA(Map<String, Object> map);
+
+    //链表监控
+    List<Map<String, Object>> listMonitor(Map<String, Object> map);
+}

+ 73 - 0
src/main/java/com/steerinfo/dil/service/IQmsQueueResultService.java

@@ -0,0 +1,73 @@
+package com.steerinfo.dil.service;
+
+import com.steerinfo.framework.service.IBaseService;
+import com.steerinfo.dil.model.QmsQueueResult;
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * QmsQueueResult服务接口:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:27
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:QmsQueueResult服务接口
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+public interface IQmsQueueResultService{
+    //车辆进入电子围栏自动触发系统新增排队实绩
+    int addQueueResult(Map<String, Object> map);
+
+    //查询排队转移详情
+    List<Map<String, Object>> getChangeQueueMes(Map<String, Object> map);
+
+    //查询排队申请
+    List<Map<String, Object>> getQueueApply(Map<String, Object> map);
+
+    //人工添加排队申请查询所有执行中订单 订单状态 :1
+    List<Map<String, Object>> getAllExecutionOrder(Map<String, Object> map);
+
+    //指令接收 通过接收时间判断是否已接收  查询判断条件:是否结束进厂
+    List<Map<String, Object>> orderReceive(Map<String, Object> map);
+
+    //查询排队开始、详情数据  正在排队的数据
+    List<Map<String, Object>> getQueueListByQueueUp(Map<String, Object> map);
+
+    //查询排队取消
+    List<Map<String, Object>> getQueueCancel(Map<String, Object> map);
+
+    //通过实绩Id查询排队取消实绩
+    List<Map<String, Object>> getQueueCancelByResultId(Integer resultId);
+
+    //修改排队取消原因 和时间
+    int updateQueueCancel(QmsQueueResult qmsQueueResult);
+
+    //查询插队详情
+    List<Map<String, Object>> getQueueInsert(Map<String, Object> map);
+
+    //查询排队结束
+    List<Map<String, Object>> getQueueEndResult(Map<String, Object> map);
+
+    //汽车监控
+    List<Map<String, Object>> capacityMonitor(Map<String, Object> map);
+
+    /*
+     * APP
+     */
+    // 查看各个门岗,仓库的实时状态
+    List<Map<String, Object>> getQueueStatusList();
+
+    // 查询未接收时的接收
+    List<Map<String, Object>> getOrderReceive2(String capacityNumber);
+
+    int cancelQueue(Map<String,Object> mapValue);
+
+    // 通过车牌号得到网格id
+    BigDecimal getGridId(String capacityNumber);
+}

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

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

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

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

+ 266 - 0
src/main/java/com/steerinfo/dil/service/impl/QmsQueueListServiceImpl.java

@@ -0,0 +1,266 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.feign.TmsTruckFeign;
+import com.steerinfo.dil.mapper.QmsQueueResultMapper;
+import com.steerinfo.dil.model.QmsQueueResult;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.framework.mapper.IBaseMapper;
+import com.steerinfo.framework.service.impl.BaseServiceImpl;
+import com.steerinfo.dil.model.QmsQueueList;
+import com.steerinfo.dil.mapper.QmsQueueListMapper;
+import com.steerinfo.dil.service.IQmsQueueListService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * QmsQueueList服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:29
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:QmsQueueList服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "qmsQueueListService")
+public class QmsQueueListServiceImpl implements IQmsQueueListService {
+
+    @Autowired
+    private QmsQueueListMapper qmsQueueListMapper;
+
+    @Autowired
+    private QmsQueueResultMapper qmsQueueResultMapper;
+
+    @Autowired
+    private TmsTruckFeign tmsTruckFeign;
+
+    /**
+     * 添加 链表排序
+     * @param orderNumber 运输订单号
+     * @return
+     */
+    @Transactional
+    public int addQueueList(String orderNumber){
+        QmsQueueList qmsQueueList = new QmsQueueList();
+        Map<String, Object> map = new HashMap<>();
+        map.put("orderNumber", orderNumber);
+        //通过运输订单号查询 实绩中  网格Id 及 运力Id
+        Map<String, Object> listResultMap = qmsQueueListMapper.getQueueResultByOrderNumber(map);
+        map.putAll(listResultMap);
+        //添加主键ID
+        long id;
+        BigDecimal selectMaxId = qmsQueueListMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        qmsQueueList.setListId(new BigDecimal(id));
+        //添加网格Id
+        BigDecimal gridId = DataChange.dataToBigDecimal(map.get("gridId"));
+        qmsQueueList.setGridId(gridId);
+        //添加运力Id
+        qmsQueueList.setCapacityId(DataChange.dataToBigDecimal(map.get("capacityId")));
+        //查询当前链表还在排队中的 最大序号 + 1
+        Integer maxListNodeOrder = qmsQueueListMapper.getMaxListNodeOrder(map);
+        int nodeOrder = (maxListNodeOrder == null ? 0 : maxListNodeOrder) + 1;
+        //添加排队序号与逻辑删除 0: 正在排队
+        qmsQueueList.setListNodeOrder(new BigDecimal(nodeOrder));
+        qmsQueueList.setDeleted(new BigDecimal(0));
+
+        qmsQueueList.setInsertUsername("admin");
+        qmsQueueList.setInsertTime(new Date());
+        int i = qmsQueueListMapper.insertSelective(qmsQueueList);
+        //更新排队实绩表
+        QmsQueueResult qmsQueueResult = new QmsQueueResult();
+        qmsQueueResult.setListId(new BigDecimal(id));
+        qmsQueueResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
+        qmsQueueResult.setResultAcceptTime(new Date()); //添加接收时间
+        qmsQueueResult.setResultStartTime(new Date()); //添加排队时间
+        int i1 = qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+        return i1 + i ;
+    }
+
+    /**
+     * 排队转移
+     * 参数:实绩Id、门岗名称、转移原因
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int changeQueue(Map<String, Object> map) {
+        //通过传入的实绩Id查询 链表Id 、运力Id
+        Map<String, Object> mapValue = qmsQueueListMapper.getQueueResultByOrderNumber(map);
+        BigDecimal resultId = DataChange.dataToBigDecimal(map.get("resultId"));
+        //获取链表ID
+        BigDecimal listId = DataChange.dataToBigDecimal(mapValue.get("listId"));
+        //修改原链表状态 1
+        updateQueueListToDie(listId);
+        //获取运力ID
+        BigDecimal capacityId = DataChange.dataToBigDecimal(mapValue.get("capacityId"));
+        //如果传入的是门岗名称
+        if(map.get("gatepostName") != null){
+            //通过传入的门岗名称查询门岗ID
+            BigDecimal gatepostId = qmsQueueResultMapper.getGatepostIdByGatepostName((String) map.get("gatepostName"));
+            mapValue.put("queueLocationId", gatepostId);
+        }else {
+            //否则应该传入门岗ID
+            mapValue.put("queueLocationId", map.get("gatepostId"));
+        }
+        mapValue.put("gridType", 3);
+        //通过门岗ID 和 网格类型 查询对应网格ID
+        BigDecimal gridId = qmsQueueResultMapper.getGridIdByGatepostIdAndGridType(mapValue);
+        //查询当前网格链表还在排队中的 最大序号 + 1
+        mapValue.put("gridId", gridId);
+        Integer maxListNodeOrder = qmsQueueListMapper.getMaxListNodeOrder(mapValue);
+        int nodeOrder = (maxListNodeOrder == null ? 0 : maxListNodeOrder) + 1;
+        //新增一条链表
+        QmsQueueList qmsQueueList = new QmsQueueList();
+        //添加主键ID 新增的链表Id
+        long id;
+        BigDecimal selectMaxId = qmsQueueListMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        qmsQueueList.setListId(new BigDecimal(id));
+        //添加排队序号与逻辑删除 0: 正在排队
+        qmsQueueList.setListNodeOrder(new BigDecimal(nodeOrder));
+        qmsQueueList.setDeleted(new BigDecimal(0));
+        //添加网格Id
+        qmsQueueList.setGridId(gridId);
+        //添加运力Id
+        qmsQueueList.setCapacityId(capacityId);
+
+        qmsQueueList.setInsertUsername("admin");
+        qmsQueueList.setInsertTime(new Date());
+        int i = qmsQueueListMapper.insertSelective(qmsQueueList);
+        //更新排队实绩表
+        QmsQueueResult qmsQueueResult = new QmsQueueResult();
+        qmsQueueResult.setId(resultId);
+        qmsQueueResult.setListId(new BigDecimal(id)); //添加链表ID
+        qmsQueueResult.setResultTransferTime(new Date());   //添加转移时间
+        qmsQueueResult.setResultTransferReason((String) map.get("resultTransferReason")); //添加转移原因
+        int i1 = qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+        return i + i1;
+    }
+
+    /**
+     * 取消排队
+     *  传入参数:
+     *  运输订单号 或 排队实绩ID
+     *  取消原因
+     *  如果是司机:通过运输订单号
+     *  如果是调度人员:可通过实绩Id
+     * @param map
+     * @return
+     */
+    @Override
+    public int queueCancel(Map<String, Object> map) {
+
+        BigDecimal resultId;
+        map.putAll(qmsQueueListMapper.getQueueResultByOrderNumber(map));
+        //获取实绩Id
+        resultId = DataChange.dataToBigDecimal(map.get("resultId"));
+        //获取链表Id
+        BigDecimal listId = DataChange.dataToBigDecimal(map.get("listId"));
+        // 更新链表 移出队列
+        int i = updateQueueListToDie(listId);
+        //更新排队实绩
+        QmsQueueResult qmsQueueResult = new QmsQueueResult();
+        qmsQueueResult.setResultId(resultId);
+        qmsQueueResult.setResultCancelTime(new Date());//设置取消时间
+        qmsQueueResult.setResultCancelReason((String) map.get("resultCancelReason"));//设置取消原因
+        int i1 = qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+
+        return i + i1;
+    }
+
+    /**
+     * 排队插队 通过实绩Id进行关联
+     * 实绩ID
+     * 插队原因
+     * @param map
+     * @return
+     */
+    @Override
+    public int queueCutInLine(Map<String, Object> map) {
+        //通过实绩Id查出关联的链表Id
+        map.putAll(qmsQueueListMapper.getQueueResultByOrderNumber(map));
+        //获取链表Id
+        BigDecimal listId = DataChange.dataToBigDecimal(map.get("listId"));
+        QmsQueueList qmsQueueList = new QmsQueueList();
+        //设置链表排队顺序号 为 最小的那个 -1
+        //获取排队顺序号最小值
+        BigDecimal gridId = qmsQueueListMapper.getGridIdByListId(listId);
+        //通过网格Id匹配当前列表中最小的顺序号
+        map.putAll(qmsQueueListMapper.getQueueNumAndMin(gridId));
+        //计算插队后顺序号
+        int listNodeOrder = DataChange.dataToBigDecimal(map.get("listNodeOrder")).intValue() - 1;
+        qmsQueueList.setListId(listId);
+        qmsQueueList.setListNodeOrder(new BigDecimal(listNodeOrder));
+        qmsQueueList.setUpdateTime(new Date());
+        qmsQueueList.setUpdateUsername("admin");
+        int i = qmsQueueListMapper.updateByPrimaryKeySelective(qmsQueueList);
+        //更新排队实绩
+        QmsQueueResult qmsQueueResult = new QmsQueueResult();
+        qmsQueueResult.setResultId(DataChange.dataToBigDecimal(map.get("resultId")));
+        qmsQueueResult.setResultInsertTime(new Date());
+        qmsQueueResult.setResultInsertReason((String)map.get("resultInsertReason"));
+        int i1 = qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+        return i + i1;
+    }
+
+    /**
+     * 排队结束 PDA 形式
+     * 运输订单号
+     * @param map
+     * @return
+     */
+    @Override
+    @Transactional
+    public int queueEndByPDA(Map<String, Object> map) {
+        //通过运输订单号查询排队实绩ID 链表Id
+        map.putAll(qmsQueueListMapper.getQueueResultByOrderNumber(map));
+        BigDecimal resultId = DataChange.dataToBigDecimal(map.get("resultId")); //实绩Id
+        BigDecimal listId = DataChange.dataToBigDecimal(map.get("listId"));  //链表Id
+        //通过链表id修改链表对应数据 将此数据移出队列 deleted = 1
+        int i = updateQueueListToDie(listId);
+        //给排队实绩中添加数据
+        QmsQueueResult qmsQueueResult = new QmsQueueResult();
+        qmsQueueResult.setResultId(resultId);
+        qmsQueueResult.setResultEndTime(new Date());
+        int i1 = qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+        // 排队结束添加进厂作业
+        tmsTruckFeign.updateEnactoryResult(map);
+
+        return i + i1;
+    }
+
+    /**
+     * 链表监控
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> listMonitor(Map<String, Object> map) {
+        return qmsQueueListMapper.listMonitor(map);
+    }
+
+
+    /**
+     * 修改状态为 1 移出链表队列
+     * @param listId
+     * @return
+     */
+    public int updateQueueListToDie(BigDecimal listId){
+        QmsQueueList qmsQueueList = new QmsQueueList();
+        qmsQueueList.setId(listId);
+        qmsQueueList.setDeleted(new BigDecimal(1));
+        return qmsQueueListMapper.updateByPrimaryKeySelective(qmsQueueList);
+    }
+}

+ 284 - 0
src/main/java/com/steerinfo/dil/service/impl/QmsQueueResultServiceImpl.java

@@ -0,0 +1,284 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.QmsQueueListMapper;
+import com.steerinfo.dil.model.QmsQueueList;
+import com.steerinfo.dil.util.DataChange;
+import com.steerinfo.dil.model.QmsQueueResult;
+import com.steerinfo.dil.mapper.QmsQueueResultMapper;
+import com.steerinfo.dil.service.IQmsQueueResultService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+import java.math.BigDecimal;
+
+/**
+ * QmsQueueResult服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:27
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:QmsQueueResult服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "qmsQueueResultService")
+public class QmsQueueResultServiceImpl implements IQmsQueueResultService {
+
+    @Autowired
+    private QmsQueueResultMapper qmsQueueResultMapper;
+
+    @Autowired
+    private QmsQueueListMapper qmsQueueListMapper;
+
+    /**
+     * 新增排队实绩
+     * @param map {orderNumber}运输订单号
+     * @return
+     */
+    @Override
+    public int addQueueResult(Map<String, Object> map) {
+        QmsQueueResult qmsQueueResult = new QmsQueueResult();
+        //生成主键
+        long id;
+        BigDecimal selectMaxId = qmsQueueResultMapper.selectMaxId();
+        id = selectMaxId == null ? 1 : selectMaxId.longValue() + 1;
+        qmsQueueResult.setId(new BigDecimal(id));
+        //获取传入运输订单号
+        String orderNumber = (String) map.get("orderNumber");
+        //查询实绩总表ID与运力Id
+        Map<String, Object> cidAndTidMap = qmsQueueResultMapper.queryCIdAndTIdByOrderNumber(orderNumber);
+        BigDecimal capacityId = DataChange.dataToBigDecimal(cidAndTidMap.get("capacityId"));
+        map.put("capacityId", capacityId);  //使用传进来的map将数据一路带到尾
+        qmsQueueResult.setCapacityId(capacityId);
+        BigDecimal resultTotalId = DataChange.dataToBigDecimal(cidAndTidMap.get("resultTotalId"));
+        qmsQueueResult.setResultTotalId(resultTotalId);
+        //通过运输订单号查询物资Id
+        BigDecimal materialId = qmsQueueResultMapper.queryOrderMesByOrderId(DataChange.dataToBigDecimal(cidAndTidMap.get("orderId")));
+        //通过物资Id查询门岗ID
+        map.put("materialId", materialId);
+        map.put("type", 0); //匹配物资可进厂的门岗
+        List<BigDecimal> gatepostList = qmsQueueResultMapper.queryGatepostByMaterialId(map); //可能会有多个门岗可入
+        BigDecimal gatepostId = gatepostList.get(0);
+        map.put("gridType", 3);
+        map.put("queueLocationId", gatepostId);
+        //通过匹配出来的门岗ID获取网格ID
+        BigDecimal gridId = qmsQueueResultMapper.getGridIdByGatepostIdAndGridType(map);
+        map.put("gridId", gridId);
+        //新增进厂排队实绩
+        qmsQueueResult.setGridId(gridId);
+        //添加申请时间
+        qmsQueueResult.setResultApplyforTime(new Date());
+        //系统自动下发 添加下发时间
+        qmsQueueResult.setResultDownTime(new Date());
+
+        qmsQueueResult.setInsertTime(new Date());
+        qmsQueueResult.setInsertUsername("admin");
+        return qmsQueueResultMapper.insertSelective(qmsQueueResult);
+    }
+
+    /**
+     * 查看排队转移界面
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getChangeQueueMes(Map<String, Object> map) {
+        return qmsQueueResultMapper.getChangeQueueMes(map);
+    }
+
+    /**
+     * 查询排队申请
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQueueApply(Map<String, Object> map) {
+        return qmsQueueResultMapper.getQueueApply(map);
+    }
+
+    /**
+     * 查询执行中运单
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getAllExecutionOrder(Map<String, Object> map) {
+        return qmsQueueResultMapper.getAllExecutionOrder(map);
+    }
+
+    /**
+     * 指令接收 判断条件:是否有排队结束时间
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> orderReceive(Map<String, Object> map) {
+        List<Map<String, Object>> orderReceiveList = qmsQueueResultMapper.getOrderReceive(map);
+        //遍历数据 通过是否有接收时间 来判断是否接收
+        for (Map<String, Object> orderReceiveMap : orderReceiveList) {
+            if(orderReceiveMap.get("resultAcceptTime") != null){
+                orderReceiveMap.put("isReceive", "是");
+            }else {
+                orderReceiveMap.put("isReceive", "否");
+            }
+        }
+        return orderReceiveList;
+    }
+
+    /**
+     * 查询排队开始 数据
+     * 可用 gridId 网格ID
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQueueListByQueueUp(Map<String, Object> map) {
+        return qmsQueueResultMapper.getQueueListByQueueUp(map);
+    }
+
+    /**
+     * 查询排队取消数据
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQueueCancel(Map<String, Object> map) {
+        return qmsQueueResultMapper.getQueueCancel(map);
+    }
+
+    /**
+     * 通过实绩ID查询排队取消信息
+     * @param resultId
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQueueCancelByResultId(Integer resultId) {
+        return qmsQueueResultMapper.getQueueCancelByResultId(resultId);
+    }
+
+    /**
+     * 修改排队取消实绩
+     * @param qmsQueueResult
+     * @return
+     */
+    @Override
+    public int updateQueueCancel(QmsQueueResult qmsQueueResult) {
+        qmsQueueResult.setUpdateTime(new Date());
+        qmsQueueResult.setUpdateUsername("admin");
+        return qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+    }
+
+    /**
+     * 查询排队插队
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQueueInsert(Map<String, Object> map) {
+        return qmsQueueResultMapper.getQueueInsert(map);
+    }
+
+    /**
+     * 查询排队结束
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQueueEndResult(Map<String, Object> map) {
+        return qmsQueueResultMapper.getQueueEndResult(map);
+    }
+
+    /**
+     * 汽车监控
+     * @param map
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> capacityMonitor(Map<String, Object> map) {
+        List<Map<String, Object>> list = qmsQueueResultMapper.capacityMonitor(map);
+        for (Map<String, Object> capacityMap : list) {
+            //如果结束时间为空 排队总时长为
+            if(capacityMap.get("resultEndTime") == null){
+                Date date1 = (Date) capacityMap.get("resultApplyforTime");
+                Date date2 = new Date();
+                String differenceTime = DataChange.calculatedTimeDifference(date1, date2);
+                capacityMap.put("resultQueueAllTime",differenceTime);
+            }else {
+                //否则排队时长为结束时长 - 申请时长
+                Date date1 = (Date)capacityMap.get("resultApplyforTime");
+                Date date2 = (Date)capacityMap.get("resultEndTime");
+                String differenceTime = DataChange.calculatedTimeDifference(date1, date2);
+                capacityMap.put("resultQueueAllTime",differenceTime);
+            }
+        }
+        return list;
+    }
+
+    //********************************APP*********************************************
+
+    /**
+     * 根据车牌号查询排队下发
+     * @param capacityNumber
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getOrderReceive2(String capacityNumber) {
+        BigDecimal gridId = getGridId(capacityNumber);
+        if (gridId == null) {
+            List<Map<String,Object>> mapList = new ArrayList<>();
+            return mapList;
+        }
+        Map<String,Object> map = new HashMap<>();
+        map.put("capacityNumber",capacityNumber);
+        map.put("gridId",gridId);
+        List<Map<String, Object>> orderReceive = qmsQueueResultMapper.getOrderReceive2(map);
+        return orderReceive;
+    }
+
+    /**
+     * 排队取消
+     * @param mapValue
+     * @return
+     */
+    @Override
+    public int cancelQueue(Map<String,Object> mapValue) {
+        String capacityNumber = (String) mapValue.get("capacityNumber");
+        String resultCancelReason = (String) mapValue.get("resultCancelReason");
+        BigDecimal resultId = qmsQueueResultMapper.getResultIdByCapacityId(capacityNumber);
+        QmsQueueResult qmsQueueResult = qmsQueueResultMapper.selectByPrimaryKey(resultId);
+        Map<String, Object> listIdMap = qmsQueueResultMapper.getListIdByResultId(resultId);
+        BigDecimal listId = (BigDecimal) listIdMap.get("listId");
+        QmsQueueList qmsQueueList = qmsQueueListMapper.selectByPrimaryKey(listId);
+        qmsQueueList.setDeleted(new BigDecimal(1));
+        qmsQueueResult.setResultCancelTime(new Date());
+        qmsQueueResult.setResultCancelReason(resultCancelReason);
+        qmsQueueListMapper.updateByPrimaryKeySelective(qmsQueueList);
+        return qmsQueueResultMapper.updateByPrimaryKeySelective(qmsQueueResult);
+    }
+
+
+    /**
+     * 通过车牌号得到网格id
+     * @param capacityNumber
+     * @return
+     */
+    @Override
+    public BigDecimal getGridId(String capacityNumber) {
+        return qmsQueueResultMapper.getGridIdNotNull(capacityNumber);
+    }
+
+
+    /**
+     * 查询各门岗和仓库的排队状态
+     * @return
+     */
+    @Override
+    public List<Map<String, Object>> getQueueStatusList() {
+        return qmsQueueResultMapper.getQueueStatusList();
+    }
+
+
+}

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

@@ -0,0 +1,29 @@
+package com.steerinfo.dil.service.impl;
+
+import com.steerinfo.dil.mapper.RmsCapacityMapper;
+import com.steerinfo.dil.service.IRmsCapacityService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import java.util.Date;
+import java.math.BigDecimal;
+
+/**
+ * RmsCapacity服务实现:
+ * @author generator
+ * @version 1.0-SNAPSHORT 2021-09-14 11:31
+ * 类描述
+ * 修订历史:
+ * 日期:2021-09-14
+ * 作者:generator
+ * 参考:
+ * 描述:RmsCapacity服务实现
+ * @see null
+ * @Copyright 湖南视拓信息技术股份有限公司. All rights reserved.
+ */
+@Service(value = "rmsCapacityService")
+public class RmsCapacityServiceImpl implements IRmsCapacityService {
+
+    @Autowired
+    private RmsCapacityMapper rmsCapacityMapper;
+
+}

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

@@ -0,0 +1,71 @@
+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;
+    }
+}

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

@@ -0,0 +1,136 @@
+package com.steerinfo.dil.util;
+
+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;
+                int i = Integer.parseInt(data1);
+                return new BigDecimal(i);
+            }
+            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 {
+
+}

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

@@ -0,0 +1,37 @@
+package com.steerinfo.dil.websocket;
+
+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 java.util.List;
+import java.util.Map;
+
+@Component()
+public class WebSocketController extends BaseRESTfulController {
+
+    @Autowired
+    private SimpMessagingTemplate simpMessagingTemplate; //消息(发送)推送模板
+
+//    @Autowired
+//    private QueueService queueService;
+//
+//    //定时器推送
+//    @Scheduled(fixedDelay = 2000)
+//    public void sendMessage() {
+//        //排队申请指令推送
+//        List<Map<String ,Object>> queuePush = queueService.getQueueApplyPush();
+//        for (Map<String ,Object> push : queuePush) {
+////            System.out.println(("/topic/getResponse/location/" + push.get("CAPACITY_ID")).trim());
+//            simpMessagingTemplate.convertAndSend(("/topic/getResponse/location/" + push.get("CAPACITY_ID")).trim(),
+//                    push.get("RAW_MATERIAL_NAME"));
+//        }
+//        //排队开始指令推送
+//        List<Map<String, Object>> queueStartPush = queueService.getQueueStartPush();
+//        for (Map<String ,Object> push : queueStartPush) {
+////            System.out.println(("/topic/getResponse/location" + push).trim());
+//            simpMessagingTemplate.convertAndSend(("/topic/getResponse/queue/" + push.get("CAPACITY_ID")).trim(), push);
+//        }
+//    }
+}

+ 8 - 0
src/main/resources/application-dev.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-trick-queue-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-trick-queue-prod

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


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

@@ -0,0 +1,63 @@
+api.version: api/v1/queueTruck
+spring:
+  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:
+  profiles:
+    include: ${SPRING_PROFILES:dev}
+#  cloud:
+#    config:
+#      fail-fast: true
+#      discovery:
+#        enabled: true
+#        service-id: config-server
+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
+
+#eureka设置
+eureka:
+  client:
+    service-url:
+      defaultZone: http://root:root@${EUREKA_HOST:dev-discovery.steerinfo.com}:${EUREKA_PORT:80}/eureka/
+    registerWithEureka:
+      false
+    fetchRegistry:
+      false
+  instance:
+    prefer-ip-address: true
+    status-page-url: http://${spring.cloud.client.ip-address}:${server.port}/swagger-ui.html#/
+    instance-id: ${spring.cloud.client.ip-address}:${server.port}
+
+
+
+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: 8082

+ 323 - 0
src/main/resources/com/steerinfo/dil/mapper/QmsQueueGridMapper.xml

@@ -0,0 +1,323 @@
+<?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.QmsQueueGridMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.QmsQueueGrid">
+    <id column="GRID_ID" jdbcType="DECIMAL" property="gridId" />
+    <result column="GRID_TYPE" jdbcType="DECIMAL" property="gridType" />
+    <result column="QUEUE_LOCATION_ID" jdbcType="DECIMAL" property="queueLocationId" />
+    <result column="GRID_ORDER" jdbcType="DECIMAL" property="gridOrder" />
+    <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">
+    GRID_ID, GRID_TYPE, QUEUE_LOCATION_ID, GRID_ORDER, INSERT_USERNAME, INSERT_TIME,
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.GRID_ID, t.GRID_TYPE, t.QUEUE_LOCATION_ID, t.GRID_ORDER, 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 QMS_QUEUE_GRID
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM QMS_QUEUE_GRID t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="gridId != null">
+        and GRID_ID = #{gridId}
+      </if>
+
+      <if test="gridType != null">
+        and GRID_TYPE = #{gridType}
+      </if>
+      <if test="queueLocationId != null">
+        and QUEUE_LOCATION_ID = #{queueLocationId}
+      </if>
+      <if test="gridOrder != null">
+        and GRID_ORDER = #{gridOrder}
+      </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="gridId != null">
+        and GRID_ID = #{gridId}
+      </if>
+      <if test="gridType != null">
+        and GRID_TYPE = #{gridType}
+      </if>
+      <if test="queueLocationId != null">
+        and QUEUE_LOCATION_ID = #{queueLocationId}
+      </if>
+      <if test="gridOrder != null">
+        and GRID_ORDER = #{gridOrder}
+      </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 QMS_QUEUE_GRID
+    where GRID_ID = #{gridId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from QMS_QUEUE_GRID
+    where 1!=1
+      <if test="gridType != null">
+        or GRID_TYPE = #{gridType}
+      </if>
+      <if test="queueLocationId != null">
+        or QUEUE_LOCATION_ID = #{queueLocationId}
+      </if>
+      <if test="gridOrder != null">
+        or GRID_ORDER = #{gridOrder}
+      </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.QmsQueueGrid">
+    insert into QMS_QUEUE_GRID (GRID_ID, GRID_TYPE,
+      QUEUE_LOCATION_ID, GRID_ORDER, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    values (#{gridId,jdbcType=DECIMAL},#{gridType,jdbcType=DECIMAL},
+      #{queueLocationId,jdbcType=DECIMAL}, #{gridOrder,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.QmsQueueGrid">
+    insert into QMS_QUEUE_GRID
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="gridId != null">
+        GRID_ID,
+      </if>
+      <if test="gridType != null">
+        GRID_TYPE,
+      </if>
+      <if test="queueLocationId != null">
+        QUEUE_LOCATION_ID,
+      </if>
+      <if test="gridOrder != null">
+        GRID_ORDER,
+      </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="gridId != null">
+        #{gridId,jdbcType=DECIMAL},
+      </if>
+      <if test="gridType != null">
+        #{gridType,jdbcType=DECIMAL},
+      </if>
+      <if test="queueLocationId != null">
+        #{queueLocationId,jdbcType=DECIMAL},
+      </if>
+      <if test="gridOrder != null">
+        #{gridOrder,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.QmsQueueGrid">
+    update QMS_QUEUE_GRID
+    set
+      GRID_TYPE = #{gridType,jdbcType=DECIMAL},
+      QUEUE_LOCATION_ID = #{queueLocationId,jdbcType=DECIMAL},
+      GRID_ORDER = #{gridOrder,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 GRID_ID = #{gridId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.QmsQueueGrid">
+    update QMS_QUEUE_GRID
+    <set>
+
+      <if test="gridType != null">
+        GRID_TYPE = #{gridType,jdbcType=DECIMAL},
+      </if>
+      <if test="queueLocationId != null">
+        QUEUE_LOCATION_ID = #{queueLocationId,jdbcType=DECIMAL},
+      </if>
+      <if test="gridOrder != null">
+        GRID_ORDER = #{gridOrder,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 GRID_ID = #{gridId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where GRID_ID = #{gridId,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 QMS_QUEUE_GRID 
+      (GRID_ID, 
+      GRID_TYPE, QUEUE_LOCATION_ID,
+      GRID_ORDER, INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.gridId,jdbcType=DECIMAL}, 
+      #{item.gridType,jdbcType=DECIMAL}, #{item.queueLocationId,jdbcType=DECIMAL},
+      #{item.gridOrder,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 QMS_QUEUE_GRID
+     set
+       GRID_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.gridId,jdbcType=DECIMAL}
+       </foreach>
+       ,GRID_TYPE=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.gridType,jdbcType=DECIMAL}
+       </foreach>
+       ,QUEUE_LOCATION_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.queueLocationId,jdbcType=DECIMAL}
+       </foreach>
+       ,GRID_ORDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.gridOrder,jdbcType=DECIMAL}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case GRID_ID" close="end">
+          when #{item.gridId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where GRID_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.gridId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from QMS_QUEUE_GRID
+    where GRID_ID in 
+    <foreach collection="list" item="id" open="(" close=")" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+
+
+</mapper>

+ 432 - 0
src/main/resources/com/steerinfo/dil/mapper/QmsQueueListMapper.xml

@@ -0,0 +1,432 @@
+<?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.QmsQueueListMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.QmsQueueList">
+    <id column="LIST_ID" jdbcType="DECIMAL" property="listId" />
+    <result column="GRID_ID" jdbcType="DECIMAL" property="gridId" />
+    <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+    <result column="LIST_NODE_ORDER" jdbcType="DECIMAL" property="listNodeOrder" />
+    <result column="DELETED" jdbcType="VARCHAR" property="deleted" />
+    <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">
+    LIST_ID, GRID_ID, CAPACITY_ID, LIST_NODE_ORDER, DELETED, INSERT_USERNAME, INSERT_TIME, 
+    UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK
+  </sql>
+  <sql id="columns_alias">
+    t.LIST_ID, t.GRID_ID, t.CAPACITY_ID, t.LIST_NODE_ORDER, t.DELETED, 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 QMS_QUEUE_LIST
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias"/> FROM QMS_QUEUE_LIST t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="listId != null">
+        and LIST_ID = #{listId}
+      </if>
+      <if test="gridId != null">
+        and GRID_ID = #{gridId}
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="listNodeOrder != null">
+        and LIST_NODE_ORDER = #{listNodeOrder}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED = #{deleted}
+      </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="listId != null">
+        and LIST_ID = #{listId}
+      </if>
+      <if test="gridId != null">
+        and GRID_ID = #{gridId}
+      </if>
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="listNodeOrder != null">
+        and LIST_NODE_ORDER = #{listNodeOrder}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        and DELETED LIKE '%${deleted}%'
+      </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 QMS_QUEUE_LIST
+    where LIST_ID = #{listId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from QMS_QUEUE_LIST
+    where 1!=1 
+      <if test="gridId != null">
+        or GRID_ID = #{gridId}
+      </if>
+      <if test="capacityId != null">
+        or CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="listNodeOrder != null">
+        or LIST_NODE_ORDER = #{listNodeOrder}
+      </if>
+      <if test="deleted != null and deleted != ''">
+        or DELETED = #{deleted}
+      </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.QmsQueueList">
+    insert into QMS_QUEUE_LIST (LIST_ID, GRID_ID, CAPACITY_ID, 
+      LIST_NODE_ORDER, DELETED, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    values (#{listId,jdbcType=DECIMAL}, #{gridId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL}, 
+      #{listNodeOrder,jdbcType=DECIMAL}, #{deleted,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, 
+      #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, 
+      #{insertUpdateRemark,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.QmsQueueList">
+    insert into QMS_QUEUE_LIST
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="listId != null">
+        LIST_ID,
+      </if>
+      <if test="gridId != null">
+        GRID_ID,
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID,
+      </if>
+      <if test="listNodeOrder != null">
+        LIST_NODE_ORDER,
+      </if>
+      <if test="deleted != null">
+        DELETED,
+      </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="listId != null">
+        #{listId,jdbcType=DECIMAL},
+      </if>
+      <if test="gridId != null">
+        #{gridId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityId != null">
+        #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="listNodeOrder != null">
+        #{listNodeOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="deleted != null">
+        #{deleted,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>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.QmsQueueList">
+    update QMS_QUEUE_LIST
+    set GRID_ID = #{gridId,jdbcType=DECIMAL},
+      CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+      LIST_NODE_ORDER = #{listNodeOrder,jdbcType=DECIMAL},
+      DELETED = #{deleted,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}
+    where LIST_ID = #{listId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.QmsQueueList">
+    update QMS_QUEUE_LIST
+    <set>
+      <if test="gridId != null">
+        GRID_ID = #{gridId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityId != null">
+        CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="listNodeOrder != null">
+        LIST_NODE_ORDER = #{listNodeOrder,jdbcType=DECIMAL},
+      </if>
+      <if test="deleted != null">
+        DELETED = #{deleted,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>
+    </set>
+    where LIST_ID = #{listId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.math.BigDecimal" resultMap="BaseResultMap">
+    <include refid="select"/>
+    where LIST_ID = #{listId,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 QMS_QUEUE_LIST 
+      (LIST_ID, 
+      GRID_ID, CAPACITY_ID, LIST_NODE_ORDER, 
+      DELETED, INSERT_USERNAME, INSERT_TIME, 
+      UPDATE_USERNAME, UPDATE_TIME, 
+      INSERT_UPDATE_REMARK)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.listId,jdbcType=DECIMAL}, 
+      #{item.gridId,jdbcType=DECIMAL}, #{item.capacityId,jdbcType=DECIMAL}, #{item.listNodeOrder,jdbcType=DECIMAL}, 
+      #{item.deleted,jdbcType=VARCHAR}, #{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 QMS_QUEUE_LIST
+     set
+       LIST_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.listId,jdbcType=DECIMAL}
+       </foreach>
+       ,GRID_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.gridId,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_ID=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+       </foreach>
+       ,LIST_NODE_ORDER=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.listNodeOrder,jdbcType=DECIMAL}
+       </foreach>
+       ,DELETED=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.deleted,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach collection="list" item="item" index="index" separator=" " open="case LIST_ID" close="end">
+          when #{item.listId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+     where LIST_ID in 
+     <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+    #{item.listId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from QMS_QUEUE_LIST
+    where LIST_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(QQL.LIST_ID)
+    from QMS_QUEUE_LIST QQL
+  </select>
+
+<!-- 查询当前网格最大序号 -->
+  <select id="getMaxListNodeOrder" parameterType="java.util.Map" resultType="int">
+    select max(QQL.LIST_NODE_ORDER)
+    from QMS_QUEUE_LIST QQL
+    where QQL.GRID_ID = #{gridId}
+      and QQL.DELETED = 0
+  </select>
+
+<!--  通过运输订单号 或实绩Id 关联 实绩总表 查询 排队实绩 -->
+  <select id="getQueueResultByOrderNumber" parameterType="java.util.Map" resultType="java.util.Map">
+    select
+           OO.CAPACITY_ID "capacityId",
+           QQR.GRID_ID "gridId",
+           QQR.RESULT_ID "resultId",
+           QQR.LIST_ID "listId"
+    from OMSTRUCK_ORDER OO
+           left join TMSTRUCK_TOTAL_RESULT TTR
+                     on OO.ORDER_ID = TTR.ORDER_ID
+           left join QMS_QUEUE_RESULT QQR
+                     on QQR.RESULT_TOTAL_ID = TTR.RESULT_TOTAL_ID
+    <where>
+      <if test="orderNumber != null">
+        OO.ORDER_NUMBER = #{orderNumber}
+      </if>
+      <if test="resultId != null">
+        QQR.RESULT_ID = #{resultId}
+      </if>
+    </where>
+
+  </select>
+
+<!--  通过链表ID 查询当前网格id -->
+  <select id="getGridIdByListId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+    select GRID_ID from QMS_QUEUE_LIST where LIST_ID = #{listId}
+  </select>
+
+<!-- 通过网格Id查询当前网格中所有的排队车数 以及最小的顺序号 -->
+  <select id="getQueueNumAndMin" parameterType="java.math.BigDecimal" resultType="java.util.Map">
+    select
+           count(*) "count",
+           min(LIST_NODE_ORDER) "listNodeOrder"
+    from QMS_QUEUE_LIST
+    where GRID_ID = #{gridId}
+      and DELETED = 0
+  </select>
+
+<!--  链表监控 查询全部门岗排队车数 -->
+  <select id="listMonitor" resultType="java.util.LinkedHashMap">
+    select *
+    from (
+        select
+          RG.GATEPOST_NAME           "gatepostName",
+          count(QQL.LIST_NODE_ORDER) "count"
+        from RMS_GATEPOST RG
+        LEFT JOIN QMS_QUEUE_LIST QQL
+            on QQL.GRID_ID = RG.GATEPOST_ID and QQL.DELETED = 0
+        group by RG.GATEPOST_NAME
+        )
+    <where>
+      <if test="gatepostName != null">
+        <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+          "gatepostName" like '%${item}%'
+        </foreach>
+      </if>
+      <if test="count != null">
+        and
+        <foreach collection="count" item="item" open="(" separator="or" close=")">
+          "count" like '%${item}%'
+        </foreach>
+      </if>
+    </where>
+    <include refid="orderBy"></include>
+    <if test="orderField == null  ">
+      order by "count" desc
+    </if>
+  </select>
+</mapper>

+ 1608 - 0
src/main/resources/com/steerinfo/dil/mapper/QmsQueueResultMapper.xml

@@ -0,0 +1,1608 @@
+<?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.QmsQueueResultMapper">
+    <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.QmsQueueResult">
+        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+        <result column="RESULT_TOTAL_ID" jdbcType="DECIMAL" property="resultTotalId" />
+        <result column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+        <result column="RESULT_APPLYFOR_TIME" jdbcType="TIMESTAMP" property="resultApplyforTime" />
+        <result column="RESULT_APPLYFOR_LOCATION" jdbcType="VARCHAR" property="resultApplyforLocation" />
+        <result column="GRID_ID" jdbcType="DECIMAL" property="gridId" />
+        <result column="RESULT_DOWN_TIME" jdbcType="TIMESTAMP" property="resultDownTime" />
+        <result column="RESULT_ACCEPT_TIME" jdbcType="TIMESTAMP" property="resultAcceptTime" />
+        <result column="RESULT_START_TIME" jdbcType="TIMESTAMP" property="resultStartTime" />
+        <result column="RESULT_END_TIME" jdbcType="TIMESTAMP" property="resultEndTime" />
+        <result column="RESULT_CANCEL_TIME" jdbcType="TIMESTAMP" property="resultCancelTime" />
+        <result column="RESULT_CANCEL_REASON" jdbcType="VARCHAR" property="resultCancelReason" />
+        <result column="RESULT_INSERT_TIME" jdbcType="TIMESTAMP" property="resultInsertTime" />
+        <result column="RESULT_INSERT_REASON" jdbcType="VARCHAR" property="resultInsertReason" />
+        <result column="RESULT_TRANSFER_TIME" jdbcType="TIMESTAMP" property="resultTransferTime" />
+        <result column="RESULT_TRANSFER_REASON" jdbcType="VARCHAR" property="resultTransferReason" />
+        <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="LIST_ID" jdbcType="DECIMAL" property="listId" />
+    </resultMap>
+    <sql id="columns">
+        RESULT_ID, RESULT_TOTAL_ID, CAPACITY_ID, RESULT_APPLYFOR_TIME, RESULT_APPLYFOR_LOCATION, 
+    GRID_ID, RESULT_DOWN_TIME, RESULT_ACCEPT_TIME, RESULT_START_TIME, RESULT_END_TIME, 
+    RESULT_CANCEL_TIME, RESULT_CANCEL_REASON, RESULT_INSERT_TIME, RESULT_INSERT_REASON, 
+    RESULT_TRANSFER_TIME, RESULT_TRANSFER_REASON, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+    UPDATE_TIME, INSERT_UPDATE_REMARK, LIST_ID
+    </sql>
+    <sql id="columns_alias">
+        t.RESULT_ID, t.RESULT_TOTAL_ID, t.CAPACITY_ID, t.RESULT_APPLYFOR_TIME, t.RESULT_APPLYFOR_LOCATION, 
+    t.GRID_ID, t.RESULT_DOWN_TIME, t.RESULT_ACCEPT_TIME, t.RESULT_START_TIME, t.RESULT_END_TIME, 
+    t.RESULT_CANCEL_TIME, t.RESULT_CANCEL_REASON, t.RESULT_INSERT_TIME, t.RESULT_INSERT_REASON, 
+    t.RESULT_TRANSFER_TIME, t.RESULT_TRANSFER_REASON, t.INSERT_USERNAME, t.INSERT_TIME, 
+    t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.LIST_ID
+    </sql>
+    <sql id="select">
+        SELECT <include refid="columns"/> FROM QMS_QUEUE_RESULT
+    </sql>
+    <sql id="select_alias">
+        SELECT <include refid="columns_alias"/> FROM QMS_QUEUE_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="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="resultApplyforTime != null">
+                and TO_CHAR(RESULT_APPLYFOR_TIME,'yyyy-MM-dd') = #{resultApplyforTime}
+            </if>
+            <if test="resultApplyforLocation != null and resultApplyforLocation != ''">
+                and RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation}
+            </if>
+            <if test="gridId != null">
+                and GRID_ID = #{gridId}
+            </if>
+            <if test="resultDownTime != null">
+                and TO_CHAR(RESULT_DOWN_TIME,'yyyy-MM-dd') = #{resultDownTime}
+            </if>
+            <if test="resultAcceptTime != null">
+                and TO_CHAR(RESULT_ACCEPT_TIME,'yyyy-MM-dd') = #{resultAcceptTime}
+            </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="resultCancelTime != null">
+                and TO_CHAR(RESULT_CANCEL_TIME,'yyyy-MM-dd') = #{resultCancelTime}
+            </if>
+            <if test="resultCancelReason != null and resultCancelReason != ''">
+                and RESULT_CANCEL_REASON = #{resultCancelReason}
+            </if>
+            <if test="resultInsertTime != null">
+                and TO_CHAR(RESULT_INSERT_TIME,'yyyy-MM-dd') = #{resultInsertTime}
+            </if>
+            <if test="resultInsertReason != null and resultInsertReason != ''">
+                and RESULT_INSERT_REASON = #{resultInsertReason}
+            </if>
+            <if test="resultTransferTime != null">
+                and TO_CHAR(RESULT_TRANSFER_TIME,'yyyy-MM-dd') = #{resultTransferTime}
+            </if>
+            <if test="resultTransferReason != null and resultTransferReason != ''">
+                and RESULT_TRANSFER_REASON = #{resultTransferReason}
+            </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="listId != null">
+                and LIST_ID = #{listId}
+            </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="capacityId != null">
+                and CAPACITY_ID = #{capacityId}
+            </if>
+            <if test="resultApplyforTime != null">
+                and TO_CHAR(RESULT_APPLYFOR_TIME,'yyyy-MM-dd') = #{resultApplyforTime}
+            </if>
+            <if test="resultApplyforLocation != null and resultApplyforLocation != ''">
+                and RESULT_APPLYFOR_LOCATION LIKE '%${resultApplyforLocation}%'
+            </if>
+            <if test="gridId != null">
+                and GRID_ID = #{gridId}
+            </if>
+            <if test="resultDownTime != null">
+                and TO_CHAR(RESULT_DOWN_TIME,'yyyy-MM-dd') = #{resultDownTime}
+            </if>
+            <if test="resultAcceptTime != null">
+                and TO_CHAR(RESULT_ACCEPT_TIME,'yyyy-MM-dd') = #{resultAcceptTime}
+            </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="resultCancelTime != null">
+                and TO_CHAR(RESULT_CANCEL_TIME,'yyyy-MM-dd') = #{resultCancelTime}
+            </if>
+            <if test="resultCancelReason != null and resultCancelReason != ''">
+                and RESULT_CANCEL_REASON LIKE '%${resultCancelReason}%'
+            </if>
+            <if test="resultInsertTime != null">
+                and TO_CHAR(RESULT_INSERT_TIME,'yyyy-MM-dd') = #{resultInsertTime}
+            </if>
+            <if test="resultInsertReason != null and resultInsertReason != ''">
+                and RESULT_INSERT_REASON LIKE '%${resultInsertReason}%'
+            </if>
+            <if test="resultTransferTime != null">
+                and TO_CHAR(RESULT_TRANSFER_TIME,'yyyy-MM-dd') = #{resultTransferTime}
+            </if>
+            <if test="resultTransferReason != null and resultTransferReason != ''">
+                and RESULT_TRANSFER_REASON LIKE '%${resultTransferReason}%'
+            </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="listId != null">
+                and LIST_ID = #{listId}
+            </if>
+        </where>
+    </sql>
+    <delete id="deleteByPrimaryKey" parameterType="java.math.BigDecimal">
+        delete from QMS_QUEUE_RESULT
+        where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+    </delete>
+    <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+        delete from QMS_QUEUE_RESULT
+        where 1!=1
+        <if test="resultTotalId != null">
+            or RESULT_TOTAL_ID = #{resultTotalId}
+        </if>
+        <if test="capacityId != null">
+            or CAPACITY_ID = #{capacityId}
+        </if>
+        <if test="resultApplyforTime != null">
+            or TO_CHAR(RESULT_APPLYFOR_TIME,'yyyy-MM-dd') = '#{resultApplyforTime}'
+        </if>
+        <if test="resultApplyforLocation != null and resultApplyforLocation != ''">
+            or RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation}
+        </if>
+        <if test="gridId != null">
+            or GRID_ID = #{gridId}
+        </if>
+        <if test="resultDownTime != null">
+            or TO_CHAR(RESULT_DOWN_TIME,'yyyy-MM-dd') = '#{resultDownTime}'
+        </if>
+        <if test="resultAcceptTime != null">
+            or TO_CHAR(RESULT_ACCEPT_TIME,'yyyy-MM-dd') = '#{resultAcceptTime}'
+        </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="resultCancelTime != null">
+            or TO_CHAR(RESULT_CANCEL_TIME,'yyyy-MM-dd') = '#{resultCancelTime}'
+        </if>
+        <if test="resultCancelReason != null and resultCancelReason != ''">
+            or RESULT_CANCEL_REASON = #{resultCancelReason}
+        </if>
+        <if test="resultInsertTime != null">
+            or TO_CHAR(RESULT_INSERT_TIME,'yyyy-MM-dd') = '#{resultInsertTime}'
+        </if>
+        <if test="resultInsertReason != null and resultInsertReason != ''">
+            or RESULT_INSERT_REASON = #{resultInsertReason}
+        </if>
+        <if test="resultTransferTime != null">
+            or TO_CHAR(RESULT_TRANSFER_TIME,'yyyy-MM-dd') = '#{resultTransferTime}'
+        </if>
+        <if test="resultTransferReason != null and resultTransferReason != ''">
+            or RESULT_TRANSFER_REASON = #{resultTransferReason}
+        </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="listId != null">
+            or LIST_ID = #{listId}
+        </if>
+    </delete>
+    <insert id="insert" parameterType="com.steerinfo.dil.model.QmsQueueResult">
+        insert into QMS_QUEUE_RESULT (RESULT_ID, RESULT_TOTAL_ID, CAPACITY_ID,
+                                      RESULT_APPLYFOR_TIME, RESULT_APPLYFOR_LOCATION,
+                                      GRID_ID, RESULT_DOWN_TIME, RESULT_ACCEPT_TIME,
+                                      RESULT_START_TIME, RESULT_END_TIME, RESULT_CANCEL_TIME,
+                                      RESULT_CANCEL_REASON, RESULT_INSERT_TIME,
+                                      RESULT_INSERT_REASON, RESULT_TRANSFER_TIME,
+                                      RESULT_TRANSFER_REASON, INSERT_USERNAME, INSERT_TIME,
+                                      UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
+                                      LIST_ID)
+        values (#{resultId,jdbcType=DECIMAL}, #{resultTotalId,jdbcType=DECIMAL}, #{capacityId,jdbcType=DECIMAL},
+                #{resultApplyforTime,jdbcType=TIMESTAMP}, #{resultApplyforLocation,jdbcType=VARCHAR},
+                #{gridId,jdbcType=DECIMAL}, #{resultDownTime,jdbcType=TIMESTAMP}, #{resultAcceptTime,jdbcType=TIMESTAMP},
+                #{resultStartTime,jdbcType=TIMESTAMP}, #{resultEndTime,jdbcType=TIMESTAMP}, #{resultCancelTime,jdbcType=TIMESTAMP},
+                #{resultCancelReason,jdbcType=VARCHAR}, #{resultInsertTime,jdbcType=TIMESTAMP},
+                #{resultInsertReason,jdbcType=VARCHAR}, #{resultTransferTime,jdbcType=TIMESTAMP},
+                #{resultTransferReason,jdbcType=VARCHAR}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{listId,jdbcType=DECIMAL})
+    </insert>
+    <insert id="insertSelective" parameterType="com.steerinfo.dil.model.QmsQueueResult">
+        insert into QMS_QUEUE_RESULT
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="resultId != null">
+                RESULT_ID,
+            </if>
+            <if test="resultTotalId != null">
+                RESULT_TOTAL_ID,
+            </if>
+            <if test="capacityId != null">
+                CAPACITY_ID,
+            </if>
+            <if test="resultApplyforTime != null">
+                RESULT_APPLYFOR_TIME,
+            </if>
+            <if test="resultApplyforLocation != null">
+                RESULT_APPLYFOR_LOCATION,
+            </if>
+            <if test="gridId != null">
+                GRID_ID,
+            </if>
+            <if test="resultDownTime != null">
+                RESULT_DOWN_TIME,
+            </if>
+            <if test="resultAcceptTime != null">
+                RESULT_ACCEPT_TIME,
+            </if>
+            <if test="resultStartTime != null">
+                RESULT_START_TIME,
+            </if>
+            <if test="resultEndTime != null">
+                RESULT_END_TIME,
+            </if>
+            <if test="resultCancelTime != null">
+                RESULT_CANCEL_TIME,
+            </if>
+            <if test="resultCancelReason != null">
+                RESULT_CANCEL_REASON,
+            </if>
+            <if test="resultInsertTime != null">
+                RESULT_INSERT_TIME,
+            </if>
+            <if test="resultInsertReason != null">
+                RESULT_INSERT_REASON,
+            </if>
+            <if test="resultTransferTime != null">
+                RESULT_TRANSFER_TIME,
+            </if>
+            <if test="resultTransferReason != null">
+                RESULT_TRANSFER_REASON,
+            </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="listId != null">
+                LIST_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="capacityId != null">
+                #{capacityId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultApplyforTime != null">
+                #{resultApplyforTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultApplyforLocation != null">
+                #{resultApplyforLocation,jdbcType=VARCHAR},
+            </if>
+            <if test="gridId != null">
+                #{gridId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultDownTime != null">
+                #{resultDownTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultAcceptTime != null">
+                #{resultAcceptTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultStartTime != null">
+                #{resultStartTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultEndTime != null">
+                #{resultEndTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultCancelTime != null">
+                #{resultCancelTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultCancelReason != null">
+                #{resultCancelReason,jdbcType=VARCHAR},
+            </if>
+            <if test="resultInsertTime != null">
+                #{resultInsertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultInsertReason != null">
+                #{resultInsertReason,jdbcType=VARCHAR},
+            </if>
+            <if test="resultTransferTime != null">
+                #{resultTransferTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultTransferReason != null">
+                #{resultTransferReason,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="listId != null">
+                #{listId,jdbcType=DECIMAL},
+            </if>
+        </trim>
+    </insert>
+    <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.QmsQueueResult">
+        update QMS_QUEUE_RESULT
+        set RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+            RESULT_APPLYFOR_TIME = #{resultApplyforTime,jdbcType=TIMESTAMP},
+            RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation,jdbcType=VARCHAR},
+            GRID_ID = #{gridId,jdbcType=DECIMAL},
+            RESULT_DOWN_TIME = #{resultDownTime,jdbcType=TIMESTAMP},
+            RESULT_ACCEPT_TIME = #{resultAcceptTime,jdbcType=TIMESTAMP},
+            RESULT_START_TIME = #{resultStartTime,jdbcType=TIMESTAMP},
+            RESULT_END_TIME = #{resultEndTime,jdbcType=TIMESTAMP},
+            RESULT_CANCEL_TIME = #{resultCancelTime,jdbcType=TIMESTAMP},
+            RESULT_CANCEL_REASON = #{resultCancelReason,jdbcType=VARCHAR},
+            RESULT_INSERT_TIME = #{resultInsertTime,jdbcType=TIMESTAMP},
+            RESULT_INSERT_REASON = #{resultInsertReason,jdbcType=VARCHAR},
+            RESULT_TRANSFER_TIME = #{resultTransferTime,jdbcType=TIMESTAMP},
+            RESULT_TRANSFER_REASON = #{resultTransferReason,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},
+            LIST_ID = #{listId,jdbcType=DECIMAL}
+        where RESULT_ID = #{resultId,jdbcType=DECIMAL}
+    </update>
+    <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.QmsQueueResult">
+        update QMS_QUEUE_RESULT
+        <set>
+            <if test="resultTotalId != null">
+                RESULT_TOTAL_ID = #{resultTotalId,jdbcType=DECIMAL},
+            </if>
+            <if test="capacityId != null">
+                CAPACITY_ID = #{capacityId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultApplyforTime != null">
+                RESULT_APPLYFOR_TIME = #{resultApplyforTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultApplyforLocation != null">
+                RESULT_APPLYFOR_LOCATION = #{resultApplyforLocation,jdbcType=VARCHAR},
+            </if>
+            <if test="gridId != null">
+                GRID_ID = #{gridId,jdbcType=DECIMAL},
+            </if>
+            <if test="resultDownTime != null">
+                RESULT_DOWN_TIME = #{resultDownTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultAcceptTime != null">
+                RESULT_ACCEPT_TIME = #{resultAcceptTime,jdbcType=TIMESTAMP},
+            </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="resultCancelTime != null">
+                RESULT_CANCEL_TIME = #{resultCancelTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultCancelReason != null">
+                RESULT_CANCEL_REASON = #{resultCancelReason,jdbcType=VARCHAR},
+            </if>
+            <if test="resultInsertTime != null">
+                RESULT_INSERT_TIME = #{resultInsertTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultInsertReason != null">
+                RESULT_INSERT_REASON = #{resultInsertReason,jdbcType=VARCHAR},
+            </if>
+            <if test="resultTransferTime != null">
+                RESULT_TRANSFER_TIME = #{resultTransferTime,jdbcType=TIMESTAMP},
+            </if>
+            <if test="resultTransferReason != null">
+                RESULT_TRANSFER_REASON = #{resultTransferReason,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="listId != null">
+                LIST_ID = #{listId,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 QMS_QUEUE_RESULT
+        (RESULT_ID,
+        RESULT_TOTAL_ID, CAPACITY_ID, RESULT_APPLYFOR_TIME,
+        RESULT_APPLYFOR_LOCATION, GRID_ID,
+        RESULT_DOWN_TIME, RESULT_ACCEPT_TIME,
+        RESULT_START_TIME, RESULT_END_TIME,
+        RESULT_CANCEL_TIME, RESULT_CANCEL_REASON,
+        RESULT_INSERT_TIME, RESULT_INSERT_REASON,
+        RESULT_TRANSFER_TIME, RESULT_TRANSFER_REASON,
+        INSERT_USERNAME, INSERT_TIME,
+        UPDATE_USERNAME, UPDATE_TIME,
+        INSERT_UPDATE_REMARK, LIST_ID)
+        ( <foreach collection="list" item="item" separator="union all">
+        select
+        #{item.resultId,jdbcType=DECIMAL},
+        #{item.resultTotalId,jdbcType=DECIMAL}, #{item.capacityId,jdbcType=DECIMAL}, #{item.resultApplyforTime,jdbcType=TIMESTAMP},
+        #{item.resultApplyforLocation,jdbcType=VARCHAR}, #{item.gridId,jdbcType=DECIMAL},
+        #{item.resultDownTime,jdbcType=TIMESTAMP}, #{item.resultAcceptTime,jdbcType=TIMESTAMP},
+        #{item.resultStartTime,jdbcType=TIMESTAMP}, #{item.resultEndTime,jdbcType=TIMESTAMP},
+        #{item.resultCancelTime,jdbcType=TIMESTAMP}, #{item.resultCancelReason,jdbcType=VARCHAR},
+        #{item.resultInsertTime,jdbcType=TIMESTAMP}, #{item.resultInsertReason,jdbcType=VARCHAR},
+        #{item.resultTransferTime,jdbcType=TIMESTAMP}, #{item.resultTransferReason,jdbcType=VARCHAR},
+        #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
+        #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
+        #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.listId,jdbcType=DECIMAL} from dual
+    </foreach> )
+    </insert>
+    <update id="batchUpdate" parameterType="java.util.List">
+        update QMS_QUEUE_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>
+        ,CAPACITY_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+        </foreach>
+        ,RESULT_APPLYFOR_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApplyforTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_APPLYFOR_LOCATION=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApplyforLocation,jdbcType=VARCHAR}
+        </foreach>
+        ,GRID_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.gridId,jdbcType=DECIMAL}
+        </foreach>
+        ,RESULT_DOWN_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultDownTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_ACCEPT_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultAcceptTime,jdbcType=TIMESTAMP}
+        </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_CANCEL_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCancelTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_CANCEL_REASON=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCancelReason,jdbcType=VARCHAR}
+        </foreach>
+        ,RESULT_INSERT_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultInsertTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_INSERT_REASON=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultInsertReason,jdbcType=VARCHAR}
+        </foreach>
+        ,RESULT_TRANSFER_TIME=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTransferTime,jdbcType=TIMESTAMP}
+        </foreach>
+        ,RESULT_TRANSFER_REASON=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.resultTransferReason,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>
+        ,LIST_ID=
+        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.listId,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 QMS_QUEUE_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>
+    </sql>
+
+    <!--  获取最大ID值  -->
+    <select id="selectMaxId" resultType="java.math.BigDecimal">
+        select max(QQR.RESULT_ID)
+        from QMS_QUEUE_RESULT QQR
+    </select>
+
+    <!-- 车辆进入电子围栏后触发排队申请 -->
+    <select id="queryCIdAndTIdByOrderNumber" parameterType="string" resultType="java.util.Map">
+        select OO.ORDER_ID         "orderId",
+               OO.CAPACITY_ID      "capacityId",
+               TTR.RESULT_TOTAL_ID "resultTotalId"
+        from OMSTRUCK_ORDER OO
+                 left join TMSTRUCK_TOTAL_RESULT TTR
+                           on TTR.ORDER_ID = OO.ORDER_ID
+        where OO.ORDER_NUMBER = #{orderNumber}
+    </select>
+
+    <!--  人工添加排队申请查询所有执行中订单 订单状态 :1  -->
+    <select id="getAllExecutionOrder" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select *
+        from (
+                 select OO.ORDER_ID               "orderId",
+                        OO.ORDER_NUMBER           "orderNumber",
+                        OOM.ORDER_MATERIAL_WEIGHT "orderMaterialWeight",
+                        RM.MATERIAL_NAME          "materialName",
+                        RC.CAPACITY_NUMBER        "capacityNumber",
+                        RCD.DRIVER_NAME           "driverName",
+                        OO.INSERT_TIME            "insertTime"
+                 from OMSTRUCK_ORDER OO
+                          join OMSTRUCK_ORDER_MATERIAL OOM
+                               on OOM.ORDER_ID = OO.ORDER_ID
+                          join RMS_MATERIAL RM
+                               on RM.MATERIAL_ID = OOM.ORDER_MATERIAL_ID
+                          join RMS_CAPACITY RC
+                               on RC.CAPACITY_ID = OO.CAPACITY_ID
+                          join RMS_DRIVER_CAPACITY RDC
+                               on RDC.CAPACITY_ID = RC.CAPACITY_ID
+                          join RMS_CAR_DRIVER RCD
+                               on RDC.DRIVER_ID = RCD.DRIVER_ID
+                          join TMSTRUCK_TOTAL_RESULT TTR
+                               on TTR.ORDER_ID = OO.ORDER_ID
+                 where OO.ORDER_STATUS = #{orderStatus}
+                   and OO.ORDER_TYPE = #{orderTypee}
+                   and TTR.RESULT_TOTAL_ID not in (select QQR.RESULT_TOTAL_ID from QMS_QUEUE_RESULT QQR)
+             )
+        <where>
+            <if test="orderNumber != null">
+
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" 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="materialName != null">
+                and
+                <foreach collection="materialName" item="item" open="(" separator="or" close=")">
+                    "materialName" 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>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "insertTime" desc
+        </if>
+    </select>
+
+    <!--  根据运单Id查询物资Id-->
+    <select id="queryOrderMesByOrderId" parameterType="java.math.BigDecimal" resultType="java.math.BigDecimal">
+        select OOM.MATERIAL_ID "materialId"
+        from OMSTRUCK_ORDER OO
+                 left join OMSTRUCK_ORDER_MATERIAL OOM
+                           on OO.ORDER_ID = OOM.ORDER_ID
+        where OO.ORDER_ID = #{orderId}
+    </select>
+    <!--  根据物资Id、门岗规则(进或出) 查询门岗id -->
+    <select id="queryGatepostByMaterialId" parameterType="java.util.Map" resultType="java.math.BigDecimal">
+        select
+        RG.GATEPOST_ID "gatepostId"
+        from RMS_GATEPOST RG
+        left join RMS_GATEPOST_RULES RGR
+        on RGR.GATEPOST_ID = RG.GATEPOST_ID
+        left join RMS_MATERIAL_TYPE RMT
+        on RMT.MATERIAL_TYPE_ID = RGR.MATERIAL_TYPE_ID
+        left join RMS_MATERIAL RM
+        on RM.MATERIAL_TYPE_ID = RMT.MATERIAL_TYPE_ID
+        <where>
+            <if test="materialId != null">
+                RM.MATERIAL_ID = #{materialId}
+            </if>
+            <if test="type != null">
+                and RGR.RULES_GATEPOST_ENTRY_OUT_TYPE = #{type}
+            </if>
+        </where>
+        order by
+        "gatepostId"
+    </select>
+
+<!-- 通过门岗名称查询门岗ID -->
+    <select id="getGatepostIdByGatepostName" parameterType="string" resultType="java.math.BigDecimal">
+     select RG.GATEPOST_ID "gatepostId"
+     from RMS_GATEPOST RG
+     where RG.GATEPOST_NAME = #{gatepostName}
+    </select>
+
+    <!-- 通过门岗ID、和 网格类型 匹配 网格主键 -->
+    <select id="getGridIdByGatepostIdAndGridType" parameterType="java.util.Map" resultType="java.math.BigDecimal">
+        select QQG.GRID_ID
+        from QMS_QUEUE_GRID QQG
+        where QQG.GRID_TYPE = #{gridType}
+          and QQG.QUEUE_LOCATION_ID = #{queueLocationId}
+    </select>
+
+<!-- 查询排队申请 -->
+    <select id="getQueueApply" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select *
+        from (
+                 select QQR.RESULT_ID                "resultId",
+                        OO.ORDER_NUMBER              "orderNumber",
+                        RC.CAPACITY_NUMBER           "capacityNumber",
+                        QQR.RESULT_APPLYFOR_LOCATION "resultApplyforLocation", --当前位置?
+                        QQR.RESULT_APPLYFOR_TIME     "resultApplyforTime",
+                        QQR.RESULT_DOWN_TIME         "resultDownTime",
+                        RG.GATEPOST_NAME             "gatepostName"
+                 from QMS_QUEUE_RESULT QQR
+                          left join TMSTRUCK_TOTAL_RESULT TTR
+                                    on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID
+                          left join OMSTRUCK_ORDER OO
+                                    on OO.ORDER_ID = TTR.ORDER_ID
+                          left join RMS_CAPACITY RC
+                                    on RC.CAPACITY_ID = QQR.CAPACITY_ID
+                          left join QMS_QUEUE_GRID QQG
+                                    on QQG.GRID_ID = QQR.GRID_ID
+                          left join RMS_GATEPOST RG
+                                    on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
+                 where QQR.RESULT_ACCEPT_TIME is null
+             )
+        <where>
+            <if test="capacityNumber != null">
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" 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="resultApplyforLocation != null">
+                and
+                <foreach collection="resultApplyforLocation" item="item" open="(" separator="or" close=")">
+                    "resultApplyforLocation" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultApplyforTime != null">
+                and
+                <foreach collection="resultApplyforTime" item="item" open="(" separator="or" close=")">
+                    "resultApplyforTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultDownTime != null">
+                and
+                <foreach collection="resultDownTime" item="item" open="(" separator="or" close=")">
+                    "resultDownTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="gatepostName != null">
+                and
+                <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+                    "gatepostName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultDownTime" desc
+        </if>
+
+    </select>
+
+<!--    指令接收 通过接收时间判断是否已接收  查询判断条件:是否结束进厂  -->
+    <select id="getOrderReceive" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select *
+        from (
+                 select OO.ORDER_NUMBER        "orderNumber",
+                        RC.CAPACITY_NUMBER     "capacityNumber",
+                        QQR.RESULT_ACCEPT_TIME "resultAcceptTime",
+                        RG.GATEPOST_NAME       "gatepostName",
+                        QQR.RESULT_DOWN_TIME "resultDownTime"
+                 from QMS_QUEUE_RESULT QQR
+                          left join TMSTRUCK_TOTAL_RESULT TTR
+                                    on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID
+                          left join OMSTRUCK_ORDER OO
+                                    on OO.ORDER_ID = TTR.ORDER_ID
+                          left join RMS_CAPACITY RC
+                                    on RC.CAPACITY_ID = QQR.CAPACITY_ID
+                          left join QMS_QUEUE_GRID QQG
+                                    on QQG.GRID_ID = QQR.GRID_ID
+                          left join RMS_GATEPOST RG
+                                    on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
+                 where QQR.RESULT_END_TIME is null
+             )
+        <where>
+            <if test="capacityNumber != null">
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" 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="resultAcceptTime != null">
+                and
+                <foreach collection="resultAcceptTime" item="item" open="(" separator="or" close=")">
+                    "resultAcceptTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultAcceptTime != null">
+                and
+                <foreach collection="resultAcceptTime" item="item" open="(" separator="or" close=")">
+                    "resultAcceptTime" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultDownTime" desc
+        </if>
+    </select>
+    
+    <!--  排队开始、详情 正在排队的数据 -->
+    <select id="getQueueListByQueueUp" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+        *
+        from(
+        select
+            QQR.RESULT_ID "resultId",
+            APO.PURCHASE_ORDER_NO "purchaseOrderNo",
+            OO.ORDER_NUMBER "orderNumber",
+            RC.CAPACITY_NUMBER "capacityNumber",
+            QQR.RESULT_START_TIME "resultStartTime",
+            RG.GATEPOST_NAME    "gatepostName",
+            (
+        <![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",
+          RC.CAPACITY_VIP "capacityVip"
+
+        from QMS_QUEUE_RESULT QQR
+        left join QMS_QUEUE_LIST QQL
+        on QQR.LIST_ID = QQL.LIST_ID
+        left join QMS_QUEUE_GRID QQG
+        on QQG.GRID_ID = QQL.GRID_ID
+        left join RMS_GATEPOST RG
+        on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
+        left join TMSTRUCK_TOTAL_RESULT TTR
+        on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID
+        left join OMSTRUCK_ORDER OO
+        on OO.ORDER_ID = TTR.ORDER_ID
+
+        left join AMS_PURCHASE_ORDER APO
+        on OO.ORDER_PLAN_ID = APO.PURCHASE_ORDER_ID
+
+        left join RMS_CAPACITY RC
+        on QQR.CAPACITY_ID = RC.CAPACITY_ID
+
+        where QQR.RESULT_START_TIME is not null
+              and QQL.DELETED = 0
+        <if test="gridId != null">
+            and QQL.GRID_ID = #{gridId}
+        </if>
+        )
+        <where>
+            <if test="purchaseOrderNo != null">
+                <foreach collection="purchaseOrderNo" item="item" open="(" separator="or" close=")">
+                    "purchaseOrderNo" 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="resultStartTime != null">
+            and
+                <foreach collection="resultStartTime" item="item" open="(" separator="or" close=")">
+                    "resultStartTime" 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="listNodeOrder != null">
+            and
+                <foreach collection="listNodeOrder" item="item" open="(" separator="or" close=")">
+                    "listNodeOrder" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultStartTime" desc
+        </if>
+    </select>
+    
+<!--  通过实绩Id查询链表ID  -->
+    <select id="getListIdByResultId" parameterType="java.math.BigDecimal" resultType="java.util.Map">
+        select
+               LIST_ID "listId",
+               CAPACITY_ID "capacityId"
+        from QMS_QUEUE_RESULT QQR
+        where QQR.RESULT_ID = #{resultId}
+    </select>
+
+<!--    查看排队转移详情 -->
+    <select id="getChangeQueueMes" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+        *
+        from(
+        select
+            QQR.RESULT_ID "resultId",
+            OO.ORDER_NUMBER "orderNumber",
+            RC.CAPACITY_NUMBER "capacityNumber",
+            RG1.GATEPOST_NAME  "gatepostName1",
+            RG2.GATEPOST_NAME  "gatepostName2",
+            QQR.RESULT_TRANSFER_TIME "resultTransferTime",
+            QQR.RESULT_TRANSFER_REASON "resultTransferReason",
+            (
+            <![CDATA[
+                select
+                    count(*)
+                from
+                    QMS_QUEUE_LIST QL
+                        join QMS_QUEUE_GRID QG
+                             on QG.GRID_ID = QL.GRID_ID
+                where
+                    QL.LIST_NODE_ORDER <= QQL.list_node_order
+                  and QL.GRID_ID = QQL.GRID_ID
+                  and QL.DELETED = 0
+                ]]>
+              ) "listNodeOrder"
+
+        from QMS_QUEUE_RESULT QQR
+        left join TMSTRUCK_TOTAL_RESULT TTR
+        on QQR.RESULT_TOTAL_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 = QQR.CAPACITY_ID
+        left join QMS_QUEUE_LIST QQL
+        on QQL.LIST_ID = QQR.LIST_ID
+        left join QMS_QUEUE_GRID QQG1 --转移后门岗ID
+        on QQG1.GRID_ID = QQL.GRID_ID
+        left join RMS_GATEPOST RG1    --转移后门岗
+        on QQG1.QUEUE_LOCATION_ID = RG1.GATEPOST_ID
+        left join QMS_QUEUE_GRID QQG2 -- 转移前门岗ID
+        on QQG2.GRID_ID = QQR.GRID_ID
+        left join RMS_GATEPOST RG2     --转移前门岗
+        on RG2.GATEPOST_ID = QQG2.QUEUE_LOCATION_ID
+
+        where QQR.RESULT_TRANSFER_TIME is not null
+              and QQL.DELETED = 0
+        )
+    <where>
+        <if test="orderNumber != null">
+            <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="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="resultTransferTime != null">
+            and
+            <foreach collection="resultTransferTime" item="item" open="(" separator="or" close=")">
+                "resultTransferTime" like '%${item}%'
+            </foreach>
+        </if>
+        <if test="resultTransferReason != null">
+            and
+            <foreach collection="resultTransferReason" item="item" open="(" separator="or" close=")">
+                "resultTransferReason" like '%${item}%'
+            </foreach>
+        </if>
+    </where>
+    <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultTransferTime" desc
+        </if>
+    </select>
+
+<!--  查询排队取消  -->
+    <select id="getQueueCancel" parameterType="java.util.Map" resultType="java.util.Map">
+        select *
+        from (
+                 select QQR.RESULT_ID            "resultId",
+                        OO.ORDER_NUMBER          "orderNumber",
+                        RC.CAPACITY_NUMBER       "capacityNumber",
+                        QQR.RESULT_CANCEL_TIME   "resultCancelTime",
+                        QQR.RESULT_CANCEL_REASON "resultCancelReason",
+                        RG.GATEPOST_NAME         "gatepostName"
+                 from QMS_QUEUE_RESULT QQR
+                          left join TMSTRUCK_TOTAL_RESULT TTR
+                                    on QQR.RESULT_TOTAL_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 = QQR.CAPACITY_ID
+                          left join QMS_QUEUE_LIST QQL
+                                    on QQL.LIST_ID = QQR.LIST_ID
+                          left join QMS_QUEUE_GRID QQG
+                                    on QQG.GRID_ID = QQL.GRID_ID
+                          left join RMS_GATEPOST RG
+                                    on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
+                 where QQR.RESULT_CANCEL_TIME is not null
+             )
+        <where>
+            <if test="orderNumber != null">
+                <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="resultCancelTime != null">
+                and
+                <foreach collection="resultCancelTime" item="item" open="(" separator="or" close=")">
+                    "resultCancelTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultCancelReason != null">
+                and
+                <foreach collection="resultCancelReason" item="item" open="(" separator="or" close=")">
+                    "resultCancelReason" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="gatepostName != null">
+                and
+                <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+                    "gatepostName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultCancelTime" desc
+        </if>
+    </select>
+
+<!--    通过实绩Id 查询数据 取消排队使用-->
+    <select id="getQueueCancelByResultId" parameterType="int" resultType="java.util.Map">
+        select
+            OO.ORDER_NUMBER "orderNumber",
+            RC.CAPACITY_NUMBER "capacityNumber",
+            QQR.RESULT_CANCEL_TIME "resultCancelTime",
+            QQR.RESULT_CANCEL_REASON "resultCancelReason"
+
+        from QMS_QUEUE_RESULT QQR
+          left join TMSTRUCK_TOTAL_RESULT TTR
+                    on QQR.RESULT_TOTAL_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 = QQR.CAPACITY_ID
+          left join QMS_QUEUE_LIST QQL
+                    on QQL.LIST_ID = QQR.LIST_ID
+          left join QMS_QUEUE_GRID QQG
+                    on QQG.GRID_ID = QQL.GRID_ID
+          left join RMS_GATEPOST RG
+                    on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
+        where RESULT_ID = #{resultId}
+    </select>
+
+<!--    查询插队实绩-->
+    <select id="getQueueInsert" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select *
+        from (
+                 select QQR.RESULT_ID            "resultId",
+                        OO.ORDER_NUMBER          "orderNumber",
+                        RG.GATEPOST_NAME         "gatepostName",
+                        RC.CAPACITY_NUMBER       "capacityNumber",
+                        QQR.RESULT_INSERT_TIME   "resultInsertTime",
+                        QQR.RESULT_INSERT_REASON "resultInsertReason",
+                        (
+                            select count(*) from QMS_QUEUE_LIST QQL2 where QQL2.GRID_ID = QQL.GRID_ID
+                        )                        "queueNumber"
+
+                 from QMS_QUEUE_RESULT QQR
+                          left join TMSTRUCK_TOTAL_RESULT TTR
+                                    on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID
+                          left join OMSTRUCK_ORDER OO
+                                    on OO.ORDER_ID = TTR.ORDER_ID
+                          left join QMS_QUEUE_LIST QQL
+                                    on QQR.LIST_ID = QQL.LIST_ID
+                          left join QMS_QUEUE_GRID QQG
+                                    on QQG.GRID_ID = QQL.GRID_ID
+                          left join RMS_GATEPOST RG
+                                    on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
+                          left join RMS_CAPACITY RC
+                                    on RC.CAPACITY_ID = QQR.CAPACITY_ID
+                 where QQR.RESULT_INSERT_TIME is not null
+                   and QQR.RESULT_END_TIME is null
+             )
+        <where>
+            <if test="orderNumber != null">
+                <foreach collection="orderNumber" item="item" open="(" separator="or" close=")">
+                    "orderNumber" 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="capacityNumber != null">
+                and
+                <foreach collection="capacityNumber" item="item" open="(" separator="or" close=")">
+                    "capacityNumber" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultInsertTime != null">
+                and
+                <foreach collection="resultInsertTime" item="item" open="(" separator="or" close=")">
+                    "resultInsertTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultInsertReason != null">
+                and
+                <foreach collection="resultInsertReason" item="item" open="(" separator="or" close=")">
+                    "resultInsertReason" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultInsertTime" desc
+        </if>
+    </select>
+
+
+<!--    查询所有排队结束  -->
+    <select id="getQueueEndResult" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+        select
+               *
+        from (
+                 select OO.ORDER_NUMBER     "orderNumber",
+                        RC.CAPACITY_NUMBER  "capacityNumber",
+                        QQR.RESULT_END_TIME "resultEndTime",
+                        RG.GATEPOST_NAME    "gatepostName"
+                 from QMS_QUEUE_RESULT QQR
+                          left join TMSTRUCK_TOTAL_RESULT TTR
+                                    on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID
+                          left join OMSTRUCK_ORDER OO
+                                    on OO.ORDER_ID = TTR.ORDER_ID
+                          left join QMS_QUEUE_LIST QQL
+                                    on QQR.LIST_ID = QQL.LIST_ID
+                          left join QMS_QUEUE_GRID QQG
+                                    on QQG.GRID_ID = QQL.GRID_ID
+                          left join RMS_GATEPOST RG
+                                    on RG.GATEPOST_ID = QQG.QUEUE_LOCATION_ID
+                          left join RMS_CAPACITY RC
+                                    on RC.CAPACITY_ID = QQR.CAPACITY_ID
+                 where QQR.RESULT_END_TIME is not null
+             )
+        <where>
+            <if test="orderNumber != null">
+                <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="resultEndTime != null">
+                and
+                <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
+                    "resultEndTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="gatepostName != null">
+                and
+                <foreach collection="gatepostName" item="item" open="(" separator="or" close=")">
+                    "gatepostName" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultEndTime" desc
+        </if>
+    </select>
+    <!--   排序 -->
+    <sql id="orderByEndTime">
+        <if test="orderField != null and orderField != ''">
+            order by "${orderField}"
+            <if test="orderType != null and orderType != ''">
+                ${orderType}
+            </if>
+        </if>
+        <if test="orderField == null  ">
+            order by "resultEndTime" desc
+        </if>
+    </sql>
+
+<!--    汽车监控  -->
+    <select id="capacityMonitor" parameterType="java.util.Map" resultType="java.util.LinkedHashMap">
+
+        select *
+        from (
+                 select OO.ORDER_NUMBER          "orderNumber",
+                        RC.CAPACITY_NUMBER       "capacityNumber",
+                        QQR.RESULT_APPLYFOR_TIME "resultApplyforTime",
+                        QQR.RESULT_START_TIME    "resultStartTime",
+                        QQR.RESULT_DOWN_TIME     "resultDownTime",
+                        QQR.RESULT_ACCEPT_TIME   "resultAcceptTime",
+                        QQR.RESULT_CANCEL_TIME   "resultCancelTime",
+                        QQR.RESULT_CANCEL_REASON "resultCancelReason",
+                        QQR.RESULT_INSERT_TIME   "resultInsertTime",
+                        QQR.RESULT_INSERT_REASON "resultInsertReason",
+                        QQR.RESULT_END_TIME      "resultEndTime"
+
+                 from QMS_QUEUE_RESULT QQR
+                          left join TMSTRUCK_TOTAL_RESULT TTR
+                                    on TTR.RESULT_TOTAL_ID = QQR.RESULT_TOTAL_ID
+                          left join OMSTRUCK_ORDER OO
+                                    on OO.ORDER_ID = TTR.ORDER_ID
+                          left join RMS_CAPACITY RC
+                                    on RC.CAPACITY_ID = QQR.CAPACITY_ID
+             )
+        <where>
+            <if test="orderNumber != null">
+                <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="resultApplyforTime != null">
+                and
+                <foreach collection="resultApplyforTime" item="item" open="(" separator="or" close=")">
+                    "resultApplyforTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultStartTime != null">
+                and
+                <foreach collection="resultStartTime" item="item" open="(" separator="or" close=")">
+                    "resultStartTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultDownTime != null">
+                and
+                <foreach collection="resultDownTime" item="item" open="(" separator="or" close=")">
+                    "resultDownTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultAcceptTime != null">
+                and
+                <foreach collection="resultAcceptTime" item="item" open="(" separator="or" close=")">
+                    "resultAcceptTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultCancelTime != null">
+                and
+                <foreach collection="resultCancelTime" item="item" open="(" separator="or" close=")">
+                    "resultCancelTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultCancelReason != null">
+                and
+                <foreach collection="resultCancelReason" item="item" open="(" separator="or" close=")">
+                    "resultCancelReason" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultInsertTime != null">
+                and
+                <foreach collection="resultInsertTime" item="item" open="(" separator="or" close=")">
+                    "resultInsertTime" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultInsertReason != null">
+                and
+                <foreach collection="resultInsertReason" item="item" open="(" separator="or" close=")">
+                    "resultInsertReason" like '%${item}%'
+                </foreach>
+            </if>
+            <if test="resultEndTime != null">
+                and
+                <foreach collection="resultEndTime" item="item" open="(" separator="or" close=")">
+                    "resultEndTime" like '%${item}%'
+                </foreach>
+            </if>
+        </where>
+        <include refid="orderBy"></include>
+        <if test="orderField == null  ">
+            order by "resultApplyforTime" desc
+        </if>
+    </select>
+
+    <!-- 通过门岗查询排队车数 -->
+    <select id="getQueueListByGatepost" parameterType="java.math.BigDecimal" resultType="java.util.Map">
+        SELECT oo.ORDER_NUMBER    as "orderNumber",
+               rc.CAPACITY_NUMBER as "capacityNumber",
+               rg.GATEPOST_NAME   as "gatepostName",
+               (
+  <![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 QMS_QUEUE_RESULT qqr
+                 LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr
+                           ON qqr.RESULT_TOTAL_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 = qqr.CAPACITY_ID
+                 LEFT JOIN QMS_QUEUE_LIST qql
+                           ON qql.LIST_ID = qqr.LIST_ID
+                 LEFT JOIN QMS_QUEUE_GRID qqg
+                           ON qqg.GRID_ID = qql.GRID_ID
+                 LEFT JOIN RMS_GATEPOST rg
+                           ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID
+        WHERE rg.GATEPOST_ID = #{gatepostId}
+          AND qql.DELETED = 0
+    </select>
+
+    <!-- 查询排队取消列表 -->
+    <select id="getQueueCancelList" resultType="java.util.Map">
+        SELECT oo.ORDER_NUMBER          as "orderNumber",
+               rc.CAPACITY_NUMBER       as "capacityNumber",
+               qqr.RESULT_CANCEL_TIME   as "resultCancelTime",
+               qqr.RESULT_CANCEL_REASON as "resultCancelReason",
+               rg.GATEPOST_NAME         as "gatepostName"
+        FROM QMS_QUEUE_RESULT qqr
+                 LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr
+                           ON qqr.RESULT_TOTAL_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 = qqr.CAPACITY_ID
+                 LEFT JOIN QMS_QUEUE_LIST qql
+                           ON qql.LIST_ID = qqr.LIST_ID
+                 LEFT JOIN QMS_QUEUE_GRID qqg
+                           ON qqg.GRID_ID = qql.GRID_ID
+                 LEFT JOIN RMS_GATEPOST rg
+                           ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID
+        WHERE qqr.RESULT_CANCEL_REASON IS NOT NULL
+    </select>
+
+    <!-- 查看各个门岗,仓库的实时状态 -->
+    <select id="getQueueStatusList" resultType="java.util.Map">
+        select
+            RG.GATEPOST_NAME           "gatepostName",
+            count(QQL.LIST_NODE_ORDER) "count"
+        from RMS_GATEPOST RG
+                 LEFT JOIN QMS_QUEUE_LIST QQL
+                           on QQL.GRID_ID = RG.GATEPOST_ID and QQL.DELETED = 0
+        group by RG.GATEPOST_NAME
+    </select>
+
+    <!-- 查询指令接收 -->
+    <select id="getOrderReceiveList" resultType="java.util.Map">
+        SELECT oo.ORDER_NUMBER        as "orderNumber",
+               rc.CAPACITY_NUMBER     as "capacityNumber",
+               qqr.RESULT_ACCEPT_TIME as "resultAcceptTime",
+               rg.GATEPOST_NAME       as "gatepostName"
+        FROM QMS_QUEUE_RESULT qqr
+                 LEFT JOIN QMS_QUEUE_LIST qql
+                           ON qql.LIST_ID = qqr.LIST_ID
+                 LEFT JOIN RMS_CAPACITY rc
+                           ON rc.CAPACITY_ID = qql.CAPACITY_ID
+                 LEFT JOIN QMS_QUEUE_GRID qqg
+                           ON qqg.GRID_ID = qql.GRID_ID
+                 LEFT JOIN RMS_GATEPOST rg
+                           ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID
+                 LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr
+                           ON ttr.RESULT_TOTAL_ID = qqr.RESULT_TOTAL_ID
+                 LEFT JOIN OMSTRUCK_ORDER oo
+                           ON ttr.ORDER_ID = oo.ORDER_ID
+    </select>
+
+    <!-- 根据车牌号查询指令接收 -->
+    <select id="getOrderReceive2" resultType="java.util.Map" parameterType="java.util.Map">
+        SELECT DISTINCT oo.ORDER_NUMBER    as "orderNumber",
+                        rc.CAPACITY_NUMBER as "capacityNumber",
+                        rg.GATEPOST_NAME   as "gatepostName",
+                        (
+                            SELECT count(*)
+                            FROM QMS_QUEUE_LIST qql
+                            WHERE qql.DELETED = 0
+                              AND qql.GRID_ID = #{gridId}
+                        )                     "count",
+                        (
+            <![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 QMS_QUEUE_RESULT qqr
+                 LEFT JOIN RMS_CAPACITY rc
+                           ON rc.CAPACITY_ID = qqr.CAPACITY_ID
+                 LEFT JOIN QMS_QUEUE_GRID qqg
+                           ON qqg.GRID_ID = qqr.GRID_ID
+                 LEFT JOIN QMS_QUEUE_LIST qql
+                           ON qqr.LIST_ID = qql.LIST_ID
+                 LEFT JOIN RMS_GATEPOST rg
+                           ON rg.GATEPOST_ID = qqg.QUEUE_LOCATION_ID
+                 LEFT JOIN TMSTRUCK_TOTAL_RESULT ttr
+                           ON ttr.RESULT_TOTAL_ID = qqr.RESULT_TOTAL_ID
+                 LEFT JOIN OMSTRUCK_ORDER oo
+                           ON ttr.ORDER_ID = oo.ORDER_ID
+        WHERE rc.CAPACITY_NUMBER = #{capacityNumber}  and OO.ORDER_STATUS = 1
+    </select>
+
+    <!-- 通过车牌号查询网格id -->
+    <select id="getGridId" parameterType="java.lang.String" resultType="DECIMAL">
+        SELECT qqg.GRID_ID as "gridId"
+        FROM QMS_QUEUE_RESULT qqr
+                 LEFT JOIN QMS_QUEUE_GRID qqg
+                           ON qqr.GRID_ID = qqg.GRID_ID
+                 LEFT JOIN RMS_CAPACITY rc
+                           ON qqr.CAPACITY_ID = rc.CAPACITY_ID
+        WHERE qqr.RESULT_START_TIME IS NULL
+          AND rc.CAPACITY_NUMBER = #{capacityNumber}
+    </select>
+
+    <select id="getGridIdNotNull" parameterType="java.lang.String" resultType="DECIMAL">
+        SELECT qqg.GRID_ID as "gridId"
+        FROM QMS_QUEUE_RESULT qqr
+                 LEFT JOIN QMS_QUEUE_GRID qqg
+                           ON qqr.GRID_ID = qqg.GRID_ID
+                 LEFT JOIN RMS_CAPACITY rc
+                           ON qqr.CAPACITY_ID = rc.CAPACITY_ID
+        WHERE qqr.RESULT_END_TIME IS NULL
+          AND qqr.RESULT_CANCEL_TIME IS NULL
+          AND rc.CAPACITY_NUMBER = #{capacityNumber}
+    </select>
+
+    <!-- 通过运单号得到总实绩id -->
+    <select id="getResultTotalId" parameterType="java.lang.String" resultType="DECIMAL">
+        SELECT ttr.RESULT_TOTAL_ID
+        FROM TMSTRUCK_TOTAL_RESULT ttr
+                 LEFT JOIN OMSTRUCK_ORDER oo
+                           ON ttr.ORDER_ID = oo.ORDER_ID
+        WHERE oo.ORDER_NUMBER = #{orderNumber}
+    </select>
+
+    <!-- 通过车牌号得到实绩id -->
+    <select id="getResultIdByCapacityId" parameterType="java.lang.String" resultType="DECIMAL">
+        SELECT qqr.RESULT_ID
+        FROM QMS_QUEUE_RESULT qqr
+                 LEFT JOIN RMS_CAPACITY rc
+                           ON rc.CAPACITY_ID = qqr.CAPACITY_ID
+        WHERE rc.CAPACITY_NUMBER = #{capacityNumber}
+          AND qqr.RESULT_END_TIME IS NULL
+    </select>
+
+    <!-- 通过运力id和总实绩id查询排队实绩id -->
+    <select id="getQueueResultId" parameterType="java.util.Map" resultType="DECIMAL">
+        SELECT qqr.RESULT_ID as "resultId"
+        FROM QMS_QUEUE_RESULT qqr
+        WHERE qqr.CAPACITY_ID = #{capacityId}
+          AND qqr.RESULT_TOTAL_ID = #{resultTotalId}
+    </select>
+</mapper>

+ 657 - 0
src/main/resources/com/steerinfo/dil/mapper/RmsCapacityMapper.xml

@@ -0,0 +1,657 @@
+<?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.RmsCapacityMapper">
+  <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.RmsCapacity">
+    <id column="CAPACITY_ID" jdbcType="DECIMAL" property="capacityId" />
+    <result column="CAPACITY_NUMBER" jdbcType="VARCHAR" property="capacityNumber" />
+    <result column="CAPACITY_MAX_LOAD" jdbcType="DECIMAL" property="capacityMaxLoad" />
+    <result column="CAPACITY_TYPE_ID" jdbcType="DECIMAL" property="capacityTypeId" />
+    <result column="CAPACITY_STATUS" jdbcType="VARCHAR" property="capacityStatus" />
+    <result column="CARRIER_ID" jdbcType="DECIMAL" property="carrierId" />
+    <result column="CAPACITY_ENERGY_ID" jdbcType="VARCHAR" property="capacityEnergyId" />
+    <result column="CAPACITY_LEN_VAL" jdbcType="DECIMAL" property="capacityLenVal" />
+    <result column="CAPACITY_WID_VAL" jdbcType="DECIMAL" property="capacityWidVal" />
+    <result column="CAPACITY_HIG_VAL" jdbcType="DECIMAL" property="capacityHigVal" />
+    <result column="CAPACITY_OIL_ID" jdbcType="DECIMAL" property="capacityOilId" />
+    <result column="CAPACITY_FUEL_CONSUMPTION" jdbcType="VARCHAR" property="capacityFuelConsumption" />
+    <result column="CAPACITY_OWNERIS" jdbcType="DECIMAL" property="capacityOwneris" />
+    <result column="CAPACITY_BLACKLIST" jdbcType="DECIMAL" property="capacityBlacklist" />
+    <result column="MEMO" jdbcType="VARCHAR" property="memo" />
+    <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="CAPACITY_CORLOR" jdbcType="VARCHAR" property="capacityCorlor" />
+    <result column="CAPACITY_VIP" jdbcType="VARCHAR" property="capacityVip" />
+  </resultMap>
+  <sql id="columns">
+    CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD, CAPACITY_TYPE_ID, CAPACITY_STATUS, 
+    CARRIER_ID, CAPACITY_ENERGY_ID, CAPACITY_LEN_VAL, CAPACITY_WID_VAL, CAPACITY_HIG_VAL, 
+    CAPACITY_OIL_ID, CAPACITY_FUEL_CONSUMPTION, CAPACITY_OWNERIS, CAPACITY_BLACKLIST, 
+    MEMO, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK, 
+    CAPACITY_CORLOR, CAPACITY_VIP
+  </sql>
+  <sql id="columns_alias">
+    t.CAPACITY_ID, t.CAPACITY_NUMBER, t.CAPACITY_MAX_LOAD, t.CAPACITY_TYPE_ID, t.CAPACITY_STATUS, 
+    t.CARRIER_ID, t.CAPACITY_ENERGY_ID, t.CAPACITY_LEN_VAL, t.CAPACITY_WID_VAL, t.CAPACITY_HIG_VAL, 
+    t.CAPACITY_OIL_ID, t.CAPACITY_FUEL_CONSUMPTION, t.CAPACITY_OWNERIS, t.CAPACITY_BLACKLIST, 
+    t.MEMO, t.INSERT_USERNAME, t.INSERT_TIME, t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, 
+    t.CAPACITY_CORLOR, t.CAPACITY_VIP
+  </sql>
+  <sql id="select">
+    SELECT <include refid="columns" /> FROM RMS_CAPACITY
+  </sql>
+  <sql id="select_alias">
+    SELECT <include refid="columns_alias" /> FROM RMS_CAPACITY t
+  </sql>
+  <sql id="where">
+    <where> 
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="capacityNumber != null and capacityNumber != ''">
+        and CAPACITY_NUMBER = #{capacityNumber}
+      </if>
+      <if test="capacityMaxLoad != null">
+        and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
+      </if>
+      <if test="capacityTypeId != null">
+        and CAPACITY_TYPE_ID = #{capacityTypeId}
+      </if>
+      <if test="capacityStatus != null and capacityStatus != ''">
+        and CAPACITY_STATUS = #{capacityStatus}
+      </if>
+      <if test="carrierId != null">
+        and CARRIER_ID = #{carrierId}
+      </if>
+      <if test="capacityEnergyId != null and capacityEnergyId != ''">
+        and CAPACITY_ENERGY_ID = #{capacityEnergyId}
+      </if>
+      <if test="capacityLenVal != null">
+        and CAPACITY_LEN_VAL = #{capacityLenVal}
+      </if>
+      <if test="capacityWidVal != null">
+        and CAPACITY_WID_VAL = #{capacityWidVal}
+      </if>
+      <if test="capacityHigVal != null">
+        and CAPACITY_HIG_VAL = #{capacityHigVal}
+      </if>
+      <if test="capacityOilId != null">
+        and CAPACITY_OIL_ID = #{capacityOilId}
+      </if>
+      <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
+        and CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
+      </if>
+      <if test="capacityOwneris != null">
+        and CAPACITY_OWNERIS = #{capacityOwneris}
+      </if>
+      <if test="capacityBlacklist != null">
+        and CAPACITY_BLACKLIST = #{capacityBlacklist}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO = #{memo}
+      </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="capacityCorlor != null and capacityCorlor != ''">
+        and CAPACITY_CORLOR = #{capacityCorlor}
+      </if>
+      <if test="capacityVip != null and capacityVip != ''">
+        and CAPACITY_VIP = #{capacityVip}
+      </if>
+    </where>
+  </sql>
+  <sql id="whereLike">
+    <where> 
+      <if test="capacityId != null">
+        and CAPACITY_ID = #{capacityId}
+      </if>
+      <if test="capacityNumber != null and capacityNumber != ''">
+        and CAPACITY_NUMBER LIKE '%${capacityNumber}%'
+      </if>
+      <if test="capacityMaxLoad != null">
+        and CAPACITY_MAX_LOAD = #{capacityMaxLoad}
+      </if>
+      <if test="capacityTypeId != null">
+        and CAPACITY_TYPE_ID = #{capacityTypeId}
+      </if>
+      <if test="capacityStatus != null and capacityStatus != ''">
+        and CAPACITY_STATUS LIKE '%${capacityStatus}%'
+      </if>
+      <if test="carrierId != null">
+        and CARRIER_ID = #{carrierId}
+      </if>
+      <if test="capacityEnergyId != null and capacityEnergyId != ''">
+        and CAPACITY_ENERGY_ID LIKE '%${capacityEnergyId}%'
+      </if>
+      <if test="capacityLenVal != null">
+        and CAPACITY_LEN_VAL = #{capacityLenVal}
+      </if>
+      <if test="capacityWidVal != null">
+        and CAPACITY_WID_VAL = #{capacityWidVal}
+      </if>
+      <if test="capacityHigVal != null">
+        and CAPACITY_HIG_VAL = #{capacityHigVal}
+      </if>
+      <if test="capacityOilId != null">
+        and CAPACITY_OIL_ID = #{capacityOilId}
+      </if>
+      <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
+        and CAPACITY_FUEL_CONSUMPTION LIKE '%${capacityFuelConsumption}%'
+      </if>
+      <if test="capacityOwneris != null">
+        and CAPACITY_OWNERIS = #{capacityOwneris}
+      </if>
+      <if test="capacityBlacklist != null">
+        and CAPACITY_BLACKLIST = #{capacityBlacklist}
+      </if>
+      <if test="memo != null and memo != ''">
+        and MEMO LIKE '%${memo}%'
+      </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="capacityCorlor != null and capacityCorlor != ''">
+        and CAPACITY_CORLOR LIKE '%${capacityCorlor}%'
+      </if>
+      <if test="capacityVip != null and capacityVip != ''">
+        and CAPACITY_VIP LIKE '%${capacityVip}%'
+      </if>
+    </where>
+  </sql>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    delete from RMS_CAPACITY
+    where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
+    delete from RMS_CAPACITY
+    where 1!=1 
+      <if test="capacityNumber != null and capacityNumber != ''">
+        or CAPACITY_NUMBER = #{capacityNumber}
+      </if>
+      <if test="capacityMaxLoad != null">
+        or CAPACITY_MAX_LOAD = #{capacityMaxLoad}
+      </if>
+      <if test="capacityTypeId != null">
+        or CAPACITY_TYPE_ID = #{capacityTypeId}
+      </if>
+      <if test="capacityStatus != null and capacityStatus != ''">
+        or CAPACITY_STATUS = #{capacityStatus}
+      </if>
+      <if test="carrierId != null">
+        or CARRIER_ID = #{carrierId}
+      </if>
+      <if test="capacityEnergyId != null and capacityEnergyId != ''">
+        or CAPACITY_ENERGY_ID = #{capacityEnergyId}
+      </if>
+      <if test="capacityLenVal != null">
+        or CAPACITY_LEN_VAL = #{capacityLenVal}
+      </if>
+      <if test="capacityWidVal != null">
+        or CAPACITY_WID_VAL = #{capacityWidVal}
+      </if>
+      <if test="capacityHigVal != null">
+        or CAPACITY_HIG_VAL = #{capacityHigVal}
+      </if>
+      <if test="capacityOilId != null">
+        or CAPACITY_OIL_ID = #{capacityOilId}
+      </if>
+      <if test="capacityFuelConsumption != null and capacityFuelConsumption != ''">
+        or CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption}
+      </if>
+      <if test="capacityOwneris != null">
+        or CAPACITY_OWNERIS = #{capacityOwneris}
+      </if>
+      <if test="capacityBlacklist != null">
+        or CAPACITY_BLACKLIST = #{capacityBlacklist}
+      </if>
+      <if test="memo != null and memo != ''">
+        or MEMO = #{memo}
+      </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="capacityCorlor != null and capacityCorlor != ''">
+        or CAPACITY_CORLOR = #{capacityCorlor}
+      </if>
+      <if test="capacityVip != null and capacityVip != ''">
+        or CAPACITY_VIP = #{capacityVip}
+      </if>
+  </delete>
+  <insert id="insert" parameterType="com.steerinfo.dil.model.RmsCapacity">
+    insert into RMS_CAPACITY (CAPACITY_ID, CAPACITY_NUMBER, CAPACITY_MAX_LOAD, 
+      CAPACITY_TYPE_ID, CAPACITY_STATUS, CARRIER_ID, 
+      CAPACITY_ENERGY_ID, CAPACITY_LEN_VAL, CAPACITY_WID_VAL, 
+      CAPACITY_HIG_VAL, CAPACITY_OIL_ID, CAPACITY_FUEL_CONSUMPTION, 
+      CAPACITY_OWNERIS, CAPACITY_BLACKLIST, MEMO, 
+      INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, CAPACITY_CORLOR, 
+      CAPACITY_VIP)
+    values (#{capacityId,jdbcType=DECIMAL}, #{capacityNumber,jdbcType=VARCHAR}, #{capacityMaxLoad,jdbcType=DECIMAL}, 
+      #{capacityTypeId,jdbcType=DECIMAL}, #{capacityStatus,jdbcType=VARCHAR}, #{carrierId,jdbcType=DECIMAL}, 
+      #{capacityEnergyId,jdbcType=VARCHAR}, #{capacityLenVal,jdbcType=DECIMAL}, #{capacityWidVal,jdbcType=DECIMAL}, 
+      #{capacityHigVal,jdbcType=DECIMAL}, #{capacityOilId,jdbcType=DECIMAL}, #{capacityFuelConsumption,jdbcType=VARCHAR}, 
+      #{capacityOwneris,jdbcType=DECIMAL}, #{capacityBlacklist,jdbcType=DECIMAL}, #{memo,jdbcType=VARCHAR}, 
+      #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP}, #{updateUsername,jdbcType=VARCHAR}, 
+      #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR}, #{capacityCorlor,jdbcType=VARCHAR}, 
+      #{capacityVip,jdbcType=VARCHAR})
+  </insert>
+  <insert id="insertSelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
+    insert into RMS_CAPACITY
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="capacityId != null">
+        CAPACITY_ID,
+      </if>
+      <if test="capacityNumber != null">
+        CAPACITY_NUMBER,
+      </if>
+      <if test="capacityMaxLoad != null">
+        CAPACITY_MAX_LOAD,
+      </if>
+      <if test="capacityTypeId != null">
+        CAPACITY_TYPE_ID,
+      </if>
+      <if test="capacityStatus != null">
+        CAPACITY_STATUS,
+      </if>
+      <if test="carrierId != null">
+        CARRIER_ID,
+      </if>
+      <if test="capacityEnergyId != null">
+        CAPACITY_ENERGY_ID,
+      </if>
+      <if test="capacityLenVal != null">
+        CAPACITY_LEN_VAL,
+      </if>
+      <if test="capacityWidVal != null">
+        CAPACITY_WID_VAL,
+      </if>
+      <if test="capacityHigVal != null">
+        CAPACITY_HIG_VAL,
+      </if>
+      <if test="capacityOilId != null">
+        CAPACITY_OIL_ID,
+      </if>
+      <if test="capacityFuelConsumption != null">
+        CAPACITY_FUEL_CONSUMPTION,
+      </if>
+      <if test="capacityOwneris != null">
+        CAPACITY_OWNERIS,
+      </if>
+      <if test="capacityBlacklist != null">
+        CAPACITY_BLACKLIST,
+      </if>
+      <if test="memo != null">
+        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="capacityCorlor != null">
+        CAPACITY_CORLOR,
+      </if>
+      <if test="capacityVip != null">
+        CAPACITY_VIP,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="capacityId != null">
+        #{capacityId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityNumber != null">
+        #{capacityNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityMaxLoad != null">
+        #{capacityMaxLoad,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityTypeId != null">
+        #{capacityTypeId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityStatus != null">
+        #{capacityStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierId != null">
+        #{carrierId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityEnergyId != null">
+        #{capacityEnergyId,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityLenVal != null">
+        #{capacityLenVal,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityWidVal != null">
+        #{capacityWidVal,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityHigVal != null">
+        #{capacityHigVal,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityOilId != null">
+        #{capacityOilId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityFuelConsumption != null">
+        #{capacityFuelConsumption,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityOwneris != null">
+        #{capacityOwneris,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityBlacklist != null">
+        #{capacityBlacklist,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        #{memo,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="capacityCorlor != null">
+        #{capacityCorlor,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityVip != null">
+        #{capacityVip,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.RmsCapacity">
+    update RMS_CAPACITY
+    set CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
+      CAPACITY_MAX_LOAD = #{capacityMaxLoad,jdbcType=DECIMAL},
+      CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
+      CAPACITY_STATUS = #{capacityStatus,jdbcType=VARCHAR},
+      CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+      CAPACITY_ENERGY_ID = #{capacityEnergyId,jdbcType=VARCHAR},
+      CAPACITY_LEN_VAL = #{capacityLenVal,jdbcType=DECIMAL},
+      CAPACITY_WID_VAL = #{capacityWidVal,jdbcType=DECIMAL},
+      CAPACITY_HIG_VAL = #{capacityHigVal,jdbcType=DECIMAL},
+      CAPACITY_OIL_ID = #{capacityOilId,jdbcType=DECIMAL},
+      CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
+      CAPACITY_OWNERIS = #{capacityOwneris,jdbcType=DECIMAL},
+      CAPACITY_BLACKLIST = #{capacityBlacklist,jdbcType=DECIMAL},
+      MEMO = #{memo,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},
+      CAPACITY_CORLOR = #{capacityCorlor,jdbcType=VARCHAR},
+      CAPACITY_VIP = #{capacityVip,jdbcType=VARCHAR}
+    where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.RmsCapacity">
+    update RMS_CAPACITY
+    <set>
+      <if test="capacityNumber != null">
+        CAPACITY_NUMBER = #{capacityNumber,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityMaxLoad != null">
+        CAPACITY_MAX_LOAD = #{capacityMaxLoad,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityTypeId != null">
+        CAPACITY_TYPE_ID = #{capacityTypeId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityStatus != null">
+        CAPACITY_STATUS = #{capacityStatus,jdbcType=VARCHAR},
+      </if>
+      <if test="carrierId != null">
+        CARRIER_ID = #{carrierId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityEnergyId != null">
+        CAPACITY_ENERGY_ID = #{capacityEnergyId,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityLenVal != null">
+        CAPACITY_LEN_VAL = #{capacityLenVal,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityWidVal != null">
+        CAPACITY_WID_VAL = #{capacityWidVal,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityHigVal != null">
+        CAPACITY_HIG_VAL = #{capacityHigVal,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityOilId != null">
+        CAPACITY_OIL_ID = #{capacityOilId,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityFuelConsumption != null">
+        CAPACITY_FUEL_CONSUMPTION = #{capacityFuelConsumption,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityOwneris != null">
+        CAPACITY_OWNERIS = #{capacityOwneris,jdbcType=DECIMAL},
+      </if>
+      <if test="capacityBlacklist != null">
+        CAPACITY_BLACKLIST = #{capacityBlacklist,jdbcType=DECIMAL},
+      </if>
+      <if test="memo != null">
+        MEMO = #{memo,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="capacityCorlor != null">
+        CAPACITY_CORLOR = #{capacityCorlor,jdbcType=VARCHAR},
+      </if>
+      <if test="capacityVip != null">
+        CAPACITY_VIP = #{capacityVip,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where CAPACITY_ID = #{capacityId,jdbcType=DECIMAL}
+  </update>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
+    <include refid="select" />
+    where CAPACITY_ID = #{capacityId,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 RMS_CAPACITY 
+      (CAPACITY_ID, 
+      CAPACITY_NUMBER, CAPACITY_MAX_LOAD, 
+      CAPACITY_TYPE_ID, CAPACITY_STATUS, 
+      CARRIER_ID, CAPACITY_ENERGY_ID, 
+      CAPACITY_LEN_VAL, CAPACITY_WID_VAL, 
+      CAPACITY_HIG_VAL, CAPACITY_OIL_ID, 
+      CAPACITY_FUEL_CONSUMPTION, CAPACITY_OWNERIS, 
+      CAPACITY_BLACKLIST, MEMO, INSERT_USERNAME, 
+      INSERT_TIME, UPDATE_USERNAME, 
+      UPDATE_TIME, INSERT_UPDATE_REMARK, 
+      CAPACITY_CORLOR, CAPACITY_VIP)
+    ( <foreach collection="list" item="item" separator="union all"> 
+   select  
+      #{item.capacityId,jdbcType=DECIMAL}, 
+      #{item.capacityNumber,jdbcType=VARCHAR}, #{item.capacityMaxLoad,jdbcType=DECIMAL}, 
+      #{item.capacityTypeId,jdbcType=DECIMAL}, #{item.capacityStatus,jdbcType=VARCHAR}, 
+      #{item.carrierId,jdbcType=DECIMAL}, #{item.capacityEnergyId,jdbcType=VARCHAR}, 
+      #{item.capacityLenVal,jdbcType=DECIMAL}, #{item.capacityWidVal,jdbcType=DECIMAL}, 
+      #{item.capacityHigVal,jdbcType=DECIMAL}, #{item.capacityOilId,jdbcType=DECIMAL}, 
+      #{item.capacityFuelConsumption,jdbcType=VARCHAR}, #{item.capacityOwneris,jdbcType=DECIMAL}, 
+      #{item.capacityBlacklist,jdbcType=DECIMAL}, #{item.memo,jdbcType=VARCHAR}, #{item.insertUsername,jdbcType=VARCHAR}, 
+      #{item.insertTime,jdbcType=TIMESTAMP}, #{item.updateUsername,jdbcType=VARCHAR}, 
+      #{item.updateTime,jdbcType=TIMESTAMP}, #{item.insertUpdateRemark,jdbcType=VARCHAR}, 
+      #{item.capacityCorlor,jdbcType=VARCHAR}, #{item.capacityVip,jdbcType=VARCHAR} from dual  
+   </foreach> )
+  </insert>
+  <update id="batchUpdate" parameterType="java.util.List">
+     update RMS_CAPACITY
+     set
+       CAPACITY_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityId,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_NUMBER=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityNumber,jdbcType=VARCHAR}
+       </foreach>
+       ,CAPACITY_MAX_LOAD=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityMaxLoad,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_TYPE_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityTypeId,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_STATUS=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityStatus,jdbcType=VARCHAR}
+       </foreach>
+       ,CARRIER_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.carrierId,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_ENERGY_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityEnergyId,jdbcType=VARCHAR}
+       </foreach>
+       ,CAPACITY_LEN_VAL=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityLenVal,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_WID_VAL=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityWidVal,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_HIG_VAL=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityHigVal,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_OIL_ID=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOilId,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_FUEL_CONSUMPTION=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityFuelConsumption,jdbcType=VARCHAR}
+       </foreach>
+       ,CAPACITY_OWNERIS=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityOwneris,jdbcType=DECIMAL}
+       </foreach>
+       ,CAPACITY_BLACKLIST=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityBlacklist,jdbcType=DECIMAL}
+       </foreach>
+       ,MEMO=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.memo,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,INSERT_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,UPDATE_USERNAME=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
+       </foreach>
+       ,UPDATE_TIME=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
+       </foreach>
+       ,INSERT_UPDATE_REMARK=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
+       </foreach>
+       ,CAPACITY_CORLOR=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityCorlor,jdbcType=VARCHAR}
+       </foreach>
+       ,CAPACITY_VIP=
+       <foreach close="end" collection="list" index="index" item="item" open="case CAPACITY_ID" separator=" ">
+          when #{item.capacityId,jdbcType=DECIMAL} then #{item.capacityVip,jdbcType=VARCHAR}
+       </foreach>
+     where CAPACITY_ID in 
+     <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
+    #{item.capacityId,jdbcType=DECIMAL}
+     </foreach> 
+  </update>
+  <delete id="batchDelete" parameterType="java.util.List">
+    delete from RMS_CAPACITY
+    where CAPACITY_ID in 
+    <foreach close=")" collection="list" item="id" open="(" separator=",">
+      #{id}
+    </foreach>
+  </delete>
+  <!-- 友情提示!!!-->
+  <!-- 请将自己写的代码放在此标签之下,方便以后粘贴复制。-->
+
+  
+</mapper>

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

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

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

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