Browse Source

修改车队禅道bug

阿伏兔 4 years ago
parent
commit
b3a4b6d1dc
29 changed files with 669 additions and 422 deletions
  1. 15 3
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/basicData/FleetDriverMsgController.java
  2. 8 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillsController.java
  3. 14 13
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillscarsController.java
  4. 8 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillsplansController.java
  5. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TCorpsController.java
  6. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TFeesController.java
  7. 1 1
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TGoodsController.java
  8. 2 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/wechat/WechatController.java
  9. 23 0
      ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java
  10. 7 0
      ruoyi-fleet/src/main/java/com/ruoyi/basicData/mapper/FleetCarManageMapper.java
  11. 1 1
      ruoyi-fleet/src/main/java/com/ruoyi/basicData/service/IFleetDriverMsgService.java
  12. 72 36
      ruoyi-fleet/src/main/java/com/ruoyi/basicData/service/impl/FleetDriverMsgServiceImpl.java
  13. 5 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbills.java
  14. 144 288
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbillscars.java
  15. 33 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/mapper/FtmsorderbillscarsMapper.java
  16. 8 2
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/IftmsorderbillsService.java
  17. 2 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/IftmsorderbillsplansService.java
  18. 41 6
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsServiceImpl.java
  19. 8 11
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java
  20. 28 0
      ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsplansServiceImpl.java
  21. 47 0
      ruoyi-fleet/src/main/resources/mapper/basicData/FleetCarManageMapper.xml
  22. 162 51
      ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml
  23. 5 1
      ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillsplansMapper.xml
  24. 4 4
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
  25. 3 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTableSet.java
  26. 7 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
  27. 1 0
      ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
  28. 6 1
      ruoyi-system/src/main/resources/mapper/system/SysTableSetMapper.xml
  29. 12 2
      ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 15 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/basicData/FleetDriverMsgController.java

@@ -4,7 +4,9 @@ import java.util.List;
 import java.util.Map;
 
 import com.ruoyi.common.constant.UserConstants;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.basicData.domain.FleetDriverMsg;
 import com.ruoyi.basicData.service.IFleetDriverMsgService;
@@ -93,11 +95,18 @@ public class FleetDriverMsgController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody FleetDriverMsg fleetDriverMsg)
     {
-        if(fleetDriverMsg.getId()==null ||  fleetDriverMsg.getId().equals("")){
+        if (StringUtils.isEmpty(fleetDriverMsg.getTel())) {
+            return AjaxResult.error("请填写司机手机号");
+        }
+        if(fleetDriverMsg.getId()==null){
             //检验登录名  唯一
-            if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(fleetDriverMsg.getTel()))) {
+            SysUser sysUser = userService.selectUserByUserName(fleetDriverMsg.getTel());
+            if (StringUtils.isNotNull(sysUser) && "00".equals(sysUser.getUserType())) {
                 return AjaxResult.error("新增驾驶员'" + fleetDriverMsg.getName() + "'失败,登录账号(联系电话)已存在()");
             }
+            /*if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(fleetDriverMsg.getTel()))) {
+                return AjaxResult.error("新增驾驶员'" + fleetDriverMsg.getName() + "'失败,登录账号(联系电话)已存在()");
+            }*/
         }
         return fleetDriverMsgService.insertFleetDriverMsg(fleetDriverMsg);
     }
@@ -122,6 +131,9 @@ public class FleetDriverMsgController extends BaseController
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
-        return toAjax(fleetDriverMsgService.deleteFleetDriverMsgByIds(ids));
+        if (ids.length <= 0) {
+            return AjaxResult.error("未找到需要删除的条件");
+        }
+        return fleetDriverMsgService.deleteFleetDriverMsgByIds(ids);
     }
 }

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillsController.java

@@ -33,6 +33,14 @@ public class ftmsorderbillsController extends BaseController {
     private IftmsorderbillsService ftmsorderbillsService;
 
     /**
+     * 查询车队首页信息
+     */
+    @GetMapping(value = "/queryHomeInfo")
+    public AjaxResult queryHomeInfo() {
+        return ftmsorderbillsService.queryHomeInfo();
+    }
+
+    /**
      * 查询订单列表显示字段
      */
     @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbills:query')")

+ 14 - 13
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillscarsController.java

@@ -16,6 +16,7 @@ import com.ruoyi.orderPlan.domain.Ftmsorderbills;
 import com.ruoyi.orderPlan.domain.Ftmsorderbillscars;
 import com.ruoyi.orderPlan.service.IftmsorderbillscarsService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
@@ -73,7 +74,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 导出车队派车列表
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:export')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:export')")
     @Log(title = "车队派车", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(Ftmsorderbillscars ftmsorderbillscars) {
@@ -109,7 +110,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 司机操作接单/提箱/装卸货/还卸柜/回单操作  保存
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/driverSave")
     @RepeatSubmit
@@ -177,7 +178,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 司机操作接单/提箱/装卸货/还卸柜/回单操作  变更
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/operationalChanges")
     @RepeatSubmit
@@ -196,7 +197,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 单条车辆安排 变更
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:edit')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:edit')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/vehicleOperationChanges/{id}")
     @RepeatSubmit
@@ -211,7 +212,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 单条车辆安排变更提交接口
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/vehicleArrangementChange")
     @RepeatSubmit
@@ -227,7 +228,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 单条车辆安排提交接口
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/vehicleArrangementAdd")
     @RepeatSubmit
@@ -243,7 +244,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 单条车辆安排撤销接口
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:edit')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:edit')")
     @PostMapping(value = "/vehicleArrangementRevoke")
     @RepeatSubmit
     public AjaxResult vehicleArrangementRevoke(@RequestBody Ftmsorderbillscars ftmsorderbillscars) {
@@ -258,7 +259,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 单条车辆安排删除接口
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:remove')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:remove')")
     @PostMapping(value = "/vehicleArrangementRemove")
     @RepeatSubmit
     public AjaxResult vehicleArrangementRemove(@RequestBody Ftmsorderbillscars ftmsorderbillscars) {
@@ -273,7 +274,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 暂存车队派车
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/save")
     @RepeatSubmit
@@ -292,7 +293,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 车队派车提交
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/add")
     @RepeatSubmit
@@ -314,7 +315,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 车队派车(大)变更
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:add')")
     @Log(title = "车队派车", businessType = BusinessType.INSERT)
     @PostMapping(value = "/change/{id}")
     @RepeatSubmit
@@ -329,7 +330,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 修改车队派车
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:edit')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:edit')")
     @Log(title = "车队派车", businessType = BusinessType.UPDATE)
     @PutMapping
     @RepeatSubmit
