txf 3 years ago
parent
commit
e85a2e61a8

+ 1 - 1
pom.xml

@@ -111,7 +111,7 @@
                     <!--包名-->
                     <targetPackage>com.steerinfo.dil</targetPackage>
                     <tables>
-                         <table>RMS_STACKING</table>
+                         <table>TMSTRAIN_PLEASE_APPROVE_RESULT</table>
                     </tables>
                 </configuration>
                 <executions>

+ 2 - 30
src/main/java/com/steerinfo/dil/controller/TmstrainLoadingResultController.java

@@ -61,39 +61,11 @@ public class TmstrainLoadingResultController extends BaseRESTfulController {
                                               Integer pageSize,
                                               Integer resultType,
                                               String con) {
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_tmstrain_wagon_load";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
+
         mapValue.put("resultType", resultType);
-        //初始化过滤
-        List<Map<String, Object>> wagonLoadList = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == 1) {
-            //将查询结果存入索引中
-            wagonLoadList = tmstrainLoadingResultService.getTmstrainWagonLoad(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_tmstrain_wagon_load");
-            //添加id
-            map.put("indexId", "trainLoadingId");
-            wagonLoadList.add(map);
-            //新建索引
-            String s = JSON.toJSONString(wagonLoadList);
-            esFeign.insertIndex(wagonLoadList);
-            //删除
-            wagonLoadList.remove(wagonLoadList.size() - 1);
-        }
-        if (wagonLoadList == null) {
-            wagonLoadList = tmstrainLoadingResultService.getTmstrainWagonLoad(mapValue);
-        }
         PageHelper.startPage(pageNum, pageSize);
         List<Map<String, Object>> tmstrainWagonLoad1 = tmstrainLoadingResultService.getTmstrainWagonLoad(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonLoadList, tmstrainWagonLoad1);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, tmstrainWagonLoad1);
         return success(pageList);
     }
 

+ 1 - 2
src/main/java/com/steerinfo/dil/controller/TmstrainMeasureCommissionController.java

@@ -52,11 +52,10 @@ public class TmstrainMeasureCommissionController extends BaseRESTfulController {
             Integer resultType) {
         mapValue.put("resultType",resultType);
         //不分页筛选数据
-        List<Map<String, Object>> allMes = tmstrainMeasureCommissionService.getLoadResultToSendMC(mapValue);
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> mes = tmstrainMeasureCommissionService.getLoadResultToSendMC(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, allMes, mes);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, mes);
         return success(pageList);
     }
 

+ 2 - 31
src/main/java/com/steerinfo/dil/controller/TmstrainPleaseApproveResultController.java

@@ -67,45 +67,16 @@ public class TmstrainPleaseApproveResultController extends BaseRESTfulController
                                            Integer resultType,
                                            Integer resultId,
                                            String con) {
-        int count = 2;
         mapValue.put("resultType", resultType);
         mapValue.put("status", status);
         if(resultId != null){
             mapValue.put("resultId", resultId);
-            count++;
-        }
-        if (con != null) {
-            if (!"undefined".equals(con)) {
-                //设置要查询的索引名称
-                String index = "get_all_wagon_please";
-                //获取查询结果
-                return success(esFeign.getConResult(mapValue, index, apiId, pageNum, pageSize, con));
-            }
-        }
-        //初始化过滤
-        List<Map<String, Object>> wagonPleaseList = null;
-        //如果有条件查询则跳过初始化,和创建索引
-        if (mapValue.size() == count) {
-            //将查询结果存入索引中
-            wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
-            Map<String, Object> map = new HashMap<>();
-            //添加索引
-            map.put("index", "get_all_wagon_please");
-            //添加id
-            map.put("indexId", "wagonPleaseId");
-            wagonPleaseList.add(map);
-            //新建索引
-            esFeign.insertIndex(wagonPleaseList);
-            //删除
-            wagonPleaseList.remove(wagonPleaseList.size() - 1);
-        }
-        if (wagonPleaseList == null) {
-            wagonPleaseList = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
         }
+
         PageHelper.startPage(pageNum, pageSize);
         //分页数据
         List<Map<String, Object>> wagonPlease = tmstrainPleaseApproveResultService.getAllWagonPlease(mapValue);
-        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, wagonPleaseList, wagonPlease);
+        PageListAdd pageList = columnDataUtil.tableColumnData(apiId, null, wagonPlease);
         return success(pageList);
     }
 

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

