From e809f5955584e600d8612540ea814977c49774c2 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期三, 27 八月 2025 23:51:54 +0800
Subject: [PATCH] 修改bug

---
 ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java |  205 +++++++++++++++++++++++++++++---------------------
 1 files changed, 118 insertions(+), 87 deletions(-)

diff --git a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java
index 98db265..42e4878 100644
--- a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java
+++ b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java
@@ -245,35 +245,44 @@
             for (int i = 0; i < mapList.size(); i++) {
                 Map<String,Object> d=mapList.get(i);
                 values[i] = new String[title.length];
-                values[i][0]=d.get("insertTime").toString();
-                values[i][1]=d.get("originalDriver").toString();
-                values[i][2]=d.get("reason").toString();
-                values[i][3]=d.get("orderNum").toString();
-                values[i][4]=d.get("addOrderUser").toString();
-                values[i][5]=d.get("travelTime").toString();
-                values[i][6]=d.get("startAddress").toString();
-                values[i][7]=d.get("endAddress").toString();
-                values[i][8]=d.get("originalCar").toString();
-                values[i][9]=d.get("money").toString();
+                values[i][0]=null == d.get("insertTime") ? "" : d.get("insertTime").toString();
+                values[i][1]=null == d.get("originalDriver") ? "" : d.get("originalDriver").toString();
+                values[i][2]=null == d.get("reason") ? "" : d.get("reason").toString();
+                values[i][3]=null == d.get("orderNum") ? "" : d.get("orderNum").toString();
+                values[i][4]=null == d.get("addOrderUser") ? "" : d.get("addOrderUser").toString();
+                values[i][5]=null == d.get("travelTime") ? "" : d.get("travelTime").toString();
+                values[i][6]=null == d.get("startAddress") ? "" : d.get("startAddress").toString();
+                values[i][7]=null == d.get("endAddress") ? "" : d.get("endAddress").toString();
+                values[i][8]=null == d.get("originalCar") ? "" : d.get("originalCar").toString();
+                values[i][9]=null == d.get("money") ? "" : d.get("money").toString();
                 values[i][10]=d.get("nowDriver")==null?"":d.get("nowDriver").toString();
                 values[i][11]=d.get("nowCar")==null?"":d.get("nowCar").toString();
-                values[i][12]=d.get("orderState").toString().equals("1")?"待接单":
-                        d.get("orderState").toString().equals("2")?"待出发":
-                                d.get("orderState").toString().equals("3")?"待到达预约地点":
-                                        d.get("orderState").toString().equals("4")?"待取货":
-                                                d.get("orderState").toString().equals("5")?"服务中":
-                                                        d.get("orderState").toString().equals("6")?"已送达":
-                                                                d.get("orderState").toString().equals("7")?"待支付":
-                                                                        d.get("orderState").toString().equals("8")?"需补差价":
-                                                                                d.get("orderState").toString().equals("9")?"已取货":
-                                                                                        d.get("orderState").toString().equals("10")?"已取消":
-                                                                                                d.get("orderState").toString().equals("11")?"改派中":
-                                                                                                        d.get("orderState").toString().equals("12")?"已支付差价":"";
-                values[i][13]=d.get("state").toString().equals("1")?"提交申请":
-                        d.get("state").toString().equals("2")?"已支付":
-                                d.get("state").toString().equals("3")?"已改派":
-                                        d.get("state").toString().equals("4")?"已取消":
-                                                d.get("state").toString().equals("5")?"已拒绝":"";
+                if(null == d.get("orderState")){
+                    values[i][12]="";
+                }else{
+                    values[i][12]=d.get("orderState").toString().equals("1")?"待接单":
+                            d.get("orderState").toString().equals("2")?"待出发":
+                                    d.get("orderState").toString().equals("3")?"待到达预约地点":
+                                            d.get("orderState").toString().equals("4")?"待取货":
+                                                    d.get("orderState").toString().equals("5")?"服务中":
+                                                            d.get("orderState").toString().equals("6")?"已送达":
+                                                                    d.get("orderState").toString().equals("7")?"待支付":
+                                                                            d.get("orderState").toString().equals("8")?"需补差价":
+                                                                                    d.get("orderState").toString().equals("9")?"已取货":
+                                                                                            d.get("orderState").toString().equals("10")?"已取消":
+                                                                                                    d.get("orderState").toString().equals("11")?"改派中":
+                                                                                                            d.get("orderState").toString().equals("12")?"已支付差价":"";
+                }
+                if(null == d.get("state")){
+                    values[i][13]="";
+                }else{
+                    values[i][13]=d.get("state").toString().equals("1")?"提交申请":
+                            d.get("state").toString().equals("2")?"已支付":
+                                    d.get("state").toString().equals("3")?"已改派":
+                                            d.get("state").toString().equals("4")?"已取消":
+                                                    d.get("state").toString().equals("5")?"已拒绝":"";
+                }
+
             }
             String fileNameTitle="快车改派";
             HSSFWorkbook wb = ExcelUtil.getHSSFWorkbookTime(fileNameTitle+time, title, values, null,insertTime);
