Explorar o código

航运基础资料完善

lazhaoqian %!s(int64=4) %!d(string=hai) anos
pai
achega
1b4042ade5
Modificáronse 21 ficheiros con 1144 adicións e 132 borrados
  1. 46 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TAddressController.java
  2. 41 0
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrController.java
  3. 65 6
      ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrnoController.java
  4. 2 2
      ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
  5. 172 2
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrno.java
  6. 72 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrtracking.java
  7. 20 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TAddressMapper.java
  8. 35 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TCntrMapper.java
  9. 21 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TCntrnoMapper.java
  10. 19 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITAddressService.java
  11. 22 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrService.java
  12. 35 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrnoService.java
  13. 15 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TAddressServiceImpl.java
  14. 17 0
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrServiceImpl.java
  15. 137 14
      ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrnoServiceImpl.java
  16. 87 54
      ruoyi-shipping/src/main/resources/mapper/shipping/TAddressMapper.xml
  17. 91 39
      ruoyi-shipping/src/main/resources/mapper/shipping/TCntrMapper.xml
  18. 182 3
      ruoyi-shipping/src/main/resources/mapper/shipping/TCntrnoMapper.xml
  19. 53 12
      ruoyi-shipping/src/main/resources/mapper/shipping/TCntrtrackingMapper.xml
  20. 8 0
      ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java
  21. 4 0
      ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml

+ 46 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TAddressController.java

@@ -216,4 +216,50 @@ public class TAddressController extends BaseController
     {
         return toAjax(tAddressService.updateTAddressStatus(fIds));
     }
+    /**
+     * 获取地点基础信息(港口 码头 堆场 航线)详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectAddressFno')")
+    @PostMapping(value = "/selectAddressFno")
+    public AjaxResult selectAddressFno(@RequestBody TAddress tAddress)
+    {
+        if (StringUtils.isEmpty(tAddress.getfTypes()) || StringUtils.isEmpty(tAddress.getfNo())){
+            return AjaxResult.error("参数不能为空");
+        }
+        String addressFno = tAddressService.selectAddressFno(tAddress);
+        if (StringUtils.isNotEmpty(addressFno)){
+            return AjaxResult.error("编号已存在");
+        }else {
+            return AjaxResult.success();
+        }
+
+    }
+    /**
+     * 获取地点基础信息(港口 码头 堆场 航线)详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectAddressFName')")
+    @PostMapping(value = "/selectAddressFName")
+    public AjaxResult getInfo(@RequestBody TAddress tAddress)
+    {
+        if (StringUtils.isEmpty(tAddress.getfTypes()) || StringUtils.isEmpty(tAddress.getfName())){
+            return AjaxResult.error("参数不能为空");
+        }
+        String addressFno = tAddressService.selectAddressFName(tAddress);
+        if (StringUtils.isNotEmpty(addressFno)){
+            return AjaxResult.error("名称已存在");
+        }else {
+            return AjaxResult.success();
+        }
+    }
+    /**
+     * 查询地点基础信息(港口 码头 堆场 航线)列表
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:address:selectadress')")
+    @GetMapping("/selectadress")
+    public TableDataInfo selectadress( )
+    {
+        startPage();
+        List<Map<String, Object>> list = tAddressService.selectadress();
+        return getDataTable(list);
+    }
 }

+ 41 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrController.java

@@ -1,6 +1,7 @@
 package com.ruoyi.web.controller.shipping.controller;
 
 import java.util.List;
+import java.util.Map;
 
 import com.ruoyi.common.utils.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -124,4 +125,44 @@ public class TCntrController extends BaseController
     {
         return toAjax(tCntrService.deleteTCntrByIds(fIds));
     }
+    /**
+     * 查询集装箱编号
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:cntr:selectRcntrName')")
+    @GetMapping("/selectRcntrName")
+    public TableDataInfo selectRcntrName(TCntr tCntr)
+    {
+        startPage();
+        List<Map<String,Object>> list = tCntrService.selectRcntrName(tCntr);
+        return getDataTable(list);
+    }
+    /**
+     * 获取集装箱编号
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:cntr:selectTcnrFno')")
+    @GetMapping(value = "/selectTcnrFno/{fNo}")
+    public AjaxResult selectTcnrFno(@PathVariable("fNo") String fNo)
+    {
+        String fno = tCntrService.selectTcnrFno(fNo);
+        if (StringUtils.isNotEmpty(fno)){
+            return AjaxResult.error("编号已存在");
+        }else {
+            return AjaxResult.success();
+        }
+
+    }
+    /**
+     * 获取集装箱详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:cntr:selectTcnrFName')")
+    @GetMapping(value = "/selectTcnrFName/{fName}")
+    public AjaxResult selectTcnrFName(@PathVariable("fName") String fName)
+    {
+        String name = tCntrService.selectTcnrFName(fName);
+        if (StringUtils.isNotEmpty(name)){
+            return AjaxResult.error("名称已存在");
+        }else {
+            return AjaxResult.success();
+        }
+    }
 }

+ 65 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/shipping/controller/TCntrnoController.java

@@ -1,7 +1,9 @@
 package com.ruoyi.web.controller.shipping.controller;
 
 import java.util.List;
+import java.util.Map;
 
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.ruoyi.common.utils.StringUtils;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -38,6 +40,17 @@ public class TCntrnoController extends BaseController
     /**
      * 查询集装箱号列表
      */
+    @PreAuthorize("@ss.hasPermi('shipping:cntrno:selectTcntrnoMessage')")
+    @GetMapping("/selectTcntrnoMessage")
+    public TableDataInfo selectTcntrnoMessage(TCntrno tCntrno)
+    {
+        startPage();
+        List<TCntrno> list = tCntrnoService.selectTcntrnoMessage(tCntrno);
+        return getDataTable(list);
+    }
+    /**
+     * 查询集装箱号列表
+     */
     @PreAuthorize("@ss.hasPermi('shipping:cntrno:list')")
     @GetMapping("/list")
     public TableDataInfo list(TCntrno tCntrno)
@@ -91,23 +104,36 @@ public class TCntrnoController extends BaseController
             return AjaxResult.error("地点不能为空");
         }
         if (StringUtils.isEmpty(tCntrno.getfUpdateef())){
-            return AjaxResult.error("箱重不能为空");
+            return AjaxResult.error("箱重不能为空");
         }
         if (StringUtils.isEmpty(tCntrno.getfCntrstatus())){
             return AjaxResult.error("箱状态不能为空");
         }
-        return toAjax(tCntrnoService.insertTCntrno(tCntrno));
+        if (tCntrno.getfId() == null){
+            return toAjax(tCntrnoService.insertTCntrno(tCntrno));
+        }else {
+            if (tCntrno.getfStatus().equals("T") ||tCntrno.getfStatus().equals("正常")){
+                tCntrno.setfStatus("T");
+            }else {
+                tCntrno.setfStatus("F");
+            }
+            return toAjax(tCntrnoService.updateTCntrnoMessage(tCntrno));
+        }
+
     }
 
     /**
      * 修改集装箱号
      */
-    @PreAuthorize("@ss.hasPermi('shipping:cntrno:edit')")
+    @PreAuthorize("@ss.hasPermi('shipping:cntrno:updateTCntrno')")
     @Log(title = "集装箱号", businessType = BusinessType.UPDATE)
-    @PutMapping
-    public AjaxResult edit(@RequestBody List<TCntrno> tCntrno)
+    @PostMapping("/updateTCntrno")
+    public AjaxResult updateTCntrno(@RequestBody TCntrno tCntrno)
     {
-        return toAjax(tCntrnoService.updateTCntrno(tCntrno));
+        if (CollectionUtils.isEmpty(tCntrno.gettCntrno())){
+            return AjaxResult.error("请选择后再提交");
+        }
+        return toAjax(tCntrnoService.updateTCntrno(tCntrno.gettCntrno()));
     }
 
     /**
@@ -120,4 +146,37 @@ public class TCntrnoController extends BaseController
     {
         return toAjax(tCntrnoService.updateTcntrnoStatus(fIds));
     }
+    /**
+     * 查询集装箱信息
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:cntrno:getTCntrnoMessage')")
+    @GetMapping("/getTCntrnoMessage")
+    public TableDataInfo getTCntrnoMessage(TCntrno tCntrno)
+    {
+        startPage();
+        List<Map<String, Object>> list = tCntrnoService.getTCntrnoMessage(tCntrno);
+        return getDataTable(list);
+    }
+    /**
+     * 查询集装箱动态分布标签
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:cntrno:getTCntrnoChange')")
+    @GetMapping("/getTCntrnoChange")
+    public TableDataInfo getTCntrnoChange(TCntrno tCntrno)
+    {
+        startPage();
+        List<String> list = tCntrnoService.getTCntrnoChange(tCntrno);
+        return getDataTable(list);
+    }
+    /**
+     * 查询集装箱动态分布
+     */
+    @PreAuthorize("@ss.hasPermi('shipping:cntrno:getTCntrnoDistribute')")
+    @GetMapping("/getTCntrnoDistribute")
+    public TableDataInfo getTCntrnoDistribute(TCntrno tCntrno)
+    {
+        startPage();
+        List<TCntrno> list = tCntrnoService.getTCntrnoDistribute(tCntrno);
+        return getDataTable(list);
+    }
 }

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