@@ -11,7 +11,7 @@ import java.util.List;
 import java.util.Map;
 
 @Mapper
-public interface TmstrainWagonUnloadResultMapper extends IBaseMapper<TmstrainWagonUnloadResult, BigDecimal> {
+public interface    TmstrainWagonUnloadResultMapper extends IBaseMapper<TmstrainWagonUnloadResult, BigDecimal> {
     //查询采购卸车作业信息
     List<Map<String, Object>> getTmsWagonUnLoadInfo(Map<String,Object>map);
     //查询主键最大值

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

@@ -22,7 +22,7 @@ public class TmstrainPleaseApproveResult implements IBasePO<BigDecimal> {
     private BigDecimal railPlanId;
 
     /**
-     * 请车计划号(RESULT_PLEASE_PLAN_NO,VARCHAR,20)
+     * 请车计划号(RESULT_PLEASE_PLAN_NO,VARCHAR,50)
      */
     @ApiModelProperty(value="请车计划号",required=false)
     private String resultPleasePlanNo;
@@ -40,10 +40,10 @@ public class TmstrainPleaseApproveResult implements IBasePO<BigDecimal> {
     private String resultCategory;
 
     /**
-     * 发货单位ID(资源管理托运人)(SHIPPER_ID,DECIMAL,0)
+     * 发货单位ID(原料供应商)(SUPPLIER_ID,DECIMAL,0)
      */
-    @ApiModelProperty(value="发货单位ID(资源管理托运人)",required=false)
-    private BigDecimal shipperId;
+    @ApiModelProperty(value="发货单位ID(原料供应商)",required=false)
+    private BigDecimal supplierId;
 
     /**
      * 发站ID(SEND_STATION_ID,DECIMAL,0)
@@ -175,12 +175,12 @@ public class TmstrainPleaseApproveResult implements IBasePO<BigDecimal> {
         this.resultCategory = resultCategory == null ? null : resultCategory.trim();
     }
 
-    public BigDecimal getShipperId() {
-        return shipperId;
+    public BigDecimal getSupplierId() {
+        return supplierId;
     }
 
-    public void setShipperId(BigDecimal shipperId) {
-        this.shipperId = shipperId;
+    public void setSupplierId(BigDecimal supplierId) {
+        this.supplierId = supplierId;
     }
 
     public BigDecimal getSendStationId() {
@@ -298,7 +298,7 @@ public class TmstrainPleaseApproveResult implements IBasePO<BigDecimal> {
         sb.append(", resultPleasePlanNo=").append(resultPleasePlanNo);
         sb.append(", resultPlanDate=").append(resultPlanDate);
         sb.append(", resultCategory=").append(resultCategory);
-        sb.append(", shipperId=").append(shipperId);
+        sb.append(", supplierId=").append(supplierId);
         sb.append(", sendStationId=").append(sendStationId);
         sb.append(", toTheStationId=").append(toTheStationId);
         sb.append(", resultPleaseNumber=").append(resultPleaseNumber);

+ 2 - 1
src/main/java/com/steerinfo/dil/service/impl/TmstrainMeasureCommissionServiceImpl.java

@@ -76,7 +76,8 @@ public class TmstrainMeasureCommissionServiceImpl  implements ITmstrainMeasureCo
         //添加计量委托实绩
         int i = addMeasureCommission(map);
         //添加计量委托其他数据
-        i += sendMesToMeasure(measureCommission);
+        System.out.println(measureCommission);
+//        i += sendMesToMeasure(measureCommission);
         return i;
     }
 

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

@@ -29,7 +29,7 @@ public class ColumnDataUtil {
         List<Map<String, Object>> columnDataList = columnDataFeign.getColumnData(apiId);
         for (Map<String, Object> columnData : columnDataList) {
             //每个表头字段的过滤条件
-            columnData.put("filters", setListMap(list, columnData.get("prop").toString()));
+            columnData.put("filters", setListMap(data, columnData.get("prop").toString()));
         }
         PageListAdd pageList = new PageListAdd(data);
         pageList.setColumnData(columnDataList);

+ 2 - 2
src/main/resources/application-dev.yml

@@ -1,8 +1,8 @@
 spring:
   datasource:
     url: jdbc:oracle:thin:@172.16.33.163:1521:ilsdbpri
-    password: Dil123789
-    username: dil
+    password: root123
+    username: dagang
     driver-class-name: oracle.jdbc.OracleDriver
   application:
     name: dil-tms-train-dev

+ 107 - 109
src/main/resources/com/steerinfo/dil/mapper/TmstrainPleaseApproveResultMapper.xml

@@ -2,47 +2,43 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.steerinfo.dil.mapper.TmstrainPleaseApproveResultMapper">
     <resultMap id="BaseResultMap" type="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
-        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId"/>
-        <result column="RAIL_PLAN_ID" jdbcType="DECIMAL" property="railPlanId"/>
-        <result column="RESULT_PLEASE_PLAN_NO" jdbcType="VARCHAR" property="resultPleasePlanNo"/>
-        <result column="RESULT_PLAN_DATE" jdbcType="TIMESTAMP" property="resultPlanDate"/>
-        <result column="RESULT_CATEGORY" jdbcType="VARCHAR" property="resultCategory"/>
-        <result column="SHIPPER_ID" jdbcType="DECIMAL" property="shipperId"/>
-        <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId"/>
-        <result column="TO_THE_STATION_ID" jdbcType="DECIMAL" property="toTheStationId"/>
-        <result column="RESULT_PLEASE_NUMBER" jdbcType="DECIMAL" property="resultPleaseNumber"/>
-        <result column="RESULT_PLEASE_DATE" jdbcType="TIMESTAMP" property="resultPleaseDate"/>
-        <result column="RESULT_APPROVE_NUMBER" jdbcType="DECIMAL" property="resultApproveNumber"/>
-        <result column="RESULT_APPROVE_DATE" jdbcType="TIMESTAMP" property="resultApproveDate"/>
-        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername"/>
-        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime"/>
-        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername"/>
-        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime"/>
-        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark"/>
-        <result column="STATUS" jdbcType="DECIMAL" property="status"/>
-        <result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType"/>
+        <id column="RESULT_ID" jdbcType="DECIMAL" property="resultId" />
+        <result column="RAIL_PLAN_ID" jdbcType="DECIMAL" property="railPlanId" />
+        <result column="RESULT_PLEASE_PLAN_NO" jdbcType="VARCHAR" property="resultPleasePlanNo" />
+        <result column="RESULT_PLAN_DATE" jdbcType="TIMESTAMP" property="resultPlanDate" />
+        <result column="RESULT_CATEGORY" jdbcType="VARCHAR" property="resultCategory" />
+        <result column="SUPPLIER_ID" jdbcType="DECIMAL" property="supplierId" />
+        <result column="SEND_STATION_ID" jdbcType="DECIMAL" property="sendStationId" />
+        <result column="TO_THE_STATION_ID" jdbcType="DECIMAL" property="toTheStationId" />
+        <result column="RESULT_PLEASE_NUMBER" jdbcType="DECIMAL" property="resultPleaseNumber" />
+        <result column="RESULT_PLEASE_DATE" jdbcType="TIMESTAMP" property="resultPleaseDate" />
+        <result column="RESULT_APPROVE_NUMBER" jdbcType="DECIMAL" property="resultApproveNumber" />
+        <result column="RESULT_APPROVE_DATE" jdbcType="TIMESTAMP" property="resultApproveDate" />
+        <result column="INSERT_USERNAME" jdbcType="VARCHAR" property="insertUsername" />
+        <result column="INSERT_TIME" jdbcType="TIMESTAMP" property="insertTime" />
+        <result column="UPDATE_USERNAME" jdbcType="VARCHAR" property="updateUsername" />
+        <result column="UPDATE_TIME" jdbcType="TIMESTAMP" property="updateTime" />
+        <result column="INSERT_UPDATE_REMARK" jdbcType="VARCHAR" property="insertUpdateRemark" />
+        <result column="STATUS" jdbcType="DECIMAL" property="status" />
+        <result column="RESULT_TYPE" jdbcType="DECIMAL" property="resultType" />
     </resultMap>
     <sql id="columns">
-        RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO, RESULT_PLAN_DATE, RESULT_CATEGORY,
-    SHIPPER_ID, SEND_STATION_ID, TO_THE_STATION_ID, RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE, 
+        RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO, RESULT_PLAN_DATE, RESULT_CATEGORY, 
+    SUPPLIER_ID, SEND_STATION_ID, TO_THE_STATION_ID, RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE, 
     RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE, INSERT_USERNAME, INSERT_TIME, UPDATE_USERNAME, 
     UPDATE_TIME, INSERT_UPDATE_REMARK, STATUS, RESULT_TYPE
     </sql>
     <sql id="columns_alias">
-        t.RESULT_ID, t.RAIL_PLAN_ID, t.RESULT_PLEASE_PLAN_NO, t.RESULT_PLAN_DATE, t.RESULT_CATEGORY,
-    t.SHIPPER_ID, t.SEND_STATION_ID, t.TO_THE_STATION_ID, t.RESULT_PLEASE_NUMBER, t.RESULT_PLEASE_DATE, 
+        t.RESULT_ID, t.RAIL_PLAN_ID, t.RESULT_PLEASE_PLAN_NO, t.RESULT_PLAN_DATE, t.RESULT_CATEGORY, 
+    t.SUPPLIER_ID, t.SEND_STATION_ID, t.TO_THE_STATION_ID, t.RESULT_PLEASE_NUMBER, t.RESULT_PLEASE_DATE, 
     t.RESULT_APPROVE_NUMBER, t.RESULT_APPROVE_DATE, t.INSERT_USERNAME, t.INSERT_TIME, 
     t.UPDATE_USERNAME, t.UPDATE_TIME, t.INSERT_UPDATE_REMARK, t.STATUS, t.RESULT_TYPE
     </sql>
     <sql id="select">
-        SELECT
-        <include refid="columns"/>
-        FROM TMSTRAIN_PLEASE_APPROVE_RESULT
+        SELECT <include refid="columns" /> FROM TMSTRAIN_PLEASE_APPROVE_RESULT
     </sql>
     <sql id="select_alias">
-        SELECT
-        <include refid="columns_alias"/>
-        FROM TMSTRAIN_PLEASE_APPROVE_RESULT t
+        SELECT <include refid="columns_alias" /> FROM TMSTRAIN_PLEASE_APPROVE_RESULT t
     </sql>
     <sql id="where">
         <where>
@@ -61,8 +57,8 @@
             <if test="resultCategory != null and resultCategory != ''">
                 and RESULT_CATEGORY = #{resultCategory}
             </if>
-            <if test="shipperId != null">
-                and SHIPPER_ID = #{shipperId}
+            <if test="supplierId != null">
+                and SUPPLIER_ID = #{supplierId}
             </if>
             <if test="sendStationId != null">
                 and SEND_STATION_ID = #{sendStationId}
@@ -122,8 +118,8 @@
             <if test="resultCategory != null and resultCategory != ''">
                 and RESULT_CATEGORY LIKE '%${resultCategory}%'
             </if>
-            <if test="shipperId != null">
-                and SHIPPER_ID = #{shipperId}
+            <if test="supplierId != null">
+                and SUPPLIER_ID = #{supplierId}
             </if>
             <if test="sendStationId != null">
                 and SEND_STATION_ID = #{sendStationId}
@@ -167,8 +163,7 @@
         </where>
     </sql>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
-        delete
-        from TMSTRAIN_PLEASE_APPROVE_RESULT
+        delete from TMSTRAIN_PLEASE_APPROVE_RESULT
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </delete>
     <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
@@ -186,8 +181,8 @@
         <if test="resultCategory != null and resultCategory != ''">
             or RESULT_CATEGORY = #{resultCategory}
         </if>
-        <if test="shipperId != null">
-            or SHIPPER_ID = #{shipperId}
+        <if test="supplierId != null">
+            or SUPPLIER_ID = #{supplierId}
         </if>
         <if test="sendStationId != null">
             or SEND_STATION_ID = #{sendStationId}
@@ -231,21 +226,18 @@
     </delete>
     <insert id="insert" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
         insert into TMSTRAIN_PLEASE_APPROVE_RESULT (RESULT_ID, RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
-                                                    RESULT_PLAN_DATE, RESULT_CATEGORY, SHIPPER_ID,
+                                                    RESULT_PLAN_DATE, RESULT_CATEGORY, SUPPLIER_ID,
                                                     SEND_STATION_ID, TO_THE_STATION_ID, RESULT_PLEASE_NUMBER,
                                                     RESULT_PLEASE_DATE, RESULT_APPROVE_NUMBER,
                                                     RESULT_APPROVE_DATE, INSERT_USERNAME, INSERT_TIME,
                                                     UPDATE_USERNAME, UPDATE_TIME, INSERT_UPDATE_REMARK,
                                                     STATUS, RESULT_TYPE)
         values (#{resultId,jdbcType=DECIMAL}, #{railPlanId,jdbcType=DECIMAL}, #{resultPleasePlanNo,jdbcType=VARCHAR},
-                #{resultPlanDate,jdbcType=TIMESTAMP}, #{resultCategory,jdbcType=VARCHAR}, #{shipperId,jdbcType=DECIMAL},
-                #{sendStationId,jdbcType=DECIMAL}, #{toTheStationId,jdbcType=DECIMAL},
-                #{resultPleaseNumber,jdbcType=DECIMAL},
+                #{resultPlanDate,jdbcType=TIMESTAMP}, #{resultCategory,jdbcType=VARCHAR}, #{supplierId,jdbcType=DECIMAL},
+                #{sendStationId,jdbcType=DECIMAL}, #{toTheStationId,jdbcType=DECIMAL}, #{resultPleaseNumber,jdbcType=DECIMAL},
                 #{resultPleaseDate,jdbcType=TIMESTAMP}, #{resultApproveNumber,jdbcType=DECIMAL},
-                #{resultApproveDate,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR},
-                #{insertTime,jdbcType=TIMESTAMP},
-                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
-                #{insertUpdateRemark,jdbcType=VARCHAR},
+                #{resultApproveDate,jdbcType=TIMESTAMP}, #{insertUsername,jdbcType=VARCHAR}, #{insertTime,jdbcType=TIMESTAMP},
+                #{updateUsername,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{insertUpdateRemark,jdbcType=VARCHAR},
                 #{status,jdbcType=DECIMAL}, #{resultType,jdbcType=DECIMAL})
     </insert>
     <insert id="insertSelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
@@ -266,8 +258,8 @@
             <if test="resultCategory != null">
                 RESULT_CATEGORY,
             </if>
-            <if test="shipperId != null">
-                SHIPPER_ID,
+            <if test="supplierId != null">
+                SUPPLIER_ID,
             </if>
             <if test="sendStationId != null">
                 SEND_STATION_ID,
@@ -325,8 +317,8 @@
             <if test="resultCategory != null">
                 #{resultCategory,jdbcType=VARCHAR},
             </if>
-            <if test="shipperId != null">
-                #{shipperId,jdbcType=DECIMAL},
+            <if test="supplierId != null">
+                #{supplierId,jdbcType=DECIMAL},
             </if>
             <if test="sendStationId != null">
                 #{sendStationId,jdbcType=DECIMAL},
@@ -371,24 +363,24 @@
     </insert>
     <update id="updateByPrimaryKey" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
         update TMSTRAIN_PLEASE_APPROVE_RESULT
-        set RAIL_PLAN_ID          = #{railPlanId,jdbcType=DECIMAL},
+        set RAIL_PLAN_ID = #{railPlanId,jdbcType=DECIMAL},
             RESULT_PLEASE_PLAN_NO = #{resultPleasePlanNo,jdbcType=VARCHAR},
-            RESULT_PLAN_DATE      = #{resultPlanDate,jdbcType=TIMESTAMP},
-            RESULT_CATEGORY       = #{resultCategory,jdbcType=VARCHAR},
-            SHIPPER_ID            = #{shipperId,jdbcType=DECIMAL},
-            SEND_STATION_ID       = #{sendStationId,jdbcType=DECIMAL},
-            TO_THE_STATION_ID     = #{toTheStationId,jdbcType=DECIMAL},
-            RESULT_PLEASE_NUMBER  = #{resultPleaseNumber,jdbcType=DECIMAL},
-            RESULT_PLEASE_DATE    = #{resultPleaseDate,jdbcType=TIMESTAMP},
+            RESULT_PLAN_DATE = #{resultPlanDate,jdbcType=TIMESTAMP},
+            RESULT_CATEGORY = #{resultCategory,jdbcType=VARCHAR},
+            SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL},
+            SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
+            TO_THE_STATION_ID = #{toTheStationId,jdbcType=DECIMAL},
+            RESULT_PLEASE_NUMBER = #{resultPleaseNumber,jdbcType=DECIMAL},
+            RESULT_PLEASE_DATE = #{resultPleaseDate,jdbcType=TIMESTAMP},
             RESULT_APPROVE_NUMBER = #{resultApproveNumber,jdbcType=DECIMAL},
-            RESULT_APPROVE_DATE   = #{resultApproveDate,jdbcType=TIMESTAMP},
-            INSERT_USERNAME       = #{insertUsername,jdbcType=VARCHAR},
-            INSERT_TIME           = #{insertTime,jdbcType=TIMESTAMP},
-            UPDATE_USERNAME       = #{updateUsername,jdbcType=VARCHAR},
-            UPDATE_TIME           = #{updateTime,jdbcType=TIMESTAMP},
-            INSERT_UPDATE_REMARK  = #{insertUpdateRemark,jdbcType=VARCHAR},
-            STATUS                = #{status,jdbcType=DECIMAL},
-            RESULT_TYPE           = #{resultType,jdbcType=DECIMAL}
+            RESULT_APPROVE_DATE = #{resultApproveDate,jdbcType=TIMESTAMP},
+            INSERT_USERNAME = #{insertUsername,jdbcType=VARCHAR},
+            INSERT_TIME = #{insertTime,jdbcType=TIMESTAMP},
+            UPDATE_USERNAME = #{updateUsername,jdbcType=VARCHAR},
+            UPDATE_TIME = #{updateTime,jdbcType=TIMESTAMP},
+            INSERT_UPDATE_REMARK = #{insertUpdateRemark,jdbcType=VARCHAR},
+            STATUS = #{status,jdbcType=DECIMAL},
+            RESULT_TYPE = #{resultType,jdbcType=DECIMAL}
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
     <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.dil.model.TmstrainPleaseApproveResult">
@@ -406,8 +398,8 @@
             <if test="resultCategory != null">
                 RESULT_CATEGORY = #{resultCategory,jdbcType=VARCHAR},
             </if>
-            <if test="shipperId != null">
-                SHIPPER_ID = #{shipperId,jdbcType=DECIMAL},
+            <if test="supplierId != null">
+                SUPPLIER_ID = #{supplierId,jdbcType=DECIMAL},
             </if>
             <if test="sendStationId != null">
                 SEND_STATION_ID = #{sendStationId,jdbcType=DECIMAL},
@@ -452,23 +444,23 @@
         where RESULT_ID = #{resultId,jdbcType=DECIMAL}
     </update>
     <select id="selectByPrimaryKey" parameterType="java.lang.Short" resultMap="BaseResultMap">
-        <include refid="select"/>
+        <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"/>
+        <include refid="select" />
+        <include refid="where" />
     </select>
     <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
-        <include refid="select"/>
-        <include refid="whereLike"/>
+        <include refid="select" />
+        <include refid="whereLike" />
     </select>
     <insert id="batchInsert" parameterType="java.util.List">
         insert into TMSTRAIN_PLEASE_APPROVE_RESULT
         (RESULT_ID,
         RAIL_PLAN_ID, RESULT_PLEASE_PLAN_NO,
         RESULT_PLAN_DATE, RESULT_CATEGORY,
-        SHIPPER_ID, SEND_STATION_ID, TO_THE_STATION_ID,
+        SUPPLIER_ID, SEND_STATION_ID, TO_THE_STATION_ID,
         RESULT_PLEASE_NUMBER, RESULT_PLEASE_DATE,
         RESULT_APPROVE_NUMBER, RESULT_APPROVE_DATE,
         INSERT_USERNAME, INSERT_TIME,
@@ -480,14 +472,12 @@
         #{item.resultId,jdbcType=DECIMAL},
         #{item.railPlanId,jdbcType=DECIMAL}, #{item.resultPleasePlanNo,jdbcType=VARCHAR},
         #{item.resultPlanDate,jdbcType=TIMESTAMP}, #{item.resultCategory,jdbcType=VARCHAR},
-        #{item.shipperId,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL},
-        #{item.toTheStationId,jdbcType=DECIMAL},
+        #{item.supplierId,jdbcType=DECIMAL}, #{item.sendStationId,jdbcType=DECIMAL}, #{item.toTheStationId,jdbcType=DECIMAL},
         #{item.resultPleaseNumber,jdbcType=DECIMAL}, #{item.resultPleaseDate,jdbcType=TIMESTAMP},
         #{item.resultApproveNumber,jdbcType=DECIMAL}, #{item.resultApproveDate,jdbcType=TIMESTAMP},
         #{item.insertUsername,jdbcType=VARCHAR}, #{item.insertTime,jdbcType=TIMESTAMP},
         #{item.updateUsername,jdbcType=VARCHAR}, #{item.updateTime,jdbcType=TIMESTAMP},
-        #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL},
-        #{item.resultType,jdbcType=DECIMAL}
+        #{item.insertUpdateRemark,jdbcType=VARCHAR}, #{item.status,jdbcType=DECIMAL}, #{item.resultType,jdbcType=DECIMAL}
         from dual
     </foreach> )
     </insert>
@@ -495,90 +485,90 @@
         update TMSTRAIN_PLEASE_APPROVE_RESULT
         set
         RESULT_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultId,jdbcType=DECIMAL}
         </foreach>
         ,RAIL_PLAN_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.railPlanId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_PLEASE_PLAN_NO=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleasePlanNo,jdbcType=VARCHAR}
         </foreach>
         ,RESULT_PLAN_DATE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPlanDate,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_CATEGORY=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultCategory,jdbcType=VARCHAR}
         </foreach>
-        ,SHIPPER_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
-            when #{item.resultId,jdbcType=DECIMAL} then #{item.shipperId,jdbcType=DECIMAL}
+        ,SUPPLIER_ID=
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
+            when #{item.resultId,jdbcType=DECIMAL} then #{item.supplierId,jdbcType=DECIMAL}
         </foreach>
         ,SEND_STATION_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.sendStationId,jdbcType=DECIMAL}
         </foreach>
         ,TO_THE_STATION_ID=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.toTheStationId,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_PLEASE_NUMBER=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseNumber,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_PLEASE_DATE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultPleaseDate,jdbcType=TIMESTAMP}
         </foreach>
         ,RESULT_APPROVE_NUMBER=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveNumber,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_APPROVE_DATE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultApproveDate,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUsername,jdbcType=VARCHAR}
         </foreach>
         ,INSERT_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.insertTime,jdbcType=TIMESTAMP}
         </foreach>
         ,UPDATE_USERNAME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.updateUsername,jdbcType=VARCHAR}
         </foreach>
         ,UPDATE_TIME=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.updateTime,jdbcType=TIMESTAMP}
         </foreach>
         ,INSERT_UPDATE_REMARK=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.insertUpdateRemark,jdbcType=VARCHAR}
         </foreach>
         ,STATUS=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.status,jdbcType=DECIMAL}
         </foreach>
         ,RESULT_TYPE=
-        <foreach collection="list" item="item" index="index" separator=" " open="case RESULT_ID" close="end">
+        <foreach close="end" collection="list" index="index" item="item" open="case RESULT_ID" separator=" ">
             when #{item.resultId,jdbcType=DECIMAL} then #{item.resultType,jdbcType=DECIMAL}
         </foreach>
         where RESULT_ID in
-        <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
+        <foreach close=")" collection="list" index="index" item="item" open="(" separator=",">
             #{item.resultId,jdbcType=DECIMAL}
         </foreach>
     </update>
     <delete id="batchDelete" parameterType="java.util.List">
         delete from TMSTRAIN_PLEASE_APPROVE_RESULT
         where RESULT_ID in
-        <foreach collection="list" item="id" open="(" close=")" separator=",">
+        <foreach close=")" collection="list" item="id" open="(" separator=",">
             #{id}
         </foreach>
     </delete>
@@ -597,21 +587,27 @@
                t1.RESULT_PLEASE_NUMBER "resultPleaseNumber",
         TO_CHAR(t1.RESULT_PLEASE_DATE , 'yyyy-mm-dd')"resultPleaseDate",
         TO_CHAR(t1.RESULT_PLAN_DATE, 'yyyy-mm-dd')  "resultPlanDate",
-               t2.SHIPPER_NAME "shipperName",
+               t2.SUPPLIER_NAME "shipperName",
         t3.ARRIVAL_NAME "forwardName",
                t4.ARRIVAL_NAME "arrivalName",
                t1.RESULT_CATEGORY "resultCategory",
         t1.INSERT_USERNAME "insertUserName"
 
         from TMSTRAIN_PLEASE_APPROVE_RESULT t1
-        left join RMS_SHIPPER t2
-        on t1.SHIPPER_ID = t2.SHIPPER_ID
+        left join RMS_SUPPLIER t2
+        on t1.SUPPLIER_ID = t2.SUPPLIER_ID
         left join RMSTRAIN_ARRIVAL_SEND t3
         on t1.SEND_STATION_ID = t3.ARRIVAL_ID
         left join RMSTRAIN_ARRIVAL_SEND t4
         on t1.TO_THE_STATION_ID = t4.ARRIVAL_ID
 
-        where t1.STATUS = #{status} and t1.RESULT_TYPE = #{resultType}
+        where  t1.RESULT_TYPE = #{resultType}
+        <if  test="status == 0">
+            and t1.STATUS = 0
+        </if>
+        <if  test="resultType == 1">
+            and t1.RESULT_TYPE in (1, 2)
+        </if>
         )
         <where>
             <if test="resultId != null">
@@ -713,13 +709,13 @@
         t1.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
         TO_CHAR(t1.RESULT_APPROVE_DATE, 'yyyy-mm-dd') "resultApproveDate",
         t1.RESULT_APPROVE_NUMBER "resultApproveNumber",
-        t2.SHIPPER_NAME "shipperName",
+        t2.SUPPLIER_NAME "shipperName",
         t1.RESULT_CATEGORY "resultCategory",
         t3.ARRIVAL_NAME "forwardName",
         t4.ARRIVAL_NAME "arrivalName"
         from TMSTRAIN_PLEASE_APPROVE_RESULT t1
-        left join RMS_SHIPPER t2
-        on t1.SHIPPER_ID = t2.SHIPPER_ID
+        left join RMS_SUPPLIER t2
+        on t1.SUPPLIER_ID = t2.SUPPLIER_ID
         left join RMSTRAIN_ARRIVAL_SEND t3
         on t1.SEND_STATION_ID = t3.ARRIVAL_ID
         left join RMSTRAIN_ARRIVAL_SEND t4
@@ -793,7 +789,8 @@
     <!--  //通过Id查询请车作业 getWagonPleaseById(Integer pleasePlanId);-->
     <select id="getWagonPleaseById" parameterType="int" resultType="java.util.Map">
         select APAR.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
-               APAR.SHIPPER_ID            "shipperId",
+               APAR.SUPPLIER_ID            "supplierId",
+               RS.SUPPLIER_NAME             "supplierName",
                APAR.SEND_STATION_ID       "sendStationId",
                APAR.TO_THE_STATION_ID     "toTheStationId",
                APAR.RESULT_CATEGORY       "resultCategory",
@@ -805,6 +802,7 @@
                APAR.RESULT_APPROVE_DATE   "resultApproveDate",
                APAR.RESULT_APPROVE_NUMBER "resultApproveNumber"
         from TMSTRAIN_PLEASE_APPROVE_RESULT APAR
+        left join RMS_SUPPLIER RS on RS.SUPPLIER_ID = APAR.SUPPLIER_ID
         where RESULT_ID = #{resultId}
     </select>
 
@@ -815,7 +813,7 @@
                APAR.RESULT_PLEASE_PLAN_NO "resultPleasePlanNo",
                APAR.RESULT_APPROVE_DATE   "resultApproveDate",
                APAR.RESULT_APPROVE_NUMBER "resultApproveNumber",
-               APAR.SHIPPER_ID            "shipperId",
+               APAR.SUPPLIER_ID           "supplierId",
                APAR.RESULT_CATEGORY       "resultCategory",
                APAR.SEND_STATION_ID       "sendStationId",
                APAR.TO_THE_STATION_ID     "toTheStationId"