@@ -353,35 +362,44 @@
             for (int i = 0; i < mapList.size(); i++) {
                 Map<String,Object> d=mapList.get(i);
                 values[i] = new String[title.length];
-                values[i][0]=d.get("insertTime").toString();
-                values[i][1]=d.get("originalDriver").toString();
-                values[i][2]=d.get("reason").toString();
-                values[i][3]=d.get("orderNum").toString();
-                values[i][4]=d.get("addOrderUser").toString();
-                values[i][5]=d.get("travelTime").toString();
-                values[i][6]=d.get("startAddress").toString();
-                values[i][7]=d.get("endAddress").toString();
-                values[i][8]=d.get("originalCar").toString();
-                values[i][9]=d.get("money").toString();
+                values[i][0]=null == d.get("insertTime") ? "" : d.get("insertTime").toString();
+                values[i][1]=null == d.get("originalDriver") ? "" : d.get("originalDriver").toString();
+                values[i][2]=null == d.get("reason") ? "" : d.get("reason").toString();
+                values[i][3]=null == d.get("orderNum") ? "" : d.get("orderNum").toString();
+                values[i][4]=null == d.get("addOrderUser") ? "" : d.get("addOrderUser").toString();
+                values[i][5]=null == d.get("travelTime") ? "" : d.get("travelTime").toString();
+                values[i][6]=null == d.get("startAddress") ? "" : d.get("startAddress").toString();
+                values[i][7]=null == d.get("endAddress") ? "" : d.get("endAddress").toString();
+                values[i][8]=null == d.get("originalCar") ? "" : d.get("originalCar").toString();
+                values[i][9]=null == d.get("money") ? "" : d.get("money").toString();
                 values[i][10]=d.get("nowDriver")==null?"":d.get("nowDriver").toString();
                 values[i][11]=d.get("nowCar")==null?"":d.get("nowCar").toString();
-                values[i][12]=d.get("orderState").toString().equals("1")?"待接单":
-                        d.get("orderState").toString().equals("2")?"待出发":
-                                d.get("orderState").toString().equals("3")?"待到达预约地点":
-                                        d.get("orderState").toString().equals("4")?"待取货":
-                                                d.get("orderState").toString().equals("5")?"服务中":
-                                                        d.get("orderState").toString().equals("6")?"已送达":
-                                                                d.get("orderState").toString().equals("7")?"待支付":
-                                                                        d.get("orderState").toString().equals("8")?"需补差价":
-                                                                                d.get("orderState").toString().equals("9")?"已取货":
-                                                                                        d.get("orderState").toString().equals("10")?"已取消":
-                                                                                                d.get("orderState").toString().equals("11")?"改派中":
-                                                                                                        d.get("orderState").toString().equals("12")?"已支付差价":"";
-                values[i][13]=d.get("state").toString().equals("1")?"提交申请":
-                        d.get("state").toString().equals("2")?"已支付":
-                                d.get("state").toString().equals("3")?"已改派":
-                                        d.get("state").toString().equals("4")?"已取消":
-                                                d.get("state").toString().equals("5")?"已拒绝":"";
+                if(null == d.get("orderState")){
+                    values[i][12]="";
+                }else{
+                    values[i][12]=d.get("orderState").toString().equals("1")?"待接单":
+                            d.get("orderState").toString().equals("2")?"待出发":
+                                    d.get("orderState").toString().equals("3")?"待到达预约地点":
+                                            d.get("orderState").toString().equals("4")?"待取货":
+                                                    d.get("orderState").toString().equals("5")?"服务中":
+                                                            d.get("orderState").toString().equals("6")?"已送达":
+                                                                    d.get("orderState").toString().equals("7")?"待支付":
+                                                                            d.get("orderState").toString().equals("8")?"需补差价":
+                                                                                    d.get("orderState").toString().equals("9")?"已取货":
+                                                                                            d.get("orderState").toString().equals("10")?"已取消":
+                                                                                                    d.get("orderState").toString().equals("11")?"改派中":
+                                                                                                            d.get("orderState").toString().equals("12")?"已支付差价":"";
+                }
+                if(null == d.get("state")){
+                    values[i][13]="";
+                }else{
+                    values[i][13]=d.get("state").toString().equals("1")?"提交申请":
+                            d.get("state").toString().equals("2")?"已支付":
+                                    d.get("state").toString().equals("3")?"已改派":
+                                            d.get("state").toString().equals("4")?"已取消":
+                                                    d.get("state").toString().equals("5")?"已拒绝":"";
+                }
+
             }
             String fileNameTitle="快车改派";
             HSSFWorkbook wb = ExcelUtil.getHSSFWorkbookTime(fileNameTitle+time, title, values, null,insertTime);