@@ -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")));

+ 172 - 2
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrno.java

@@ -1,9 +1,11 @@
 package com.ruoyi.shipping.domain;
 
 import java.util.Date;
+import java.util.List;
 
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -15,6 +17,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
  * @author ruoyi
  * @date 2021-03-22
  */
+@Data
 public class TCntrno extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -62,9 +65,40 @@ public class TCntrno extends BaseEntity
     /** 默认 T ,正常T 停用F 下拉选择 */
     @Excel(name = "默认 T ,正常T 停用F 下拉选择")
     private String fStatus;
-    @TableField(exist = false)
+    //提单号
     private String fMblno;
-
+    //箱主中文
+    private String ownerName;
+    //箱类型中文
+    private String typeidName;
+    //箱来源中文
+    private String sourceName;
+    //租赁方式中文
+    private String rentName;
+    //空重中文
+    private String updateEFName;
+    //箱状态中文
+    private String cntrstatusName;
+    //查询时间区间
+    private List<String> cLoadDate;
+    //集装箱尺码
+    private Long cntrsize;
+    //集装箱尺码中文
+    private String cntrsizeName;
+    //船名
+    private String fVsl;
+    //航次
+    private String fVoy;
+    //调入地点
+    private String foldSite;
+    //调入空重
+    private String foldFUpdateef;
+    //调入状态
+    private String foldFCntrstatus;
+    //调入时间
+    private Date foldtime;
+    //修改信息
+    private List<TCntrno> tCntrno;
     public void setfId(Long fId) 
     {
         this.fId = fId;
@@ -165,6 +199,142 @@ public class TCntrno extends BaseEntity
         return fStatus;
     }
 
+    public String getfMblno() {
+        return fMblno;
+    }
+
+    public void setfMblno(String fMblno) {
+        this.fMblno = fMblno;
+    }
+
+    public String getOwnerName() {
+        return ownerName;
+    }
+
+    public void setOwnerName(String ownerName) {
+        this.ownerName = ownerName;
+    }
+
+    public String getSourceName() {
+        return sourceName;
+    }
+
+    public void setSourceName(String sourceName) {
+        this.sourceName = sourceName;
+    }
+
+    public String getRentName() {
+        return rentName;
+    }
+
+    public void setRentName(String rentName) {
+        this.rentName = rentName;
+    }
+
+    public String getUpdateEFName() {
+        return updateEFName;
+    }
+
+    public void setUpdateEFName(String updateEFName) {
+        this.updateEFName = updateEFName;
+    }
+
+    public String getCntrstatusName() {
+        return cntrstatusName;
+    }
+
+    public void setCntrstatusName(String cntrstatusName) {
+        this.cntrstatusName = cntrstatusName;
+    }
+
+    public List<String> getcLoadDate() {
+        return cLoadDate;
+    }
+
+    public void setcLoadDate(List<String> cLoadDate) {
+        this.cLoadDate = cLoadDate;
+    }
+
+    public Long getCntrsize() {
+        return cntrsize;
+    }
+
+    public void setCntrsize(Long cntrsize) {
+        this.cntrsize = cntrsize;
+    }
+
+    public String getCntrsizeName() {
+        return cntrsizeName;
+    }
+
+    public void setCntrsizeName(String cntrsizeName) {
+        this.cntrsizeName = cntrsizeName;
+    }
+
+    public String getfVsl() {
+        return fVsl;
+    }
+
+    public void setfVsl(String fVsl) {
+        this.fVsl = fVsl;
+    }
+
+    public String getfVoy() {
+        return fVoy;
+    }
+
+    public void setfVoy(String fVoy) {
+        this.fVoy = fVoy;
+    }
+
+    public String getTypeidName() {
+        return typeidName;
+    }
+
+    public void setTypeidName(String typeidName) {
+        this.typeidName = typeidName;
+    }
+
+    public String getFoldSite() {
+        return foldSite;
+    }
+
+    public void setFoldSite(String foldSite) {
+        this.foldSite = foldSite;
+    }
+
+    public String getFoldFUpdateef() {
+        return foldFUpdateef;
+    }
+
+    public void setFoldFUpdateef(String foldFUpdateef) {
+        this.foldFUpdateef = foldFUpdateef;
+    }
+
+    public String getFoldFCntrstatus() {
+        return foldFCntrstatus;
+    }
+
+    public void setFoldFCntrstatus(String foldFCntrstatus) {
+        this.foldFCntrstatus = foldFCntrstatus;
+    }
+
+    public Date getFoldtime() {
+        return foldtime;
+    }
+
+    public void setFoldtime(Date foldtime) {
+        this.foldtime = foldtime;
+    }
+
+    public List<TCntrno> gettCntrno() {
+        return tCntrno;
+    }
+
+    public void settCntrno(List<TCntrno> tCntrno) {
+        this.tCntrno = tCntrno;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 72 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/domain/TCntrtracking.java

@@ -1,6 +1,8 @@
 package com.ruoyi.shipping.domain;
 
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
@@ -64,6 +66,20 @@ public class TCntrtracking extends BaseEntity
     /** 默认 T ,正常T 停用F 下拉选择 */
     @Excel(name = "默认 T ,正常T 停用F 下拉选择")
     private String fStatus;
+    //箱主中文
+    private String ownerName;
+    //箱类型中文
+    private String typeidName;
+    //空重中文
+    private String updateEFName;
+    //箱状态中文
+    private String cntrstatusName;
+    //查询时间区间
+    private List<String> cLoadDate;
+    //集装箱尺码
+    private Long cntrsize;
+    //集装箱尺码中文
+    private String cntrsizeName;
 
     public void setfId(Long fId) 
     {
@@ -174,6 +190,62 @@ public class TCntrtracking extends BaseEntity
         return fStatus;
     }
 
+    public String getOwnerName() {
+        return ownerName;
+    }
+
+    public void setOwnerName(String ownerName) {
+        this.ownerName = ownerName;
+    }
+
+    public String getTypeidName() {
+        return typeidName;
+    }
+
+    public void setTypeidName(String typeidName) {
+        this.typeidName = typeidName;
+    }
+
+    public String getUpdateEFName() {
+        return updateEFName;
+    }
+
+    public void setUpdateEFName(String updateEFName) {
+        this.updateEFName = updateEFName;
+    }
+
+    public String getCntrstatusName() {
+        return cntrstatusName;
+    }
+
+    public void setCntrstatusName(String cntrstatusName) {
+        this.cntrstatusName = cntrstatusName;
+    }
+
+    public List<String> getcLoadDate() {
+        return cLoadDate;
+    }
+
+    public void setcLoadDate(List<String> cLoadDate) {
+        this.cLoadDate = cLoadDate;
+    }
+
+    public Long getCntrsize() {
+        return cntrsize;
+    }
+
+    public void setCntrsize(Long cntrsize) {
+        this.cntrsize = cntrsize;
+    }
+
+    public String getCntrsizeName() {
+        return cntrsizeName;
+    }
+
+    public void setCntrsizeName(String cntrsizeName) {
+        this.cntrsizeName = cntrsizeName;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)

+ 20 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TAddressMapper.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.ruoyi.shipping.domain.TAddress;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -119,4 +120,23 @@ public interface TAddressMapper
      * @return
      */
     public int updateTAddressStatus(Long[] fIds);
+
+    /**
+     * 查询地址表里的编号
+     * @param tAddress
+     * @return
+     */
+    public String selectAddressFno(TAddress tAddress);
+    /**
+     * 查询地址表里的名称
+     * @param tAddress
+     * @return
+     */
+    public String selectAddressFName(TAddress tAddress);
+    /**
+     * 查询地点
+     * @param
+     * @return
+     */
+    public List<Map<String, Object>> selectadress();
 }

+ 35 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TCntrMapper.java

@@ -1,7 +1,10 @@
 package com.ruoyi.shipping.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.shipping.domain.TCntr;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 集装箱Mapper接口
