Browse Source

添加司机id字段,添加上传图片进行压缩的接口

阿伏兔 4 years ago
parent
commit
163a985b75

+ 15 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java

@@ -2,6 +2,8 @@ package com.ruoyi.web.controller.common;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.utils.file.MimeTypeUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -18,6 +20,10 @@ import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.framework.config.ServerConfig;
 
+import static com.ruoyi.common.utils.file.FileUploadUtils.getExtension;
+import static com.ruoyi.common.utils.file.FileUploadUtils.isPicture;
+import static com.ruoyi.common.utils.file.ImageUtils.imageMethod;
+
 /**
  * 通用请求处理
  * 
@@ -72,12 +78,20 @@ public class CommonController
     {
         try
         {
+            AjaxResult ajax = AjaxResult.success();
             // 上传文件路径
             String filePath = RuoYiConfig.getUploadPath();
+            String extension = getExtension(file);
+            MultipartFile multipartFile = null;
+            if (isPicture(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
+                multipartFile = imageMethod(file);
+                String thumbnail = FileUploadUtils.upload(filePath, multipartFile);
+                String url = serverConfig.getUrl() + thumbnail;
+                ajax.put("thumbnailUrl", url);
+            }
             // 上传并返回新文件名称
             String fileName = FileUploadUtils.upload(filePath, file);
             String url = serverConfig.getUrl() + fileName;
-            AjaxResult ajax = AjaxResult.success();
             ajax.put("fileName", file.getOriginalFilename());
             ajax.put("url", url);
             return ajax;

+ 28 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillscarsController.java

@@ -3,6 +3,8 @@ package com.ruoyi.web.controller.fleet.orderPlan;
 import java.util.List;
 import java.util.Map;
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.annotation.RepeatSubmit;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.ServletUtils;
@@ -137,6 +139,32 @@ public class ftmsorderbillscarsController extends BaseController {
     }
 
     /**
+     * 司机操作接单/提箱/装卸货/还卸柜/回单操作  微信提交
+     */
+//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @Log(title = "车队派车", businessType = BusinessType.INSERT)
+    @PostMapping(value = "/wechatInsertDriver")
+    @RepeatSubmit
+    public AjaxResult wechatInsertDriver(@RequestBody String information) {
+        if (StringUtils.isEmpty(information)) {
+            return AjaxResult.error("未找到查询条件,请确认");
+        }
+        JSONObject jsonObject = JSONArray.parseObject(information);
+        String cars = jsonObject.get("cars").toString();
+        String fees = jsonObject.get("fees").toString();
+        String attachs = jsonObject.get("attachs").toString();
+        String operationType = jsonObject.get("operationType").toString();
+        if (StringUtils.isEmpty(cars) || "{}".equals(cars)) {
+            return AjaxResult.error("未找到司机信息,请确认");
+        }
+        if (StringUtils.isEmpty(operationType)) {
+            return AjaxResult.error("未找到状态信息,请确认");
+        }
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return ftmsorderbillscarsService.insertDriver(cars, fees, attachs, operationType, loginUser);
+    }
+
+    /**
      * 司机操作接单/提箱/装卸货/还卸柜/回单操作  变更
      */
 //    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")

+ 1 - 7
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUploadUtils.java

@@ -108,13 +108,7 @@ public class FileUploadUtils
         {
             throw new FileNameLengthLimitExceededException(FileUploadUtils.DEFAULT_FILE_NAME_LENGTH);
         }
-        String extension = getExtension(file);
-        if (isPicture(extension, MimeTypeUtils.IMAGE_EXTENSION)) {
-            File files = multipartFileToFile(file);
-//        Thumbnails.of(files).scale(0.1f).toFile(files);//按比例缩小
-            Thumbnails.of(files).scale(1f).outputQuality(0.5f).toFile(files);
-            file = fileToMultipartFile(files);
-        }
+
         assertAllowed(file, allowedExtension);
 
         String fileName = extractFilename(file);

+ 145 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/ImageUtils.java