@@ -462,35 +480,44 @@
             for (int i = 0; i < mapList.size(); i++) {
                 Map<String,Object> d=mapList.get(i);
                 values[i] = new String[title.length];
-                values[i][0]=d.get("insertTime").toString();
-                values[i][1]=d.get("originalDriver").toString();
-                values[i][2]=d.get("reason").toString();
-                values[i][3]=d.get("orderNum").toString();
-                values[i][4]=d.get("addOrderUser").toString();
-                values[i][5]=d.get("travelTime").toString();
-                values[i][6]=d.get("startAddress").toString();
-                values[i][7]=d.get("endAddress").toString();
-                values[i][8]=d.get("originalCar").toString();
-                values[i][9]=d.get("money").toString();
+                values[i][0]=null == d.get("insertTime") ? "" : d.get("insertTime").toString();
+                values[i][1]=null == d.get("originalDriver") ? "" : d.get("originalDriver").toString();
+                values[i][2]=null == d.get("reason") ? "" : d.get("reason").toString();
+                values[i][3]=null == d.get("orderNum") ? "" : d.get("orderNum").toString();
+                values[i][4]=null == d.get("addOrderUser") ? "" : d.get("addOrderUser").toString();
+                values[i][5]=null == d.get("travelTime") ? "" : d.get("travelTime").toString();
+                values[i][6]=null == d.get("startAddress") ? "" : d.get("startAddress").toString();
+                values[i][7]=null == d.get("endAddress") ? "" : d.get("endAddress").toString();
+                values[i][8]=null == d.get("originalCar") ? "" : d.get("originalCar").toString();
+                values[i][9]=null == d.get("money") ? "" : d.get("money").toString();
                 values[i][10]=d.get("nowDriver")==null?"":d.get("nowDriver").toString();
                 values[i][11]=d.get("nowCar")==null?"":d.get("nowCar").toString();
-                values[i][12]=d.get("orderState").toString().equals("1")?"待接单":
-                        d.get("orderState").toString().equals("2")?"待出发":
-                                d.get("orderState").toString().equals("3")?"待到达预约地点":
-                                        d.get("orderState").toString().equals("4")?"待取货":
-                                                d.get("orderState").toString().equals("5")?"服务中":
-                                                        d.get("orderState").toString().equals("6")?"已送达":
-                                                                d.get("orderState").toString().equals("7")?"待支付":
-                                                                        d.get("orderState").toString().equals("8")?"需补差价":
-                                                                                d.get("orderState").toString().equals("9")?"已取货":
-                                                                                        d.get("orderState").toString().equals("10")?"已取消":
-                                                                                                d.get("orderState").toString().equals("11")?"改派中":
-                                                                                                        d.get("orderState").toString().equals("12")?"已支付差价":"";
-                values[i][13]=d.get("state").toString().equals("1")?"提交申请":
-                        d.get("state").toString().equals("2")?"已支付":
-                                d.get("state").toString().equals("3")?"已改派":
-                                        d.get("state").toString().equals("4")?"已取消":
-                                                d.get("state").toString().equals("5")?"已拒绝":"";
+                if(null == d.get("orderState")){
+                    values[i][12]="";
+                }else{
+                    values[i][12]=d.get("orderState").toString().equals("1")?"待接单":
+                            d.get("orderState").toString().equals("2")?"待出发":
+                                    d.get("orderState").toString().equals("3")?"待到达预约地点":
+                                            d.get("orderState").toString().equals("4")?"待取货":
+                                                    d.get("orderState").toString().equals("5")?"服务中":
+                                                            d.get("orderState").toString().equals("6")?"已送达":
+                                                                    d.get("orderState").toString().equals("7")?"待支付":
+                                                                            d.get("orderState").toString().equals("8")?"需补差价":
+                                                                                    d.get("orderState").toString().equals("9")?"已取货":
+                                                                                            d.get("orderState").toString().equals("10")?"已取消":
+                                                                                                    d.get("orderState").toString().equals("11")?"改派中":
+                                                                                                            d.get("orderState").toString().equals("12")?"已支付差价":"";
+                }
+                if(null == d.get("state")){
+                    values[i][13]="";
+                }else{
+                    values[i][13]=d.get("state").toString().equals("1")?"提交申请":
+                            d.get("state").toString().equals("2")?"已支付":
+                                    d.get("state").toString().equals("3")?"已改派":
+                                            d.get("state").toString().equals("4")?"已取消":
+                                                    d.get("state").toString().equals("5")?"已拒绝":"";
+                }
+
             }
             String fileNameTitle="快车改派";
             HSSFWorkbook wb = ExcelUtil.getHSSFWorkbookTime(fileNameTitle+time, title, values, null,insertTime);
@@ -598,12 +625,16 @@
                                                                                                     d.get("orderState").toString().equals("11")?"改派中":
                                                                                                             d.get("orderState").toString().equals("12")?"已支付差价":"";
                 }
-                
-                values[i][13]=d.get("state").toString().equals("1")?"提交申请":
-                        d.get("state").toString().equals("2")?"已支付":
-                                d.get("state").toString().equals("3")?"已改派":
-                                        d.get("state").toString().equals("4")?"已取消":
-                                                d.get("state").toString().equals("5")?"已拒绝":"";
+                if(null == d.get("state")){
+                    values[i][13]="";
+                }else{
+                    values[i][13]=d.get("state").toString().equals("1")?"提交申请":
+                            d.get("state").toString().equals("2")?"已支付":
+                                    d.get("state").toString().equals("3")?"已改派":
+                                            d.get("state").toString().equals("4")?"已取消":
+                                                    d.get("state").toString().equals("5")?"已拒绝":"";
+                }
+
             }
             String fileNameTitle="快车改派";
             HSSFWorkbook wb = ExcelUtil.getHSSFWorkbookTime(fileNameTitle+time, title, values, null,insertTime);

--
Gitblit v1.7.1