@@ -58,4 +61,36 @@ public interface TCntrMapper
      * @return 结果
      */
     public int deleteTCntrByIds(Long[] fIds);
+
+    /**
+     * 获取集装箱的编号和id
+     * @param tCntr
+     * @return
+     */
+    public List<Map<String, Object>>selectRcntrName(TCntr tCntr);
+
+    /**
+     * 获取集装箱的编号
+     * @return
+     */
+    public  List<String> selectTCntrFNo();
+
+    /**
+     * 获取集装箱id
+     * @param fNo
+     * @return
+     */
+    public Long selectRcntrFId(@Param("fNo") String fNo);
+    /**
+     * 查询集装箱表里的编号
+     * @param fType
+     * @return
+     */
+    public String selectTcnrFno(@Param("fNo") String fType);
+    /**
+     * 查询集装箱表里的名称
+     * @param fType
+     * @return
+     */
+    public String selectTcnrFName(@Param("fName") String fType);
 }

+ 21 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/mapper/TCntrnoMapper.java

@@ -1,7 +1,10 @@
 package com.ruoyi.shipping.mapper;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.shipping.domain.TCntrno;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 集装箱号Mapper接口
@@ -28,6 +31,15 @@ public interface TCntrnoMapper
     public List<TCntrno> selectTCntrnoList(TCntrno tCntrno);
 
     /**
+     * 查询集装箱信息
+     * @param tCntrno
+     * @return
+     */
+
+    public List<TCntrno> selectTcntrnoMessage(TCntrno tCntrno);
+
+
+    /**
      * 新增集装箱号
      * 
      * @param tCntrno 集装箱号
@@ -65,4 +77,13 @@ public interface TCntrnoMapper
      * @return
      */
     public int updateTcntrnoStatus(Long[] fIds);
+
+    /**
+     * 获取箱动态分布信息
+     * @param sql
+     * @param tCntrno
+     * @return
+     */
+    public List<Map<String, Object>> getTCntrnoMessage(@Param("sql") String sql,
+                                                       @Param("tCntrno") TCntrno tCntrno);
 }

+ 19 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITAddressService.java

@@ -4,6 +4,7 @@ import java.util.List;
 import java.util.Map;
 
 import com.ruoyi.shipping.domain.TAddress;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -115,4 +116,22 @@ public interface ITAddressService
      * @return
      */
     public List<Map<String, Object>>selectAirLineName(TAddress tAddress);
+    /**
+     * 查询地址表里的编号
+     * @param  tAddress
+     * @return
+     */
+    public String selectAddressFno(TAddress tAddress);
+    /**
+     * 查询地址表里的编号
+     * @param  tAddress
+     * @return
+     */
+    public String selectAddressFName(TAddress tAddress);
+
+    /**
+     * 查询地点
+     * @return
+     */
+    public List<Map<String, Object>> selectadress();
 }

+ 22 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrService.java

@@ -1,7 +1,10 @@
 package com.ruoyi.shipping.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.shipping.domain.TCntr;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 集装箱Service接口
@@ -58,4 +61,23 @@ public interface ITCntrService
      * @return 结果
      */
     public int deleteTCntrById(Long fId);
+
+    /**
+     * 获取集装箱编号
+     * @param tCntr
+     * @return
+     */
+    public List<Map<String, Object>>selectRcntrName(TCntr tCntr);
+    /**
+     * 查询集装箱表里的编号
+     * @param fNo
+     * @return
+     */
+    public String selectTcnrFno(String fNo);
+    /**
+     * 查询集装箱表里的名称
+     * @param fName
+     * @return
+     */
+    public String selectTcnrFName(String fName);
 }

+ 35 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/ITCntrnoService.java

@@ -1,6 +1,8 @@
 package com.ruoyi.shipping.service;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.shipping.domain.TCntrno;
 
 /**
@@ -42,6 +44,13 @@ public interface ITCntrnoService
      * @return 结果
      */
     public int updateTCntrno(List<TCntrno> tCntrno);
+    /**
+     * 修改集装箱号
+     *
+     * @param tCntrno 集装箱号
+     * @return 结果
+     */
+    public int updateTCntrnoMessage(TCntrno tCntrno);
 
     /**
      * 批量删除集装箱号
@@ -64,4 +73,30 @@ public interface ITCntrnoService
      * @return
      */
     public int updateTcntrnoStatus(Long[] fIds);
+    /**
+     * 查询集装箱信息
+     * @param tCntrno
+     * @return
+     */
+    public List<TCntrno> selectTcntrnoMessage(TCntrno tCntrno);
+
+    /**
+     * 获取集装箱信息
+     * @param tCntrno
+     * @return
+     */
+    public List<Map<String, Object>> getTCntrnoMessage(TCntrno tCntrno);
+    /**
+     * 获取集装箱分布信息
+     * @param tCntrno
+     * @return
+     */
+    public List<TCntrno> getTCntrnoDistribute(TCntrno tCntrno);
+
+    /**
+     * 获取集装箱动态分布标签
+     * @param tCntrno
+     * @return
+     */
+    public List<String> getTCntrnoChange(TCntrno tCntrno);
 }

+ 15 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TAddressServiceImpl.java

@@ -148,4 +148,19 @@ public class TAddressServiceImpl implements ITAddressService
     public List<Map<String, Object>> selectAirLineName(TAddress tAddress) {
         return tAddressMapper.selectAirLineName(tAddress);
     }
+
+    @Override
+    public String selectAddressFno(TAddress tAddress) {
+        return tAddressMapper.selectAddressFno(tAddress);
+    }
+
+    @Override
+    public String selectAddressFName(TAddress tAddress) {
+        return tAddressMapper.selectAddressFName(tAddress);
+    }
+
+    @Override
+    public List<Map<String, Object>> selectadress() {
+        return tAddressMapper.selectadress();
+    }
 }

+ 17 - 0
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrServiceImpl.java

@@ -1,6 +1,8 @@
 package com.ruoyi.shipping.service.impl;
 
 import java.util.List;
+import java.util.Map;
+
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -96,4 +98,19 @@ public class TCntrServiceImpl implements ITCntrService
     {
         return tCntrMapper.deleteTCntrById(fId);
     }
+
+    @Override
+    public List<Map<String, Object>> selectRcntrName(TCntr tCntr) {
+        return tCntrMapper.selectRcntrName(tCntr);
+    }
+
+    @Override
+    public String selectTcnrFno(String fNo) {
+        return tCntrMapper.selectTcnrFno(fNo);
+    }
+
+    @Override
+    public String selectTcnrFName(String fName) {
+        return tCntrMapper.selectTcnrFName(fName);
+    }
 }

+ 137 - 14
ruoyi-shipping/src/main/java/com/ruoyi/shipping/service/impl/TCntrnoServiceImpl.java

@@ -1,13 +1,15 @@
 package com.ruoyi.shipping.service.impl;
 
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.shipping.domain.TCntrtracking;
+import com.ruoyi.shipping.mapper.TCntrMapper;
 import com.ruoyi.shipping.mapper.TCntrtrackingMapper;
-import org.apache.commons.lang3.concurrent.ConcurrentUtils;
+import com.ruoyi.system.mapper.SysDictDataMapper;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -17,21 +19,25 @@ import com.ruoyi.shipping.service.ITCntrnoService;
 
 /**
  * 集装箱号Service业务层处理
- * 
+ *
  * @author ruoyi
  * @date 2021-03-22
  */
 @Service