@@ -0,0 +1,145 @@
+package com.ruoyi.common.utils.file;
+
+import net.coobird.thumbnailator.Thumbnails;
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+
+import java.io.*;
+
+public class ImageUtils {
+    public static MultipartFile imageMethod(MultipartFile file) {
+        //region/-------创建缩略图存放的文件夹-------/
+        //获得项目根目录
+        String path = System.getProperty("user.dir");
+        //定义新文件夹路径
+        String dirPath = path + File.separator + "imagecache";
+        //根据路径生成文件夹
+        File dir = new File(dirPath);
+        dir.mkdirs();
+        //endregion
+        //定义缩略图的全路径
+        String fileSuffix = "image.jpg";
+        String contextPath = dirPath + File.separator + fileSuffix;
+        //压缩图片
+        MultipartFile newFile = null;
+        try {
+            //自定义宽高压缩(压缩方法很多,可以根据需求更改)
+//            Thumbnails.of(file.getInputStream()).forceSize(100, 100).toFile(contextPath);
+            Thumbnails.of(file.getInputStream()).scale(0.1f).toFile(contextPath);//按比例缩小
+            //压缩完成后将缩略图生成MultipartFile
+            FileItem fileItem = createFileItem(contextPath);
+            newFile = new CommonsMultipartFile(fileItem);
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        //endregion
+        //上面的“newFile”就是缩略图转换后的MultipartFile,就可以拿来用了
+        //程序处理完后把生成的缩略图删除
+        File image = new File(contextPath);
+        if (image.exists()) {
+            image.delete();
+        }
+        return newFile;
+    }
+
+    /**
+     * 获取压缩后的图片,File 转为 MultipartFile
+     */
+    public static FileItem createFileItem(String contextPath) {
+        {
+            FileItemFactory factory = new DiskFileItemFactory(16, null);
+            String textFieldName = "textField";
+            int num = contextPath.lastIndexOf(".");
+            String extFile = contextPath.substring(num);
+            FileItem item = factory.createItem(textFieldName, "text/plain", true,
+                    "MyFileName" + extFile);
+            File newfile = new File(contextPath);
+            int bytesRead = 0;
+            byte[] buffer = new byte[8192];
+            try {
+                FileInputStream fis = new FileInputStream(newfile);
+                OutputStream os = item.getOutputStream();
+                while ((bytesRead = fis.read(buffer, 0, 8192))
+                        != -1) {
+                    os.write(buffer, 0, bytesRead);
+                }
+                os.close();
+                fis.close();
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+            return item;
+        }
+    }
+
+    /**
+     * MultipartFile 转 File
+     *
+     * @param file
+     * @throws Exception
+     */
+    public static File multipartFileToFile(MultipartFile file) throws Exception {
+
+        File toFile = null;
+        if (file.equals("") || file.getSize() <= 0) {
+            file = null;
+        } else {
+            InputStream ins = null;
+            ins = file.getInputStream();
+            toFile = new File(file.getOriginalFilename());
+            inputStreamToFile(ins, toFile);
+            ins.close();
+        }
+        return toFile;
+    }
+
+    //获取流文件
+    private static void inputStreamToFile(InputStream ins, File file) {
+        try {
+            OutputStream os = new FileOutputStream(file);
+            int bytesRead = 0;
+            byte[] buffer = new byte[8192];
+            while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) {
+                os.write(buffer, 0, bytesRead);
+            }
+            os.close();
+            ins.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    /**
+     * File转为MultipartFile
+     *
+     * @param file
+     * @return
+     */
+    public static MultipartFile fileToMultipartFile(File file) {
+        FileItem fileItem = createFileItem(file);
+        MultipartFile multipartFile = new CommonsMultipartFile(fileItem);
+        return multipartFile;
+    }
+
+    private static FileItem createFileItem(File file) {
+        FileItemFactory factory = new DiskFileItemFactory(16, null);
+        FileItem item = factory.createItem("textField", "text/plain", true, file.getName());
+        int bytesRead = 0;
+        byte[] buffer = new byte[8192];
+        try {
+            FileInputStream fis = new FileInputStream(file);
+            OutputStream os = item.getOutputStream();
+            while ((bytesRead = fis.read(buffer, 0, 8192)) != -1) {
+                os.write(buffer, 0, bytesRead);
+            }
+            os.close();
+            fis.close();
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+        return item;
+    }
+}

+ 6 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbillscars.java

@@ -72,6 +72,12 @@ public class Ftmsorderbillscars extends BaseEntity {
     private String mblno;
 
     /**
+     * 司机id
+     */
+    @Excel(name = "司机id")
+    private String driverUserId;
+
+    /**
      * 司机姓名
      */
     @Excel(name = "司机姓名")

+ 30 - 17
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsplansServiceImpl.java

@@ -491,23 +491,36 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
             }
         }
         // 调度安排
-        JSONArray planJson = JSONArray.parseArray(plans);
-        List<Ftmsorderbillsplans> tmsorderbillsplansList = JSONObject.parseArray(planJson.toJSONString(), Ftmsorderbillsplans.class);
-        int line = 0;
-        for (Ftmsorderbillsplans p : tmsorderbillsplansList) {
-            line++;
-            Ftmsorderbillscntrs ftmsorderbillscntrs = ftmsorderbillscntrsMapper.selectftmsorderbillscntrsById(p.getPId());
-            if (StringUtils.isNull(ftmsorderbillscntrs)) {
-                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                return AjaxResult.error("调度安排第" + line + "行未找到箱型箱量数据");
-            }
-            if (!ftmsorderbillscntrs.getCntrId().equals(p.getCntrId())) {
-                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                return AjaxResult.error("调度安排第" + line + "行箱型数据与计划箱量箱型数据不匹配");
-            }
-            if (StringUtils.isNull(p.getCarcorPid())) {
-                TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                return AjaxResult.error("调度安排第" + line + "行未找到车队数据");
+        if (StringUtils.isNotNull(plans) && !"[]".equals(plans)) {
+            JSONArray planJson = JSONArray.parseArray(plans);
+            List<Ftmsorderbillsplans> tmsorderbillsplansList = JSONObject.parseArray(planJson.toJSONString(), Ftmsorderbillsplans.class);
+            int line = 0;
+            for (Ftmsorderbillsplans p : tmsorderbillsplansList) {
+                line++;
+                Ftmsorderbillscntrs ftmsorderbillscntrs = ftmsorderbillscntrsMapper.selectftmsorderbillscntrsById(p.getPId());
+                if (StringUtils.isNull(ftmsorderbillscntrs)) {
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                    return AjaxResult.error("调度安排第" + line + "行未找到箱型箱量数据");
+                }
+                if (!ftmsorderbillscntrs.getCntrId().equals(p.getCntrId())) {
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                    return AjaxResult.error("调度安排第" + line + "行箱型数据与计划箱量箱型数据不匹配");
+                }
+                if (StringUtils.isNull(p.getCarcorPid())) {
+                    TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
+                    return AjaxResult.error("调度安排第" + line + "行未找到车队数据");
+                }
+                if (StringUtils.isNull(p.getId())) {
+                    p.setOrgId(pId);
+                    p.setBillStatus(2L);
+                    p.setCreateTime(new Date());
+                    p.setCreateBy(loginUser.getUsername());
+                    ftmsorderbillsplansMapper.insertftmsorderbillsplans(p);
+                } else {
+                    p.setUpdateTime(new Date());
+                    p.setUpdateBy(loginUser.getUsername());
+                    ftmsorderbillsplansMapper.updateftmsorderbillsplans(p);
+                }
             }
         }
         return AjaxResult.success();

+ 36 - 24
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml

@@ -15,6 +15,7 @@
         <result property="mblno" column="mblno"/>
         <result property="carregNo" column="carreg_no"/>
         <result property="driverName" column="driver_name"/>
+        <result property="driverUserId" column="driver_user_id"/>
         <result property="driverTel" column="driver_tel"/>
         <result property="planDate" column="plan_date"/>
         <result property="planRemarks" column="plan_remarks"/>
@@ -98,7 +99,7 @@
     </resultMap>
 
     <sql id="selectftmsorderbillscarsVo">
-        select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_name, driver_tel, plan_date, plan_remarks, accept_date, off_data, off_remarks, accept_remarks, load_date, load_remarks, md_load_date, md_load_remarks, un_load_date, un_load_remarks, waybill_date, waybill_remarks, qty_load, cntr_qty, qty_un_load, cntr_weight, gopods_loss_qty, gopods_lossrate, gopods_lossamt_cr, qty_dr, gopods_lossamt_dr, qty_cr, freight_price_dr, freight_price_cr, freight_amt_dr, freight_amt_cr, feeitem_dr, feeitem_dr_remarks, feeitem_cr, feeitem_cr_remarks, amt_dr, amt_cr, due_date_dr, due_date_cr, odometer_from, odometer_end, miles_empty, miles_load, miles, driverbonus, costtoll, costmaintain, cost_oth, cost_remarks, oil_qtyper, oil_qty1, oil_price1, oil_amt1, oil_qty2, oil_price2, oil_amt2, oil_qty, oil_price, oil_amt, oil_qty_blc, oil_amt_blc, profit, inv_dr_need, inv_dr_status, inv_dr_taxrate, inv_dr_taxamt, inv_dr_date, inv_dr_no, accchk_staus, bill_status, order_status, accchk_date, stl_amt_dr, stl_date_dr, stl_amt_cr, stl_date_cr, del_flag, create_by, create_time, update_by, update_time, remarks from F_TMSORDERBILLSCARS
+        select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_user_id, driver_name, driver_tel, plan_date, plan_remarks, accept_date, off_data, off_remarks, accept_remarks, load_date, load_remarks, md_load_date, md_load_remarks, un_load_date, un_load_remarks, waybill_date, waybill_remarks, qty_load, cntr_qty, qty_un_load, cntr_weight, gopods_loss_qty, gopods_lossrate, gopods_lossamt_cr, qty_dr, gopods_lossamt_dr, qty_cr, freight_price_dr, freight_price_cr, freight_amt_dr, freight_amt_cr, feeitem_dr, feeitem_dr_remarks, feeitem_cr, feeitem_cr_remarks, amt_dr, amt_cr, due_date_dr, due_date_cr, odometer_from, odometer_end, miles_empty, miles_load, miles, driverbonus, costtoll, costmaintain, cost_oth, cost_remarks, oil_qtyper, oil_qty1, oil_price1, oil_amt1, oil_qty2, oil_price2, oil_amt2, oil_qty, oil_price, oil_amt, oil_qty_blc, oil_amt_blc, profit, inv_dr_need, inv_dr_status, inv_dr_taxrate, inv_dr_taxamt, inv_dr_date, inv_dr_no, accchk_staus, bill_status, order_status, accchk_date, stl_amt_dr, stl_date_dr, stl_amt_cr, stl_date_cr, del_flag, create_by, create_time, update_by, update_time, remarks from F_TMSORDERBILLSCARS
     </sql>
 
     <select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
@@ -112,6 +113,7 @@
             <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
             <if test="mblno != null  and mblno != ''"> and mblno = #{mblno}</if>
             <if test="carregNo != null  and carregNo != ''"> and carreg_no = #{carregNo}</if>
+            <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
             <if test="driverName != null  and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
             <if test="driverTel != null  and driverTel != ''"> and driver_tel = #{driverTel}</if>
             <if test="planDate != null "> and plan_date = #{planDate}</if>
@@ -202,6 +204,7 @@
             <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
             <if test="mblno != null  and mblno != ''"> and mblno = #{mblno}</if>
             <if test="carregNo != null  and carregNo != ''"> and carreg_no = #{carregNo}</if>
+            <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
             <if test="driverName != null  and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
             <if test="driverTel != null  and driverTel != ''"> and driver_tel = #{driverTel}</if>
             <if test="planDate != null "> and plan_date = #{planDate}</if>
@@ -292,6 +295,7 @@
             <if test="carcorPid != null "> and carcor_pid = #{carcorPid}</if>
             <if test="mblno != null  and mblno != ''"> and mblno = #{mblno}</if>
             <if test="carregNo != null  and carregNo != ''"> and carreg_no = #{carregNo}</if>
+            <if test="driverUserId != null"> and driver_user_id = #{driverUserId}</if>
             <if test="driverName != null  and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
             <if test="driverTel != null  and driverTel != ''"> and driver_tel = #{driverTel}</if>
             <if test="planDate != null "> and plan_date = #{planDate}</if>
@@ -393,18 +397,18 @@
             t.load_attn loadAttn,
             t.load_attntel loadAttntel,
             t.md_load_addr mdLoadAddr,
-            t.md_load_date mdLoadDate,
+            t.md_load_date tMdLoadDate,
             t.md_load_attn mdLoadAttn,
             t.md_load_attn_tel mdLoadAttnTel,
             t.un_load_addr unLoadAddr,
-            t.un_load_date unLoadDate,
+            t.un_load_date tUnLoadDate,
             t.un_load_attn unLoadAttn,
             t.un_load_attn_tel unLoadAttnTel,
             c.accept_date acceptDate,
             c.off_data offData,
             c.load_date cLoadDate,
-            c.md_load_date cMdLoadDate,
-            c.un_load_date cUnLoadDate,
+            c.md_load_date mdLoadDate,
+            c.un_load_date unLoadDate,
             c.waybill_date waybillDate,
             c.waybill_remarks waybillRemarks
         FROM
@@ -466,6 +470,7 @@
             t.corp_id AS fCorpId,
             corp.f_name AS fCorpIds,
             u.nick_name AS planUserId,
+            driver.nick_name AS driverUserId,
             t.un_load_date AS tUnLoadDate,
             t.un_load_addr AS unLoadAddr,
             t.un_load_attn AS unLoadAttn,
@@ -482,6 +487,7 @@
             c.carreg_no AS carregNo,
             c.mblno,
             g.f_name AS goodsId,
+            c.order_status AS orderStatus,
             c.cntr_qty AS cntrQty,
             c.cntr_weight AS cntrWeight,
             t.ysl,
@@ -511,6 +517,7 @@
             F_TMSORDERBILLSCARS c
             LEFT JOIN F_TMSORDERBILLS t ON t.id = c.org_id
             LEFT JOIN sys_user u ON u.user_id = t.plan_user_id
+            LEFT JOIN sys_user driver ON driver.user_id = c.driver_user_id
             LEFT JOIN t_corps corp ON corp.f_id = t.corp_id
             LEFT JOIN t_goods g ON g.f_id = t.goods_id
         where
@@ -526,34 +533,35 @@
             <if test="cntrId != null">cntr_id,</if>
             <if test="cntrNo != null">cntr_no,</if>
             <if test="carcorPid != null">carcor_pid,</if>
-            <if test="mblno != null">mblno,</if>
             <if test="carregNo != null">carreg_no,</if>
+            <if test="mblno != null">mblno,</if>
             <if test="driverName != null">driver_name,</if>
+            <if test="driverUserId != null">driver_user_id,</if>
             <if test="driverTel != null">driver_tel,</if>
             <if test="planDate != null">plan_date,</if>
             <if test="planRemarks != null">plan_remarks,</if>
             <if test="acceptDate != null">accept_date,</if>
             <if test="acceptRemarks != null">accept_remarks,</if>
-            <if test="offData != null">off_data,</if>
-            <if test="offRemarks != null">off_remarks,</if>
             <if test="loadDate != null">load_date,</if>
             <if test="loadRemarks != null">load_remarks,</if>
+            <if test="offData != null">off_data,</if>
             <if test="mdLoadDate != null">md_load_date,</if>
             <if test="mdLoadRemarks != null">md_load_remarks,</if>
+            <if test="offRemarks != null">off_remarks,</if>
             <if test="unLoadDate != null">un_load_date,</if>
             <if test="unLoadRemarks != null">un_load_remarks,</if>
             <if test="waybillDate != null">waybill_date,</if>
-            <if test="waybillRemarks != null">waybill_remarks,</if>
             <if test="qtyLoad != null">qty_load,</if>
-            <if test="cntrQty != null">cntr_qty,</if>
             <if test="qtyUnLoad != null">qty_un_load,</if>
-            <if test="cntrWeight != null">cntr_weight,</if>
+            <if test="cntrQty != null">cntr_qty,</if>
             <if test="gopodsLossQty != null">gopods_loss_qty,</if>
+            <if test="cntrWeight != null">cntr_weight,</if>
             <if test="gopodsLossrate != null">gopods_lossrate,</if>
             <if test="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
             <if test="qtyDr != null">qty_dr,</if>
-            <if test="gopodsLossamtDr != null">gopods_lossamt_dr,</if>
+            <if test="waybillRemarks != null">waybill_remarks,</if>
             <if test="qtyCr != null">qty_cr,</if>
+            <if test="gopodsLossamtDr != null">gopods_lossamt_dr,</if>
             <if test="freightPriceDr != null">freight_price_dr,</if>
             <if test="freightPriceCr != null">freight_price_cr,</if>
             <if test="freightAmtDr != null">freight_amt_dr,</if>
@@ -617,9 +625,10 @@
             <if test="cntrId != null">#{cntrId},</if>
             <if test="cntrNo != null">#{cntrNo},</if>
             <if test="carcorPid != null">#{carcorPid},</if>
-            <if test="mblno != null">#{mblno},</if>
             <if test="carregNo != null">#{carregNo},</if>
+            <if test="mblno != null">#{mblno},</if>
             <if test="driverName != null">#{driverName},</if>
+            <if test="driverUserId != null">#{driverUserId},</if>
             <if test="driverTel != null">#{driverTel},</if>
             <if test="planDate != null">#{planDate},</if>
             <if test="planRemarks != null">#{planRemarks},</if>
@@ -627,22 +636,24 @@
             <if test="acceptRemarks != null">#{acceptRemarks},</if>
             <if test="loadDate != null">#{loadDate},</if>
             <if test="loadRemarks != null">#{loadRemarks},</if>
+            <if test="offData != null">#{offData},</if>
             <if test="mdLoadDate != null">#{mdLoadDate},</if>
             <if test="mdLoadRemarks != null">#{mdLoadRemarks},</if>
+            <if test="offRemarks != null">#{offRemarks},</if>
             <if test="unLoadDate != null">#{unLoadDate},</if>
             <if test="unLoadRemarks != null">#{unLoadRemarks},</if>
             <if test="waybillDate != null">#{waybillDate},</if>
-            <if test="waybillRemarks != null">#{waybillRemarks},</if>
             <if test="qtyLoad != null">#{qtyLoad},</if>
-            <if test="cntrQty != null">#{cntrQty},</if>
             <if test="qtyUnLoad != null">#{qtyUnLoad},</if>
-            <if test="cntrWeight != null">#{cntrWeight},</if>
+            <if test="cntrQty != null">#{cntrQty},</if>
             <if test="gopodsLossQty != null">#{gopodsLossQty},</if>
+            <if test="cntrWeight != null">#{cntrWeight},</if>
             <if test="gopodsLossrate != null">#{gopodsLossrate},</if>
             <if test="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
             <if test="qtyDr != null">#{qtyDr},</if>
-            <if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
+            <if test="waybillRemarks != null">#{waybillRemarks},</if>
             <if test="qtyCr != null">#{qtyCr},</if>
+            <if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
             <if test="freightPriceDr != null">#{freightPriceDr},</if>
             <if test="freightPriceCr != null">#{freightPriceCr},</if>
             <if test="freightAmtDr != null">#{freightAmtDr},</if>
@@ -710,34 +721,35 @@
             <if test="cntrId != null">cntr_id = #{cntrId},</if>
             <if test="cntrNo != null">cntr_no = #{cntrNo},</if>
             <if test="carcorPid != null">carcor_pid = #{carcorPid},</if>
-            <if test="mblno != null">mblno = #{mblno},</if>
             <if test="carregNo != null">carreg_no = #{carregNo},</if>
+            <if test="mblno != null">mblno = #{mblno},</if>
             <if test="driverName != null">driver_name = #{driverName},</if>
+            <if test="driverUserId != null">driver_user_id = #{driverUserId},</if>
             <if test="driverTel != null">driver_tel = #{driverTel},</if>
             <if test="planDate != null">plan_date = #{planDate},</if>
             <if test="planRemarks != null">plan_remarks = #{planRemarks},</if>
             <if test="acceptDate != null">accept_date = #{acceptDate},</if>
             <if test="acceptRemarks != null">accept_remarks = #{acceptRemarks},</if>
-            <if test="offData != null">off_data = #{offData},</if>
-            <if test="offRemarks != null">off_remarks = #{offRemarks},</if>
             <if test="loadDate != null">load_date = #{loadDate},</if>
             <if test="loadRemarks != null">load_remarks = #{loadRemarks},</if>
+            <if test="offData != null">off_data = #{offData},</if>
             <if test="mdLoadDate != null">md_load_date = #{mdLoadDate},</if>
             <if test="mdLoadRemarks != null">md_load_remarks = #{mdLoadRemarks},</if>
+            <if test="offRemarks != null">off_remarks = #{offRemarks},</if>
             <if test="unLoadDate != null">un_load_date = #{unLoadDate},</if>
             <if test="unLoadRemarks != null">un_load_remarks = #{unLoadRemarks},</if>
             <if test="waybillDate != null">waybill_date = #{waybillDate},</if>
-            <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
             <if test="qtyLoad != null">qty_load = #{qtyLoad},</if>
-            <if test="cntrQty != null">cntr_qty = #{cntrQty},</if>
             <if test="qtyUnLoad != null">qty_un_load = #{qtyUnLoad},</if>
-            <if test="cntrWeight != null">cntr_weight = #{cntrWeight},</if>
+            <if test="cntrQty != null">cntr_qty = #{cntrQty},</if>
             <if test="gopodsLossQty != null">gopods_loss_qty = #{gopodsLossQty},</if>
+            <if test="cntrWeight != null">cntr_weight = #{cntrWeight},</if>
             <if test="gopodsLossrate != null">gopods_lossrate = #{gopodsLossrate},</if>
             <if test="gopodsLossamtCr != null">gopods_lossamt_cr = #{gopodsLossamtCr},</if>
             <if test="qtyDr != null">qty_dr = #{qtyDr},</if>
-            <if test="gopodsLossamtDr != null">gopods_lossamt_dr = #{gopodsLossamtDr},</if>
+            <if test="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
             <if test="qtyCr != null">qty_cr = #{qtyCr},</if>
+            <if test="gopodsLossamtDr != null">gopods_lossamt_dr = #{gopodsLossamtDr},</if>
             <if test="freightPriceDr != null">freight_price_dr = #{freightPriceDr},</if>
             <if test="freightPriceCr != null">freight_price_cr = #{freightPriceCr},</if>
             <if test="freightAmtDr != null">freight_amt_dr = #{freightAmtDr},</if>

+ 1 - 1
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsplansMapper.xml

@@ -102,7 +102,7 @@
             LEFT JOIN t_goods g ON g.f_id = f.goods_id
             LEFT JOIN sys_user u ON u.user_name = f.create_by
         WHERE
-            f.id != ''·
+            f.id != ''
             <if test="corpId != null and corpId != ''">
                 AND f.corp_id = #{corpId}
             </if>