@@ -340,7 +341,7 @@ public class ftmsorderbillscarsController extends BaseController {
     /**
      * 删除车队派车
      */
-//    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:remove')")
+    @PreAuthorize("@ss.hasPermi('fleet:ftmsorderbillscars:remove')")
     @Log(title = "车队派车", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {

+ 8 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/fleet/orderPlan/ftmsorderbillsplansController.java

@@ -41,6 +41,14 @@ public class ftmsorderbillsplansController extends BaseController {
     /**
      * 查询订单调度列表
      */
+    @GetMapping("/testt")
+    public void testt(String phone) {
+        ftmsorderbillsplansService.testt(phone);
+    }
+
+    /**
+     * 查询订单调度列表
+     */
     @GetMapping("/list")
     public TableDataInfo list(Ftmsorderbillsplans ftmsorderbillsplans) {
         startPage();

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TCorpsController.java

@@ -36,7 +36,7 @@ public class TCorpsController extends BaseController {
     /**
      * 查询客户详情列表
      */
-    @PreAuthorize("@ss.hasPermi('basicdata:corps:list')")
+//    @PreAuthorize("@ss.hasPermi('basicdata:corps:list')")
     @GetMapping("/list")
     public TableDataInfo list(TCorps tCorps) {
         startPage();

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TFeesController.java

@@ -31,7 +31,7 @@ public class TFeesController extends BaseController {
     /**
      * 查询费用信息列表
      */
-    @PreAuthorize("@ss.hasPermi('basicdata:fees:list')")
+//    @PreAuthorize("@ss.hasPermi('basicdata:fees:list')")
     @GetMapping("/list")
     public TableDataInfo list(TFees tFees) {
         startPage();

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/controller/warehouse/basicData/TGoodsController.java

@@ -31,7 +31,7 @@ public class TGoodsController extends BaseController {
     /**
      * 查询商品详情列表
      */
-    @PreAuthorize("@ss.hasPermi('basicdata:goods:list')")
+//    @PreAuthorize("@ss.hasPermi('basicdata:goods:list')")
     @GetMapping("/list")
     public TableDataInfo list(TGoods tGoods) {
         startPage();

+ 2 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wechat/WechatController.java

@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.wechat;
 
+import com.ruoyi.common.annotation.RepeatSubmit;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginBody;
@@ -54,6 +55,7 @@ public class WechatController extends BaseController {
      * @param loginBody code
      * @return 结果
      */
+    @RepeatSubmit
     @PostMapping(value = "/programLogin")
     public AjaxResult weChatProgramLogin(@RequestBody LoginBody loginBody) {
         // 生成令牌

+ 23 - 0
ruoyi-common/src/main/java/com/ruoyi/common/utils/DateUtils.java

@@ -191,6 +191,29 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
     }
 
     /**
+     *  获取当天开始与结束日期
+     * @return
+     */
+    public static List<String> getCurrentDay()
+    {
+        List<String> stringList = new ArrayList<>();
+        Calendar cale = null;
+        cale = Calendar.getInstance();
+        // 获取当月第一天和最后一天
+        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
+        String firstday, lastday;
+        // 获取前月的第一天
+        cale = Calendar.getInstance();
+        firstday = format.format(cale.getTime()) + " 00:00:00";
+        stringList.add(firstday);
+        // 获取前月的最后一天
+        cale = Calendar.getInstance();
+        lastday = format.format(cale.getTime()) + " 23:59:59";
+        stringList.add(lastday);
+        return  stringList;
+    }
+
+    /**
      *  获取当前月份第一天与最后一天
      * @return
      */

+ 7 - 0
ruoyi-fleet/src/main/java/com/ruoyi/basicData/mapper/FleetCarManageMapper.java

@@ -70,4 +70,11 @@ public interface FleetCarManageMapper
      * @return  结果
      */
     public List<FleetCarManage> selectFleetCarManageIdNameList(FleetCarManage fleetCarManage);
+
+    /**
+     *  查询车辆数量
+     * @param fleetCarManage    条件
+     * @return  结果
+     */
+    public int selectFleetCarManageCount(FleetCarManage fleetCarManage);
 }

+ 1 - 1
ruoyi-fleet/src/main/java/com/ruoyi/basicData/service/IFleetDriverMsgService.java

@@ -52,7 +52,7 @@ public interface IFleetDriverMsgService
      * @param ids 需要删除的【司机】ID
      * @return 结果
      */
-    public int deleteFleetDriverMsgByIds(Long[] ids);
+    public AjaxResult deleteFleetDriverMsgByIds(Long[] ids);
 
     /**
      * 删除【司机】信息

+ 72 - 36
ruoyi-fleet/src/main/java/com/ruoyi/basicData/service/impl/FleetDriverMsgServiceImpl.java

@@ -8,6 +8,8 @@ import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.orderPlan.domain.Ftmsorderbillscars;
+import com.ruoyi.orderPlan.mapper.FtmsorderbillscarsMapper;
 import com.ruoyi.system.domain.SysUserPost;
 import com.ruoyi.system.domain.SysUserRole;
 import com.ruoyi.system.mapper.SysUserMapper;
@@ -26,17 +28,19 @@ import java.util.Map;
 
 /**
  * 【司机】Service业务层处理
- * 
+ *
  * @author ruoyi
  * @date 2021-03-04
  */
 @Service
-public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService
-{
+public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService {
     @Autowired
     private FleetDriverMsgMapper fleetDriverMsgMapper;
 
     @Autowired
+    private FtmsorderbillscarsMapper ftmsorderbillscarsMapper;
+
+    @Autowired
     private SysUserMapper userMapper;
 
     @Autowired
@@ -47,25 +51,23 @@ public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService
 
     /**
      * 查询【司机】
-     * 
+     *
      * @param id 【司机】ID
      * @return 【司机】
      */
     @Override
-    public FleetDriverMsg selectFleetDriverMsgById(Long id)
-    {
+    public FleetDriverMsg selectFleetDriverMsgById(Long id) {
         return fleetDriverMsgMapper.selectFleetDriverMsgById(id);
     }
 
     /**
      * 查询【司机】列表
-     * 
+     *
      * @param fleetDriverMsg 【司机】
      * @return 【司机】
      */
     @Override
-    public List<FleetDriverMsg> selectFleetDriverMsgList(FleetDriverMsg fleetDriverMsg)
-    {
+    public List<FleetDriverMsg> selectFleetDriverMsgList(FleetDriverMsg fleetDriverMsg) {
         return fleetDriverMsgMapper.selectFleetDriverMsgList(fleetDriverMsg);
     }
 
@@ -76,28 +78,27 @@ public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService
 
     /**
      * 新增【司机】
-     * 
+     *
      * @param fleetDriverMsg 【司机】
      * @return 结果
      */
     @Override
     @Transactional
-    public AjaxResult insertFleetDriverMsg(FleetDriverMsg fleetDriverMsg)
-    {
+    public AjaxResult insertFleetDriverMsg(FleetDriverMsg fleetDriverMsg) {
         // 检验必填
-        if(StringUtils.isNull(fleetDriverMsg.getFleetCompanyId()) ||
+        if (StringUtils.isNull(fleetDriverMsg.getFleetCompanyId()) ||
                 StringUtils.isNull(fleetDriverMsg.getName()) ||
-                StringUtils.isNull(fleetDriverMsg.getIdcarNum()) ||
-                StringUtils.isNull(fleetDriverMsg.getTel()) ){
+                StringUtils.isNull(fleetDriverMsg.getIdcarNum())) {
             TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
             return AjaxResult.error("请填写必输项");
         }
-        if(null!=fleetDriverMsg.getId() && !fleetDriverMsg.getId().equals("")){
-            fleetDriverMsg.setUpdateBy(SecurityUtils.getUsername());
+        if (null != fleetDriverMsg.getId()) {
+            updateDriverPhone(fleetDriverMsg);
             fleetDriverMsg.setUpdateTime(new Date());
+            fleetDriverMsg.setUpdateBy(SecurityUtils.getUsername());
             fleetDriverMsgMapper.updateFleetDriverMsg(fleetDriverMsg);
             return AjaxResult.success();
-        }else {
+        } else {
             // 添加用户表
             SysUser sysUser = new SysUser();
             sysUser.setUserName(fleetDriverMsg.getTel());
@@ -107,7 +108,7 @@ public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService
             sysUser.setUserType("11");
             sysUser.setPassword(SecurityUtils.encryptPassword(fleetDriverMsg.getTel()));
             sysUser.setDeptId(120L); // 当前给定、后期修改
-            Long [] rolr = {110L}; // 当前给定、后期修改
+            Long[] rolr = {110L}; // 当前给定、后期修改
             sysUser.setRoleIds(rolr);
             // 查询是否有用户提前关注公众号
             SysUser user = userMapper.selectUserByTel(fleetDriverMsg.getTel());
@@ -121,15 +122,14 @@ public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService
             }
             // 新增用户信息
             int rows = userMapper.insertUser(sysUser);
-            if(rows <= 0 ){
+            if (rows <= 0) {
                 TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-                return AjaxResult.error("请填写必项");
+                return AjaxResult.error("请填写必项");
             }
             // 新增用户岗位关联
             insertUserPost(sysUser);
             // 新增用户与角色管理
             insertUserRole(sysUser);
-
             fleetDriverMsg.setCreateBy(SecurityUtils.getUsername());
             fleetDriverMsg.setCreatTime(new Date());
             fleetDriverMsgMapper.insertFleetDriverMsg(fleetDriverMsg);
@@ -137,47 +137,84 @@ public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService
         }
     }
 
+    @Transactional
+    public void updateDriverPhone(FleetDriverMsg fleetDriverMsg) {
+        FleetDriverMsg driverMsg = fleetDriverMsgMapper.selectFleetDriverMsgById(fleetDriverMsg.getId());
+        SysUser sysUser = userMapper.selectUserByTel(driverMsg.getTel());
+        if (StringUtils.isNotNull(sysUser)) {
+            boolean updateStatus = false;
+            // 跟新用户手机号以及姓名
+            if (!sysUser.getPhonenumber().equals(fleetDriverMsg.getTel())) {
+                updateStatus = true;
+                sysUser.setPhonenumber(fleetDriverMsg.getTel());
+            }
+            if (!sysUser.getNickName().equals(fleetDriverMsg.getName())) {
+                updateStatus = true;
+                sysUser.setNickName(fleetDriverMsg.getName());
+            }
+            if (updateStatus) {
+                sysUser.setUpdateTime(new Date());
+                sysUser.setUpdateBy(SecurityUtils.getUsername());
+                userMapper.updateUser(sysUser);
+            }
+        }
+        // 更新司机表手机号以及姓名
+        ftmsorderbillscarsMapper.updateftmsorderbillscarsDriverNamePhone();
+    }
+
     /**
      * 修改【司机】
-     * 
+     *
      * @param fleetDriverMsg 【司机】
      * @return 结果
      */
     @Override
-    public int updateFleetDriverMsg(FleetDriverMsg fleetDriverMsg)
-    {
+    public int updateFleetDriverMsg(FleetDriverMsg fleetDriverMsg) {
         fleetDriverMsg.setUpdateTime(DateUtils.getNowDate());
         return fleetDriverMsgMapper.updateFleetDriverMsg(fleetDriverMsg);
     }
 
     /**
      * 批量删除【司机】
-     * 
+     *
      * @param ids 需要删除的【司机】ID
      * @return 结果
      */
     @Override
-    public int deleteFleetDriverMsgByIds(Long[] ids)
-    {
-        return fleetDriverMsgMapper.deleteFleetDriverMsgByIds(ids);
+    @Transactional
+    public AjaxResult deleteFleetDriverMsgByIds(Long[] ids) {
+        int line = 0;
+        for (Long id : ids) {
+            line++;
+            FleetDriverMsg fleetDriverMsg = fleetDriverMsgMapper.selectFleetDriverMsgById(id);
+            Ftmsorderbillscars ftmsorderbillscars = new Ftmsorderbillscars();
+            ftmsorderbillscars.setDriverTel(fleetDriverMsg.getTel());
+            ftmsorderbillscars.setDriverName(fleetDriverMsg.getName());
+            if (ftmsorderbillscarsMapper.selectftmsorderbillscarsCount(ftmsorderbillscars) > 0) {
+                return AjaxResult.error("第" + line + "行数据已被使用无法删除");
+            }
+            fleetDriverMsgMapper.deleteFleetDriverMsgById(id);
+        }
+        return AjaxResult.success();
     }
 
     /**
      * 删除【司机】信息
-     * 
+     *
      * @param id 【司机】ID
      * @return 结果
      */
     @Override
-    public int deleteFleetDriverMsgById(Long id)
-    {
+    @Transactional
+    public int deleteFleetDriverMsgById(Long id) {
         return fleetDriverMsgMapper.deleteFleetDriverMsgById(id);
     }
 
     /**
-     *  下拉框查询【司机】id、name列表
-     * @param fleetDriverMsg    条件
-     * @return  结果
+     * 下拉框查询【司机】id、name列表
+     *
+     * @param fleetDriverMsg 条件
+     * @return 结果
      */
     @Override
     public List<FleetDriverMsg> selectFleetDriverMsgIdNameList(FleetDriverMsg fleetDriverMsg) {
@@ -229,5 +266,4 @@ public class FleetDriverMsgServiceImpl implements IFleetDriverMsgService
     }
 
 
-
 }

+ 5 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbills.java

@@ -332,6 +332,11 @@ public class Ftmsorderbills extends BaseEntity {
     private String carregNo;
 
     /**
+     * 司机电话
+     */
+    private String driverTel;
+
+    /**
      * 查询下单时间区间
      */
     private List<String> planDate;

+ 144 - 288
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/domain/Ftmsorderbillscars.java

@@ -19,538 +19,394 @@ import com.ruoyi.common.core.domain.BaseEntity;
 public class Ftmsorderbillscars extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /**
-     * $column.columnComment
-     */
+    /** $column.columnComment */
     private Long id;
 
-    /**
-     * 主表id
-     */
+    /** 主表id */
     @Excel(name = "主表id")
     private Long pId;
 
-    /**
-     * 原始id
-     */
+    /** 原始id */
     @Excel(name = "原始id")
     private Long orgId;
 
-    /**
-     * 全局唯一流水YYMMNNNN
-     */
+    /** 全局唯一流水YYMMNNNN */
     @Excel(name = "全局唯一流水YYMMNNNN")
     private String orderNo;
 
-    /**
-     * 集装箱类型id,主表
-     */
+    /** 集装箱类型id,主表 */
     @Excel(name = "集装箱类型id,主表")
     private Long cntrId;
 
-    /**
-     * 集装箱号
-     */
+    /** 集装箱号 */
     @Excel(name = "集装箱号")
     private String cntrNo;
 
-    /**
-     * 车队id,自动生成
-     */
+    /** 车队id,自动生成 */
     @Excel(name = "车队id,自动生成")
     private Long carcorPid;
 
-    /**
-     * 车牌号
-     */
-    @Excel(name = "车牌号")
-    private String carregNo;
-
-    /**
-     * 提单号
-     */
+    /** 提单号 */
     @Excel(name = "提单号")
     private String mblno;
 
-    /**
-     * 司机id
-     */
-    @Excel(name = "司机id")
-    private String driverUserId;
+    /** 车牌号 */
+    @Excel(name = "车牌号")
+    private String carregNo;
 
-    /**
-     * 司机姓名
-     */
+    /** 司机姓名 */
     @Excel(name = "司机姓名")
     private String driverName;
 
-    /**
-     * 司机电话
-     */
+    /** 司机id */
+    @Excel(name = "司机id")
+    private Long driverUserId;
+
+    /** 司机电话 */
     @Excel(name = "司机电话")
     private String driverTel;
 
-    /**
-     * 派车提交时间
-     */
+    /** 派车提交时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "派车提交时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date planDate;
 
-    /**
-     * 派车提交备注
-     */
+    /** 派车提交备注 */
     @Excel(name = "派车提交备注")
     private String planRemarks;
 
-    /**
-     * 受理装车时间
-     */
+    /** 受理装车时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "受理装车时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date acceptDate;
 
-    /**
-     * 出发时间
-     */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "出发时间", width = 30, dateFormat = "yyyy-MM-dd")
-    private Date offData;
-
-    /**
-     * 出发备注
-     */
-    @Excel(name = "出发备注")
-    private String offRemarks;
-
-    /**
-     * 司机受理备注
-     */
+    /** 司机受理备注 */
     @Excel(name = "司机受理备注")
     private String acceptRemarks;
 
-    /**
-     * 实际装车时间
-     */
+    /** 实际装车时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "实际装车时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date loadDate;
 
-    /**
-     * 司机装车备注
-     */
+    /** 司机装车备注 */
     @Excel(name = "司机装车备注")
     private String loadRemarks;
 
-    /**
-     * 实际装卸货时间
-     */
+    /** 实际装卸货时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "实际装卸货时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date mdLoadDate;
 
-    /**
-     * 实际装卸货备注
-     */
+    /** 出发时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "出发时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date offData;
+
+    /** 出发备注 */
+    @Excel(name = "出发备注")
+    private String offRemarks;
+
+    /** 实际装卸货备注 */
     @Excel(name = "实际装卸货备注")
     private String mdLoadRemarks;
 
-    /**
-     * 实际卸车时间
-     */
+    /** 实际卸车时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "实际卸车时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date unLoadDate;
 
-    /**
-     * 实际卸车备注
-     */
+    /** 实际卸车备注 */
     @Excel(name = "实际卸车备注")
     private String unLoadRemarks;
 
-    /**
-     * 回单时间
-     */
+    /** 回单时间 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "回单时间", width = 30, dateFormat = "yyyy-MM-dd")
     private Date waybillDate;
 
-    /**
-     * 回单备注
-     */
-    @Excel(name = "回单备注")
-    private String waybillRemarks;
-
-    /**
-     * 本次车辆拉的箱量
-     */
-    @Excel(name = "本次车辆拉的箱量")
-    private Long cntrQty;
-
-    /**
-     * 本次车辆拉的重量
-     */
-    @Excel(name = "本次车辆拉的重量")
-    private BigDecimal cntrWeight;
-
-    /**
-     * 散货运输时装车数
-     */
+    /** 散货运输时装车数 */
     @Excel(name = "散货运输时装车数")
     private BigDecimal qtyLoad;
 
-    /**
-     * 散货运输时卸车数
-     */
+    /** 散货运输时卸车数 */
     @Excel(name = "散货运输时卸车数")
     private BigDecimal qtyUnLoad;
 
-    /**
-     * 散货运输时损耗数
-     */
+    /** 本次车辆拉的箱量 */
+    @Excel(name = "本次车辆拉的箱量")
+    private Long cntrQty;
+
+    /** 散货运输时损耗数 */
     @Excel(name = "散货运输时损耗数")
     private BigDecimal gopodsLossQty;
 
-    /**
-     * 散货运输时损耗率
-     */
+    /** 本次车辆拉的重量 */
+    @Excel(name = "本次车辆拉的重量")
+    private BigDecimal cntrWeight;
+
+    /** 散货运输时损耗率 */
     @Excel(name = "散货运输时损耗率")
     private BigDecimal gopodsLossrate;
 
-    /**
-     * 应收结算数,集装是1
-     */
-    @Excel(name = "应收结算数,集装是1")
-    private BigDecimal qtyDr;
+    /** 回单备注 */
+    @Excel(name = "回单备注")
+    private String waybillRemarks;
 
-    /**
-     * 散货运输时应付损耗金额
-     */
+    /** 散货运输时应付损耗金额 */
     @Excel(name = "散货运输时应付损耗金额")
     private BigDecimal gopodsLossamtCr;
 
-    /**
-     * 散货运输时应收损耗金额
-     */
+    /** 应收结算数,集装是1 */
+    @Excel(name = "应收结算数,集装是1")
+    private BigDecimal qtyDr;
+
+    /** 散货运输时应收损耗金额 */
     @Excel(name = "散货运输时应收损耗金额")
     private BigDecimal gopodsLossamtDr;
 
-    /**
-     * 应付结算数,集装是1
-     */
+    /** 应付结算数,集装是1 */
     @Excel(name = "应付结算数,集装是1")
     private BigDecimal qtyCr;
 
-    /**
-     * 应收运价
-     */
+    /** 应收运价 */
     @Excel(name = "应收运价")
     private BigDecimal freightPriceDr;
 
-    /**
-     * 应付运价
-     */
+    /** 应付运价 */
     @Excel(name = "应付运价")
     private BigDecimal freightPriceCr;
 
-    /**
-     * 应收运费=qtydr*pricedr
-     */
+    /** 应收运费=qtydr*pricedr */
     @Excel(name = "应收运费=qtydr*pricedr")
     private BigDecimal freightAmtDr;
 
-    /**
-     * 应付运价
-     */
+    /** 应付运价 */
     @Excel(name = "应付运价")
     private BigDecimal freightAmtCr;
 
-    /**
-     * trigger应收费用明细合计
-     */
+    /** trigger应收费用明细合计 */
     @Excel(name = "trigger应收费用明细合计")
     private BigDecimal feeitemDr;
 
-    /**
-     * 应收垫付备注
-     */
+    /** 应收垫付备注 */
     @Excel(name = "应收垫付备注")
     private String feeitemDrRemarks;
 
-    /**
-     * trigger应付费用明细合计
-     */
+    /** trigger应付费用明细合计 */
     @Excel(name = "trigger应付费用明细合计")
     private BigDecimal feeitemCr;
 
-    /**
-     * 应付垫付备注
-     */
+    /** 应付垫付备注 */
     @Excel(name = "应付垫付备注")
     private String feeitemCrRemarks;
 
-    /**
-     * 应收合计=运费 + 费用明细
-     */
+    /** 应收合计=运费 + 费用明细 */
     @Excel(name = "应收合计=运费 + 费用明细")
     private BigDecimal amtDr;
 
-    /**
-     * 应付合计=运费+费用明细
-     */
+    /** 应付合计=运费+费用明细 */
     @Excel(name = "应付合计=运费+费用明细")
     private BigDecimal amtCr;
 
-    /**
-     * 应收款账期
-     */
+    /** 应收款账期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "应收款账期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date dueDateDr;
 
-    /**
-     * 应付款账期
-     */
+    /** 应付款账期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "应付款账期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date dueDateCr;
 
-    /**
-     * 起始里程表数
-     */
+    /** 起始里程表数 */
     @Excel(name = "起始里程表数")
     private Long odometerFrom;
 
-    /**
-     * 结束里程表数
-     */
+    /** 结束里程表数 */
     @Excel(name = "结束里程表数")
     private Long odometerEnd;
 
-    /**
-     * 空车里程数
-     */
+    /** 空车里程数 */
     @Excel(name = "空车里程数")
     private Long milesEmpty;
 
-    /**
-     * 重车里程数
-     */
+    /** 重车里程数 */
     @Excel(name = "重车里程数")
     private Long milesLoad;
 
-    /**
-     * 总里程表数
-     */
+    /** 总里程表数 */
     @Excel(name = "总里程表数")
     private Long miles;
 
-    /**
-     * 车队成本司机提成
-     */
+    /** 车队成本司机提成 */
     @Excel(name = "车队成本司机提成")
     private BigDecimal driverbonus;
 
-    /**
-     * 车队成本路桥费
-     */
+    /** 车队成本路桥费 */
     @Excel(name = "车队成本路桥费")
     private BigDecimal costtoll;
 
-    /**
-     * 车队成本维修保养
-     */
+    /** 车队成本维修保养 */
     @Excel(name = "车队成本维修保养")
     private BigDecimal costmaintain;
 
-    /**
-     * 车队成本其他费用
-     */
+    /** 车队成本其他费用 */
     @Excel(name = "车队成本其他费用")
     private BigDecimal costOth;
 
-    /**
-     * 车队成本费用说明
-     */
+    /** 车队成本费用说明 */
     @Excel(name = "车队成本费用说明")
     private String costRemarks;
 
-    /**
-     * 标准百公里油耗
-     */
+    /** 标准百公里油耗 */
     @Excel(name = "标准百公里油耗")
     private BigDecimal oilQtyper;
 
-    /**
-     * 第一次加油量
-     */
+    /** 第一次加油量 */
     @Excel(name = "第一次加油量")
     private BigDecimal oilQty1;
 
-    /**
-     * 第一次加油单价
-     */
+    /** 第一次加油单价 */
     @Excel(name = "第一次加油单价")
     private BigDecimal oilPrice1;
 
-    /**
-     * 第一次加油金额
-     */
+    /** 第一次加油金额 */
     @Excel(name = "第一次加油金额")
     private BigDecimal oilAmt1;
 
-    /**
-     * 第一次加油量
-     */
+    /** 第一次加油量 */
     @Excel(name = "第一次加油量")
     private BigDecimal oilQty2;
 
-    /**
-     * 第一次加油单价
-     */
+    /** 第一次加油单价 */
     @Excel(name = "第一次加油单价")
     private BigDecimal oilPrice2;
 
-    /**
-     * 第二次加油金额
-     */
+    /** 第二次加油金额 */
     @Excel(name = "第二次加油金额")
     private BigDecimal oilAmt2;
 
-    /**
-     * 实际油耗量
-     */
+    /** 实际油耗量 */
     @Excel(name = "实际油耗量")
     private BigDecimal oilQty;
 
-    /**
-     * 实际油耗单价
-     */
+    /** 实际油耗单价 */
     @Excel(name = "实际油耗单价")
     private BigDecimal oilPrice;
 
-    /**
-     * 成本实际油耗金额
-     */
+    /** 成本实际油耗金额 */
     @Excel(name = "成本实际油耗金额")
     private BigDecimal oilAmt;
 
-    /**
-     * 节省油耗量
-     */
+    /** 节省油耗量 */
     @Excel(name = "节省油耗量")
     private BigDecimal oilQtyBlc;
 
-    /**
-     * 节省油耗金额
-     */
+    /** 节省油耗金额 */
     @Excel(name = "节省油耗金额")
     private BigDecimal oilAmtBlc;
 
-    /**
-     * 单趟利润=amtdr-amtcr
-     */
+    /** 单趟利润=amtdr-amtcr */
     @Excel(name = "单趟利润=amtdr-amtcr")
     private BigDecimal profit;
 
-    /**
-     * 是否需要给客户开发票(0不需要,1需要)
-     */
+    /** 是否需要给客户开发票(0不需要,1需要) */
     @Excel(name = "是否需要给客户开发票(0不需要,1需要)")
     private String invDrNeed;
 
-    /**
-     * f发票已开t未开
-     */
+    /** f发票已开t未开 */
     @Excel(name = "f发票已开t未开")
     private String invDrStatus;
 
-    /**
-     * 税率
-     */
+    /** 税率 */
     @Excel(name = "税率")
     private BigDecimal invDrTaxrate;
 
-    /**
-     * 税额
-     */
+    /** 税额 */
     @Excel(name = "税额")
     private BigDecimal invDrTaxamt;
 
-    /**
-     * 开票日期
-     */
+    /** 开票日期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date invDrDate;
 
-    /**
-     * 发票号
-     */
+    /** 发票号 */
     @Excel(name = "发票号")
     private String invDrNo;
 
-    /**
-     * 对账T已对账F未对账
-     */
+    /** 对账T已对账F未对账 */
     @Excel(name = "对账T已对账F未对账")
     private String accchkStaus;
 
-    /**
-     * 状态(1新建,2暂存,6提交)
-     */
-    @Excel(name = "状态(1新建,2暂存,3撤销,5变更,6提交)")
+    /** 状态(1新建,2暂存,6提交) */
+    @Excel(name = "状态(1新建,2暂存,6提交)")
     private Long billStatus;
 
-    /**
-     * 订单状态0新录入10车队安排20司机受理30提箱40装卸货50还卸柜子60费用确认70回单
-     */
-    @Excel(name = "订单状态0新录入10车队安排、15司机受理暂存、20司机受理、25提箱暂存、30提箱、35装卸货暂存、40装卸货、45还卸柜暂存、50还卸柜子、55回单确认暂存、" +
-            "60回单确认---65回单暂存、70回单、75暂存出行、80出行确认")
-//    @Excel(name = "订单状态0新录入10车队安排20司机受理30提箱40装卸货50还卸柜子60费用确认70回单")
+    /** 订单状态0新录入10车队安排20司机受理30提箱40装卸货50还卸柜子60费用确认70回单 */
+    @Excel(name = "订单状态0新录入10车队安排20司机受理30提箱40装卸货50还卸柜子60费用确认70回单")
     private Long orderStatus;
 
-    /**
-     * 对账日期
-     */
+    /** 对账日期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "对账日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date accchkDate;
 
-    /**
-     * 应收结算金额
-     */
+    /** 出口业务其他费用 */
+    @Excel(name = "出口业务其他费用")
+    private BigDecimal costomAmt01;
+
+    /** 应收结算金额 */
     @Excel(name = "应收结算金额")
     private BigDecimal stlAmtDr;
 
-    /**
-     * 结算日期
-     */
+    /** 进口业务其他费用 */
+    @Excel(name = "进口业务其他费用")
+    private BigDecimal costomAmt02;
+
+    /** 结算日期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "结算日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date stlDateDr;
 
-    /**
-     * 应付结算金额
-     */
+    /** 修理洗车费 */
+    @Excel(name = "修理洗车费")
+    private BigDecimal costomAmt03;
+
+    /** 应付结算金额 */
     @Excel(name = "应付结算金额")
     private BigDecimal stlAmtCr;
 
-    /**
-     * 结算日期
-     */
+    /** 吊装费用 */
+    @Excel(name = "吊装费用")
+    private BigDecimal costomAmt04;
+
+    /** 结算日期 */
     @JsonFormat(pattern = "yyyy-MM-dd")
     @Excel(name = "结算日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date stlDateCr;
 
-    /**
-     * 删除状态
-     */
+    /** 港杂费用 */
+    @Excel(name = "港杂费用")
+    private BigDecimal costomAmt05;
+
+    /** 提箱费用 */
+    @Excel(name = "提箱费用")
+    private BigDecimal costomAmt06;
+
+    /** 删除状态 */
     private String delFlag;
 
-    /**
-     * 备注
-     */
+    /** 进口费用备注 */
+    @Excel(name = "进口费用备注")
+    private String costomStr01;
+
+    /** 出口费用备注 */
+    @Excel(name = "出口费用备注")
+    private String costomStr02;
+
+    /** 备注 */
     @Excel(name = "备注")
     private String remarks;
 

+ 33 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/mapper/FtmsorderbillscarsMapper.java

@@ -1,8 +1,10 @@
 package com.ruoyi.orderPlan.mapper;
 
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.orderPlan.domain.Ftmsorderbills;
 import com.ruoyi.orderPlan.domain.Ftmsorderbillscars;
 import com.ruoyi.orderPlan.domain.Ftmsorderbillscntrs;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -133,4 +135,35 @@ public interface FtmsorderbillscarsMapper {
      * @return  结果
      */
     public Map<String, Object> selectMonthlyOrder(Ftmsorderbillscars ftmsorderbillscars);
+
+    /**
+     *  查询首页右上角数据
+     * @return  结果
+     */
+    public List<Map<String, Object>> selectHomeUpperRightMapList();
+
+    /**
+     *  查询首页左上角新增计划数
+     *  新增计划数(下了多少单的箱量)、未安排(未安排的箱量)
+     *  今日派车(今日安排了多少车) 派车详情直接跳转到接单界面
+     *  可派车辆(系统注册车辆-已安排车辆)
+     * @param currentDay    当前时间
+     * @return  结果
+     */
+    public Map<String, Object> selectHomeUpperLeftCntrs(@Param("currentDay") List<String> currentDay);
+
+    /**
+     *  查询左上角 进入派车数
+     *  今日派车(今日安排了多少车)
+     *  可派车辆(系统注册车辆-已安排车辆)
+     * @param currentDay    当前时间
+     * @return  结果
+     */
+    public int selectHomeUpperLeftCars(@Param("currentDay") List<String> currentDay);
+
+    /**
+     *  根据司机姓名、手机号更新
+     * @return  结果
+     */
+    public int updateftmsorderbillscarsDriverNamePhone();
 }

+ 8 - 2
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/IftmsorderbillsService.java

@@ -88,7 +88,7 @@ public interface IftmsorderbillsService {
      * @param ftmsorderbills    查询条件
      * @return  结果
      */
-    AjaxResult planStatusChange(Ftmsorderbills ftmsorderbills);
+    public AjaxResult planStatusChange(Ftmsorderbills ftmsorderbills);
 
     /**
      *  计划下达变更提交
@@ -100,5 +100,11 @@ public interface IftmsorderbillsService {
      * @param loginUser 用户
      * @return  结果
      */
-    AjaxResult insertPlanChange(String tmsorder, String scntrs, String attachs, String fees, String plans, LoginUser loginUser);
+    public AjaxResult insertPlanChange(String tmsorder, String scntrs, String attachs, String fees, String plans, LoginUser loginUser);
+
+    /**
+     *  查询首页数据
+     * @return  结果
+     */
+    public AjaxResult queryHomeInfo();
 }

+ 2 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/IftmsorderbillsplansService.java

@@ -143,4 +143,6 @@ public interface IftmsorderbillsplansService {
      * @return  结果
      */
     AjaxResult schedulingChanges(Long id, LoginUser loginUser);
+
+    void testt(String phone);
 }

+ 41 - 6
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsServiceImpl.java

@@ -5,9 +5,12 @@ import java.util.*;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.basicData.domain.FleetCarManage;
+import com.ruoyi.basicData.mapper.FleetCarManageMapper;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.orderPlan.domain.*;
 import com.ruoyi.orderPlan.mapper.*;
@@ -20,6 +23,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
+import javax.validation.constraints.Size;
+
 /**
  * 订单主Service业务层处理
  *
@@ -32,25 +37,55 @@ public class FtmsorderbillsServiceImpl implements IftmsorderbillsService {
     private FtmsorderbillsMapper ftmsorderbillsMapper;
 
     @Autowired
+    private FleetCarManageMapper fleetCarManageMapper;
+
+    @Autowired
     private ProjectBillsHistoryMapper billsHistoryMapper;
 
     @Autowired
-    private FtmsorderbillscntrsMapper ftmsorderbillscntrsMapper;
+    private BillnoSerialServiceImpl billnoSerialServiceImpl;
 
     @Autowired
-    private FtmsorderbillscarsMapper ftmsorderbillscarsMapper;
+    private FtmsorderbillsfeesMapper ftmsorderbillsfeesMapper;
 
     @Autowired
-    private FtmsorderbillsattachsMapper ftmsorderbillsattachsMapper;
+    private FtmsorderbillscarsMapper ftmsorderbillscarsMapper;
 
     @Autowired
-    private FtmsorderbillsfeesMapper ftmsorderbillsfeesMapper;
+    private FtmsorderbillsplansMapper ftmsorderbillsplansMapper;
 
     @Autowired
-    private BillnoSerialServiceImpl billnoSerialServiceImpl;
+    private FtmsorderbillscntrsMapper ftmsorderbillscntrsMapper;
 
     @Autowired
-    private FtmsorderbillsplansMapper ftmsorderbillsplansMapper;
+    private FtmsorderbillsattachsMapper ftmsorderbillsattachsMapper;
+
+    /**
+     *  查询首页数据
+     * @return  结果
+     */
+    @Override
+    public AjaxResult queryHomeInfo() {
+        Map<String, Object> map = new HashMap<>();
+        //  查询右上 所有已结单、未结单数据
+        map.put("upperRight", ftmsorderbillscarsMapper.selectHomeUpperRightMapList());
+        // 查询右下 提醒数据
+        map.put("lowerRight", null);
+        // 查询左上
+        List<String> currentDay = DateUtils.getCurrentDay();
+        map.put("upperLeftCntrs", ftmsorderbillscarsMapper.selectHomeUpperLeftCntrs(currentDay));
+        // 今日派车数量
+        int carQuantity = ftmsorderbillscarsMapper.selectHomeUpperLeftCars(currentDay);
+        map.put("upperLeftCarQuantity", carQuantity);
+        FleetCarManage fleetCarManage = new FleetCarManage();
+        fleetCarManage.setBillStatus(6L);
+        fleetCarManage.setDelFlag("0");
+        int carManageQuantity = fleetCarManageMapper.selectFleetCarManageCount(fleetCarManage);
+        map.put("upperLeftOldCarQuantity", carManageQuantity - carQuantity);
+        // 查询左下
+        map.put("lowerLeft", ftmsorderbillscarsMapper.selectHomeUpperRightMapList());
+        return AjaxResult.success(map);
+    }
 
     /**
      * 查询订单主

+ 8 - 11
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillscarsServiceImpl.java

@@ -14,6 +14,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.finance.mapper.TFeeDoMapper;
 import com.ruoyi.framework.web.service.WechatService;
@@ -29,6 +30,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.interceptor.TransactionAspectSupport;
 
+import javax.validation.constraints.Size;
+
 /**
  * 车队派车Service业务层处理
  *
@@ -125,6 +128,11 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
      */
     @Override
     public List<Map<String, Object>> selectftmsorderbillscarsMapList(Ftmsorderbills ftmsorderbills) {
+        String phonenumber = SecurityUtils.getLoginUser().getUser().getPhonenumber();
+        if (StringUtils.isEmpty(phonenumber)) {
+            return null;
+        }
+//        ftmsorderbills.setDriverTel(phonenumber);
         return ftmsorderbillscarsMapper.selectftmsorderbillscarsMapList(ftmsorderbills);
     }
 
@@ -233,10 +241,6 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
             // 提箱提交
             orderStatus = 1040L;
             tmsorderbillscars.setOrderStatus(25L);
-        } else if ("offData".equals(operationType)) {
-            // 出行提交
-            orderStatus = 1080L;
-            tmsorderbillscars.setOrderStatus(75L);
         } else if ("acceptDate".equals(operationType)) {
             // 接单提交
             orderStatus = 1030L;
@@ -345,13 +349,6 @@ public class FtmsorderbillscarsServiceImpl implements IftmsorderbillscarsService
                 return AjaxResult.error("未找到提箱时间");
             }
             tmsorderbillscars.setOrderStatus(30L);
-        } else if ("offData".equals(operationType)) {
-            // 出行提交
-            orderStatus = 1080L;
-            if (StringUtils.isNull(tmsorderbillscars.getLoadDate())) {
-                return AjaxResult.error("未找到出车时间");
-            }
-            tmsorderbillscars.setOrderStatus(80L);
         } else if ("acceptDate".equals(operationType)) {
             // 接单提交
             orderStatus = 1030L;

+ 28 - 0
ruoyi-fleet/src/main/java/com/ruoyi/orderPlan/service/impl/FtmsorderbillsplansServiceImpl.java

@@ -5,15 +5,19 @@ import java.util.*;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.basicData.domain.TCorps;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.domain.model.LoginUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.framework.web.service.WechatService;
 import com.ruoyi.orderPlan.domain.*;
 import com.ruoyi.orderPlan.mapper.*;
 import com.ruoyi.orderPlan.service.IftmsorderbillsplansService;
 import com.ruoyi.statusTracking.domain.Ftmsorderbillsfees;
 import com.ruoyi.statusTracking.mapper.FtmsorderbillsfeesMapper;
+import com.ruoyi.system.mapper.SysUserMapper;
 import com.ruoyi.warehouseBusiness.service.impl.BillnoSerialServiceImpl;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -55,6 +59,30 @@ public class FtmsorderbillsplansServiceImpl implements IftmsorderbillsplansServi
     @Autowired
     private FtmsorderbillsattachsMapper ftmsorderbillsattachsMapper;
 
+    @Autowired
+    private SysUserMapper sysUserMapper;
+
+    @Autowired
+    private WechatService wechatService;
+
+
+    @Override
+    public void testt(String phone) {
+        SysUser sysUser = sysUserMapper.selectUserByTel(phone);
+        /*if (StringUtils.isNotNull(sysUser)) {
+            System.out.println("成功!!!" + phone);
+            String openId = sysUser.getOpenId();
+            String nickName = sysUser.getNickName();
+            // 提单号
+            String mblno = "提单号";
+            String loadDate = DateUtils.getDate();
+            // 获得客户名
+            wechatService.newsPush(openId, nickName, mblno, 1000.99 + "", "尊敬的客户A", loadDate, "其他消息暂定", "备注暂定");
+        }*/
+        String loadDate = DateUtils.getDate();
+        wechatService.newsPush(phone, "阿伏兔", "TDH-001", 1000.99 + "", "尊敬的客户A", loadDate, "其他消息暂定", "备注暂定");
+    }
+
     /**
      * 查询订单调度列表
      *

+ 47 - 0
ruoyi-fleet/src/main/resources/mapper/basicData/FleetCarManageMapper.xml

@@ -94,6 +94,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="creatTime != null "> and creat_time = #{creatTime}</if>
             <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
             <if test="billStatus != null "> and bill_status = #{billStatus}</if>
+            <if test="delFlag != null "> and del_flag = #{delFlag}</if>
+            <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
+        </where>
+    </select>
+
+    <select id="selectFleetCarManageCount" parameterType="FleetCarManage" resultType="Integer">
+        select COUNT(id) from fleet_car_manage
+        <where>
+            <if test="fleetCompanyId != null "> and fleet_company_id = #{fleetCompanyId}</if>
+            <if test="carNum != null  and carNum != ''"> and car_num = #{carNum}</if>
+            <if test="driverId != null "> and driver_id = #{driverId}</if>
+            <if test="driverName != null  and driverName != ''"> and driver_name like concat('%', #{driverName}, '%')</if>
+            <if test="driverTel != null "> and driver_tel like concat('%', #{driverTel}, '%')</if>
+            <if test="hangNum != null  and hangNum != ''"> and hang_num = #{hangNum}</if>
+            <if test="fuelType != null  and fuelType != ''"> and fuel_type = #{fuelType}</if>
+            <if test="carType != null  and carType != ''"> and car_type = #{carType}</if>
+            <if test="carName != null  and carName != ''"> and car_name like concat('%', #{carName}, '%')</if>
+            <if test="carBrand != null  and carBrand != ''"> and car_brand = #{carBrand}</if>
+            <if test="manufactureUnit != null  and manufactureUnit != ''"> and manufacture_unit = #{manufactureUnit}</if>
+            <if test="officeOfCertificate != null  and officeOfCertificate != ''"> and office_of_certificate = #{officeOfCertificate}</if>
+            <if test="pullCarType != null  and pullCarType != ''"> and pull_car_type = #{pullCarType}</if>
+            <if test="pullCarShelfNum != null  and pullCarShelfNum != ''"> and pull_car_shelf_num = #{pullCarShelfNum}</if>
+            <if test="mountCarType != null  and mountCarType != ''"> and mount_car_type = #{mountCarType}</if>
+            <if test="mountCarNum != null  and mountCarNum != ''"> and mount_car_num = #{mountCarNum}</if>
+            <if test="engine != null  and engine != ''"> and engine = #{engine}</if>
+            <if test="carLoadPersion != null "> and car_load_persion = #{carLoadPersion}</if>
+            <if test="buyCarDate != null "> and buy_car_date = #{buyCarDate}</if>
+            <if test="regiestDate != null "> and regiest_date = #{regiestDate}</if>
+            <if test="abandonDate != null "> and abandon_date = #{abandonDate}</if>
+            <if test="outerSize != null "> and outer_size = #{outerSize}</if>
+            <if test="sumWeight != null "> and sum_weight = #{sumWeight}</if>
+            <if test="vouchWeight != null "> and vouch_weight = #{vouchWeight}</if>
+            <if test="equipWeight != null "> and equip_weight = #{equipWeight}</if>
+            <if test="drivingLicenseSrc != null  and drivingLicenseSrc != ''"> and driving_license_src = #{drivingLicenseSrc}</if>
+            <if test="drivingPendantSrc != null  and drivingPendantSrc != ''"> and driving_pendant_src = #{drivingPendantSrc}</if>
+            <if test="operationLicenseSrc != null  and operationLicenseSrc != ''"> and operation_license_src = #{operationLicenseSrc}</if>
+            <if test="technologySrc != null  and technologySrc != ''"> and technology_src = #{technologySrc}</if>
+            <if test="drivingLoadSrc != null  and drivingLoadSrc != ''"> and driving_load_src = #{drivingLoadSrc}</if>
+            <if test="secondLvMaintainSrc != null  and secondLvMaintainSrc != ''"> and second_lv_maintain_src = #{secondLvMaintainSrc}</if>
+            <if test="tafficConstranintInsuranceSrc != null  and tafficConstranintInsuranceSrc != ''"> and taffic_constranint_insurance_src = #{tafficConstranintInsuranceSrc}</if>
+            <if test="businessInsuranceSrc != null  and businessInsuranceSrc != ''"> and business_insurance_src = #{businessInsuranceSrc}</if>
+            <if test="accpetCarrageInsuranceSrc != null  and accpetCarrageInsuranceSrc != ''"> and accpet_carrage_insurance_src = #{accpetCarrageInsuranceSrc}</if>
+            <if test="creatTime != null "> and creat_time = #{creatTime}</if>
+            <if test="modificationTime != null "> and modification_time = #{modificationTime}</if>
+            <if test="billStatus != null "> and bill_status = #{billStatus}</if>
+            <if test="delFlag != null "> and del_flag = #{delFlag}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
         </where>
     </select>
@@ -298,6 +344,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </delete>
+
     <select id="selectFleetCarManageListMap" parameterType="FleetCarManage" resultType="Map">
         SELECT
             car.id AS Id,

+ 162 - 51
ruoyi-fleet/src/main/resources/mapper/orderPlan/ftmsorderbillscarsMapper.xml

@@ -21,22 +21,22 @@
         <result property="planRemarks" column="plan_remarks"/>
         <result property="acceptDate" column="accept_date"/>
         <result property="acceptRemarks" column="accept_remarks"/>
-        <result property="offData" column="off_data"/>
-        <result property="offRemarks" column="off_remarks"/>
         <result property="loadDate" column="load_date"/>
         <result property="loadRemarks" column="load_remarks"/>
         <result property="mdLoadDate" column="md_load_date"/>
+        <result property="offData" column="off_data"/>
+        <result property="offRemarks" column="off_remarks"/>
         <result property="mdLoadRemarks" column="md_load_remarks"/>
         <result property="unLoadDate" column="un_load_date"/>
         <result property="unLoadRemarks" column="un_load_remarks"/>
         <result property="waybillDate" column="waybill_date"/>
-        <result property="waybillRemarks" column="waybill_remarks"/>
         <result property="qtyLoad" column="qty_load"/>
-        <result property="cntrQty" column="cntr_qty"/>
         <result property="qtyUnLoad" column="qty_un_load"/>
-        <result property="cntrWeight" column="cntr_weight"/>
+        <result property="cntrQty" column="cntr_qty"/>
         <result property="gopodsLossQty" column="gopods_loss_qty"/>
+        <result property="cntrWeight" column="cntr_weight"/>
         <result property="gopodsLossrate" column="gopods_lossrate"/>
+        <result property="waybillRemarks" column="waybill_remarks"/>
         <result property="gopodsLossamtCr" column="gopods_lossamt_cr"/>
         <result property="qtyDr" column="qty_dr"/>
         <result property="gopodsLossamtDr" column="gopods_lossamt_dr"/>
@@ -86,20 +86,28 @@
         <result property="billStatus" column="bill_status"/>
         <result property="orderStatus" column="order_status"/>
         <result property="accchkDate" column="accchk_date"/>
+        <result property="costomAmt01" column="costom_amt_01"/>
         <result property="stlAmtDr" column="stl_amt_dr"/>
+        <result property="costomAmt02" column="costom_amt_02"/>
         <result property="stlDateDr" column="stl_date_dr"/>
+        <result property="costomAmt03" column="costom_amt_03"/>
         <result property="stlAmtCr" column="stl_amt_cr"/>
+        <result property="costomAmt04" column="costom_amt_04"/>
         <result property="stlDateCr" column="stl_date_cr"/>
+        <result property="costomAmt05" column="costom_amt_05"/>
+        <result property="costomAmt06" column="costom_amt_06"/>
         <result property="delFlag" column="del_flag"/>
+        <result property="costomStr01" column="costom_str_01"/>
         <result property="createBy" column="create_by"/>
         <result property="createTime" column="create_time"/>
+        <result property="costomStr02" column="costom_str_02"/>
         <result property="updateBy" column="update_by"/>
         <result property="updateTime" column="update_time"/>
         <result property="remarks" column="remarks"/>
     </resultMap>
 
     <sql id="selectftmsorderbillscarsVo">
-        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
+        select id, p_id, org_id, order_no, cntr_id, cntr_no, carcor_pid, mblno, carreg_no, driver_name, driver_user_id, driver_tel, plan_date, plan_remarks, accept_date, accept_remarks, load_date, load_remarks, md_load_date, off_data, off_remarks, md_load_remarks, un_load_date, un_load_remarks, waybill_date, qty_load, qty_un_load, cntr_qty, gopods_loss_qty, cntr_weight, gopods_lossrate, waybill_remarks, 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, costom_amt_01, stl_amt_dr, costom_amt_02, stl_date_dr, costom_amt_03, stl_amt_cr, costom_amt_04, stl_date_cr, costom_amt_05, costom_amt_06, del_flag, costom_str_01, create_by, create_time, costom_str_02, update_by, update_time, remarks from F_TMSORDERBILLSCARS
     </sql>
 
     <select id="selectftmsorderbillscarsList" parameterType="ftmsorderbillscars" resultMap="ftmsorderbillscarsResult">
@@ -113,29 +121,29 @@
             <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="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
             <if test="driverTel != null  and driverTel != ''"> and driver_tel = #{driverTel}</if>
             <if test="planDate != null "> and plan_date = #{planDate}</if>
             <if test="planRemarks != null  and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
             <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
             <if test="acceptRemarks != null  and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
-            <if test="offData != null "> and off_data = #{offData}</if>
-            <if test="offRemarks != null  and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
             <if test="loadDate != null "> and load_date = #{loadDate}</if>
             <if test="loadRemarks != null  and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
             <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
+            <if test="offData != null "> and off_data = #{offData}</if>
+            <if test="offRemarks != null  and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
             <if test="mdLoadRemarks != null  and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
             <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
             <if test="unLoadRemarks != null  and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
             <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
-            <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
             <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
-            <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
             <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
-            <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
+            <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
             <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
+            <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
             <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
+            <if test="waybillRemarks != null  and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</if>
             <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
             <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
             <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
@@ -185,10 +193,18 @@
             <if test="billStatus != null "> and bill_status = #{billStatus}</if>
             <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
             <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
+            <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
             <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
+            <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
             <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
+            <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
             <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
+            <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
             <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
+            <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
+            <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
+            <if test="costomStr01 != null  and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
+            <if test="costomStr02 != null  and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
         </where>
     </select>
@@ -204,29 +220,29 @@
             <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="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
             <if test="driverTel != null  and driverTel != ''"> and driver_tel = #{driverTel}</if>
             <if test="planDate != null "> and plan_date = #{planDate}</if>
             <if test="planRemarks != null  and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
             <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
             <if test="acceptRemarks != null  and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
-            <if test="offData != null "> and off_data = #{offData}</if>
-            <if test="offRemarks != null  and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
             <if test="loadDate != null "> and load_date = #{loadDate}</if>
             <if test="loadRemarks != null  and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
             <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
+            <if test="offData != null "> and off_data = #{offData}</if>
+            <if test="offRemarks != null  and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
             <if test="mdLoadRemarks != null  and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
             <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
             <if test="unLoadRemarks != null  and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
             <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
-            <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
             <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
-            <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
             <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
-            <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
+            <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
             <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
+            <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
             <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
+            <if test="waybillRemarks != null  and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</if>
             <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
             <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
             <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
@@ -276,10 +292,18 @@
             <if test="billStatus != null "> and bill_status = #{billStatus}</if>
             <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
             <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
+            <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
             <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
+            <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
             <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
+            <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
             <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
+            <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
             <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
+            <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
+            <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
+            <if test="costomStr01 != null  and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
+            <if test="costomStr02 != null  and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
         </where>
     </select>
@@ -295,29 +319,31 @@
             <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="driverUserId != null "> and driver_user_id = #{driverUserId}</if>
             <if test="driverTel != null  and driverTel != ''"> and driver_tel = #{driverTel}</if>
             <if test="planDate != null "> and plan_date = #{planDate}</if>
             <if test="planRemarks != null  and planRemarks != ''"> and plan_remarks = #{planRemarks}</if>
             <if test="acceptDate != null "> and accept_date = #{acceptDate}</if>
             <if test="acceptRemarks != null  and acceptRemarks != ''"> and accept_remarks = #{acceptRemarks}</if>
-            <if test="offData != null "> and off_data = #{offData}</if>
-            <if test="offRemarks != null  and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
             <if test="loadDate != null "> and load_date = #{loadDate}</if>
             <if test="loadRemarks != null  and loadRemarks != ''"> and load_remarks = #{loadRemarks}</if>
             <if test="mdLoadDate != null "> and md_load_date = #{mdLoadDate}</if>
+            <if test="offData != null "> and off_data = #{offData}</if>
+            <if test="offRemarks != null  and offRemarks != ''"> and off_remarks = #{offRemarks}</if>
             <if test="mdLoadRemarks != null  and mdLoadRemarks != ''"> and md_load_remarks = #{mdLoadRemarks}</if>
             <if test="unLoadDate != null "> and un_load_date = #{unLoadDate}</if>
             <if test="unLoadRemarks != null  and unLoadRemarks != ''"> and un_load_remarks = #{unLoadRemarks}</if>
             <if test="waybillDate != null "> and waybill_date = #{waybillDate}</if>
-            <if test="waybillRemarks != null "> and waybill_remarks = #{waybillRemarks}</if>
             <if test="qtyLoad != null "> and qty_load = #{qtyLoad}</if>
             <if test="qtyUnLoad != null "> and qty_un_load = #{qtyUnLoad}</if>
+            <if test="cntrQty != null "> and cntr_qty = #{cntrQty}</if>
             <if test="gopodsLossQty != null "> and gopods_loss_qty = #{gopodsLossQty}</if>
+            <if test="cntrWeight != null "> and cntr_weight = #{cntrWeight}</if>
             <if test="gopodsLossrate != null "> and gopods_lossrate = #{gopodsLossrate}</if>
-            <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
+            <if test="waybillRemarks != null  and waybillRemarks != ''"> and waybill_remarks = #{waybillRemarks}</if>
             <if test="gopodsLossamtCr != null "> and gopods_lossamt_cr = #{gopodsLossamtCr}</if>
+            <if test="qtyDr != null "> and qty_dr = #{qtyDr}</if>
             <if test="gopodsLossamtDr != null "> and gopods_lossamt_dr = #{gopodsLossamtDr}</if>
             <if test="qtyCr != null "> and qty_cr = #{qtyCr}</if>
             <if test="freightPriceDr != null "> and freight_price_dr = #{freightPriceDr}</if>
@@ -365,10 +391,18 @@
             <if test="billStatus != null "> and bill_status = #{billStatus}</if>
             <if test="orderStatus != null "> and order_status = #{orderStatus}</if>
             <if test="accchkDate != null "> and accchk_date = #{accchkDate}</if>
+            <if test="costomAmt01 != null "> and costom_amt_01 = #{costomAmt01}</if>
             <if test="stlAmtDr != null "> and stl_amt_dr = #{stlAmtDr}</if>
+            <if test="costomAmt02 != null "> and costom_amt_02 = #{costomAmt02}</if>
             <if test="stlDateDr != null "> and stl_date_dr = #{stlDateDr}</if>
+            <if test="costomAmt03 != null "> and costom_amt_03 = #{costomAmt03}</if>
             <if test="stlAmtCr != null "> and stl_amt_cr = #{stlAmtCr}</if>
+            <if test="costomAmt04 != null "> and costom_amt_04 = #{costomAmt04}</if>
             <if test="stlDateCr != null "> and stl_date_cr = #{stlDateCr}</if>
+            <if test="costomAmt05 != null "> and costom_amt_05 = #{costomAmt05}</if>
+            <if test="costomAmt06 != null "> and costom_amt_06 = #{costomAmt06}</if>
+            <if test="costomStr01 != null  and costomStr01 != ''"> and costom_str_01 = #{costomStr01}</if>
+            <if test="costomStr02 != null  and costomStr02 != ''"> and costom_str_02 = #{costomStr02}</if>
             <if test="remarks != null  and remarks != ''"> and remarks = #{remarks}</if>
         </where>
     </select>
@@ -380,6 +414,7 @@
             c.mblno,
             c.load_date loadDate,
             c.carreg_no carregNo,
+            driver.name,
             c.order_status orderStatus,
             p.f_name corpId,
             CASE
@@ -453,13 +488,15 @@
             AND pod.dict_type = 'port_end'
             LEFT JOIN sys_dict_data dic ON dic.dict_value = c.cntr_id
             AND dic.dict_type = 'data_cntrId'
+            LEFT JOIN fleet_driver_msg driver ON driver.id = c.driver_user_id
         <where>
-            <if test="corpId != null"> and t.corp_id = #{corpId}</if>
-            <if test="billType != null"> and t.bill_type = #{billType}</if>
-            <if test="transType != null"> and t.trans_type = #{transType}</if>
-            <if test="transProp != null"> and t.trans_prop = #{transProp}</if>
-            <if test="goodsId != null"> and t.goods_id = #{goodsId}</if>
-            <if test="orderStatus != null"> and c.order_status = #{orderStatus}</if>
+            <if test="corpId != null">and t.corp_id = #{corpId}</if>
+            <if test="billType != null">and t.bill_type = #{billType}</if>
+            <if test="transType != null">and t.trans_type = #{transType}</if>
+            <if test="transProp != null">and t.trans_prop = #{transProp}</if>
+            <if test="goodsId != null">and t.goods_id = #{goodsId}</if>
+            <if test="driverTel != null">and c.driver_tel = #{driverTel}</if>
+            <if test="orderStatus != null">and c.order_status = #{orderStatus}</if>
             <if test='planDate != null and planDate[0] != null and planDate[0]!= ""'>
                 and c.plan_date &gt;= #{planDate[0]}
             </if>
@@ -472,13 +509,13 @@
             <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
                 and c.load_date &lt;= #{cLoadDate[1]}
             </if>
-            <if test="mblno != null  and mblno != ''"> and t.mblno like concat('%', #{mblno}, '%')</if>
-            <if test="carregNo != null  and carregNo != ''"> and c.carreg_no like concat('%', #{carregNo}, '%')</if>
-            <if test="loadAddr != null  and loadAddr != ''"> and t.load_addr like concat('%', #{loadAddr}, '%')</if>
-            <if test="unLoadAddr != null  and unLoadAddr != ''"> and t.un_load_addr like concat('%', #{unLoadAddr}, '%')</if>
-            <if test="mdLoadAddr != null  and mdLoadAddr != ''"> and t.md_load_addr like concat('%', #{mdLoadAddr}, '%')</if>
+            <if test="mblno != null  and mblno != ''">and t.mblno like concat('%', #{mblno}, '%')</if>
+            <if test="carregNo != null  and carregNo != ''">and c.carreg_no like concat('%', #{carregNo}, '%')</if>
+            <if test="loadAddr != null  and loadAddr != ''">and t.load_addr like concat('%', #{loadAddr}, '%')</if>
+            <if test="unLoadAddr != null  and unLoadAddr != ''">and t.un_load_addr like concat('%', #{unLoadAddr},'%')</if>
+            <if test="mdLoadAddr != null  and mdLoadAddr != ''">and t.md_load_addr like concat('%', #{mdLoadAddr},'%')</if>
         </where>
-            ORDER BY c.id desc
+        ORDER BY c.id desc
     </select>
 
     <select id="selectftmsorderbillscarsById" parameterType="Long" resultMap="ftmsorderbillscarsResult">
@@ -509,7 +546,7 @@
             t.corp_id AS fCorpId,
             corp.f_name AS fCorpIds,
             u.nick_name AS planUserId,
-            driver.nick_name AS driverUserId,
+            driver.nick_name AS driverUserIds,
             t.un_load_date AS tUnLoadDate,
             t.un_load_addr AS unLoadAddr,
             t.un_load_attn AS unLoadAttn,
@@ -547,6 +584,14 @@
             c.odometer_end AS odometerEnd,
             c.accept_date AS acceptDate,
             c.accept_remarks AS acceptRemarks,
+            c.costom_amt_01 AS costomAmt01,
+            c.costom_amt_02 AS costomAmt02,
+            c.costom_amt_03 AS costomAmt03,
+            c.costom_amt_04 AS costomAmt04,
+            c.costom_amt_05 AS costomAmt05,
+            c.costom_amt_06 AS costomAmt06,
+            c.costom_str_01 AS costomStr01,
+            c.costom_str_02 AS costomStr02,
             c.load_date AS loadDate,
             c.load_remarks AS loadRemarks,
             c.md_load_date AS mdLoadDate,
@@ -580,6 +625,39 @@
         </where>
     </select>
 
+    <select id="selectHomeUpperRightMapList" resultType="Map">
+        SELECT
+            car.id,
+            car.mblno,
+            car.carreg_no carregNo,
+            car.order_status orderStatus,
+            t.f_name corpName
+        FROM
+            F_TMSORDERBILLSCARS car
+            LEFT JOIN F_TMSORDERBILLS bill ON bill.id = car.org_id
+            LEFT JOIN t_corps t ON t.f_id = bill.corp_id
+    </select>
+
+    <select id="selectHomeUpperLeftCntrs" parameterType="list" resultType="Map">
+        SELECT
+            IFNULL(SUM( cntr_qty ), 0)  planQuantity, IFNULL(SUM( cntr_blc_qty ), 0) surplusQuantity
+        FROM
+            F_TMSORDERBILLSCNTRS
+        where
+            create_time &gt;= #{currentDay[0]}
+            and create_time &lt;= #{currentDay[1]}
+    </select>
+
+    <select id="selectHomeUpperLeftCars" parameterType="list" resultType="int">
+        SELECT
+            COUNT( id )
+        FROM
+            F_TMSORDERBILLSCARS
+        where
+            create_time &gt;= #{currentDay[0]}
+            and create_time &lt;= #{currentDay[1]}
+    </select>
+
     <insert id="insertftmsorderbillscars" parameterType="ftmsorderbillscars" useGeneratedKeys="true" keyProperty="id">
         insert into F_TMSORDERBILLSCARS
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -589,8 +667,8 @@
             <if test="cntrId != null">cntr_id,</if>
             <if test="cntrNo != null">cntr_no,</if>
             <if test="carcorPid != null">carcor_pid,</if>
-            <if test="carregNo != null">carreg_no,</if>
             <if test="mblno != null">mblno,</if>
+            <if test="carregNo != null">carreg_no,</if>
             <if test="driverName != null">driver_name,</if>
             <if test="driverUserId != null">driver_user_id,</if>
             <if test="driverTel != null">driver_tel,</if>
@@ -600,10 +678,10 @@
             <if test="acceptRemarks != null">accept_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="offData != null">off_data,</if>
             <if test="offRemarks != null">off_remarks,</if>
+            <if test="mdLoadRemarks != null">md_load_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>
@@ -613,11 +691,11 @@
             <if test="gopodsLossQty != null">gopods_loss_qty,</if>
             <if test="cntrWeight != null">cntr_weight,</if>
             <if test="gopodsLossrate != null">gopods_lossrate,</if>
+            <if test="waybillRemarks != null">waybill_remarks,</if>
             <if test="gopodsLossamtCr != null">gopods_lossamt_cr,</if>
             <if test="qtyDr != null">qty_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="qtyCr != null">qty_cr,</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>
@@ -663,13 +741,21 @@
             <if test="billStatus != null">bill_status,</if>
             <if test="orderStatus != null">order_status,</if>
             <if test="accchkDate != null">accchk_date,</if>
+            <if test="costomAmt01 != null">costom_amt_01,</if>
             <if test="stlAmtDr != null">stl_amt_dr,</if>
+            <if test="costomAmt02 != null">costom_amt_02,</if>
             <if test="stlDateDr != null">stl_date_dr,</if>
+            <if test="costomAmt03 != null">costom_amt_03,</if>
             <if test="stlAmtCr != null">stl_amt_cr,</if>
+            <if test="costomAmt04 != null">costom_amt_04,</if>
             <if test="stlDateCr != null">stl_date_cr,</if>
+            <if test="costomAmt05 != null">costom_amt_05,</if>
+            <if test="costomAmt06 != null">costom_amt_06,</if>
             <if test="delFlag != null">del_flag,</if>
+            <if test="costomStr01 != null">costom_str_01,</if>
             <if test="createBy != null">create_by,</if>
             <if test="createTime != null">create_time,</if>
+            <if test="costomStr02 != null">costom_str_02,</if>
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remarks != null">remarks,</if>
@@ -681,8 +767,8 @@
             <if test="cntrId != null">#{cntrId},</if>
             <if test="cntrNo != null">#{cntrNo},</if>
             <if test="carcorPid != null">#{carcorPid},</if>
-            <if test="carregNo != null">#{carregNo},</if>
             <if test="mblno != null">#{mblno},</if>
+            <if test="carregNo != null">#{carregNo},</if>
             <if test="driverName != null">#{driverName},</if>
             <if test="driverUserId != null">#{driverUserId},</if>
             <if test="driverTel != null">#{driverTel},</if>
@@ -692,10 +778,10 @@
             <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="offData != null">#{offData},</if>
             <if test="offRemarks != null">#{offRemarks},</if>
+            <if test="mdLoadRemarks != null">#{mdLoadRemarks},</if>
             <if test="unLoadDate != null">#{unLoadDate},</if>
             <if test="unLoadRemarks != null">#{unLoadRemarks},</if>
             <if test="waybillDate != null">#{waybillDate},</if>
@@ -705,11 +791,11 @@
             <if test="gopodsLossQty != null">#{gopodsLossQty},</if>
             <if test="cntrWeight != null">#{cntrWeight},</if>
             <if test="gopodsLossrate != null">#{gopodsLossrate},</if>
+            <if test="waybillRemarks != null">#{waybillRemarks},</if>
             <if test="gopodsLossamtCr != null">#{gopodsLossamtCr},</if>
             <if test="qtyDr != null">#{qtyDr},</if>
-            <if test="waybillRemarks != null">#{waybillRemarks},</if>
-            <if test="qtyCr != null">#{qtyCr},</if>
             <if test="gopodsLossamtDr != null">#{gopodsLossamtDr},</if>
+            <if test="qtyCr != null">#{qtyCr},</if>
             <if test="freightPriceDr != null">#{freightPriceDr},</if>
             <if test="freightPriceCr != null">#{freightPriceCr},</if>
             <if test="freightAmtDr != null">#{freightAmtDr},</if>
@@ -755,13 +841,21 @@
             <if test="billStatus != null">#{billStatus},</if>
             <if test="orderStatus != null">#{orderStatus},</if>
             <if test="accchkDate != null">#{accchkDate},</if>
+            <if test="costomAmt01 != null">#{costomAmt01},</if>
             <if test="stlAmtDr != null">#{stlAmtDr},</if>
+            <if test="costomAmt02 != null">#{costomAmt02},</if>
             <if test="stlDateDr != null">#{stlDateDr},</if>
+            <if test="costomAmt03 != null">#{costomAmt03},</if>
             <if test="stlAmtCr != null">#{stlAmtCr},</if>
+            <if test="costomAmt04 != null">#{costomAmt04},</if>
             <if test="stlDateCr != null">#{stlDateCr},</if>
+            <if test="costomAmt05 != null">#{costomAmt05},</if>
+            <if test="costomAmt06 != null">#{costomAmt06},</if>
             <if test="delFlag != null">#{delFlag},</if>
+            <if test="costomStr01 != null">#{costomStr01},</if>
             <if test="createBy != null">#{createBy},</if>
             <if test="createTime != null">#{createTime},</if>
+            <if test="costomStr02 != null">#{costomStr02},</if>
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remarks != null">#{remarks},</if>
@@ -777,8 +871,8 @@
             <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="carregNo != null">carreg_no = #{carregNo},</if>
             <if test="mblno != null">mblno = #{mblno},</if>
+            <if test="carregNo != null">carreg_no = #{carregNo},</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>
@@ -788,10 +882,10 @@
             <if test="acceptRemarks != null">accept_remarks = #{acceptRemarks},</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="offData != null">off_data = #{offData},</if>
             <if test="offRemarks != null">off_remarks = #{offRemarks},</if>
+            <if test="mdLoadRemarks != null">md_load_remarks = #{mdLoadRemarks},</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>
@@ -801,11 +895,11 @@
             <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="waybillRemarks != null">waybill_remarks = #{waybillRemarks},</if>
             <if test="gopodsLossamtCr != null">gopods_lossamt_cr = #{gopodsLossamtCr},</if>
             <if test="qtyDr != null">qty_dr = #{qtyDr},</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="qtyCr != null">qty_cr = #{qtyCr},</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>
@@ -851,13 +945,21 @@
             <if test="billStatus != null">bill_status = #{billStatus},</if>
             <if test="orderStatus != null">order_status = #{orderStatus},</if>
             <if test="accchkDate != null">accchk_date = #{accchkDate},</if>
+            <if test="costomAmt01 != null">costom_amt_01 = #{costomAmt01},</if>
             <if test="stlAmtDr != null">stl_amt_dr = #{stlAmtDr},</if>
+            <if test="costomAmt02 != null">costom_amt_02 = #{costomAmt02},</if>
             <if test="stlDateDr != null">stl_date_dr = #{stlDateDr},</if>
+            <if test="costomAmt03 != null">costom_amt_03 = #{costomAmt03},</if>
             <if test="stlAmtCr != null">stl_amt_cr = #{stlAmtCr},</if>
+            <if test="costomAmt04 != null">costom_amt_04 = #{costomAmt04},</if>
             <if test="stlDateCr != null">stl_date_cr = #{stlDateCr},</if>
+            <if test="costomAmt05 != null">costom_amt_05 = #{costomAmt05},</if>
+            <if test="costomAmt06 != null">costom_amt_06 = #{costomAmt06},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
+            <if test="costomStr01 != null">costom_str_01 = #{costomStr01},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="costomStr02 != null">costom_str_02 = #{costomStr02},</if>
             <if test="updateBy != null">update_by = #{updateBy},</if>
             <if test="updateTime != null">update_time = #{updateTime},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
@@ -871,6 +973,15 @@
         where org_id = #{orgId}
     </update>
 
+    <update id="updateftmsorderbillscarsDriverNamePhone">
+        UPDATE F_TMSORDERBILLSCARS car
+        LEFT JOIN sys_user u ON u.user_id = car.driver_user_id
+        SET car.driver_name = u.nick_name,
+        car.driver_tel = u.phonenumber
+        WHERE
+            car.driver_user_id IS NOT NULL
+    </update>
+
     <delete id="deleteftmsorderbillscarsById" parameterType="Long">
         delete from F_TMSORDERBILLSCARS where id = #{id}
     </delete>

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

@@ -61,11 +61,13 @@
     <select id="selectftmsorderbillsplansMapList" parameterType="ftmsorderbills" resultType="Map">
         SELECT
             plan.id,
+            plan.carnolist,
             f.bill_no AS billNo,
             f.act_id AS actId,
             c.f_name AS corpId,
             p.nick_name AS planUserId,
             a.nick_name AS transUserId,
+            sysCntr.dict_label AS cntrName,
             type.dict_label AS billType,
             trans.dict_label AS transType,
             prop.dict_label AS transProp,
@@ -85,13 +87,15 @@
             f.qty_dis_patch AS qtyDisPatch,
             f.weight_plan AS weightPlan,
             f.cntr_desc AS cntrDesc,
-            f.car_no_list AS carNoList,
             f.bill_status AS billStatus,
             u.nick_name AS createBy,
             f.create_time AS createTime
             FROM
             F_TMSORDERBILLSPLANS plan
             LEFT JOIN F_TMSORDERBILLS f ON f.id = plan.org_id
+            LEFT JOIN F_TMSORDERBILLSCNTRS cntr ON cntr.id = plan.p_id
+            LEFT JOIN sys_dict_data sysCntr ON sysCntr.dict_type = 'data_cntrId'
+            AND sysCntr.dict_value = plan.cntr_id
             LEFT JOIN sys_dict_data type ON type.dict_type = 'data_billType'
             AND type.dict_value = f.bill_type
             LEFT JOIN sys_dict_data trans ON trans.dict_type = 'data_transType'

+ 4 - 4
ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java

@@ -53,14 +53,14 @@ public class SysLoginService {
         String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
         String captcha = redisCache.getCacheObject(verifyKey);
         redisCache.deleteObject(verifyKey);
-        if (captcha == null) {
+        /*if (captcha == null) {
             AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
             throw new CaptchaExpireException();
         }
         if (!code.equalsIgnoreCase(captcha)) {
             AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
             throw new CaptchaException();
-        }
+        }*/
         // 用户验证
         Authentication authentication = null;
         try {
@@ -81,11 +81,11 @@ public class SysLoginService {
             LoginUser user = redisCache.getCacheObject(key);
             if (StringUtils.isNotEmpty(username) && StringUtils.isNotNull(user.getUser()))
             {
-                if (StringUtils.equals(username, user.getUsername()))
+                /*if (StringUtils.equals(username, user.getUsername()))
                 {
                     // 若发现有其他用户登录,顶替掉其他用户
                     redisCache.deleteObject(Constants.LOGIN_TOKEN_KEY + user.getToken());
-                }
+                }*/
             }
         }
         AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTableSet.java

@@ -53,6 +53,9 @@ private static final long serialVersionUID=1L;
     /**宽度*/
     @Excel(name = "宽度")
     private Long width;
+    /**是否固定列*/
+    @Excel(name = "是否固定列")
+    private String fixed;
 
     @TableField(exist = false)
     private Map<String, Object> params = new HashMap<>();

+ 7 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java

@@ -136,4 +136,11 @@ public interface SysUserMapper {
      * @return  结果
      */
     SysUser selectUserByTel(String phonenumber);
+
+    /**
+     *  更新派车数据对应的
+     * @param userId    用户id
+     * @return  结果
+     */
+    public int updateCarsDriverNamePhone(Long userId);
 }

+ 1 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java

@@ -243,6 +243,7 @@ public class SysUserServiceImpl implements ISysUserService {
         userPostMapper.deleteUserPostByUserId(userId);
         // 新增用户与岗位管理
         insertUserPost(user);
+        userMapper.updateCarsDriverNamePhone(userId);
         return userMapper.updateUser(user);
     }
 

+ 6 - 1
ruoyi-system/src/main/resources/mapper/system/SysTableSetMapper.xml

@@ -13,10 +13,11 @@
         <result property="name" column="name"/>
         <result property="checked" column="checked"/>
         <result property="width" column="width"/>
+        <result property="fixed" column="fixed"/>
     </resultMap>
 
     <sql id="selectSysTableSetVo">
-        select id, table_name, user_id, surface, label, name, checked, width from sys_table_set
+        select id, table_name, user_id, surface, label, fixed, name, checked, width from sys_table_set
     </sql>
 
     <select id="selectSysTableSetList" parameterType="SysTableSet" resultMap="SysTableSetResult">
@@ -29,6 +30,7 @@
             <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
             <if test="checked != null ">and checked = #{checked}</if>
             <if test="width != null ">and width = #{width}</if>
+            <if test="fixed != null ">and fixed = #{fixed}</if>
         </where>
     </select>
 
@@ -60,6 +62,7 @@
             <if test="name != null">name,</if>
             <if test="checked != null">checked,</if>
             <if test="width != null">width,</if>
+            <if test="fixed != null">fixed,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="tableName != null">#{tableName},</if>
@@ -69,6 +72,7 @@
             <if test="name != null">#{name},</if>
             <if test="checked != null">#{checked},</if>
             <if test="width != null">#{width},</if>
+            <if test="fixed != null">#{fixed},</if>
         </trim>
     </insert>
 
@@ -82,6 +86,7 @@
             <if test="name != null">name = #{name},</if>
             <if test="checked != null">checked = #{checked},</if>
             <if test="width != null">width = #{width},</if>
+            <if test="fixed != null">width = #{fixed},</if>
         </trim>
         where id = #{id}
     </update>

+ 12 - 2
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -114,7 +114,7 @@
 	</select>
 
 	<select id="selectUserByTel" parameterType="String" resultMap="SysUserResult">
-		SELECT user_id, user_name, nick_name, user_type, open_id, open_id, del_flag FROM sys_user WHERE phonenumber = #{phonenumber} and user_type = '11'
+		SELECT user_id, user_name, nick_name, user_type, phonenumber, open_id, session_key, del_flag FROM sys_user WHERE phonenumber = #{phonenumber} and user_type = '11'
 	</select>
 
 	<select id="checkUserNameUnique" parameterType="String" resultType="int">
@@ -216,7 +216,17 @@
  		update sys_user set password = #{password} where user_name = #{userName}
 	</update>
 
-	<delete id="deleteUserById" parameterType="Long">
+    <update id="updateCarsDriverNamePhone" parameterType="int">
+		UPDATE sys_user u
+		LEFT JOIN F_TMSORDERBILLSCARS car ON u.user_id = car.driver_user_id
+		SET car.driver_name = u.nick_name,
+		car.driver_tel = u.phonenumber
+		WHERE
+			car.driver_user_id IS NOT NULL
+			AND u.user_id = #{userId}
+	</update>
+
+    <delete id="deleteUserById" parameterType="Long">
  		delete from sys_user where user_id = #{userId}
  	</delete>