-public class TCntrnoServiceImpl implements ITCntrnoService 
+public class TCntrnoServiceImpl implements ITCntrnoService
 {
     @Autowired
     private TCntrnoMapper tCntrnoMapper;
     @Autowired
     private TCntrtrackingMapper tCntrtrackingMapper;
+    @Autowired
+    private TCntrMapper tCntrMapper;
+    @Autowired
+    private SysDictDataMapper sysDictDataMapper;
 
     /**
      * 查询集装箱号
-     * 
+     *
      * @param fId 集装箱号ID
      * @return 集装箱号
      */
@@ -43,7 +49,7 @@ public class TCntrnoServiceImpl implements ITCntrnoService
 
     /**
      * 查询集装箱号列表
-     * 
+     *
      * @param tCntrno 集装箱号
      * @return 集装箱号
      */
@@ -55,7 +61,7 @@ public class TCntrnoServiceImpl implements ITCntrnoService
 
     /**
      * 新增集装箱号
-     * 
+     *
      * @param tCntrno 集装箱号
      * @return 结果
      */
@@ -63,13 +69,14 @@ public class TCntrnoServiceImpl implements ITCntrnoService
     public int insertTCntrno(TCntrno tCntrno)
     {
         tCntrno.setCreateTime(DateUtils.getNowDate());
-        tCntrno.setfUpdatetime(new Date());
+        tCntrno.setCreateBy(SecurityUtils.getUsername());
+        tCntrno.setfUpdatetime(DateUtils.getNowDate());
         return tCntrnoMapper.insertTCntrno(tCntrno);
     }
 
     /**
      * 修改集装箱号
-     * 
+     *
      * @param tCntrno 集装箱号
      * @return 结果
      */
@@ -79,20 +86,69 @@ public class TCntrnoServiceImpl implements ITCntrnoService
         int update = 0;
         if (CollectionUtils.isNotEmpty(tCntrno)){
             for (TCntrno cntrno : tCntrno) {
-                cntrno.setUpdateTime(DateUtils.getNowDate());
                 TCntrno tCntrnoById = tCntrnoMapper.selectTCntrnoById(cntrno.getfId());
+                tCntrnoById.setUpdateTime(DateUtils.getNowDate());
+                tCntrnoById.setUpdateBy(SecurityUtils.getUsername());
+                //最新时间
+                if (cntrno.getFoldtime() == null){
+                    cntrno.setfUpdatetime(new Date());
+                }else {
+                    cntrno.setfUpdatetime(cntrno.getFoldtime());
+                }
+                //调入地点
+                if (StringUtils.isNotEmpty(cntrno.getFoldSite())){
+                    cntrno.setfUpdateaddress(cntrno.getFoldSite());
+                }
+                //调入空重
+                if (StringUtils.isNotEmpty(cntrno.getFoldFUpdateef())){
+                    cntrno.setfUpdateef(cntrno.getFoldFUpdateef());
+                }
+                //调入状态
+                if (StringUtils.isNotEmpty(cntrno.getFoldFCntrstatus())){
+                    cntrno.setfCntrstatus(cntrno.getFoldFCntrstatus());
+                }
+                tCntrnoById.setUpdateBy(SecurityUtils.getUsername());
                 TCntrtracking setfield = setfield(tCntrnoById);
+                setfield.setfId(null);
+                if (setfield.getfStatus().equals("T") ||setfield.getfStatus().equals("正常")){
+                    setfield.setfStatus("T");
+                }else {
+                    setfield.setfStatus("F");
+                }
                 tCntrtrackingMapper.insertTCntrtracking(setfield);
                 //更改t_cntro表信息
+                if (cntrno.getfUpdatetime() == null){
+                    cntrno.setUpdateTime(DateUtils.getNowDate());
+                }
+                cntrno.setUpdateBy(SecurityUtils.getUsername());
                 update = tCntrnoMapper.updateTCntrno((cntrno));
             }
         }
         return update;
     }
 
+    @Override
+    public int updateTCntrnoMessage(TCntrno tCntrno) {
+        TCntrno tCntrnoById = tCntrnoMapper.selectTCntrnoById(tCntrno.getfId());
+        tCntrnoById.setUpdateTime(DateUtils.getNowDate());
+        tCntrnoById.setUpdateBy(SecurityUtils.getUsername());
+        if (tCntrnoById.getfStatus().equals("T") ||tCntrnoById.getfStatus().equals("正常")){
+            tCntrnoById.setfStatus("T");
+        }else {
+            tCntrnoById.setfStatus("F");
+        }
+        TCntrtracking setfield = setfield(tCntrnoById);
+        tCntrtrackingMapper.insertTCntrtracking(setfield);
+        //更改t_cntro表信息
+        tCntrno.setUpdateTime(DateUtils.getNowDate());
+        tCntrno.setUpdateBy(SecurityUtils.getUsername());
+        return tCntrnoMapper.updateTCntrno((tCntrno));
+
+    }
+
     /**
      * 批量删除集装箱号
-     * 
+     *
      * @param fIds 需要删除的集装箱号ID
      * @return 结果
      */
@@ -104,7 +160,7 @@ public class TCntrnoServiceImpl implements ITCntrnoService
 
     /**
      * 删除集装箱号信息
-     * 
+     *
      * @param fId 集装箱号ID
      * @return 结果
      */
@@ -124,6 +180,56 @@ public class TCntrnoServiceImpl implements ITCntrnoService
         return tCntrnoMapper.updateTcntrnoStatus(fIds);
     }
 
+    @Override
+    public List<TCntrno> selectTcntrnoMessage(TCntrno tCntrno) {
+        return tCntrnoMapper.selectTcntrnoMessage(tCntrno);
+    }
+
+    @Override
+    public List<Map<String, Object>> getTCntrnoMessage(TCntrno tCntrno) {
+        StringBuffer stringBuffer = new StringBuffer();
+        List<String> list = tCntrMapper.selectTCntrFNo();
+        for (String s : list) {
+            stringBuffer.append("MAX( CASE WHEN tt.f_no = '"+s);
+            stringBuffer.append("' THEN tt.typeidCount ELSE 0 END ) AS '" +s +"',");
+        }
+        String sql = stringBuffer.subSequence(0,stringBuffer.length() -1).toString();
+        return tCntrnoMapper.getTCntrnoMessage(sql,tCntrno);
+    }
+
+    @Override
+    public List<TCntrno> getTCntrnoDistribute(TCntrno tCntrno) {
+        //箱类型不为空查箱类型id
+        if (StringUtils.isNotEmpty(tCntrno.getTypeidName())){
+            Long fId = tCntrMapper.selectRcntrFId(tCntrno.getTypeidName());
+            tCntrno.setfTypeid(fId);
+        }
+        //箱状态不为空查箱状态
+        if (StringUtils.isNotEmpty(tCntrno.getCntrstatusName())){
+            String cntrstatus = sysDictDataMapper.selectDictValue("f_cntrstatus", tCntrno.getCntrstatusName());
+            tCntrno.setfCntrstatus(cntrstatus);
+        }
+        //箱空重部位空查空重
+        if (StringUtils.isNotEmpty(tCntrno.getUpdateEFName())){
+            String cntrstatus = sysDictDataMapper.selectDictValue("f_updateEF", tCntrno.getUpdateEFName());
+            tCntrno.setfUpdateef(cntrstatus);
+        }
+        return tCntrnoMapper.selectTcntrnoMessage(tCntrno);
+    }
+
+    @Override
+    public List<String> getTCntrnoChange(TCntrno tCntrno) {
+        List<String> key = new ArrayList<>();
+        key.add("地点");
+        List<String> list = tCntrMapper.selectTCntrFNo();
+        key.addAll(list);
+        key.add("空");
+        key.add("重");
+        key.add("好");
+        key.add("坏");
+        return key;
+    }
+
     /**
      * set字段
      * @param tCntrno
@@ -131,7 +237,24 @@ public class TCntrnoServiceImpl implements ITCntrnoService
      */
     public TCntrtracking  setfield(TCntrno tCntrno){
         TCntrtracking tCntrtracking = new TCntrtracking();
-        BeanUtils.copyProperties(tCntrtracking,tCntrno);
+        BeanUtils.copyProperties(tCntrno,tCntrtracking);
         return tCntrtracking;
     }
+    public List<String> GetMapKey(List<Map<String, Object>> listResult)
+    {
+        if ((listResult != null) && (!listResult.isEmpty()))
+        {
+            List listKey = new ArrayList();
+            Map mapResult = (Map)listResult.get(0);
+            Set mapKeySet = mapResult.keySet();
+            String listHead = "";
+            Iterator iteratorKey = mapKeySet.iterator();
+            while (iteratorKey.hasNext()) {
+                listHead = iteratorKey.next().toString();
+                listKey.add(listHead);
+            }
+            return listKey;
+        }
+        return null;
+    }
 }

+ 87 - 54
ruoyi-shipping/src/main/resources/mapper/shipping/TAddressMapper.xml

@@ -66,27 +66,28 @@
         WHERE
         t.f_status = 'T'
         AND s.dict_label = '航线'
-        <if test="fTypes != null  and fTypes != ''">and f_types = #{fTypes}</if>
-        <if test="fNo != null  and fNo != ''">and f_no = #{fNo}</if>
-        <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
-        <if test="fEname != null  and fEname != ''">and f_ename like concat('%', #{fEname}, '%')</if>
-        <if test="fLaneid != null ">and f_laneid = #{fLaneid}</if>
-        <if test="fPortid != null ">and f_portid = #{fPortid}</if>
-        <if test="fCountry != null  and fCountry != ''">and f_country = #{fCountry}</if>
-        <if test="fProvince != null  and fProvince != ''">and f_province = #{fProvince}</if>
-        <if test="fCity != null  and fCity != ''">and f_city = #{fCity}</if>
-        <if test="fTel != null  and fTel != ''">and f_tel = #{fTel}</if>
-        <if test="fEmail != null  and fEmail != ''">and f_email = #{fEmail}</if>
-        <if test="fManagerid != null ">and f_managerid = #{fManagerid}</if>
-        <if test="fUncode != null  and fUncode != ''">and f_uncode = #{fUncode}</if>
-        <if test="fPort != null  and fPort != ''">and f_port = #{fPort}</if>
-        <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
+        <if test="fTypes != null  and fTypes != ''">and t.f_types = #{fTypes}</if>
+        <if test="fNo != null  and fNo != ''">and t.f_no = #{fNo}</if>
+        <if test="fName != null  and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
+        <if test="fEname != null  and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
+        <if test="fLaneid != null ">and t.f_laneid = #{fLaneid}</if>
+        <if test="fPortid != null ">and t.f_portid = #{fPortid}</if>
+        <if test="fCountry != null  and fCountry != ''">and t.f_country = #{fCountry}</if>
+        <if test="fProvince != null  and fProvince != ''">and t.f_province = #{fProvince}</if>
+        <if test="fCity != null  and fCity != ''">and t.f_city = #{fCity}</if>
+        <if test="fTel != null  and fTel != ''">and t.f_tel = #{fTel}</if>
+        <if test="fEmail != null  and fEmail != ''">and t.f_email = #{fEmail}</if>
+        <if test="fManagerid != null ">and t.f_managerid = #{fManagerid}</if>
+        <if test="fUncode != null  and fUncode != ''">and t.f_uncode = #{fUncode}</if>
+        <if test="fPort != null  and fPort != ''">and t.f_port = #{fPort}</if>
+        <if test="fStatus != null  and fStatus != ''">and t.f_status = #{fStatus}</if>
         <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
-            and create_time &gt;= #{cLoadDate[0]}
+            and t.create_time &gt;= #{cLoadDate[0]}
         </if>
         <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
-            and create_time &lt;= #{cLoadDate[1]}
+            and t.create_time &lt;= #{cLoadDate[1]}
         </if>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
 
     <select id="selectTAddressById" parameterType="Long" resultMap="TAddressResult">
@@ -97,21 +98,21 @@
     <select id="selectTAddressListMap" resultType="java.util.Map">
 
         <where>
-            <if test="fTypes != null  and fTypes != ''"> and f_types = #{fTypes}</if>
-            <if test="fNo != null  and fNo != ''"> and f_no = #{fNo}</if>
-            <if test="fName != null  and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
-            <if test="fEname != null  and fEname != ''"> and f_ename like concat('%', #{fEname}, '%')</if>
-            <if test="fLaneid != null "> and f_laneid = #{fLaneid}</if>
-            <if test="fPortid != null "> and f_portid = #{fPortid}</if>
-            <if test="fCountry != null  and fCountry != ''"> and f_country = #{fCountry}</if>
-            <if test="fProvince != null  and fProvince != ''"> and f_province = #{fProvince}</if>
-            <if test="fCity != null  and fCity != ''"> and f_city = #{fCity}</if>
-            <if test="fTel != null  and fTel != ''"> and f_tel = #{fTel}</if>
-            <if test="fEmail != null  and fEmail != ''"> and f_email = #{fEmail}</if>
-            <if test="fManagerid != null "> and f_managerid = #{fManagerid}</if>
-            <if test="fUncode != null  and fUncode != ''"> and f_uncode = #{fUncode}</if>
-            <if test="fPort != null  and fPort != ''"> and f_port = #{fPort}</if>
-            <if test="fStatus != null  and fStatus != ''"> and f_status = #{fStatus}</if>
+            <if test="fTypes != null  and fTypes != ''">and f_types = #{fTypes}</if>
+            <if test="fNo != null  and fNo != ''">and f_no = #{fNo}</if>
+            <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+            <if test="fEname != null  and fEname != ''">and f_ename like concat('%', #{fEname}, '%')</if>
+            <if test="fLaneid != null ">and f_laneid = #{fLaneid}</if>
+            <if test="fPortid != null ">and f_portid = #{fPortid}</if>
+            <if test="fCountry != null  and fCountry != ''">and f_country = #{fCountry}</if>
+            <if test="fProvince != null  and fProvince != ''">and f_province = #{fProvince}</if>
+            <if test="fCity != null  and fCity != ''">and f_city = #{fCity}</if>
+            <if test="fTel != null  and fTel != ''">and f_tel = #{fTel}</if>
+            <if test="fEmail != null  and fEmail != ''">and f_email = #{fEmail}</if>
+            <if test="fManagerid != null ">and f_managerid = #{fManagerid}</if>
+            <if test="fUncode != null  and fUncode != ''">and f_uncode = #{fUncode}</if>
+            <if test="fPort != null  and fPort != ''">and f_port = #{fPort}</if>
+            <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
         </where>
     </select>
 
@@ -275,6 +276,7 @@
                 and t.create_time &lt;= #{cLoadDate[1]}
             </if>
         </where>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
     <!--查询码头信息-->
     <select id="selectWarfDump" parameterType="TAddress" resultMap="TAddressResult">
@@ -317,7 +319,7 @@
             t.f_status = 'T'
             and pro.dict_label = '码头'
             <if test="fTypes != null  and fTypes != ''">and t.f_types = #{fTypes}</if>
-            <if test="portName != null  and portName != ''">and t.d.f_name like concat('%', #{portName}, '%')</if>
+            <if test="portName != null  and portName != ''">and d.f_name like concat('%', #{portName}, '%')</if>
             <if test="fNo != null  and fNo != ''">and t.f_no = #{fNo}</if>
             <if test="fName != null  and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
             <if test="fEname != null  and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
@@ -339,6 +341,7 @@
                 and t.create_time &lt;= #{cLoadDate[1]}
             </if>
         </where>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
     <!--查看港口名称-->
     <select id="selectPortName" parameterType="TAddress" resultType="map">
@@ -353,6 +356,7 @@
         WHERE t.f_status = 'T'
         AND s.dict_label = '港口'
         <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
     <!--查看航线名称-->
     <select id="selectAirLineName" parameterType="TAddress" resultType="map">
@@ -367,6 +371,7 @@
         WHERE t.f_status = 'T'
         AND s.dict_label = '航线'
         <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
     <!--查看堆场名称-->
     <select id="selectStorageName" parameterType="TAddress" resultType="map">
@@ -381,6 +386,7 @@
         WHERE t.f_status = 'T'
         AND s.dict_label = '堆场'
         <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
     <!--查看堆场名称-->
     <select id="selectWharfName" parameterType="TAddress" resultType="map">
@@ -395,6 +401,7 @@
         WHERE t.f_status = 'T'
         AND s.dict_label = '码头'
         <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
     </select>
     <!--查询港口信息-->
     <select id="selectPortDump" parameterType="TAddress" resultMap="TAddressResult">
@@ -425,11 +432,6 @@
         WHEN t.f_status = 'T' THEN
         '正常使用' ELSE '停用'
         END AS f_status,
-        t.create_by,
-        t.create_time,
-        t.update_by,
-        t.update_time,
-        t.remark,
         d.f_name portName,
         d.f_ename portEnglish
         FROM
@@ -440,28 +442,59 @@
         <where>
             t.f_status = 'T'
             and pro.dict_label = '港口'
-            <if test="fTypes != null  and fTypes != ''">and f_types = #{fTypes}</if>
+            <if test="fTypes != null  and fTypes != ''">and t.f_types = #{fTypes}</if>
             <if test="portName != null  and portName != ''">and d.f_name like concat('%', #{portName}, '%')</if>
-            <if test="fNo != null  and fNo != ''">and f_no = #{fNo}</if>
-            <if test="fName != null  and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
-            <if test="fEname != null  and fEname != ''">and f_ename like concat('%', #{fEname}, '%')</if>
-            <if test="fLaneid != null ">and f_laneid = #{fLaneid}</if>
-            <if test="fPortid != null ">and f_portid = #{fPortid}</if>
-            <if test="fCountry != null  and fCountry != ''">and f_country = #{fCountry}</if>
-            <if test="fProvince != null  and fProvince != ''">and f_province = #{fProvince}</if>
-            <if test="fCity != null  and fCity != ''">and f_city = #{fCity}</if>
-            <if test="fTel != null  and fTel != ''">and f_tel = #{fTel}</if>
-            <if test="fEmail != null  and fEmail != ''">and f_email = #{fEmail}</if>
-            <if test="fManagerid != null ">and f_managerid = #{fManagerid}</if>
-            <if test="fUncode != null  and fUncode != ''">and f_uncode = #{fUncode}</if>
-            <if test="fPort != null  and fPort != ''">and f_port = #{fPort}</if>
+            <if test="fNo != null  and fNo != ''">and t.f_no = #{fNo}</if>
+            <if test="fName != null  and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
+            <if test="fEname != null  and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
+            <if test="fLaneid != null ">and t.f_laneid = #{fLaneid}</if>
+            <if test="fPortid != null ">and t.f_portid = #{fPortid}</if>
+            <if test="fCountry != null  and fCountry != ''">and t.f_country = #{fCountry}</if>
+            <if test="fProvince != null  and fProvince != ''">and t.f_province = #{fProvince}</if>
+            <if test="fCity != null  and fCity != ''">and t.f_city = #{fCity}</if>
+            <if test="fTel != null  and fTel != ''">and t.f_tel = #{fTel}</if>
+            <if test="fEmail != null  and fEmail != ''">and t.f_email = #{fEmail}</if>
+            <if test="fManagerid != null ">and t.f_managerid = #{fManagerid}</if>
+            <if test="fUncode != null  and fUncode != ''">and t.f_uncode = #{fUncode}</if>
+            <if test="fPort != null  and fPort != ''">and t.f_port = #{fPort}</if>
             <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
-                and create_time &gt;= #{cLoadDate[0]}
+                and t.create_time &gt;= #{cLoadDate[0]}
             </if>
             <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
-                and create_time &lt;= #{cLoadDate[1]}
+                and t.create_time &lt;= #{cLoadDate[1]}
             </if>
         </where>
+        ORDER BY CONVERT(t.f_name USING gbk) asc
+    </select>
+    <select id="selectAddressFno" parameterType="TAddress" resultType="string">
+        SELECT
+            f_no
+        FROM
+        t_address
+        WHERE
+        f_types = #{fTypes}
+        and f_no = #{fNo}
+        ORDER BY  CONVERT(f_name USING gbk) asc
+    </select>
+    <select id="selectAddressFName" parameterType="TAddress" resultType="string">
+        SELECT
+            f_no
+        FROM
+        t_address
+        WHERE
+        f_types = #{fTypes}
+        and f_name = #{fName}
+        ORDER BY  CONVERT(f_name USING gbk) asc
+    </select>
+    <select id="selectadress" resultType="map">
+        SELECT
+            t.f_name fName,
+            pro.dict_label typesName
+        FROM
+            t_address t
+        LEFT JOIN
+            sys_dict_data pro ON pro.dict_value = t.f_types and pro.dict_type = 'f_types'
+        ORDER BY  CONVERT(t.f_name USING gbk) asc
     </select>
 
 

+ 91 - 39
ruoyi-shipping/src/main/resources/mapper/shipping/TCntrMapper.xml

@@ -1,30 +1,30 @@
 <?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.shipping.mapper.TCntrMapper">
-    
+
     <resultMap type="TCntr" id="TCntrResult">
-        <result property="fId"    column="f_id"    />
-        <result property="fType"    column="f_type"    />
-        <result property="fNo"    column="f_no"    />
-        <result property="fName"    column="f_name"    />
-        <result property="fEname"    column="f_ename"    />
-        <result property="fUncode"    column="f_uncode"    />
-        <result property="fTeu"    column="f_teu"    />
-        <result property="fCbm"    column="f_cbm"    />
-        <result property="fWeight"    column="f_weight"    />
-        <result property="fCntrsize"    column="f_cntrsize"    />
-        <result property="fStatus"    column="f_status"    />
-        <result property="createBy"    column="create_by"    />
-        <result property="createTime"    column="create_time"    />
-        <result property="updateBy"    column="update_by"    />
-        <result property="updateTime"    column="update_time"    />
-        <result property="remark"    column="remark"    />
+        <result property="fId" column="f_id"/>
+        <result property="fType" column="f_type"/>
+        <result property="fNo" column="f_no"/>
+        <result property="fName" column="f_name"/>
+        <result property="fEname" column="f_ename"/>
+        <result property="fUncode" column="f_uncode"/>
+        <result property="fTeu" column="f_teu"/>
+        <result property="fCbm" column="f_cbm"/>
+        <result property="fWeight" column="f_weight"/>
+        <result property="fCntrsize" column="f_cntrsize"/>
+        <result property="fStatus" column="f_status"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
     </resultMap>
 
     <sql id="selectTCntrVo">
-        select f_id, f_type, f_no, f_name, f_ename, f_uncode, f_teu, f_cbm, f_weight, f_cntrsize, f_status, create_by, create_time, update_by, update_time, remark from t_cntr
+        select f_id, f_type, f_no, f_name, f_ename, f_uncode, f_teu, f_cbm, f_weight, f_cntrsize, CASE WHEN f_status = 'T' THEN '正常' ELSE '停用' END AS f_status, create_by, create_time, update_by, update_time, remark from t_cntr
     </sql>
 
     <select id="selectTCntrList" parameterType="TCntr" resultMap="TCntrResult">
@@ -40,7 +40,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         f_cbm,
         f_weight,
         f_cntrsize,
-        f_status,
+        CASE
+        WHEN f_status = 'T' THEN
+        '正常' ELSE '停用'
+        END AS f_status,
         create_by,
         create_time,
         update_by,
@@ -48,20 +51,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         remark
         FROM
         t_cntr t
-        LEFT JOIN ( SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'f_type' ) s ON t.f_type = s.dict_value
+        LEFT JOIN ( SELECT dict_label, dict_value FROM sys_dict_data WHERE dict_type = 'f_type' ) s ON t.f_type =
+        s.dict_value
         <where>
             t.f_status = 'T'
-            <if test="fType != null "> and t.f_type = #{fType}</if>
-            <if test="fNo != null  and fNo != ''"> and t.f_no = like concat('%', #{fNo}, '%')</if>
-            <if test="fName != null  and fName != ''"> and t.f_name like concat('%', #{fName}, '%')</if>
-            <if test="fEname != null  and fEname != ''"> and t.f_ename like concat('%', #{fEname}, '%')</if>
-            <if test="fUncode != null  and fUncode != ''"> and t.f_uncode = #{fUncode}</if>
-            <if test="fTeu != null "> and t.f_teu = #{fTeu}</if>
-            <if test="fCbm != null "> and t.f_cbm = #{fCbm}</if>
-            <if test="fWeight != null "> and t.f_weight = #{fWeight}</if>
-            <if test="fCntrsize != null "> and t.f_cntrsize = #{fCntrsize}</if>
-            <if test="fStatus != null  and fStatus != ''"> and t.f_status = #{fStatus}</if>
-            <if test="createBy != null  and createBy != ''"> and t.create_by = #{createBy}</if>
+            <if test="fType != null ">and t.f_type = #{fType}</if>
+            <if test="fNo != null  and fNo != ''">and t.f_no = like concat('%', #{fNo}, '%')</if>
+            <if test="fName != null  and fName != ''">and t.f_name like concat('%', #{fName}, '%')</if>
+            <if test="fEname != null  and fEname != ''">and t.f_ename like concat('%', #{fEname}, '%')</if>
+            <if test="fUncode != null  and fUncode != ''">and t.f_uncode = #{fUncode}</if>
+            <if test="fTeu != null ">and t.f_teu = #{fTeu}</if>
+            <if test="fCbm != null ">and t.f_cbm = #{fCbm}</if>
+            <if test="fWeight != null ">and t.f_weight = #{fWeight}</if>
+            <if test="fCntrsize != null ">and t.f_cntrsize = #{fCntrsize}</if>
+            <if test="fStatus != null  and fStatus != ''">and t.f_status = #{fStatus}</if>
+            <if test="createBy != null  and createBy != ''">and t.create_by = #{createBy}</if>
             <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
                 and t.create_time &gt;= #{cLoadDate[0]}
             </if>
@@ -69,13 +73,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and t.create_time &lt;= #{cLoadDate[1]}
             </if>
         </where>
+        ORDER BY  CONVERT(t.f_name USING gbk) asc
     </select>
-    
+
     <select id="selectTCntrById" parameterType="Long" resultMap="TCntrResult">
         <include refid="selectTCntrVo"/>
         where f_id = #{fId}
     </select>
-        
+
     <insert id="insertTCntr" parameterType="TCntr">
         insert into t_cntr
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -95,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">update_by,</if>
             <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
-         </trim>
+        </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="fId != null">#{fId},</if>
             <if test="fType != null">#{fType},</if>
@@ -113,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="updateBy != null">#{updateBy},</if>
             <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
-         </trim>
+        </trim>
     </insert>
 
     <update id="updateTCntr" parameterType="TCntr">
@@ -143,10 +148,57 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </delete>
 
     <delete id="deleteTCntrByIds" parameterType="String">
-        delete from t_cntr where f_id in 
+        delete from t_cntr where f_id in
         <foreach item="fId" collection="array" open="(" separator="," close=")">
             #{fId}
         </foreach>
     </delete>
-    
+    <select id="selectRcntrName" parameterType="TCntr" resultType="map">
+        SELECT
+        f_id as fId,
+        f_no as fNo
+        FROM
+        t_cntr
+        <where>
+            f_status = 'T'
+            <if test="fNo != null  and fNo != ''">and f_no like concat('%', #{fNo}, '%')</if>
+        </where>
+        ORDER BY  CONVERT(f_name USING gbk) asc
+    </select>
+    <select id="selectTCntrFNo" resultType="string">
+        SELECT DISTINCT
+	        f_no
+        FROM
+	    t_cntr
+	    where f_status = 'T'
+	    ORDER BY  CONVERT(f_name USING gbk) asc
+    </select>
+    <select id="selectRcntrFId" parameterType="TCntr" resultType="long">
+        SELECT
+        f_id as fId
+        FROM
+        t_cntr
+        where f_no = #{fNo}
+        and f_status = 'T'
+        ORDER BY  CONVERT(f_name USING gbk) asc
+    </select>
+    <select id="selectTcnrFno" parameterType="object" resultType="string">
+        SELECT
+            f_no
+        FROM
+        t_cntr
+        WHERE
+        f_no = #{fNo}
+        ORDER BY  CONVERT(f_name USING gbk) asc
+    </select>
+    <select id="selectTcnrFName" parameterType="object" resultType="string">
+        SELECT
+            f_no
+        FROM
+        t_cntr
+        WHERE
+        f_name = #{fName}
+        ORDER BY  CONVERT(f_name USING gbk) asc
+    </select>
+
 </mapper>

+ 182 - 3
ruoyi-shipping/src/main/resources/mapper/shipping/TCntrnoMapper.xml

@@ -24,7 +24,7 @@
     </resultMap>
 
     <sql id="selectTCntrnoVo">
-        select f_id, f_no, f_typeid, f_owner, f_source, f_rent, f_updatetime, f_updateaddress, f_updateEF, f_cntrstatus, f_status, create_by, create_time, update_by, update_time, remark from t_cntrno
+        select f_id, f_no, f_typeid, f_owner, f_source, f_rent, f_updatetime, f_updateaddress, f_updateEF, f_cntrstatus, case when f_status = 'T' then '正常' else '停用' end as f_status, create_by, create_time, update_by, update_time, remark from t_cntrno
     </sql>
 
     <select id="selectTCntrnoList" parameterType="TCntrno" resultMap="TCntrnoResult">
@@ -40,12 +40,119 @@
             <if test="fUpdateef != null  and fUpdateef != ''">and f_updateEF = #{fUpdateef}</if>
             <if test="fCntrstatus != null  and fCntrstatus != ''">and f_cntrstatus = #{fCntrstatus}</if>
             <if test="fStatus != null  and fStatus != ''">and f_status = #{fStatus}</if>
+            <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and create_time &lt;= #{cLoadDate[1]}
+            </if>
         </where>
     </select>
+    <select id="selectTcntrnoMessage" parameterType="TCntrno" resultMap="TCntrnoResult">
+        SELECT
+        tc.f_id,
+        tc.f_no,
+        tc.f_typeid,
+        t.f_no typeidName,
+        t.f_cntrsize cntrsize,
+        prs.dict_label cntrsizeName,
+        tc.f_owner,
+        pro.dict_label ownerName,
+        tc.f_source,
+        sd.dict_label sourceName,
+        tc.f_rent,
+        sdd.dict_label rentName,
+        tc.f_updatetime,
+        tc.f_updateaddress,
+        tc.f_updateEF,
+        sdda.dict_label updateEFName,
+        tc.f_cntrstatus,
+        pr.dict_label cntrstatusName,
+        case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
+        tc.create_by,
+        tc.create_time,
+        tc.update_by,
+        tc.update_time,
+        tc.remark
+        FROM
+        t_cntrno tc
+        LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
+        AND pro.dict_type = 'f_owner'
+        LEFT JOIN sys_dict_data sd ON sd.dict_value = tc.f_source
+        AND sd.dict_type = 'f_source'
+        LEFT JOIN sys_dict_data sdd ON sdd.dict_value = tc.f_rent
+        AND sdd.dict_type = 'f_rent'
+        LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
+        AND sdda.dict_type = 'f_updateEF'
+        LEFT JOIN sys_dict_data pr ON pr.dict_value = tc.f_cntrstatus
+        AND pr.dict_type = 'f_cntrstatus'
+        LEFT JOIN t_cntr t ON tc.f_typeid = t.f_id
+        LEFT JOIN sys_dict_data prs ON prs.dict_value = t.f_cntrsize
+        AND prs.dict_type = 'f_cntrsize'
+        <where>
+            <if test="fNo != null  and fNo != ''">and tc.f_no = #{fNo}</if>
+            <if test="fTypeid != null ">and tc.f_typeid = #{fTypeid}</if>
+            <if test="fOwner != null  and fOwner != ''">and tc.f_owner = #{fOwner}</if>
+            <if test="fSource != null  and fSource != ''">and tc.f_source = #{fSource}</if>
+            <if test="fRent != null  and fRent != ''">and tc.f_rent = #{fRent}</if>
+            <if test="fUpdatetime != null ">and tc.f_updatetime = #{fUpdatetime}</if>
+            <if test="fUpdateaddress != null  and fUpdateaddress != ''">and tc.f_updateaddress = #{fUpdateaddress}</if>
+            <if test="fUpdateef != null  and fUpdateef != ''">and tc.f_updateEF = #{fUpdateef}</if>
+            <if test="fCntrstatus != null  and fCntrstatus != ''">and tc.f_cntrstatus = #{fCntrstatus}</if>
+            <if test="fStatus != null  and fStatus != ''">and tc.f_status = #{fStatus}</if>
+            <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and tc.create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and tc.create_time &lt;= #{cLoadDate[1]}
+            </if>
+        </where>
+        ORDER BY  CONVERT(tc.f_name USING gbk) asc
+    </select>
 
     <select id="selectTCntrnoById" parameterType="Long" resultMap="TCntrnoResult">
-        <include refid="selectTCntrnoVo"/>
-        where f_id = #{fId}
+        SELECT
+        tc.f_id,
+        tc.f_no,
+        tc.f_typeid,
+        t.f_name typeidName,
+		t.f_cntrsize cntrsize,
+		prs.dict_label cntrsizeName,
+        tc.f_owner,
+        pro.dict_label ownerName,
+        tc.f_source,
+        sd.dict_label sourceName,
+        tc.f_rent,
+        sdd.dict_label rentName,
+        tc.f_updatetime,
+        tc.f_updateaddress,
+        tc.f_updateEF,
+        sdda.dict_label updateEFName,
+        tc.f_cntrstatus,
+        pr.dict_label cntrstatusName,
+        case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
+        tc.create_by,
+        tc.create_time,
+        tc.update_by,
+        tc.update_time,
+        tc.remark
+        FROM
+        t_cntrno tc
+        LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
+        AND pro.dict_type = 'f_owner'
+        LEFT JOIN sys_dict_data sd ON sd.dict_value = tc.f_source
+        AND sd.dict_type = 'f_source'
+        LEFT JOIN sys_dict_data sdd ON sdd.dict_value = tc.f_rent
+        AND sdd.dict_type = 'f_rent'
+        LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
+        AND sdda.dict_type = 'f_updateEF'
+        LEFT JOIN sys_dict_data pr ON pr.dict_value = tc.f_cntrstatus
+        AND pr.dict_type = 'f_cntrstatus'
+        LEFT JOIN t_cntr t ON tc.f_typeid = t.f_id
+		LEFT JOIN sys_dict_data prs ON prs.dict_value = t.f_cntrsize
+        AND prs.dict_type = 'f_cntrsize'
+        where tc.f_id = #{fId}
+        ORDER BY  CONVERT(tc.f_name USING gbk) asc
     </select>
 
     <insert id="insertTCntrno" parameterType="TCntrno">
@@ -129,5 +236,77 @@
             #{fId}
         </foreach>
     </update>
+    <!--获取集装动态分布信息 -->
+    <select id="getTCntrnoMessage" parameterType="string" resultType="map">
+	    SELECT
+	container.*,
+	box.`空`,
+	box.`重`,
+	car.`好`,
+	car.`坏`
+FROM
+	(
+	SELECT
+		tt.f_updateaddress AS 地点,
+		${sql}
+	FROM
+		(
+		SELECT
+			tc.f_updateaddress f_updateaddress,
+			tc.typeidCount typeidCount,
+			t.f_no f_no
+		FROM
+			( SELECT f_updateaddress, f_typeid, COUNT( 1 ) typeidCount FROM t_cntrno GROUP BY f_updateaddress, f_typeid ) tc
+			LEFT JOIN t_cntr t ON tc.f_typeid = t.f_id
+		) tt
+	GROUP BY
+		tt.f_updateaddress
+	) container
+	LEFT JOIN (
+	SELECT
+		a.f_updateaddress,
+		MAX( CASE WHEN a.dict_label = '空' THEN a.efCount ELSE 0 END ) AS 空,
+		MAX( CASE WHEN a.dict_label = '重' THEN a.efCount ELSE 0 END ) AS 重
+	FROM
+		(
+		SELECT
+			tc.f_updateaddress f_updateaddress,
+			tc.f_updateEF f_updateEF,
+			tc.efCount efCount,
+			sdda.dict_label dict_label
+		FROM
+			( SELECT f_updateaddress, f_updateEF, COUNT( 1 ) efCount FROM t_cntrno GROUP BY f_updateaddress, f_updateEF ) tc
+			LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
+			AND sdda.dict_type = 'f_updateEF'
+		) a
+	GROUP BY
+		a.f_updateaddress
+	) box ON container.地点 = box.f_updateaddress
+	LEFT JOIN (
+	SELECT
+		b.f_updateaddress,
+		MAX( CASE WHEN b.dict_label = '好' THEN b.statusCount ELSE 0 END ) AS 好,
+		MAX( CASE WHEN b.dict_label = '坏' THEN b.statusCount ELSE 0 END ) AS 坏
+	FROM
+		(
+		SELECT
+			tc.f_updateaddress f_updateaddress,
+			tc.f_cntrstatus f_cntrstatus,
+			tc.statusCount statusCount,
+			sdda.dict_label dict_label
+		FROM
+			( SELECT f_updateaddress, f_cntrstatus, COUNT( 1 ) statusCount FROM t_cntrno GROUP BY f_updateaddress, f_cntrstatus ) tc
+			LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_cntrstatus
+			AND sdda.dict_type = 'f_cntrstatus'
+		) b
+	GROUP BY
+	b.f_updateaddress
+	) car ON container.地点 = car.f_updateaddress
+	<where>
+        <if test="tCntrno.fUpdateaddress != null and tCntrno.fUpdateaddress != ''">
+        container.地点 =  like concat('%', #{tCntrno.fUpdateaddress}, '%')</if>
+    </where>
+   </select>
+
 
 </mapper>

+ 53 - 12
ruoyi-shipping/src/main/resources/mapper/shipping/TCntrtrackingMapper.xml

@@ -29,20 +29,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectTCntrtrackingList" parameterType="TCntrtracking" resultMap="TCntrtrackingResult">
-        <include refid="selectTCntrtrackingVo"/>
+        SELECT
+        tc.f_id,
+        tc.f_no,
+        tc.f_typeid,
+        tc.f_mblno,
+        t.f_no typeidName,
+        t.f_cntrsize,
+        prs.dict_label cntrsizeName,
+        tc.f_owner,
+        pro.dict_label ownerName,
+        tc.f_vsl,
+        tc.f_voy,
+        tc.f_updatetime,
+        tc.f_updateaddress,
+        tc.f_updateEF,
+        sdda.dict_label updateEFName,
+        tc.f_cntrstatus,
+        pr.dict_label cntrstatusName,
+        case when tc.f_status = 'T' then '正常' else '停用' end as f_status,
+        tc.create_by,
+        tc.create_time,
+        tc.update_by,
+        tc.update_time,
+        tc.remark
+        FROM
+        t_cntrtracking tc
+        LEFT JOIN sys_dict_data pro ON pro.dict_value = tc.f_owner
+        AND pro.dict_type = 'f_owner'
+        LEFT JOIN sys_dict_data sdda ON sdda.dict_value = tc.f_updateEF
+        AND sdda.dict_type = 'f_updateEF'
+        LEFT JOIN sys_dict_data pr ON pr.dict_value = tc.f_cntrstatus
+        AND pr.dict_type = 'f_cntrstatus'
+        LEFT JOIN t_cntr t ON tc.f_typeid = t.f_id
+        LEFT JOIN sys_dict_data prs ON prs.dict_value = t.f_cntrsize
+        AND prs.dict_type = 'f_cntrsize'
         <where>  
-            <if test="fNo != null  and fNo != ''"> and f_no = #{fNo}</if>
-            <if test="fMblno != null  and fMblno != ''"> and f_mblno = #{fMblno}</if>
-            <if test="fTypeid != null "> and f_typeid = #{fTypeid}</if>
-            <if test="fOwner != null  and fOwner != ''"> and f_owner = #{fOwner}</if>
-            <if test="fVsl != null  and fVsl != ''"> and f_vsl = #{fVsl}</if>
-            <if test="fVoy != null  and fVoy != ''"> and f_voy = #{fVoy}</if>
-            <if test="fUpdatetime != null "> and f_updatetime = #{fUpdatetime}</if>
-            <if test="fUpdateaddress != null  and fUpdateaddress != ''"> and f_updateaddress = #{fUpdateaddress}</if>
-            <if test="fUpdateef != null  and fUpdateef != ''"> and f_updateEF = #{fUpdateef}</if>
-            <if test="fCntrstatus != null  and fCntrstatus != ''"> and f_cntrstatus = #{fCntrstatus}</if>
-            <if test="fStatus != null  and fStatus != ''"> and f_status = #{fStatus}</if>
+            <if test="fNo != null  and fNo != ''"> and tc.f_no = #{fNo}</if>
+            <if test="fMblno != null  and fMblno != ''"> and tc.f_mblno = #{fMblno}</if>
+            <if test="fTypeid != null "> and tc.f_typeid = #{fTypeid}</if>
+            <if test="fOwner != null  and fOwner != ''"> and tc.f_owner = #{fOwner}</if>
+            <if test="fVsl != null  and fVsl != ''"> and tc.f_vsl = #{fVsl}</if>
+            <if test="fVoy != null  and fVoy != ''"> and tc.f_voy = #{fVoy}</if>
+            <if test="fUpdatetime != null "> and tc.f_updatetime = #{fUpdatetime}</if>
+            <if test="fUpdateaddress != null  and fUpdateaddress != ''"> and tc.f_updateaddress = #{fUpdateaddress}</if>
+            <if test="fUpdateef != null  and fUpdateef != ''"> and tc.f_updateEF = #{fUpdateef}</if>
+            <if test="fCntrstatus != null  and fCntrstatus != ''"> and tc.f_cntrstatus = #{fCntrstatus}</if>
+            <if test="fStatus != null  and fStatus != ''"> and tc.f_status = #{fStatus}</if>
+            <if test='cLoadDate != null and cLoadDate[0] != null and cLoadDate[0]!= ""'>
+                and tc.create_time &gt;= #{cLoadDate[0]}
+            </if>
+            <if test='cLoadDate != null and cLoadDate[1] != null and cLoadDate[1]!= ""'>
+                and tc.create_time &lt;= #{cLoadDate[1]}
+            </if>
         </where>
+        ORDER BY  CONVERT(tc.f_name USING gbk) asc
     </select>
     
     <select id="selectTCntrtrackingById" parameterType="Long" resultMap="TCntrtrackingResult">

+ 8 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java

@@ -35,6 +35,14 @@ public interface SysDictDataMapper
      * @return 字典标签
      */
     public String selectDictLabel(@Param("dictType") String dictType, @Param("dictValue") String dictValue);
+    /**
+     * 根据字典类型和字典键值查询字典数据信息
+     *
+     * @param dictType 字典类型
+     * @param dictLabel 字典键值
+     * @return 字典标签
+     */
+    public String selectDictValue(@Param("dictType") String dictType, @Param("dictLabel") String dictLabel);
 
     /**
      * 根据字典数据ID查询信息

+ 4 - 0
ruoyi-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -50,6 +50,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		select dict_label from sys_dict_data
 		where dict_type = #{dictType} and dict_value = #{dictValue}
 	</select>
+	<select id="selectDictValue" resultType="String">
+		select dict_value from sys_dict_data
+		where dict_type = #{dictType} and dict_label = #{dictLabel}
+	</select>
 
 	<select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult">
 		<include refid="selectDictDataVo"/>